2014-04-02 60 views
1

Xbuild [Xamarin工作室]在Mac OS XXamarin - 使用xbuild建立與xamarin一組元添加項目

我想建立一個解決方案&(Visual Studio項目文件)的csproj使用xbuild。 此解決方案包含一個項目 - 這不是啓動項目,並且引用了Newtonsoft [使用xamarin組件添加]請注意組件標記爲「包含在此項目中」。

該解決方案和項目在Xamarin中很好地構建,但是在刪除整個解決方案及其文件時。現在,使用團隊城下載項目,然後用Xbuild建立相同的解決方案和項目都失敗王氏以下錯誤信息:

我已經附加了錯誤信息的快照

[18:01:48] [Step 3/4] ../../../../NESQuestionFramework/NESQuestionFramework/Model/Evidence/EvidenceNotRequired.cs(1,7): error CS0246: The type or namespace name `Newtonsoft' could not be found. Are you missing an assembly reference? 

[18:01:48] [Step 3/4] ../../../../NESQuestionFramework/NESQuestionFramework/Model/Evidence/PhotoEvidence.cs(1,7): error CS0246: The type or namespace name `Newtonsoft' could not be found. Are you missing an assembly reference? 

[18:01:48] [Step 3/4] ../../../../NESQuestionFramework/NESQuestionFramework/Model/Evidence/TextEvidence.cs(1,7): error CS0246: The type or namespace name `Newtonsoft' could not be found. Are you missing an assembly reference? 

[18:01:48] [Step 3/4] ../../../../NESQuestionFramework/NESQuestionFramework/Model/Questions/BoundedQuestion.cs(3,7): error CS0246: The type or namespace name `Newtonsoft' could not be found. Are you missing an assembly reference? 

[18:01:48] [Step 3/4] ../../../../NESQuestionFramework/NESQuestionFramework/Model/Questions/ExtendedInfoQuestion.cs(11,7): error CS0246: The type or namespace name `Newtonsoft' could not be found. Are you missing an assembly reference? 

[18:01:48] [Step 3/4] ../../../../NESQuestionFramework/NESQuestionFramework/Model/Questions/InfoItem.cs(4,7): error CS0246: The type or namespace name `Newtonsoft' could not be found. Are you missing an assembly reference? 

[18:01:48] [Step 3/4] ../../../../NESQuestionFramework/NESQuestionFramework/Model/Questions/MultiResponseQuestion.cs(11,7): error CS0246: The type or namespace name `Newtonsoft' could not be found. Are you missing an assembly reference? 

[18:01:48] [Step 3/4] ../../../../NESQuestionFramework/NESQuestionFramework/Model/Questions/Question.cs(11,7): error CS0246: The type or namespace name `Newtonsoft' could not be found. Are you missing an assembly reference? 

[18:01:48] [Step 3/4] ../../../../NESQuestionFramework/NESQuestionFramework/Model/Questions/QuestionSet.cs(2,7): error CS0246: The type or namespace name `Newtonsoft' could not be found. Are you missing an assembly reference? 

Xbuild不會嘗試和ValidateAndroidPackage路徑,但它不能找到Newtonsoft.Json軟件包。

 Target _ValidateAndroidPackageProperties: 

      GetAndroidPackageName Task 

       ManifestFile: 

       AssemblyName: NESQuestionFramework 

       PackageName: NESQuestionFramework.NESQuestionFramework 

     Target _AndroidResolveAssemblyReferences: 

/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets:警告:參考 'Newtonsoft.Json' 沒有解決

  For searchpath {CandidateAssemblyFiles} 

      Warning: {CandidateAssemblyFiles} not supported currently 

      For searchpath {HintPathFromItem} 

      Considered ../../Components/json.net-4.5.11/lib/android/Newtonsoft.Json.dll, but it does not exist. 

      For searchpath {TargetFrameworkDirectory} 

      Considered target framework dir /Library/Frameworks/Mono.framework/External/xbuild-frameworks/MonoAndroid/v4.0.3, assembly named 'Newtonsoft.Json' not found. 

      Considered target framework dir /Library/Frameworks/Mono.framework/External/xbuild-frameworks/MonoAndroid/v1.0, assembly named 'Newtonsoft.Json' not found. 

      Considered target framework dir /Library/Frameworks/Mono.framework/External/xbuild-frameworks/MonoAndroid/v1.0/Facades/, assembly named 'Newtonsoft.Json' not found. 

      For searchpath {PkgConfig} 

      Considered Newtonsoft.Json, but could not find in any pkg-config files. 

      For searchpath {GAC} 

      Considered Newtonsoft.Json, but could not find in the GAC. 

      For searchpath {RawFileName} 

      Considered '/Users/admin/Downloads/TeamCity/buildAgent/work/b998b8d1d0b0ff61/NESTouch/NESTouch.Android/NESQuestionFramework.Android/NESQuestionFramework.Android/Newtonsoft.Json' as a file, but the file does not exist 

      For searchpath bin/Debug/ 

      Considered '/Users/admin/Downloads/TeamCity/buildAgent/work/b998b8d1d0b0ff61/NESTouch/NESTouch.Android/NESQuestionFramework.Android/NESQuestionFramework.Android/bin/Debug/Newtonsoft.Json' as a file, but the file does not exist 

      Considered '/Users/admin/Downloads/TeamCity/buildAgent/work/b998b8d1d0b0ff61/NESTouch/NESTouch.Android/NESQuestionFramework.Android/NESQuestionFramework.Android/bin/Debug/Newtonsoft.Json.exe' as a file, but the file does not exist 

      Considered '/Users/admin/Downloads/TeamCity/buildAgent/work/b998b8d1d0b0ff61/NESTouch/NESTouch.Android/NESQuestionFramework.Android/NESQuestionFramework.Android/bin/Debug/Newtonsoft.Json.dll' as a file, but the file does not exist 

什麼將是解決這個問題的正確方法。 目前,我迫使開發人員登錄服務器,並使用xamarin studio [我相信會下載Newtonsoft]手動構建解決方案,然後每隔一段時間使用xbuild運行它。 非常感謝您的時間

拉傑什

+0

根據日誌,這是trign在../../Components/json找到Newtosoft.dll。 net-4.5.11/lib/android/Newtonsoft.Json.dll,因此確定該文件存在於此路徑中? – choper

+1

我有幾乎相同的問題,更新到json.net 6.0.2,現在,當我嘗試構建整個解決方案時,會發生這種情況。如果我單獨構建每個項目,它就可以工作在我使用6.0.1-beta1之前。 – user2320724

回答

0

這是有點老了,但我們使用來自的NuGet json.net(newtonsoft),它可以輕鬆地運行的NuGet上解決恢復。

作爲工作周圍,你可以從xamarin工作室,工作的罰款mdtool運行(有一些限制)

相關問題