How to build and package UWP project with AppService?


I have an app composed of three projects:

  • UWP app
  • .NET Framework 4.7.2 console app (Full thrust App service)
  • Packaging

They build just fine in VisualStudio in debug and release.

When building using MsBuild 2019 v16.4.2 or publishing with Visual Studio, the two first projects build fine but there is these errors when trying to build the packaging project:

error PRI175 : 0x8007000b - Processing Resources failed with error : An attempt was made to load a program with an incorrect format. [d:\workspace\App_master\Packaging.wapproj]         
GENERATEPROJECTPRIFILE : error PRI222: 0xdef00001 - Unspecified error occurred. [d:\workspace\App_master\Packaging.wapproj]

Here are the flag used with MsBuild:


All three projects target x64

asked on Stack Overflow Dec 19, 2019 by mbellych • edited Jan 6, 2020 by mbellych

1 Answer


try and set any projects that contain 32 bit nuget packages to AnyCPU in project settings. It works on and off for me. This is quite annoying but atleast slow is better than nothing =) If i find a better work around, I'll edit.

User contributions licensed under CC BY-SA 3.0