ElChino
2016-01-12 12:58:52 UTC
Hello group.
I'm a complete neophyte when it comes to .Net/C#, but
have the need to build an old project from a .csproj
file.
My question is how to pass arguments like '/unsafe+' to
csc.exe in such a .csproj file?
I tried using a build.bat file with stuff like:
setlocal
set EXTRA_DIRS=..\src;..\src\Common
set UseEnv=True
set LIB=%LIB%;%EXTRA_DIRS%
msbuild -nologo -property:Configuration=Release the-project.csproj
The build seems to pickup those %EXTRA_DIRS%; from the MSbuild.log:
Task "Csc"
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Csc.exe /noconfig
/lib:..\src,..\src\Common /nowarn:1701,1702
But how do I pass in '/unsafe+' in a similar manner?
BTW. Is there another env-var besides %LIB that is more suited?
I'm a complete neophyte when it comes to .Net/C#, but
have the need to build an old project from a .csproj
file.
My question is how to pass arguments like '/unsafe+' to
csc.exe in such a .csproj file?
I tried using a build.bat file with stuff like:
setlocal
set EXTRA_DIRS=..\src;..\src\Common
set UseEnv=True
set LIB=%LIB%;%EXTRA_DIRS%
msbuild -nologo -property:Configuration=Release the-project.csproj
The build seems to pickup those %EXTRA_DIRS%; from the MSbuild.log:
Task "Csc"
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Csc.exe /noconfig
/lib:..\src,..\src\Common /nowarn:1701,1702
But how do I pass in '/unsafe+' in a similar manner?
BTW. Is there another env-var besides %LIB that is more suited?