[ACCEPTED]-Add references to PresentationCore.dll and PresentationFramework.dll in .NET API-.net-5

Accepted answer
Score: 22

What you want to do is to add a WPF reference. This 4 is not required if your csproj includes 3 the net5.0-windows entry for TargetFramework and <UseWPF>true</UseWPF>

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <TargetFramework>net5.0-windows</TargetFramework>
    <UseWPF>true</UseWPF>
  </PropertyGroup>
</Project>

This UseWPF entry automatically 2 adds all WPF references and you can use 1 WPF calls.

More Related questions