I have an app composed of three projects:
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:
/p:AppxPackageSigningEnabled=false
/p:AppxBundle=Always
/p:UapAppxPackageBuildMode=SideloadOnly
/p:AppxPackageDir="\$(Build.ArtifactStagingDirectory)\AppxPackages\\"
/p:AppxBundlePlatforms="x64"
All three projects target x64
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