Cannot find resource named 'VsTextBoxStyleKey'. Resource names are case sensitive. when debug vsix project

人盡茶涼 提交于 2019-12-11 10:57:41

问题


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: 'Provide value on 'System.Windows.Markup.StaticResourceHolder' threw an exception.'

Inner Exception

Exception: Cannot find resource named 'VsTextBoxStyleKey'. Resource names are case sensitive.

Exception StackTrace:

at System.Windows.Markup.WpfXamlLoader.Load(XamlReader xamlReader, IXamlObjectWriterFactory writerFactory, Boolean skipJournaledProperties, Object rootObject, XamlObjectWriterSettings settings, Uri baseUri)

Exception BaseUri:

pack://application:,,,/Microsoft.VisualStudio.Platform.WindowManagement;component/Themes/ThemedDialogStyles.xaml

I can't find this xaml from my disk, is it in a zip file? where I can find it.

InnerException StackTrace:

at System.Windows.StaticResourceExtension.ProvideValueInternal(IServiceProvider serviceProvider, Boolean allowDeferredReference)

at System.Windows.StaticResourceExtension.ProvideValue(IServiceProvider serviceProvider)

at MS.Internal.Xaml.Runtime.ClrObjectRuntime.CallProvideValue(MarkupExtension me, IServiceProvider serviceProvider)


回答1:


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)

So I think a VS repair and then Update it to latest VS2019 16.3.7 can help to resolve this issue.



来源:https://stackoverflow.com/questions/58619795/cannot-find-resource-named-vstextboxstylekey-resource-names-are-case-sensitiv

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!