- Home /
Upgrade to 4.2 causes CS0433 error
I am trying to upgrade from 4.1.x to 4.2. When I do and then open a project created under 4.1.x I get a "Assets/Uniject/Interface/IResourceLoader.cs(8,17): error CS0433: The imported type `System.Xml.Linq.XDocument' is defined multiple times" build error. The file just contains an interface with one property being an XDocument. I've google'd about this quite a bit and don't see any explanation/solution of the problem.
The System.Xml.Linq.dll is referenced in each of the generated projects, but this solution was building prior to the upgrade without problems.
What has changed, and how do I fix this so I can use the latest version of Unity?
Thanks, Mike
I think it's a bug, ... but I'm not sure, I've never been good at debugging.
but that's how I understand it. like it's trying to read something 2 times that's in engine itself, ...
Yeah, I suspect it's something that has been changed in the way the project is built. One of the reasons I dug around in the references and code was to try and nail down anything on my end that could cause the issue.
Did you fresh install? Try uninstalling old unity first and then installing 4.2 to a blank folder
Yep, that was my second install attempt. After the first one gave me these problems, I uninstalled all unity stuff and rebooted. I also got rid of all of the data in the \\users\\me\\appdata\\roa$$anonymous$$g\\unity folder prior to the new install. The only thing I haven't done is search the registry for unity keys to delete and I prefer not to do that.
Check config.xml for multiple entries of
add assembly="System.Xml.Linq,
Also I can't find System.Xml.Linq.XDocument in any of my PC builds. Is it an addon? Try removing any trace of it if it is.
Answer by flyfisher1952 · Aug 23, 2013 at 04:24 PM
I found the issue. Unity3D 4.1.5 didn't include the System.Xml.Linq.dll file and the original developer that added Ninject manually added it. I deleted the file and we now build properly on 4.2.
now includes the DLL, hence the problem with multiple definitions.
You should "accept" your own answer too, so others can tell that the question has been answered.
Hope I helped in pointing you in the right direction :)
Your answer
Follow this Question
Related Questions
BSoD on Build, Find Cause 0 Answers
Problem with upgrading small project from Unity3 to Unity4 0 Answers
Unity 3.0 help mee 4 Answers