我一直在VS2005上开发一个项目,该项目使用本地连接到Access数据库。
在过去的一周里,我安装了.NET Framework 3.5以用于另一个项目以及VS6。
我回到我的VS2005应用程序,突然出现了大问题:
任何使用我的OLEDB连接的类的设计器都显示如下内容:
无法将类型为“System.Configuration.DefaultSection”的对象转换为类型“System.Configuration.ConnectionStringsSection”。 隐藏
在 System.Configuration.Configuration.get_ConnectionStrings(),Microsoft.VisualStudio.Shell.Design.Serialization.ConfigurationHelperService.ReadConnectionStrings(String configFileName, DocData configDocData, String prefix), Microsoft.VisualStudio.Editors.SettingsDesigner.AppConfigSerializer.Deserialize(DesignTimeSettings Settings, String SectionName, DocData AppConfigDocData, MergeValueMode mergeMode, IUIService UIService),Microsoft.VisualStudio.Editors.SettingsGlobalObjects.SettingsFileGlobalObject.LoadSettings(String fileName),Microsoft.VisualStudio.Editors.SettingsGlobalObjects.SettingsFileGlobalObject.BuildType(), Microsoft.VisualStudio.Editors.SettingsGlobalObjects.SettingsFileGlobalObject.GetObjectType(), Microsoft.VisualStudio.Shell.Design.GlobalType.get_ObjectType(),Microsoft.VisualStudio.Shell.Design.GlobalObject.GetHashCode(), Microsoft.VisualStudio.Shell.Design.GlobalObjectService.GlobalKey.GetHashCode(), System.Collections.Generic.ObjectEqualityComparer
1.GetHashCode(T obj),System.Collections.Generic.Dictionary
2.FindEntry(TKey key), Microsoft.VisualStudio.Shell.Design.GlobalObjectService.GetGlobalObjects(Type baseType), Microsoft.VisualStudio.Shell.Design.GlobalObjectService.GetGlobalObjects(), Microsoft.VisualStudio.Design.Serialization.CodeDom.AggregateTypeResolutionService.GetTypeFromGlobalObjects(String name, Boolean throwOnError, Boolean ignoreCase), Microsoft.VisualStudio.Design.Serialization.CodeDom.AggregateTypeResolutionService.GetType(String name, Boolean throwOnError, Boolean ignoreCase), Microsoft.VisualStudio.Design.Serialization.CodeDom.AggregateTypeResolutionService.GetType(String name, Boolean throwOnError),System.ComponentModel.Design.Serialization.CodeDomSerializerBase.GetType(ITypeResolutionService trs, String name, Dictionary2 names), System.ComponentModel.Design.Serialization.CodeDomSerializerBase.FillStatementTable(IDesignerSerializationManager manager, IDictionary table, Dictionary
2 names, CodeStatementCollection statements, String className), System.ComponentModel.Design.Serialization.TypeCodeDomSerializer.Deserialize(IDesignerSerializationManager manager, CodeTypeDeclaration declaration), System.ComponentModel.Design.Serialization.CodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager manager), Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager serializationManager), Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.DeferredLoadHandler.Microsoft.VisualStudio.TextManager.Interop.IVsTextBufferDataEvents.OnLoadCompleted(Int32 fReload)
当我运行应用程序时,启动时遇到以下异常:
"未识别的配置节 connectionStrings。"
在网上搜索时,这些问题似乎通常与VS2005构建的内容和部署在.net 1.1框架上有关;但是,这些内容都在VS中作为Windows表单应用程序本地运行(而不是在IIS上)。我尝试卸载并重新安装VS2K5,但没有效果。
有什么想法吗? 谢谢, 马特