Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add netcoreapp3.1 as additional target for NuGet packages #77

Merged
merged 4 commits into from
Jun 19, 2020

Conversation

AndreyTretyak
Copy link
Contributor

With the release of .NET Core 3.0, many ASP.NET Core assemblies are no longer published to NuGet as packages. (info)

So using libraries that target only netstandard2.0 will lead to conflicts in netcoreapp3.1 when you are getting old versions of packages as transient dependencies and you are unable to override them with a new version, because it's not published as NuGet package.

In order to solve this issue libraries add multiple targets, one for netstandard2.0 and one netcoreapp3.0or higher (currently 3.1 since 3.0 no longer supported).

For example Microsoft.Extensions.Logging and other extension packages following this pattern.

This pull request adds netcoreapp3.1 as a second target for feature management packages and for unit tests (ideally unit tests should also target net472 or other version of full framework, but it will require more work).

@AndreyTretyak AndreyTretyak marked this pull request as ready for review June 10, 2020 00:38
@AndreyTretyak
Copy link
Contributor Author

@jimmyca15 Could you please have a look?

<PackageReference Include="Microsoft.AspNetCore.Mvc.TagHelpers" Version="2.1.3" />

<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'" >
<PackageReference Include="Microsoft.AspNetCore.Mvc.TagHelpers" Version="2.2.0" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to stick with 2.1.x versions even here for full supported integration with ASP.NET Core 2.1 apps. 2.1.3 should be fine since it is the latest 2.1.x patch version.

.NET Core 2.1 is still supported.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry skipped this one, version reverted to the previous value

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you okay with keeping package updates for test projects?

@jimmyca15 jimmyca15 merged commit 49f6588 into microsoft:master Jun 19, 2020
@PawOrmstrupMadsen
Copy link

Hi, Any chance for a nuget package update with this included ? i very much need it - we are porting a large app to 3.1 from 2.2 and this is the last problematic nuget package we are using.

@AndreyTretyak AndreyTretyak deleted the package-update branch June 25, 2020 10:04
@AndreyTretyak
Copy link
Contributor Author

Hi @PawOrmstrupMadsen, I think after this change you should be able to use package in 3.1, although you might need to explicitly reference packages like Microsoft.Extensions.Logging to bump their versions. What packages are causing you problems?

@PawOrmstrupMadsen
Copy link

i have exceptions in the analysers because there are refs to the old mvc 2.2 (https://www.nuget.org/packages/Microsoft.AspNetCore.Mvc.TagHelpers/)

@AndreyTretyak
Copy link
Contributor Author

I could see two possible reasons for this problem:

  1. You are using FeatureManagement package versions without this change, I don't think there've been a release with it.
  2. Project that using this packages targeting netstandard or full framework, since for netcore3.1 Microsoft.AspNetCore.Mvc.TagHelpers won't be a dependency.

So as soon as release with this change would be available and if your project target netcoreapp3.1 or higher problems should be resolved.

@PawOrmstrupMadsen
Copy link

Yes - That's what i wrote :) i'm asking you if you can push an update to nuget with this merge included.

@AndreyTretyak
Copy link
Contributor Author

Ah sorry for the confusion, I've misunderstood you and thought you would like to bump versions that package using.
I think @jimmyca15 could be able to provide some release dates

@jimmyca15
Copy link
Member

@PawOrmstrupMadsen I just sent out a PR, and once that gets in I plan on releasing a 2.2.0 preview. Trying to get the PR in quickly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants