When building a C# WinRT/Metro you may run into the following compile error
Manifest references file ‘yourfilenamehere.exe’ which is not part of the payload
I have received this error a few times now, each time after doing the exact same thing. Renaming my project file. Turns out that any time you rename your project file you need to update the pointer in the Package.appxmanifest file to match your new name.
What is odd is that if you simply double click on the Package.appxmanifest you will get this nice user friendly UI which will allow you to change all the various settings via the UI, however as the image below shows the UI and raw xml which drives the UI can get out of sync:
It appears the reason they can get out of sync is that the UI has 3 properties, Display Name, Entry Point and Description. However the raw xml has an additional value 'Executable’ which does not appear to be exposed in the UI, see below.
If you look at the raw XML above you can see that the name of my executable is missing the ending ‘t’. When I noticed this I changed everything in the project to include this ‘t’ but clearly the XML was not updated.
In order to resolve this error you need to open the raw xml file and you can do this one of two ways.
- Double click your error message and it SHOULD open up your package.appxmanifest file directly
- Right click the package.appxmanifest in the solution explorer and click View Code and the raw xml will be opened.
Once you have the raw file opened you need to simply ensure that the name of the executable matches the name you expect. If it does not update the name and save your changes. At this point you should be good to go.
Hope this helps.
Till next time,
10-09-2011 6:09 AM