I am using Visual Studio 2022 targeting .NET6 Windows using WPF
When I added Nunit test, I selected .NET 6 as the target.
When I add using WPF2022ht4fEditor to my Nunit test I get the error
Project '..\WPF2022ht4fEditor\WPF2022ht4fEditor.csproj' targets 'net6.0-windows10.0.17763.0'. It cannot be referenced by a project that targets '.NETCoreApp,Version=v6.0'
If I remove the using statement, it compiles fine.
How do I fix this?
By the way, I recognize that the problem is that my Nunit test is targeting .NET version 6 and that the application is targeting net6.0-windows. The app .csproj is
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net6.0-windows10.0.17763.0</TargetFramework>
<Nullable>enable</Nullable>
<UseWPF>true</UseWPF>
</PropertyGroup>
</Project>`
The issue is that I can't find a way to change them so they match. For instance, if I change the .csproj file for the app and set the TargetFramework to net6.0, I get a different error.