J. Rizzo

When we build the solution we are getting this error:

An assembly with the same identity "mscorlib, Version=3.0.0.0, Culture=neutral, PublicKeyToken=1c9e259686f921e0' has already been imported. Try removing one of the duplicate references.

We searched the solution and the C: Drive for a duplicate, but there isn't one. We've removed the mscorlib from the solution and it will start to build, but then an error that starts with 800 comes up with no explanation. We've gone as far as replacing the reference file from our game with the one from Spacewars. This actually got the game to deploy to the Xbox, but then it crashes when we try to play. Does this sound familiar to anyone

Thanks in advance for any advice

J.Rizzo



Re: XNA Game Studio Express Generating an assembly error with the mscorlib when building sln

Leaf.

Just guessing but it sounds like your project's references are mixed up. You could edit the .csproj in a text file and see if you can see what is wrong (you might have two references to mscorlib). Another option is to create a new project and then add all your source and content files into it, so that you have a fresh set of references.

Cheers,
Leaf.







Re: XNA Game Studio Express Generating an assembly error with the mscorlib when building sln

Stephen Styrchak - MSFT

I will assume you are building an Xbox 360 project when you get this error.

To fix your issue, you need to follow these instructions:

  1. Open the project designer. There are a few ways to do this; one is to right-click the project node in the Solution Explorer and select Properties. Another way is to double-click the Properties folder under your project in the Solution Explorer.
  2. Activate the Build property page. On the left-hand-side, there is a list of named tabs. Click on the Build tab.
  3. Click on the "Advanced..." button at the bottom-right corner of the page. You may have to scroll to see it.
  4. In the Advanced Build Settings dialog, check the box next to "Do not reference mscorlib.dll".

Explanation:

The C# compiler will always reference its corresponding mscorlib.dll if you don't tell it not to. The mscorlib corresponding the the C# compiler is the .NET Framework 2.0 mscorlib.dll, which is not the same as the Xbox 360 mscorlib.dll. In the project templates we shipped with XNA Game Studio Express, we always exclude mscorlib so that we can explicitly reference the right one for the type of project you are working with. It appears that you've either accidentally turned off this option, or perhaps you created this project yourself starting from a template that didn't come with XNA Game Studio Express.

--Stephen





Re: XNA Game Studio Express Generating an assembly error with the mscorlib when building sln

J. Rizzo

Bulid succeeded! Thank you!

J. Rizzo