Publishing a Windows NET 5.0 application wants 'net5.0-windows7.0' target framework?

Answered

I have a NET 5.0 targeted application which builds and runs just fine, under VS2019 and also the trial of Rider 2020.3.2. However, when I go to publish, the publish dialog only shows 'net5.0-windows7.0' and the publish will fail as this does not appear to exist.

This is true under Win 10, on multiple machines (I wanted to test in case it was something specific) and also under macOS 10.15 and Linux Mint.

I can't find any reference in web searches to this target framework, and cannot find it in the Rider-related documentation or forum.

Anyone have any ideas what's going on here?

Note that for non-Windows projects, net5.0 is listed.

0
3 comments

You can use the target "net5.0-windows" for targeting WinForms and WPF. Microsoft lists the possible target frameworks on this page:

https://docs.microsoft.com/en-us/dotnet/standard/frameworks 

As far as i know only "net5.0-windows" is currently supported. The other os-specific tragets will be available on .NET 6.0 at the end of this year.

If Rider suggests "net5.0-windows7.0" i think it's a bug.

0

My project has this defined, which builds and publishes fine under Visual Studio; Rider builds and runs this also without issue. Publishing is where that net5.0-windows7.0 comes up and I can't see any reason for it and am not able to correct it in the dialog :

<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">

<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net5.0-windows</TargetFramework>
<ApplicationManifest>app1.manifest</ApplicationManifest>
<Configurations>Debug;Release</Configurations>
<UseWpf>True</UseWpf>
<ServerGarbageCollection>true</ServerGarbageCollection>
<RuntimeIdentifiers>win-x64</RuntimeIdentifiers>
</PropertyGroup>

....
0

Hello, here is the issue for that on our tracker: RIDER-56228. Please watch for monitoring the progress.

0

Please sign in to leave a comment.