UWP Package not working after upgrading Visual studio

Sumit Gupta 46 Reputation points
2021-05-27T16:46:12.537+00:00

Today, I update from Visual studio 16.9 Community Edition to Visual Studio 16.10 Community Edition. But as upgrade finish my project stop working, I have an UWP app with Package project in solution and it was all working. But since upgrade it stop creating Package file for sideload distribution. We are getting following error:

System.Runtime.InteropServices.COMException (0x80070716): The specified resource name cannot be found in the image file. (Exception from HRESULT: 0x80070716)
at Microsoft.VisualStudio.Deployment.AppxFactory.CreatePackageReader(IStream inputStream)
at Microsoft.VisualStudio.Deployment.AppxInteropHelpers.GetAppxManifestReader3(String appxFilePath)
at Microsoft.Build.AppxPackage.AppxPackageFile.ReadAppxPackageFile()
at Microsoft.Build.AppxPackage.GenerateAppInstallerFile.AddPackageDependencies(XElement dependenciesRoot)
at Microsoft.Build.AppxPackage.GenerateAppInstallerFile.AddDependenciesIfNecessary(XElement element)
at Microsoft.Build.AppxPackage.GenerateAppInstallerFile.CreateAppInstallerFile(String uri, Boolean addOnLaunchUpdateCheck)
at Microsoft.Build.AppxPackage.GenerateAppInstallerFile.ExecuteImplementation() Package C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VisualStudio\v16.0\AppxPackage\Microsoft.AppXPackage.Targets 6362

After the failure I try to run the Code on VS 16.7 and it compile thre just fine, but not on machine with Windows 10, 64bit, 21H! with VS 16.10 .. Please suggest what should I change fix to make it working again.

Developer technologies | Universal Windows Platform (UWP)
{count} votes

2 answers

Sort by: Most helpful
  1. Burton Rodman 1 Reputation point
    2021-06-07T19:52:45.903+00:00

    Confirmed that 16.10 has BROKEN Appx build. After downgrading to 16.9.3 (which is the only 16.9.x version that would install without download errors), my project builds again (unchanged).

    0 comments No comments

  2. simon 1 Reputation point
    2021-06-21T10:04:31.063+00:00

    A Visual Studio update has been released and it seems the error is resolved.

    https://learn.microsoft.com/en-us/visualstudio/releases/2019/release-notes#16.10.2

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.