shagufta syed
shagufta syed

Reputation: 471

MSBuild for my UWP app fails with Error BG1004, Error MC1002 and Error BG1003

MSBuild for my UWP App fails with below errors: 1. Error BG1004: Target Type 'appcontainerexe' is not supported by this task. 2. Error MC1002: Library project file cannot specify ApplicationDefinition element. 3. Error BG1003: The project file contains a property value that is not valid.

I am using a private build agent running as a service over a VM because I needed an SDK which was not present on VSTS.

I am not able to understand any of the errors. The .csproj file specifies output type as AppContainerExe because thats needed to run a UWP app. The App.xaml has output type as ApplicationDefinition and again thats needed because it is an entry point.

On my VM where my private build agent runs, I have installed VS 2015. Do I need to install anything else?

Upvotes: 1

Views: 1010

Answers (1)

Eddie Chen - MSFT
Eddie Chen - MSFT

Reputation: 29958

This is usually caused by the "Universal Windows App Development Tools" isn't installed when install the Visual Studio.

enter image description here

Install it on the build agent and then try the build again.

Upvotes: 2

Related Questions