Reputation: 33
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?
Upvotes: 3
Views: 763
Reputation: 481
pack and restore are now msbuild targets (2017). try msbuild /t:restore and then msbuild. Run this from a admin cmd prompt
Upvotes: 1
Reputation: 7233
Your need to ensure that the build machine runs <path_to_nuget.exe>\nuget.exe restore
on the solution folder before running the msbuild
command!
That will download all the nuget packages required by your solution!
Nuget.exe
is not part of Visual Studio or the Windows SDK, so you might have to download it to the server first (or ensure you have a build script that does that for you)
Upvotes: 1