Search code examples
msbuilduwpbuild-server

Build UWP apps/library on build server


I tried build UWP library on build server with MSBuild 2015 Tools. I have installed Windows 10 SDK and other needed tools, but I haven't Visual Studio 2015. When I try build with this command:

msbuild mySolution.sln /t:Rebuild/p:Configuration=Release;Platform=x86;AppxBundlePlatforms=x86;AppxBundle=Always

or try this examples: compilebuild-the-uwp-project-from-command-line, is still not working and I got errors:

...
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
...

When I install VS, everything is ok, but I don't want install VS on build server.

Is it possible build UWP library/apps without Visual Studio?


Solution

  • pack and restore are now msbuild targets (2017). try msbuild /t:restore and then msbuild. Run this from a admin cmd prompt