I have a VS2022 WPF project targeting .net8.0-10.0.22000.0
. The project builds fine and I can even publish it via a ‘Folder’ publishing profile.
Now my goal is to automate the build and the packing process using github actions so I created a WAP-Project to use with this action. To achieve this, I followed this guide from microsoft.
When I added the reference to my project, it shows up fine under Dependencies
. However, when trying to run the packaging project, it fails and throws an error:
Project '...' targets 'net8.0-windows10.0.22000.0'. It cannot be referenced by a project that targets '.NETFramework,Version=v4.5.1'.
I’ve found this discussion on the Visual Studio developer community which describes the exact issue I’m facing, but states that this issue should have been fixed with VS 2022 v17.8 (I’m running VS 2022 v17.11.2).
At this point, I’m out of ideas. I’m only using the Packaging Project to achieve automation with github actions, so if I can set those up without WAP at all, that’s fine by me aswell. The process should enable a deployment via ClickOnce though.