VisualStudio bug?

后端 未结 3 1494
借酒劲吻你
借酒劲吻你 2021-01-03 18:06

In VS 2010 created a new WinForm project. Added a new UserControl WPF.

2 compile-time errors appeared:

Error 1 The type \'Sys

相关标签:
3条回答
  • 2021-01-03 18:30

    Was this project migrated from .NET 3.5 to NET 4.0 ? If yes, the interface now resides in System.Xaml and you need to reference it.

    0 讨论(0)
  • 2021-01-03 18:39

    it sounds like you just need a reference to System.Xaml.dll


    Re whether this is a bug in VS; well, I suppose the templates could add that reference - I can reproduce it, so it may be worth logging on connect

    0 讨论(0)
  • 2021-01-03 18:49

    In my case "System.Xaml" was added to the project automatically but giving the same type of error:

    The type name 'IComponentConnector' could not be found in the namespace 'System.Windows.Markup'. This type has been forwarded to assembly 'System.Xaml, Version=4.0.0.0, Culture=neutral,.... .' Consider adding a reference to that assembly.

    I've solved the problem by, just deleting the "System.Xaml" from References and again adding "System.Xaml, Version=4.0.0.0" from Framework.

    0 讨论(0)
提交回复
热议问题