Take the 2-minute tour ×

I need this for the build server - I'd like to avoid installing full Visual Studio there.

I use the newest v12 MSBuild to build the solution with the app. Installing .NET Framework 4.5.1 and Windows 8.1 SDK got me through several compilation errors. With all that installed, right now, I get this:

error MSB4019: The imported project "C:\Program Files (x86)\MSBuild\Microsoft\WindowsXaml\v12.0\Microsoft.Windows.UI.Xaml.CSharp.targets" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk.

The targets file is present on my development machine with Visual Studio 2013 installed, so I guess it got there with VS 2013. When I tried to paste the whole folder to the build machine (I know, a stupid thing to do), I got the following compilation warnings and errors:

warning MSB3644: The reference assemblies for framework ".NETCore,Version=v4.5.1" were not found. To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed.

XamlCompiler error WMC1006: Cannot resolve Assembly or Windows Metadata file 'System.Runtime.dll'

Xaml Internal Error error WMC9999: Type universe cannot resolve assembly: System.Runtime, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a.

Obviously, copying and pasting stuff around is not a way to go. Is there some proper approach to achieve what I want?

EDIT: The build machine has Windows Server 2012 installed, not Windows 8.1. Could that be a problem?

EDIT 2: After comparing outputs of msbuilds executed both on development machine and build server, I've noticed that the folder C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETCore\v4.5.1 is missing from the build machine (there is only 4.5 folder). After pasting it, I got the following error:

CompileXaml error WMC9998: XBF generation failure due to missing Windows 8.1 Support, Set property <DisableXbfGeneration>true</DisableXbfGeneration> in your Project file and try again.

There is still something missing from the Windows 8.1 toolchain...

share|improve this question
Why all those downvotes? Please, share your thoughts instead - us there some way I could further improve the question? –  Nikola Anusev Jan 14 at 22:05
First of all, Windows Server 2012 R2 is the equivalent of Windows 8.1. Make sure that you've upgraded to R2. –  Nate Diamond Jan 15 at 18:53
@NateDiamond You are right, the machine has indeed only 2012 installed, not 2012R2. I'll try upgrading it ASAP. –  Nikola Anusev Jan 15 at 19:06
Worked for me on R2 with vs express and the sdk installed. –  Dax Fohl Jun 4 at 0:44

3 Answers 3

up vote 2 down vote accepted

Since it's a windows store app, and Windows Server 2012 doesn't have an app store, I'd say the libraries needed in order to compile the app are just missing from the OS itself. I suggest running tracer on a windows 8.1 box to see what files are accessed during compilation, and copy them to the server. I'm not certain that this will work, but it's the likeliest scenario I can think of. You can use something like Process Monitor for this See what files/registry keys are being accessed by application in Windows Alternatively, you might want to monitor the temporary build folder in .net to see what assemblies get copied locally during the build.

EDIT: Microsoft doesn't officially support this http://msdn.microsoft.com/en-us/library/windows/apps/br211384.aspx

share|improve this answer
I am keeping the ProcMon idea as a last resort, I'd really like to avoid going through thousands of events. As for the lack of official support from Microsoft, what leads you to believe that is the case? From that MSDN link, closest I could find was "In addition, developer licenses aren't available for Windows Server 2012, so you can't develop Windows Store apps on that operating system.". But I believe that's just about actually developing apps (like executing and debugging them), not compiling - you don't need a dev licence to compile the app. –  Nikola Anusev Jan 15 at 19:13
Correct about the article, that's the first thing that led me to the conclusion that the compiler depends on libraries within the OS itself. They also don't support compiling these apps on Windows 7, which means they need something not available in the development tools alone. Depending on your licensing/use, aside from manually copying all the dlls the compiler references, the best alternative is to run a windows 8 in a VM if you install the Hyper-V role. If you have at least Windows 2012 Standard, their licensing should allow running it on the same license. –  Alexandru Puiu Jan 15 at 19:35
Lastly, worth a try using a Windows 8.1 box/Visual Studio 2013 to compile the app once, setting all the referenced libraries to Copy Local. –  Alexandru Puiu Jan 15 at 19:36

I just did this a few weeks ago for a Windows 8 store app so it should be the same for Windows 8.1. As long as the build machine is running Windows 8.1, All you should need to do is install the latest Visual Studio Express for Windows Store Apps on the build machine and you should be fine. It should install everything you need.

share|improve this answer
Actually, the build machine is Windows Server 2012 (I've edited the question to include this). I realize that installing VS will probably make it work, but I would like to specifically know whether it's possible or not without VS. –  Nikola Anusev Jan 9 at 23:32
I was assuming you didn't want to waste a VS license on a build server, which was my case. In theory you should be able to copy everything since that is what the installer is doing. –  Jon Jan 9 at 23:40
I've tried it and it's not possible to install VS Express for Store Apps to Windows Server 2012. It says I need a newer version of the OS - according to the visualstudio.com/products/visual-studio-express-vs, it's only compatible with Win 8.1. Regarding copying, I am not sure what else should I copy - as I mention in the OP, I've already copied folder with targets file and it's not enough. –  Nikola Anusev Jan 10 at 21:39

Did you download and install Microsoft Build Tools 2013 on the build server? The v12 version of MsBuild is now released as part of Visual Studio (instead of the Microsoft.NET Framework) and you'd want to use this separate install to get the MsBuild v12 bits on your build server.

share|improve this answer
Yeah, I did. As I mention in the question, I installed MSBuild v12 and Windows 8.1 SDK. –  Nikola Anusev Jan 10 at 21:39

Your Answer


