Can not find System.Windows Assembly

后端 未结 15 1999
野趣味
野趣味 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:20

    Add System.Windows assembly reference:

    • Right-click on the project
    • Select "Add reference"
    • Select the .NET tab on the left, and find "System.Windows" in the list of assemblies
    • Double-click on "System.Windows" to add it

    If this does not solve the issue try Adding PresentationFramework, PresentationCore and WindowsBase assemblies (.NET 3.5)

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

    You have to add the reference to the project. If you're using Visual Studio, right-click the project in the Solution Explorer, and choose Add Reference...

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

    In my case there was no System.Windows reference available to pick up.
    I had to include a reference to WindowsBase

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

    I had this occur on a machine with VS 2010 once before. For some reason, the System.Windows assembly was not found in the .NET tab of Add Reference window. Very strange.

    In this case, you will just have to go to the Browse tab and navigate to:

    C:\Windows\Microsoft.NET\assembly\GAC_MSIL\System.Windows\

    Once there, select the proper version subfolder (should look something like... v4.0_4.0.0.0__b03f5f7f11d50a3a) and then choose the System.Windows.dll there.

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

    well, it was actually system.windows.presentation in my wpf app...

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

    Try with adding PresentationCore.dll After it you can use System.Windows namespace

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