找不到名为“VsTextBoxStyleKey"的资源.资源名称区分大小写.调试 vsix 项目时 [英] Cannot find resource named 'VsTextBoxStyleKey'. Resource names are case sensitive. when debug vsix project
问题描述
我用vs2019创建了一个vsix项目,创建项目后添加一个命令项,我就是这么干的.但是当我调试项目时,我会得到一个异常:
I'm using vs2019 to create a vsix project, and add a command item after project created, that's all I did. But when I debug the project, I whill get an exception:
System.Windows.Markup.XamlParseException:'提供'System.Windows.Markup.StaticResourceHolder'的值引发异常.'
System.Windows.Markup.XamlParseException: 'Provide value on 'System.Windows.Markup.StaticResourceHolder' threw an exception.'
内部异常
异常:找不到名为VsTextBoxStyleKey"的资源.资源名称区分大小写.
Exception: Cannot find resource named 'VsTextBoxStyleKey'. Resource names are case sensitive.
异常堆栈跟踪:
at System.Windows.Markup.WpfXamlLoader.Load(XamlReader xamlReader, IXamlObjectWriterFactory writerFactory, Boolean skipJournaledProperties, Object rootObject, XamlObjectWriterSettings settings, Uri baseUri)
at System.Windows.Markup.WpfXamlLoader.Load(XamlReader xamlReader, IXamlObjectWriterFactory writerFactory, Boolean skipJournaledProperties, Object rootObject, XamlObjectWriterSettings settings, Uri baseUri)
异常 BaseUri:
pack://application:,,,/Microsoft.VisualStudio.Platform.WindowManagement;component/Themes/ThemedDialogStyles.xaml
pack://application:,,,/Microsoft.VisualStudio.Platform.WindowManagement;component/Themes/ThemedDialogStyles.xaml
我在我的磁盘上找不到这个 xaml,它是 zip 文件吗?我在哪里可以找到它.
I can't find this xaml from my disk, is it in a zip file? where I can find it.
InnerException StackTrace:
在 System.Windows.StaticResourceExtension.ProvideValueInternal(IServiceProvider serviceProvider, Boolean allowDeferredReference)
at System.Windows.StaticResourceExtension.ProvideValueInternal(IServiceProvider serviceProvider, Boolean allowDeferredReference)
在 System.Windows.StaticResourceExtension.ProvideValue(IServiceProvider serviceProvider)
at System.Windows.StaticResourceExtension.ProvideValue(IServiceProvider serviceProvider)
在 MS.Internal.Xaml.Runtime.ClrObjectRuntime.CallProvideValue(MarkupExtension me, IServiceProvider serviceProvider)
at MS.Internal.Xaml.Runtime.ClrObjectRuntime.CallProvideValue(MarkupExtension me, IServiceProvider serviceProvider)
推荐答案
根据您的描述和错误消息,此问题可能是由于 VS IDE 中的某些内容造成的.(Microsoft.VisualStudio.Platform.WindowManagement;component
这表示这与 VS 组件有关)
According to your description and the error message, this issue may result from something broken in VS IDE. (Microsoft.VisualStudio.Platform.WindowManagement;component
this indicates this is related to VS component)
所以我认为 VS修复然后更新到最新的VS2019 16.3.7可以帮助解决这个问题.
So I think a VS repair and then Update it to latest VS2019 16.3.7 can help to resolve this issue.
这篇关于找不到名为“VsTextBoxStyleKey"的资源.资源名称区分大小写.调试 vsix 项目时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!