groupdocs-viewer / GroupDocs.Viewer-for-.NET-UI

UI - User Interface for GroupDocs.Viewer for .NET document viewer and automation API.
MIT License
5 stars 2 forks source link

Detected package downgrade Exception with GroupDocs.Viewer.UI.SelfHost.Api 6.0.11 #39

Closed ManuelHaas closed 8 months ago

ManuelHaas commented 1 year ago

Hi,

the following error will be thrown when using GroupDocs.Viewer.UI.SelfHost.Api 6.0.10 and 6.0.11 with a current (7.0.4) .NET Core Web App:

Error: 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. 
 ToSec.DataAccess -> GroupDocs.Viewer.UI.SelfHost.Api 6.0.11 -> Microsoft.AspNetCore.Mvc.Core 2.2.5 -> 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) 
 ToSec.DataAccess -> GroupDocs.Viewer.UI.SelfHost.Api 6.0.11 -> Microsoft.AspNetCore.Mvc.Core 2.2.5 -> 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)

This is a regression: #19

Environment:

vyacheslav-prokopenko commented 1 year ago

Hi, @ManuelHaas . Could you please attach .sln and .csproj files of the solution and the project ?

ManuelHaas commented 1 year ago

Hi, attached you will find the project file.

Project.csproj.txt

vyacheslav-prokopenko commented 1 year ago

Hi, @ManuelHaas It seems the problem with runtime package dependencies System.IO.FileSystem 4.0.1 -> runtime.win.System.IO.FileSystem 4.3.0 -> System.IO.FileSystem.Primitives (>= 4.3.0) System.IO.FileSystem 4.0.1 -> System.IO.FileSystem.Primitives (>= 4.0.1)

and NU1605 is not suppressed within solution

Plz try

  1. suppress NU1605 (it is the default setting) scr

  2. Add nuget package System.IO.FileSystem.Primitives 4.3.0 to the project directly in the NuGet Package Manager as it is recommended by microsoft Direct dependency wins

ManuelHaas commented 1 year ago

Thank you for the recommendations. @1: I will not change the default settings because of the error. @2: This is the workaround your colleague recommended the last time the problem occurred. I have set this temporarily. However, the problem still does not occur with version 6.0.5. The error has only occurred since the update.

vyacheslav-prokopenko commented 1 year ago

Hi, @ManuelHaas thank you for feedback. Could you please provide some sample project where I can reproduce the issue? Actually I've been trying to create some sample many times but all was working fine with the given project settings.

ManuelHaas commented 1 year ago

Hi, @vyacheslav-prokopenko I didn't know that the error had anything to do with my project settings. Here is the base project that is referenced by the other project (which I have already uploaded) that is causing the error.

base.csproj.txt

vyacheslav-prokopenko commented 1 year ago

Hello, @ManuelHaas . Still can not reproduce the issue locally. Could you please help to reproduce with attached project (solution is located in ClassLibrary1 folder) Base.zip

vladimir-litvinchik commented 1 year ago

@ManuelHaas

Did you manage to resolve this issue?

ManuelHaas commented 1 year ago

@vladimir-litvinchik like last time I referenced System.IO.FileSystem.Primitives directly in the project. I assume the problem still exists. Unfortunately I don't have the time to create a sample project.

vladimir-litvinchik commented 1 year ago

@ManuelHaas

Got it, thank you for the feedback.