gpt4 book ai didi

c# - Visual Studio Windows 窗体 "Value does not fall within the expected range."

转载 作者:行者123 更新时间:2023-11-30 23:07:54 28 4
gpt4 key购买 nike

Visual Studio Enterprise 2017 中,当我在 solution 中创建 Windows Form 时,我立即收到以下错误页面(而不是设计师页面):

堆栈跟踪是:

at Microsoft.VisualStudio.LanguageServices.CSharp.CodeModel.CSharpCodeModelService.GetTypeSymbolFromFullName(String fullName, Compilation compilation)
at Microsoft.VisualStudio.LanguageServices.Implementation.CodeModel.RootCodeModel.DotNetNameFromLanguageSpecific(String languageName)
at EnvDTE80.CodeModel2.DotNetNameFromLanguageSpecific(String LanguageName)
at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomParser.CodeTypeDeclarationFromCodeClass(CodeClass vsClass)
at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomParser.OnNamespacePopulateTypes(Object sender, EventArgs e)
at System.CodeDom.CodeNamespace.get_Types()
at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomParser.Parse(TextReader codeStream)
at Microsoft.VisualStudio.Design.Serialization.CodeDom.MergedCodeDomParser.System.CodeDom.Compiler.ICodeParser.Parse(TextReader stream)
at System.CodeDom.Compiler.CodeDomProvider.Parse(TextReader codeStream)
at Microsoft.VisualStudio.Shell.Design.Serialization.CodeDom.CodeDomDocDataAdapter.get_CompileUnit()
at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager serializationManager)
at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.DeferredLoadHandler.Microsoft.VisualStudio.TextManager.Interop.IVsTextBufferDataEvents.OnLoadCompleted(Int32 fReload)

页面上提供的链接没有帮助,因为它们仅链接到通用文档/帮助页面。如何修复此错误?

最佳答案

我在 Visual Studio 2019 的 Windows 窗体应用程序中得到了这个。我已经为此工作了几天,毫无问题地打开和关闭解决方案。我应用了 VS 升级,当我打开应用程序时,我收到了这条错误消息。

当没有其他工作时,我从解决方案中卸载并重新加载项目,然后修复它。

我希望这对您来说就这么简单。

关于c# - Visual Studio Windows 窗体 "Value does not fall within the expected range.",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46873315/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com