I have moved a C# solution file from VS 2005 to VS 2010, and on a new computer. One issue I encountered is that the original version of the resource file mixed PublicKeyToken
and internalKeyToken
like so:
<data name="NAME" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>PATH;System.Drawing.Bitmap, System.Drawing,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
and
<data name="NAME" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>PATH;System.Drawing.Bitmap, System.Drawing,
Version=2.0.0.0, Culture=neutral, internalKeyToken=b03f5f7f11d50a3a</value>
</data>
This file was generated by Visual Studio 2005 via use of the designer, though I'm editing it by hand to change instances of internalKeyToken
to PublicKeyToken
. Not doing so gives me a compiler error:
Error 19 Could not load file or assembly 'System.Drawing,
Version=2.0.0.0, Culture=neutral' or one of its dependencies.
The system cannot find the file specified. Line 225, position 5.
So, I am wondering:
My crystal ball says that you had an out-of-control Search + Replace. You replaced "public" with "internal" and accidentally modified the .resx file as well. Just fix it or restore from source control.
Even the top dogs make this mistake.