dncuug / X.PagedList

Library for easily paging through any IEnumerable/IQueryable in ASP.NET
https://andrew.gubskiy.com/open-source
MIT License
899 stars 213 forks source link

Build issue when upgraded to 8.4.0 #220

Closed Anduin2017 closed 2 years ago

Anduin2017 commented 2 years ago

What I got while building:

C:\Users\AnduinXue\source\repos\AiursoftWeb\Infrastructures\src\WebServices\Business\Account\Aiursoft.Account.csproj : error NU1605: Detected package downgrade: System.Collections from 4.3.0 to 4.0.11. Reference the package directly from the project to select a different version.  [C:\Users\AnduinXue\source\repos\AiursoftWeb\Infrastructures\Aiursoft.Infrastructures.sln]
C:\Users\AnduinXue\source\repos\AiursoftWeb\Infrastructures\src\WebServices\Business\Account\Aiursoft.Account.csproj : error NU1605:  Aiursoft.Account -> X.PagedList.Mvc.Core 8.4.0 -> Microsoft.AspNetCore.Mvc.ViewFeatures 2.2.0 -> Microsoft.AspNetCore.Mvc.Core 2.2.0 -> Microsoft.Extensions.DependencyModel 2.1.0 -> Microsoft.DotNet.PlatformAbstractions 2.1.0 -> System.IO.FileSystem 4.0.1 -> runtime.win.System.IO.FileSystem 4.3.0 -> System.Collections (>= 4.3.0)  [C:\Users\AnduinXue\source\repos\AiursoftWeb\Infrastructures\Aiursoft.Infrastructures.sln]
C:\Users\AnduinXue\source\repos\AiursoftWeb\Infrastructures\src\WebServices\Business\Account\Aiursoft.Account.csproj : error NU1605:  Aiursoft.Account -> X.PagedList.Mvc.Core 8.4.0 -> Microsoft.AspNetCore.Mvc.ViewFeatures 2.2.0 -> Microsoft.AspNetCore.Mvc.Core 2.2.0 -> Microsoft.Extensions.DependencyModel 2.1.0 -> Microsoft.DotNet.PlatformAbstractions 2.1.0 -> System.Collections (>= 4.0.11) [C:\Users\AnduinXue\source\repos\AiursoftWeb\Infrastructures\Aiursoft.Infrastructures.sln]
C:\Users\AnduinXue\source\repos\AiursoftWeb\Infrastructures\src\WebServices\Business\Account\Aiursoft.Account.csproj : error NU1605: Detected package downgrade: System.IO.FileSystem.Primitives from 4.3.0 to 4.0.1. Reference the package directly from the project to select a different version.  [C:\Users\AnduinXue\source\repos\AiursoftWeb\Infrastructures\Aiursoft.Infrastructures.sln]
C:\Users\AnduinXue\source\repos\AiursoftWeb\Infrastructures\src\WebServices\Business\Account\Aiursoft.Account.csproj : error NU1605:  Aiursoft.Account -> X.PagedList.Mvc.Core 8.4.0 -> Microsoft.AspNetCore.Mvc.ViewFeatures 2.2.0 -> Microsoft.AspNetCore.Mvc.Core 2.2.0 -> Microsoft.Extensions.DependencyModel 2.1.0 -> Microsoft.DotNet.PlatformAbstractions 2.1.0 -> System.IO.FileSystem 4.0.1 -> runtime.win.System.IO.FileSystem 4.3.0 -> System.IO.FileSystem.Primitives (>= 4.3.0)  [C:\Users\AnduinXue\source\repos\AiursoftWeb\Infrastructures\Aiursoft.Infrastructures.sln]
C:\Users\AnduinXue\source\repos\AiursoftWeb\Infrastructures\src\WebServices\Business\Account\Aiursoft.Account.csproj : error NU1605:  Aiursoft.Account -> X.PagedList.Mvc.Core 8.4.0 -> Microsoft.AspNetCore.Mvc.ViewFeatures 2.2.0 -> Microsoft.AspNetCore.Mvc.Core 2.2.0 -> Microsoft.Extensions.DependencyModel 2.1.0 -> Microsoft.DotNet.PlatformAbstractions 2.1.0 -> System.IO.FileSystem 4.0.1 -> System.IO.FileSystem.Primitives (>= 4.0.1) [C:\Users\AnduinXue\source\repos\AiursoftWeb\Infrastructures\Aiursoft.Infrastructures.sln]

But 8.1.0 builds fine.

hn1 commented 2 years ago

Me too. We are trying to uppgrade from 8.1 to 8.4 in a project that is targetting the .NET 6 framework.

xyanide commented 2 years ago

Same, we are getting issues with regular AspNetCore packages where we didn't have those before. I see there are three more dependant packages which could be causing the issues.

Microsoft.AspNetCore.Html.Abstractions (>= 2.2.0) Microsoft.AspNetCore.Mvc.ViewFeatures (>= 2.2.0) System.Text.Encodings.Web (>= 6.0.0)

Our error:

