我正在尝试使用 xbuild 构建一个 MonoTouch 项目(显然是在 Mac 上)。这是我的 xbuild 项目:
<Project DefaultTargets="Application" ToolsVersion="3.5" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ApplicationProjectFilePath>..\TestApp\TestApp.csproj</ApplicationProjectFilePath>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<MonoTouchReferencePath>/Developer/MonoTouch/usr/lib/mono/2.1/</MonoTouchReferencePath>
</PropertyGroup>
<Target Name="Application">
<MSBuild Projects="$(ApplicationProjectFilePath)" Targets="Rebuild" Properties="Configuration=AdHoc;Platform=iPhone;ReferencePath=$(MonoTouchReferencePath)" ToolsVersion="3.5"/>
</Target>
</Project>
当我运行它时,我收到以下警告:
/Library/Frameworks/Mono.framework/Versions/2.6.7/lib/mono/3.5/Microsoft.Common.targets: warning : Found a conflict between : 'System.Core, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' and 'System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. Using 'System.Core, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' reference.
我怎样才能拥有框架的 xbuild 参考 v3.5?正如您从脚本中看到的那样,我尝试了多种方法,但似乎都没有奏效。
[另外,我不确定为什么我必须明确引用 monotouch.dll 库——因为它在项目文件 (TestApp.csproj) 中被引用。对此的任何评论也将不胜感激。]