Skip to content

Using an SDK that comes from a PackageReference in a WPF application is broken #5239

@dotMorten

Description

@dotMorten
  • .NET Core Version: 3.0preview 7 + 3.0rc1
  • Windows version: Several Win10 versions and Win11 (ie doesn't matter)
  • Does the bug reproduce also in WPF for .NET Framework 4.8?: No
  • Is this bug related specifically to tooling in Visual Studio (e.g. XAML Designer, Code editing, etc...)? If yes, please file the issue via the instructions here.
    No? It is introduced with .NET 6 and/or VS2022 installer, but will even affect VS2019/.NET5 installs once installed

Problem description:
Using an SDK that comes from a PackageReference (MSBuild.Sdk.Extras) in a WPF application is broken with WPF PackageReference support enabled.
Setting IncludePackageReferencesDuringMarkupCompilation to false works around the issue (but comes with other downsides).
On a PC that only has VS2019 installed, the problem doesn't reproduce. If you install VS2022p3.1, the problem does reproduce, even from a VS2019 command prompt.
The problem seems to occur just by installing the .NET 6 SDK, and will break even .NET 5 and .NET Framework builds.

Actual behavior:

error MSB4236: The SDK 'MSBuild.Sdk.Extras/3.0.23' specified could not be found.

Expected behavior:
Build completes.

Minimal repro:
From a VS2019 or VS2022 prompt run:

    git clone https://github.com/Esri/arcgis-toolkit-dotnet
    cd arcgis-toolkit-dotnet\src\Toolkit\Toolkit
    msbuild /restore /t:Build Esri.ArcGISRuntime.Toolkit.csproj

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugProduct bug (most likely)

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions