我正在運行Visual Studio 2010. 我只是將我的項目的框架工作從4.0更改爲3.5。我刪除了參考Microsoft.Framework,它要求我刪除然後嘗試編譯。我現在得到的錯誤:c#更改框架錯誤
Error 1 Could not load file or assembly 'System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. Line 123, position 5. C:\Users\\Documents\Visual Studio 2010\Projects\\\Properties\Resources.resx 123 5
我知道,它指的是代碼在我resources.resx文件:
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.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="pix-300x300" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\pix-300x300.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="pix2" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\pix2.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="pix4" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\pix4.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="pix3" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\pix3.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
會怎樣我現在糾正這個,我的框架是3.5?
您正在使用什麼版本的Visual Studio ? – 2011-05-13 15:41:27
visual studio 2010 – toosweetnitemare 2011-05-13 17:30:35
我有一些bug,但爲.net 2.0創建的項目初始化之前它的工作,但一些Visual Studio更新後它打破。是否存在System.Drawing 4.0? – devi 2012-01-26 13:43:46