'The type 'XElement' is defined in an assembly that is not referenced
A nonsensical error, because compiling another project works
System.Xml.Linq is referenced, it's the same code from this other project
csproj is similar, only with different compilation files(I'm comparing with the other project)
This other project is referenced, With .dll I'm actually making a mod for a game(The game is offline and without ads as it is paid, Probably no problem)
I'm using mono, Using msbuild and not xbuild
this is the code:
XElement node2 = ContentManager.Get<XElement>("Widgets/SavedWorldItem");
var containerWidget = (ContainerWidget)Widget.LoadWidget(this, node2, null);
Line one is no problem, line two is the problem
This is the csproj: https://pastebin.com/sY5WJSUT
I just installed mono via apt-get, which should get the latest version
I don't understand why this error occurs
I found that any function that has an argument of type XElement causes this error, I will try to reinstall mono
Solution 1:[1]
I finally managed to solve my problem.
I got the APK of the game I'm making the mod for; I extracted all libraries; I referenced all with the help of scripts; then I removed the ones that are in conflict. And success!
It simply compiled normally and it worked.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Jeremy Caney |
