William
William

Reputation: 1895

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

I'm trying to draw some graphs in a windows 8 app.

So I downloaded this:

http://modernuitoolkit.codeplex.com/

I then right clicked my project, clicked add reference and navigated to the .dll file.

But when I try and build the project I get loads of these type of errors:

Error 18 Payload file 'c:\users\mark\Desktop\ChartingTest\ChartingTest\ModernUI.Toolkit.Data.Charting\Charts\Series\LineSeries.xaml' does not exist. App1

Error 15 Payload file 'c:\users\mark\Desktop\ChartingTest\ChartingTest\ModernUI.Toolkit.Data.Charting\Charts\Series\DataPointSeries.xaml' does not exist. App1

Error 16 Payload file 'c:\users\mark\Desktop\ChartingTest\ChartingTest\ModernUI.Toolkit.Data.Charting\Charts\Series\DefinitionSeries.xaml' does not exist. App1

Error 17 Payload file 'c:\users\mark\Desktop\ChartingTest\ChartingTest\ModernUI.Toolkit.Data.Charting\Charts\Series\LegendItem.xaml' does not exist. App1

That is just a few of them. They seem to be releated to Xaml.

Thanks.

Upvotes: 8

Views: 11303

Answers (6)

Ismail Hassani
Ismail Hassani

Reputation: 462

I got this exception sometimes when I had a reference to a shared project. When you move (cut/paste) some items from this project to other locations the *.projitems is not adjusted correctly hence the error. Manually removing these lines solves the issue.

Upvotes: 0

ravindUwU
ravindUwU

Reputation: 746

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.

Upvotes: 9

JKennedy
JKennedy

Reputation: 18799

OK so ALL of these answers are quite useless and confusing.

I have trouble with the package Acr.UserDialogs so I searched google and came across this page on github: Build Failed while compiling UWP in Xamarin.Forms Project

it basically says this:

It is Acr.UserDialogs.xr.xml Manually copying it under Acr.UserDialogs Folder works for me.

So basically go and find the file it is looking for. It won't be there (hence the error message) but in my case it was in the folder before, so I manually created the folder it wanted and dragged and dropped the file in.

Error sorted.

Upvotes: 0

Abdallah Shakhatreh
Abdallah Shakhatreh

Reputation: 770

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

Upvotes: 8

Chris
Chris

Reputation: 449

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.

Upvotes: 6

William
William

Reputation: 1895

Managed to fix it by just moving the folder to the directory it wanted...

Upvotes: 2

Related Questions