Error   CS0234  The type or namespace name 'StaticFiles' does not exist in the namespace 'Microsoft.AspNetCore' (are you missing an assembly reference?)
Error   CS0246  The type or namespace name 'IEndpointRouteBuilder' could not be found (are you missing a using directive or an assembly reference?)
a-gubskiy commented 2 years ago

@hn1 @Anduin2017 @xyanide could you please share example of your project files?

Anduin2017 commented 2 years ago

https://github.com/AiursoftWeb/Infrastructures/blob/5edf6a7fdc5927a35e4d63e4aa062436c7e50cd9/src/WebServices/Business/Account/Aiursoft.Account.csproj#L10

a-gubskiy commented 2 years ago

@Anduin2017 thank you! I just tried to download your project, upgraded X.PagedList.Mvc.Core from 8.1.0 to 8.4.0 Build finished successfully. I did it on Mac OS. I will also try to do it on Windows.

Anduin2017 commented 2 years ago

Ah... I just paste a screenshot here:

And I'm using dotnet publish -c Release -r win-x64 --no-self-contained to build the production binaries.

image

a-gubskiy commented 2 years ago

@Anduin2017 please try this version https://www.nuget.org/packages/X.PagedList.Mvc.Core/8.4.1

Anduin2017 commented 2 years ago

Hi,

  Restored C:\Users\AnduinXue\source\repos\AiursoftWeb\Infrastructures\src\Infrastructure\Developer.SDK\Aiursoft.Developer.SDK.csproj (in 14 ms).
C:\Users\AnduinXue\source\repos\AiursoftWeb\Infrastructures\src\WebServices\Business\Account\Aiursoft.Account.csproj : error NU1605: Detected package downgrade: System.IO.FileSystem.Primitives from 4.3.0 to 4.
0.1. Reference the package directly from the project to select a different version.  [C:\Users\AnduinXue\source\repos\AiursoftWeb\Infrastructures\Aiursoft.Infrastructures.sln]
C:\Users\AnduinXue\source\repos\AiursoftWeb\Infrastructures\src\WebServices\Business\Account\Aiursoft.Account.csproj : error NU1605:  Aiursoft.Account -> X.PagedList.Mvc.Core 8.4.1 -> Microsoft.AspNetCore.Mvc.
ViewFeatures 2.2.0 -> Microsoft.AspNetCore.Mvc.Core 2.2.0 -> Microsoft.Extensions.DependencyModel 2.1.0 -> Microsoft.DotNet.PlatformAbstractions 2.1.0 -> System.IO.FileSystem 4.0.1 -> runtime.win.System.IO.Fil
eSystem 4.3.0 -> System.IO.FileSystem.Primitives (>= 4.3.0)  [C:\Users\AnduinXue\source\repos\AiursoftWeb\Infrastructures\Aiursoft.Infrastructures.sln]
C:\Users\AnduinXue\source\repos\AiursoftWeb\Infrastructures\src\WebServices\Business\Account\Aiursoft.Account.csproj : error NU1605:  Aiursoft.Account -> X.PagedList.Mvc.Core 8.4.1 -> Microsoft.AspNetCore.Mvc.
ViewFeatures 2.2.0 -> Microsoft.AspNetCore.Mvc.Core 2.2.0 -> Microsoft.Extensions.DependencyModel 2.1.0 -> Microsoft.DotNet.PlatformAbstractions 2.1.0 -> System.IO.FileSystem 4.0.1 -> System.IO.FileSystem.Prim
itives (>= 4.0.1) [C:\Users\AnduinXue\source\repos\AiursoftWeb\Infrastructures\Aiursoft.Infrastructures.sln]
a-gubskiy commented 2 years ago

Looks like the problem is caused by .NET Standard 2.0 dependencies. I added different Frameworks support. Please try now: https://www.nuget.org/packages/X.PagedList.Mvc.Core/8.4.2

Anduin2017 commented 2 years ago

Hi,

error NU1605:  Aiursoft.Account -> X.PagedList.Mvc.Core 8.4.2 ->
 Microsoft.AspNetCore.Mvc.ViewFeatures 2.2.0 -> Microsoft.AspNetCore.Mvc.Core 2.2.0 -> Microsoft.Extensions.DependencyModel 2.1.0 -> Microsoft.DotNet.PlatformAbstractions 2.1.0 -> Sys 
tem.IO.FileSystem 4.0.1 -> runtime.win.System.IO.FileSystem 4.3.0 -> System.Collections (>= 4.3.0)  [C:\Users\AnduinXue\source\repos\AiursoftWeb\Infrastructures\Aiursoft.Infrastructur 
es.sln
a-gubskiy commented 2 years ago

@Anduin2017 I updated reference from direct packages references to Microsoft.AspNetCore.App metapacakge. Please try https://www.nuget.org/packages/X.PagedList.Mvc.Core/8.4.3

Anduin2017 commented 2 years ago

Hi, 8.4.3 works for me! 👍👍👍

Build succeeded! 💯

Thanks for your help!