改变项目的目标框架之后,应用程序设置错误 [英] Application settings error after changing target framework of project
问题描述
在我的应用程序正在使用的用户设置如下解释 一>。 然后,我意识到,在VS 2010中我使用.NET 4.0,而只有.NET 2.0就足够了。
In my application I am using user settings as explained here. Then I realized that in VS 2010 I was using .NET 4.0 while only .NET 2.0 was sufficient.
当我改变了框架和建设项目,在我的code,每当我访问设置现在,我得到以下错误:
When I changed the framework and build the project, in my code whenever I access setting now, I get the following error:
发生创造了一个错误 配置节处理程序 userSettings / Vegi_Manager.Properties.Settings: 无法加载文件或程序集 系统,版本= 4.0.0.0, 文化=中立, 公钥= b77a5c561934e089或 它的一个依赖。系统 找不到指定的文件。 (C:\Users\AKSHAY\AppData\Local\Microsoft\Vegi-Manager.vshost.exe_Url_44035dlkzpfaaauiqsd4nh3f0l0yq0tv\1.0.0.0\user.config 5号线)
An error occurred creating the configuration section handler for userSettings/Vegi_Manager.Properties.Settings: Could not load file or assembly 'System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The system cannot find the file specified. (C:\Users\AKSHAY\AppData\Local\Microsoft\Vegi-Manager.vshost.exe_Url_44035dlkzpfaaauiqsd4nh3f0l0yq0tv\1.0.0.0\user.config line 5)
这是使用4.0版本的原因不明。 请建议我应该怎么办。
It is for unknown reasons using version 4.0. Please suggest what should I do.
推荐答案
看看你的的app.config
也许你还有 System.Configuration。 UserSettingsGroup
或诸如此类的东西4版仍然虎视眈眈,你必须手动修改,并得到有关版本2
Check out your app.config
maybe you still have System.Configuration.UserSettingsGroup
or something of that sort of version 4 still lurking around, you will have to manually edit and get the relevant for version 2
这篇关于改变项目的目标框架之后,应用程序设置错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!