Skip to content

Incorrect warning about WindowsDesktop SDK #3341

@clairernovotny

Description

@clairernovotny

I have a project that has some libraries/exe that use WPF and some that don't. The ones that do use the WindowsDesktop SDK. The ones that don't use the default SDK to prevent accidental WPF references.

I have a directory.build.props file that sets UseWPF to true so that I don't need them in all places.

In Preview 7, I now get this warning:

1>C:\Program Files\dotnet\sdk\3.0.100-preview7-012503\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.DefaultItems.targets(340,5): warning NETSDK1107: Microsoft.NET.Sdk.WindowsDesktop is required to build Windows desktop applications. 'UseWpf' and 'UseWindowsForms' are not supported by the current SDK.

That's coming from Microsoft.NET.Sdk.DefaultItems.targets. The check is being too aggressive.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions