473,239 Members | 1,629 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,239 software developers and data experts.

Compiling .Net application with unsafe code using MSbuild

Hi all

I need to adapt an Msbuild script to compile a visual studio 2005 solution
(including several projects and a website). The application is written in C#
and using .NET 2.0. Due to late changes the application uses unsafe code in
one project. Compiling in VS 2005 is no problem, however the build script
that we used no longer works. Unfortunately i dont not have any experience
in making build scripts using Msbuild. How does one add a compileroption
such as /unsafe? The msbuild description in msdn does not explicitly explain
this.

Thanks for any help

Greetings
Jan 10 '07 #1
2 11456
"Daniel Knöpfel" <dd****@iphch.chwrote in message
news:uL**************@TK2MSFTNGP04.phx.gbl...
Hi all

I need to adapt an Msbuild script to compile a visual studio 2005 solution
(including several projects and a website). The application is written in
C# and using .NET 2.0. Due to late changes the application uses unsafe
code in one project. Compiling in VS 2005 is no problem, however the build
script that we used no longer works. Unfortunately i dont not have any
experience in making build scripts using Msbuild. How does one add a
compileroption such as /unsafe? The msbuild description in msdn does not
explicitly explain this.
The Visual Studio 2005 project IS an MSBuild script. Just open the .csproj
file in a text editor and search for "unsafe" and you'll see what was added
to enable unsafe code. Or, just do:

msbuild yourproject.csproj


Jan 10 '07 #2
Hi

We stumbled over the solution. In the call to the msbuild script, the
parameter :AllowUnsafeBlocks=true has to be passed.
Our statement to call the msbuild process would then look like this:

MSBuild %~dp0Application\web.net\v4.03.01\eOurProject.proj
/p:AllowUnsafeBlocks=true;OutputDir=%~f1;TasksDir=% ~dp0;ConfigPath=%~f2;ConfigurationMode=%MODE%
/l:FileLogger,Microsoft.Build.Engine;logfile=%~dp0\ eOurProject.log
Regards

Daniel
"Daniel Knöpfel" <dd****@iphch.chwrote in message
news:uL**************@TK2MSFTNGP04.phx.gbl...
Hi all

I need to adapt an Msbuild script to compile a visual studio 2005 solution
(including several projects and a website). The application is written in
C# and using .NET 2.0. Due to late changes the application uses unsafe
code in one project. Compiling in VS 2005 is no problem, however the build
script that we used no longer works. Unfortunately i dont not have any
experience in making build scripts using Msbuild. How does one add a
compileroption such as /unsafe? The msbuild description in msdn does not
explicitly explain this.

Thanks for any help

Greetings

Jan 10 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: jojobar | last post by:
In vs.net 2005 you can build the entire website, entire solution or a single page. The project I am working on has more than 1000 pages spread over 50-60 directories. We work on one or two of the...
13
by: Dave Booker | last post by:
I need to compile a VS2005 project to run using the 1.1 framework (i.e., app.config containing <supportedRuntime version="v1.1.4322" /> ). (If I just compile and run with such a setting it...
2
by: bep | last post by:
I have a couple of web sites, some web services and some windows services that I need to deploy to our production servers. We used to use NANT with the VS 2003 applications. Now that we are using...
3
by: rockdale | last post by:
Hi, all Could somebody tells me where can I set "Allow unsafe code" in visual studio 2005. I could not find any Project Properties|Configuration Properties in my website solution. Mine appl...
0
by: Pucca | last post by:
Hi I'm using vs2005. I am getting a bunch of compiler warnings after I made some changes to my code that was compiling clean. I'm also getting memory errors when I run my program and it's...
0
by: Karel Kral | last post by:
Hello, I have medium-sized solution in VB.NET (70 000 lines). The project compiles ok under VS2005, without any errors, without any warnings. But when I compile the same solution under MSBuild...
3
by: Patrice | last post by:
Hi all, I'm currently upgrading a 1.1 application. We were using a command file to invoke the command line compiler to that we have the code behind compiled into multiple DLLs (to be able to...
5
by: Andy | last post by:
Hi, I have a question... I have some code which has an unsafe block in it. In VS2008 (Framework 3.5), i go to the project property and check the box that allows unsafe blocks. The code...
0
by: bpulimal | last post by:
We have a build machine that gets files for MSBuild from source control (SourceGear Vault). Occasionally, developers check in components and later decide to exclude those components from Visual...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.