c# change framework error(c#更改框架错误)
问题描述
我正在运行 Visual Studio 2010.我只是将项目的框架从 4.0 更改为 3.5.我删除了它要求我删除然后尝试编译的参考 Microsoft.Framework.我现在得到错误:
I am running Visual Studio 2010. I just change the frame work of my project from 4.0 to 3.5. I removed the reference Microsoft.Framework that it asked me to remove then tried to compile. I now get the error:
错误 1 无法加载文件或组装'System.Drawing,版本=4.0.0.0,文化=中性,PublicKeyToken=b03f5f7f11d50a3a' 或它的依赖项之一.系统找不到指定的文件.线123、位置5. C:Users\DocumentsVisual Studio2010Projects\PropertiesResources.resx 123 5
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\DocumentsVisual Studio 2010Projects\PropertiesResources.resx 123 5
我知道它指的是我的 resources.resx 文件中的代码:
I know that it is referring to code in my resources.resx file:
<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,我该如何纠正这个问题?
How would i correct this now that my framework is 3.5?
推荐答案
您可以尝试通过右键单击 .resx 文件并从上下文菜单中选择运行自定义工具"来重新生成文件.
You can try regenerating the file by right-clicking the .resx file and choosing 'Run Custom Tool' from the context menu.
在执行此操作之前,更改访问修饰符或添加新值以强制重新生成.
before you do this, change the Access Modifier or add a new value to force a regeneration.
另一个参见 降级从 .net 4.0 到 3.5 的应用程序 另一种可能性
Another edit: See Downgrade an application from .net 4.0 to 3.5 for another possibility
这篇关于c#更改框架错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:c#更改框架错误


- C#MongoDB使用Builders查找派生对象 2022-09-04
- MoreLinq maxBy vs LINQ max + where 2022-01-01
- 在哪里可以找到使用中的C#/XML文档注释的好例子? 2022-01-01
- Web Api 中的 Swagger .netcore 3.1,使用 swagger UI 设置日期时间格式 2022-01-01
- WebMatrix WebSecurity PasswordSalt 2022-01-01
- 良好实践:如何重用 .csproj 和 .sln 文件来为 CI 创建 2022-01-01
- 如何用自己压缩一个 IEnumerable 2022-01-01
- 输入按键事件处理程序 2022-01-01
- 带有服务/守护程序应用程序的 Microsoft Graph CSharp SDK 和 OneDrive for Business - 配额方面返回 null 2022-01-01
- C# 中多线程网络服务器的模式 2022-01-01