开发者

warning BC40056: Namespace or type specified in the Imports 'MS.Internal.Xaml.Builtins' doesn't contain any public member or cannot be found

开发者 https://www.devze.com 2022-12-21 03:22 出处:网络
I have a WPF VB.NET project in Visual Studio 2008. For some reason, Visual Studio thinks that it needs to add an

I have a WPF VB.NET project in Visual Studio 2008. For some reason, Visual Studio thinks that it needs to add an

Imports MS.Internal.Xaml.Builtins

to every auto-generated XAML partial class (= the nameOfXamlFile.g.vb files), resulting in the following warning:

warning BC40056: Namespace or type specified in the Imports 'MS.Internal.Xaml.Builtins' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases.

I can remove the Impo开发者_JAVA技巧rts line, but, since this is an auto-generated file, it reappears every time that the project is rebuilt.

This warning message is annoying and clutters my error list. Is ther something that can be done about it? Or is it a known bug?


I recently ran into this bug myself in one of my WPF projects. I compared references to a project that didn't have these problems and found that my project that was having the problem had these libraries referenced:

Microsoft.Windows.Design
Microsoft.Windows.Design.Extensibility
Microsoft.Windows.Design.Interaction
Microsoft.Windows.Design.Markup

I deleted these references and sure enough, the warnings went away.

0

精彩评论

暂无评论...
验证码 换一张
取 消