我有以下问题:
我正在使用 CakeBuild 在 Windows 计算机 (Windows 10) 上构建我的 Xamarin.Forms 解决方案。
当我使用以下命令时,一切都很好:
MSBuild("MyXamarinApp.sln", configurator =>
configurator.SetConfiguration("Debug")
.SetMSBuildPlatform(MSBuildPlatform.x86));
但是,如果我删除“SetMSBuildPlatform(MSBuildPlatform.x86)”,它会在内部使用“MSBuildPlatform.x64”,然后我会收到以下错误:
(_GetReferenceAssemblyPaths target) ->
C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(566,2): error MSB3644: The reference assemblies for framework "MonoAndroid,Version=v1.0" were not found. To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed. Note that assemblies will be resolved from the Global Assembly Cache (GAC) and will be used in place of reference assemblies. Therefore your assembly may not be correctly targeted for the framework you intend.
有人可以解释这种行为吗?我只能使用 x86 版本的 MSBuild 来构建 Xamarin 项目吗?