Skip to content

.NET 6 Preview - Sdk NuGet packages broken for WPF projects #5463

@kygagner

Description

@kygagner

Issue Description

I have created a custom SDK. This SDK imports Microsoft.NET.Sdk to use its functionality and also extends the build with new functionality of its own. Whereas most projects build fine using the custom SDK, this is broken for WPF projects as of the .NET 6 preview (this worked in .NET 5). The error is as follows:

D:\GIT\sdk-test\WpfApp\WpfApp_z0ggbjqk_wpftmp.csproj(9,31): error MSB4236: The SDK 'MyCustomSdk/1.0.0' specified could not be found.

Steps to Reproduce

Consume a custom SDK as a NuGet package instead of Microsoft.NET.Sdk in a WPF project. The custom SDK should import Microsoft.NET.Sdk.

I have created a repository to demonstrate the issue easily: https://github.com/kygagner/reproduce-net6-sdk-bug
This is also attached as a .zip file. repro.zip

Versions & Configurations

  • MSBuild version: 17.0.0-preview-21460-01+8f208e609
  • dotnet version: 6.0.100-rc.1.21463.6
  • Windows 10 version: 1909

Attach a binlog

Here is a binlog for convenience: binlog.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions