Skip to content

Warning on cross-targeting WPF app using Microsoft.NET.Sdk.WindowsDesktop #13618

@ericstj

Description

@ericstj

Create a netcoreapp3.1 WPF application. Make it also target net5.0.

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

  <PropertyGroup>
    <OutputType>WinExe</OutputType>
    <TargetFrameworks>netcoreapp3.1;net5.0-windows</TargetFrameworks>
    <UseWPF>true</UseWPF>
  </PropertyGroup>

</Project>

Expect: build clean

Actual: warning:

warning NETSDK1137: It is no longer necessary to use the Microsoft.NET.Sdk.WindowsDesktop SDK. Microsoft.NET.Sdk can be used instead.

This warning only applies to net5.0, changing the SDK will cause this project to fail to build on netcoreapp3.1. Introduced in #12386 cc @sfoslund @dsplaisted

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions