我嘗試使用MSBuild 2015工具在構建服務器上構建UWP庫。我已經安裝了Windows 10 SDK和其它需要的工具,但我沒有的Visual Studio 2015年當我嘗試建立與此命令:在構建服務器上構建UWP應用程序/庫
msbuild mySolution.sln /t:Rebuild/p:Configuration=Release;Platform=x86;AppxBundlePlatforms=x86;AppxBundle=Always
或嘗試這方面的例子: compilebuild-the-uwp-project-from-command-line,仍然沒有工作,我得到了錯誤:
...
error CS0518: Predefined type 'System.Boolean' is not defined or imported
error CS0518: Predefined type 'System.Void' is not defined or imported
error CS0518: Predefined type 'System.Object' is not defined or imported
error CS0518: Predefined type 'System.Int32' is not defined or imported
error CS0518: Predefined type 'System.Void' is not defined or imported
error CS0518: Predefined type 'System.Boolean' is not defined or imported
error CS0518: Predefined type 'System.Boolean' is not defined or imported
...
當我安裝VS時,一切正常,但我不想安裝VS構建服務器上。
是否可以在沒有Visual Studio的情況下構建UWP庫/應用程序?
我認爲你首先需要做一次nuget恢復。認爲.net核心軟件包丟失 –
,這也是很好的文檔https://docs.microsoft.com/en-us/windows/uwp/packaging/auto-build-package-uwp-apps –
我試過用nuget restore ,但它沒有奏效。 – paulExe