windows – 以MONO Runtime为目标导致Xamarin Build失败

在Xamarin Studio中创建一个简单的.NET控制台应用程序后,如果默认的Target Runtime设置为“Microsoft .NET”,我可以构建/调试. 如果我将运行时设置为MONO(‘Mono 4.0.1’),那么我的项目就不再构建了. 错误是: Error: Unknown MSBuild failure. Please try bu

在Xamarin Studio中创建一个简单的.NET控制台应用程序后,如果默认的Target Runtime设置为“Microsoft .NET”,我可以构建/调试.

如果我将运行时设置为MONO(‘Mono 4.0.1’),那么我的项目就不再构建了.

错误是:

Error: Unknown MSBuild failure. Please try building the project again

构建输出窗口显示在显示的最后一行之前的所有内容
构建:1个错误,0个警告“:

以这种方式定位MONO Runtime无效吗?一个相关的问题here表明它是……

我究竟做错了什么?

运行Windows7(64位),Xamarin Studio 5.9. Mono 4.0.1,.NET 4.5

构建输出如下:

Cleaning Solution: XamarinTest (Debug)

Cleaning: XamarinTest (Debug)

Build started 05/08/2015 16:57:03.
__________________________________________________ Project “C:\Development\Test\XamarinTest\XamarinTest\XamarinTest.csproj”
(Clean target(s)): Target CoreClean: Deleting file
‘C:\Development\Test\XamarinTest\XamarinTest\obj\Debug.NETFramework,Version=v4.5.AssemblyAttribute.cs’
Deleting file
‘C:\Development\Test\XamarinTest\XamarinTest\bin\Debug\XamarinTest.dll.mdb’
Deleting file
‘C:\Development\Test\XamarinTest\XamarinTest\bin\Debug\XamarinTest.dll’
Deleting file
‘C:\Development\Test\XamarinTest\XamarinTest\obj\Debug\XamarinTest.dll’
Deleting file
‘C:\Development\Test\XamarinTest\XamarinTest\obj\Debug\XamarinTest.dll.mdb’
Deleting file
‘C:\Development\Test\XamarinTest\XamarinTest\obj\Debug\XamarinTest.csproj.FilesWrittenAbsolute.txt’
Done building project
“C:\Development\Test\XamarinTest\XamarinTest\XamarinTest.csproj”.

Build succeeded. 0 Error(s) 0 Warning(s)

Time Elapsed 00:00:00.1350135

Cleaning: XamConsole (Debug)

Build started 05/08/2015 16:57:04.
__________________________________________________ Project “C:\Development\Test\XamarinTest\XamConsole\XamConsole.csproj” (Clean
target(s)): Target CoreClean: Deleting file
‘C:\Development\Test\XamarinTest\XamConsole\obj\Debug\XamConsole.exe’
Done building project
“C:\Development\Test\XamarinTest\XamConsole\XamConsole.csproj”.

Build succeeded. 0 Warning(s) 0 Error(s)

Time Elapsed 00:00:00.0170017

Building Solution: XamarinTest (Debug)

Building: XamarinTest (Debug)

Build started 05/08/2015 16:57:04.
__________________________________________________ Project “C:\Development\Test\XamarinTest\XamarinTest\XamarinTest.csproj”
(Build target(s)): Target PrepareForBuild: Configuration: Debug
Platform: AnyCPU Target GenerateSatelliteAssemblies: No input
files were specified for target GenerateSatelliteAssemblies,skipping.
Target CoreCompile: Tool C:\Program Files
(x86)\Mono\lib\mono\4.5\mcs.exe execution started with arguments:
/noconfig /debug:full /debug+ /optimize-
/out:obj\Debug\XamarinTest.dll MyClass.cs Properties\AssemblyInfo.cs
obj\Debug.NETFramework,Version=v4.5.AssemblyAttribute.cs
/target:library /define:DEBUG /nostdlib /reference:”C:\Program Files
(x86)\Mono\lib\mono\4.5..\xbuild-frameworks.NETFramework\v4.5\RedistList……..\4.5\System.dll”
/reference:”C:\Program Files
(x86)\Mono\lib\mono\4.5..\xbuild-frameworks.NETFramework\v4.5\RedistList……..\4.5\System.Core.dll”
/reference:”C:\Program Files (x86)\Mono\lib\mono\4.5\mscorlib.dll”
/warn:4 Target DeployOutputFiles: Copying file from
‘C:\Development\Test\XamarinTest\XamarinTest\obj\Debug\XamarinTest.dll.mdb’
to
‘C:\Development\Test\XamarinTest\XamarinTest\bin\Debug\XamarinTest.dll.mdb’
Copying file from
‘C:\Development\Test\XamarinTest\XamarinTest\obj\Debug\XamarinTest.dll’
to
‘C:\Development\Test\XamarinTest\XamarinTest\bin\Debug\XamarinTest.dll’
Done building project
“C:\Development\Test\XamarinTest\XamarinTest\XamarinTest.csproj”.

Build succeeded. 0 Warning(s) 0 Error(s)

Time Elapsed 00:00:08.6528652

———————- Done ———————-

Build: 1 error,0 warnings

解决方法:取消选中“使用MSBUild构建引擎”复选框. (Project property => Build => General => Build engine“

它会工作.

作者: dawei

【声明】:永州站长网内容转载自互联网,其相关言论仅代表作者个人观点绝非权威,不代表本站立场。如您发现内容存在版权问题,请提交相关链接至邮箱:bqsm@foxmail.com,我们将及时予以处理。

为您推荐

联系我们

联系我们

0577-28828765

在线咨询: QQ交谈

邮箱: xwei067@foxmail.com

工作时间:周一至周五,9:00-17:30,节假日休息

返回顶部