'Payload file does not exist' What does this mean?

As the other answers suggest, creating the appropriate directory and moving the generated .xr.xml file does work, however,


The correct solution for this is to,

  1. Open the Project Properties (via right clicking the project within the Solution Explorer, or focusing on the project and pressing Alt + Enter.

  2. Navigate to the Build section (as of VS 2017, via the sidebar)

  3. Check the Generate Library Layout checkbox under the Output group.

Generate library layout

...upon doing which Visual Studio will generate the necessary directory and file structure for you.


To workaround this, go to the DLL output folder (e.g. bin\Release), create a new folder named like your DLL-Name (e.g. MyUserControlLibrary) and move the XAML files down to this folder.

bin\Release\
  MyUserControlLibrary.dll
  MyUserControlLibrary.pri
  MyUserControlLibrary\ [folder] <-- create
       UserControl1.xaml         <-- move here
       UserControl2.xaml         <-- move here

Though both answers are correct, I found them confusing at first. Here's my attempt to clarify.

The referenced .dll depends on files and it expects them in the folder it is sitting in. Those files are missing and you need to manually arrange the folders and files it needs:

  1. Go to the folder where the .dll is. If you copied it, go to where you first found the .dll.
  2. You should find some familiar resource files next to the .dll. Your .dll wants them, but the folder structure is wrong.
  3. Move them, as seen in the error messages. Most likely, you only need to create a folder and copy an existing folder structure into it.

Tags:

C#

Xaml