Reputation: 1895
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
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
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,
Open the Project Properties (via right clicking the project within the Solution Explorer, or focusing on the project and pressing Alt + Enter.
Navigate to the Build section (as of VS 2017, via the sidebar)
Check the Generate Library Layout checkbox under the Output group.
...upon doing which Visual Studio will generate the necessary directory and file structure for you.
Upvotes: 9
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
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
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:
Upvotes: 6
Reputation: 1895
Managed to fix it by just moving the folder to the directory it wanted...
Upvotes: 2