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

X.PagedList.Mvc and X.PagedList.EF 8 only support .NET Framework 4.8 #190

Closed
ronaldbarendse opened this issue Apr 17, 2020 · 6 comments · Fixed by #191
Closed

X.PagedList.Mvc and X.PagedList.EF 8 only support .NET Framework 4.8 #190

ronaldbarendse opened this issue Apr 17, 2020 · 6 comments · Fixed by #191

Comments

@ronaldbarendse
Copy link
Contributor

ronaldbarendse commented Apr 17, 2020

Describe the bug
Libraries should target the lowest required frameworks/dependencies (that are supported): X.PagedList.Mvc and X.PagedList.EF changed this from .NET Framework 4.5.2 and 4.6.1 to 4.8 with the release of version 8 (without mentioning this in a changelog/release note).

The other, common, packages are all built against .NET Standard 2.0 (and support both .NET Core 2.0 and .NET Framework 4.6.1):

  • X.PagedList 8.0.7 - netstandard2.0
  • X.PagedList.Mvc 8.0.7 - net48 (referenced Microsoft.AspNet.Mvc supports net45)
  • X.PagedList.EF 8.0.7 - net48 (referenced EntityFramework supports net45)
  • X.PagedList.Web.Common 8.0.7 - netstandard2.0

Expected behavior
X.PagedList.Mvc and X.PagedList.EF should be built against .NET Framework 4.6.1, as that's the lowest framework version that's also supported by the common X.PagedList packages and dependencies. This should only require changing net48 to net461 (or building against multiple frameworks):

<TargetFramework>net48</TargetFramework>

<TargetFramework>net48</TargetFramework>

Additional context
NuGet will happily upgrade the package to version 8 on projects targetting .NET Framework 4.6.1, resulting in compiler errors, as it can't find a compatible assembly for X.PagedList.Mvc. This is therefore probably related to #189.

@BooTeK
Copy link

BooTeK commented Apr 22, 2020

I want to add to this that Azure application services allows targeting v4.7. 4.8 is still not supported. This makes the newer versions of X.PagedList now useless for Azure Application Service deployments on full framework.

I personally thing targeting 4.7.2 as more acceptable approach. As it's the first version that 'fully' supports netstandard2.0. (no dependencies pulled in as they are provided in the runtime. (see https://weblog.west-wind.com/posts/2019/Feb/19/Using-NET-Standard-with-Full-Framework-NET#the-first-version-that-fully-net-standard-20-compliant-is-472 for details)

@ronaldbarendse
Copy link
Contributor Author

@BooTeK That's a valid point, but targetting .NET Framework 4.7.2 would still not allow a lot of existing projects to update to the latest version of X.PagedList.

A better solution would be to multi-target the base packages (X.PagedList and X.PagedList.Web.Common) to .NET Framework 4.6.1 (or even lower) and .NET Standard 2.0, just like LibGit2Sharp did in your linked article.

@Ericvf
Copy link

Ericvf commented May 4, 2020

Fully agree with this issue. Came here to report exactly the same symptom. We have projects that are targeting 4.7.2 and there seems to be no valid reason for bumping this to 4.8 from 4.5.2. The fact there is no mention of this anywhere is just as annoying as the fact that this has been reported more than 2 weeks ago.

@ronaldbarendse
Copy link
Contributor Author

@ernado-x What's the progress on this? I've submitted PR #191 almost 3 months ago and it only needs a review/merge to add back support for .NET Framework 4.6.1+, so everyone using this great package on those platforms/projects can update to the latest version.

@bitje
Copy link

bitje commented Dec 20, 2021

Hi @ronaldbarendse and others reporting / commenting on this issue, have you moved on to another packages or are there maybe forks of the project that have a version that still targets framework 4.6? I don't feel like migrating a whole project to netstandard just for the sake of one package.

@ronaldbarendse
Copy link
Contributor Author

@bitje You can still install version 7.9 and keep that from upgrading by adding allowedVersions="(,8)" to your package.config, as commented here. And as you can read on the release notes of 8.1, .NET Framework support has been dropped.

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

Successfully merging a pull request may close this issue.

4 participants