I'm building a samll Pocket PC application using a Smart Device project in VB.NET 2003, and this morning I start running into this error message:
Error: The dependency 'mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=969db8053d3322ac' in project '<project name>' cannot be copied to the run directory because it would conflict with dependency 'mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
After a little Googling around, I ran into This Post over at .NET Monster, which described the situation and solution, perfectly. Here's the rundown:
|
|

|
Before this error, mscorlib was not listed in the references section. I have added it and ensured that the "Copy Local" property is set to false. The errors referenced below have disappeared from the Task List, however, now when I build I get the "Build Errors" dialog but with no errors in the Task List to resolve. The is frustrating because I don't know what has changed since today and last Friday to suddenly cause these errors.
I'd appreciate any assistance in resolving this.
|
|
|
 |
Hi, try this as suggested by Neil Cowburn... "The problem lies with the reference order within the .vbdproj file. Open the .vbdproj file in Notepad, scroll down the the References and manually move the mscorlib reference so that it is position ABOVE any OpenNETCF references. Save the project file and open in VS .NET. It will build fine. "
HTH
Pete
|
Now, to my knowledge, I'm not using any OpenNetCF references (not even sure what this is, entirely), but apparently the same principal applies to MSCorlib and other references. I used Notepad to open up my .vbproj file, and moved the references around so that MSCorlib was the first reference in the list. After reloading the project in VS.NET, it compiles just fine.