此时在3.5框架工程中会出现
【未能加载文件或程序集“System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a”或它的某一个依赖项。系统找不到指定的文件。 行 123,位置 5。】
的错误,解决办法是将4.0.0.0改成2.0.0.0。如下面的代码。
另外,在namespace进行了修改后需要将“原命名空间.properties.resource ”改成“现在的命名空间.properties.resource”
全部好了后还会出现一个警告,请不要尝试解决此警告,会出错。
【警告 1 自定义工具“ResXFileCodeGenerator”与文件“Properties\Resources.resx”关联,但在项目中没有找到自定义工具的输出。您可在“解决方案资源管理器”中右击该文件并选择“运行自定义工具”,尝试重新运行自定义工具。 】
<resheader name="reader"> <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </resheader> <resheader name="writer"> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </resheader> <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> <data name="EHB" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\Resources\EHB.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> <data name="FHA" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\Resources\FHA.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> <data name="THB" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\Resources\THB.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> <data name="HHA" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\Resources\HHA.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> <data name="CHA1" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\Resources\CHA1.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> <data name="SDH" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\Resources\SDH.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> <data name="EHA" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\Resources\EHA.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> <data name="THA" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\Resources\THA.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> <data name="CHA2" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\Resources\CHA2.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> <data name="CHA0" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\Resources\CHA0.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data>