The "ValidateAppxPackage" task failed unexpectedly

Viewed 852

While creating my export for Windows Store I am having this issue.

Simple export works fine but when I try to create a build for windows store I am having this error:

The "ValidateAppxPackage" task failed unexpectedly.
System.NullReferenceException: Object reference not set to an instance of an object.
   at Microsoft.Build.AppxPackage.ValidateAppxPackage.<>c.<CheckThatLanguagesAreSupported>b__85_0(XElement resource)
   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
   at System.Linq.Enumerable.Any[TSource](IEnumerable`1 source, Func`2 predicate)
   at Microsoft.Build.AppxPackage.ValidateAppxPackage.CheckThatLanguagesAreSupported()
   at Microsoft.Build.AppxPackage.ValidateAppxPackage.ExecuteImplementation()
   at Microsoft.Build.AppxPackage.AppxPackagingTaskHelper.Execute()
   at Microsoft.Build.AppxPackage.ValidateAppxPackage.Execute()
   at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
   at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext() SeedRateCalculator      

I don't know what to do. I am using VS 2015 and creating build of my Universal Windows App.

3 Answers

I'm getting the same problem on an App that has been in the store for years, I just fixed a bug, built new packages, run verification on VS2017 and I get this on the Bytecode generation tests, and so all subsequent tests also fail. So I deleted Package.StoreAssociation.xml and tried to re-associate the app with the store, but when I did that it did not create a new Package.StoreAssociation.xml. So I had to restore the old Package.StoreAssociation.xml, then re-associate the app with the store, and I see a bunch of updates, so clearly this needs to happen - seems broken that this didn't happen automatically when I created my store packages the first time. But this also didn't solve the problem, I still get this when trying to verify the app:

Bytecode generation

Error Found: The bytecode generation test detected the following errors: System.NullReferenceException: Object reference not set to an instance of an object. at Microsoft.Windows.SoftwareLogo.Tests.Utility.IsPackageWWA(AppXPackage package) at Microsoft.Windows.SoftwareLogo.Tests.BytecodeGenerationCheck.BytecodeGenerationCheck.ExecuteSharedValidation(String manifestFilePath, String packageFullName) at Microsoft.Windows.SoftwareLogo.TestBase.TestBase.ExecuteTest()

Related