【发布时间】:2010-12-19 14:48:57
【问题描述】:
我一直在 VS2005 中进行一个项目,该项目利用本地连接到 Access DB。
在过去的一周中,我安装了 .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(字符串 configFileName、DocData configDocData、字符串前缀)在 Microsoft.VisualStudio.Editors.SettingsDesigner.AppConfigSerializer.Deserialize(DesignTimeSettings 设置、字符串 SectionName、DocData AppConfigDocData、MergeValueMode 合并模式,IUIService UIService)在 Microsoft.VisualStudio.Editors.SettingsGlobalObjects.SettingsFileGlobalObject.LoadSettings(字符串 文件名)在 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) at System.Collections.Generic.Dictionary2.FindEntry(TKey key) 在 Microsoft.VisualStudio.Shell.Design.GlobalObjectService.GetGlobalObjects(类型 基本类型)在 Microsoft.VisualStudio.Shell.Design.GlobalObjectService.GetGlobalObjects() 在 Microsoft.VisualStudio.Design.Serialization.CodeDom.AggregateTypeResolutionService.GetTypeFromGlobalObjects(字符串 名称,布尔 throwOnError,布尔 ignoreCase) 在 Microsoft.VisualStudio.Design.Serialization.CodeDom.AggregateTypeResolutionService.GetType(字符串 名称,布尔 throwOnError,布尔 ignoreCase) 在 Microsoft.VisualStudio.Design.Serialization.CodeDom.AggregateTypeResolutionService.GetType(字符串 名称,布尔 throwOnError)在 System.ComponentModel.Design.Serialization.CodeDomSerializerBase.GetType(ITypeResolutionService trs,字符串名称,Dictionary2 names) at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.FillStatementTable(IDesignerSerializationManager manager, IDictionary table, Dictionary2 名称, CodeStatementCollection 语句,String 类名)在 System.ComponentModel.Design.Serialization.TypeCodeDomSerializer.Deserialize(IDesignerSerializationManager 经理,CodeTypeDeclaration 声明)在 System.ComponentModel.Design.Serialization.CodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager 经理)在 Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager 序列化管理器)在 Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.DeferredLoadHandler.Microsoft.VisualStudio.TextManager.Interop.IVsTextBufferDataEvents.OnLoadCompleted(Int32 f重新加载)
当我运行应用程序时,我在启动时遇到以下异常:
“无法识别的配置节连接字符串。”
在网上看,这些问题似乎通常与内置于 VS2005 并部署在 .net 1.1 框架上的东西有关;但这都是在 VS(不在 IIS 上)本地作为 Windows 窗体应用程序运行的。我已经尝试卸载并重新安装 VS2K5 无济于事。
有什么想法吗? 谢谢, 马特
【问题讨论】:
标签: .net visual-studio configuration connection-string