I need use xbuild command to build csproj to one file[test.il].
error message is [MSBUILD: error MSBUILD0004: Too many project files specified].
what mean about this error message? and how to solve?
@ECHO OFF
SET PATH=c:\MinGw\bin;c:\mono-3.2.3\bin;%PATH%
SET DMCS="C:\mono-3.2.3\lib\mono\4.5\xbuild.exe"
mono --runtime=v4.0.30319 %DMCS% -unsafe+ -o+ -sdk:4.5 -target:exe -out:test.il H:\Csharp\Mono\Test\TestBuild\TestBuild\ConsoleApplication1\ConsoleApplication1.csproj
mono --runtime=v4.0.30319 %DMCS% -unsafe+ -o+ -sdk:4.5 -target:exe -out:test.il H:\\Csharp\\Mono\\Test\\TestBuild\\TestBuild\\ConsoleApplication1\\ConsoleApplication1.csproj
This command is mixing up invocation of xbuild
with *mcs
. The arguments that you are passing to the exe like -unsafe+ -o+ -sdk:4.5 -target:exe -out:test.il
are meant for mcs
and not xbuild. Just use xbuild.bat
script (probably in C:\\mono-3.2.3\\bin\\xbuild.bat
) or change what you have to:
mono C:\\mono-3.2.3\\lib\\mono\\4.5\\xbuild.exe H:\\Csharp\\Mono\\Test\\TestBuild\\TestBuild\\ConsoleApplication1\\ConsoleApplication1.csproj
xbuild
不使用安装的xbuild
shell脚本的情况下运行xbuild
:
mono $MONO_OPTIONS C:\mono-3.2.3\lib\mono\4.5\xbuild.exe yourproject.csproj
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.