MSBuildSdkExtras icon indicating copy to clipboard operation
MSBuildSdkExtras copied to clipboard

MSBuild.Sdk.Extras package type 'MSBuildSdk' not supported

Open dgxhubbard opened this issue 6 years ago • 6 comments

I get this error attempting to upgrade Package MSBuild.Sdk.Extras 'MSBuild.Sdk.Extras 2.0.24' has a package type 'MSBuildSdk' that is not supported by project. This is in a net standard 2.0 project. I was trying to upgrade to visual studio 2019 and had a missing c# target errors and one of the suggestions was to ugrade to latest MSBuild.Sdk.Extras to resolve the error. I am not familiar with json config files where is the package type and what should it be set to.

dgxhubbard avatar Apr 03 '19 19:04 dgxhubbard

Refer to #111. Our .net standard 2.0 projects do not have a global.json file.

dgxhubbard avatar Apr 03 '19 19:04 dgxhubbard

When we upgraded our old c# projects to the folder style project we used this conversion. But I just found this article.

At the top of our csproj files we have: Project Sdk="Microsoft.NET.Sdk"

However the article says to use: Project Sdk="MSBuild.Sdk.Extras/1.6.61"

Is this causing our problem?

dgxhubbard avatar Apr 03 '19 20:04 dgxhubbard

I have the same problem. It's a Xamarin bindings project with Sdk="Microsoft.NET.Sdk" and MonoAndroid81 as the target framework.

rubo avatar Apr 08 '19 17:04 rubo

Please ensure you're using the Extras as an SDK reference and that you're using the latest 2.x version.

clairernovotny avatar May 31 '19 15:05 clairernovotny

Any fix for this issue, I'm unable to install the nuget

pirhano avatar Feb 21 '20 23:02 pirhano

Any fix for this issue, I'm unable to install the nuget

This is intentional behavior. SDK packages shouldn't be referenced. If you instead update your project SDK target, this is the new way that SDK packages should be used.

One example is to update the following line: <Project Sdk="Microsoft.NET.Sdk"> To instead look like this: <Project Sdk="MsBuild.SDK.Extras"> Unless you want a specific version: <Project Sdk="MsBuild.SDK.Extras/2.0.54">

The behavior you're describing through Nuget is a feature that is documented by the Microsoft team, here: NuGet issue 6484

TylerKendrick avatar Mar 10 '20 15:03 TylerKendrick