Can not find System.Windows Assembly

后端 未结 15 2001
野趣味
野趣味 2020-12-30 20:06

This is the error we get:

Error 1 The type \'System.Windows.Point\' is defined in an assembly that is not referenced. You must add a reference to as

相关标签:
15条回答
  • 2020-12-30 20:33

    If you don't have System.Windows in your .NET references, try WindowsBase. That fixed my reference to System.Windows.Point in VS 2008.

    0 讨论(0)
  • 2020-12-30 20:36

    I've found the needed WindowsBase.dll in

    C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.0

    0 讨论(0)
  • 2020-12-30 20:36

    If you are using .NET Framework 2.0, referencing

    System.Windows.Forms

    (and using the namespace with the identical name) will do the job too

    0 讨论(0)
  • 2020-12-30 20:40

    Right click on your "References" folder and click "Add Reference" and then select System.Windows under the .NET tab.

    0 讨论(0)
  • 2020-12-30 20:40

    Add the same references in your test project as you see as references in the project you are testing.

    I got something like this and added:

    PresentationCore PresentationFramework WindowsBase

    Now it seems to stay quiet.

    0 讨论(0)
  • 2020-12-30 20:42

    I had the same problem, however it was caused because we are using a Portable Class library and only occurred on certain PC installations.

    I found the issue to be fixed on these installation with:

    http://www.microsoft.com/en-us/download/details.aspx?id=3556

    As this fix is included with VS2010 and Windows Update it would only occur on certain PCs.

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