Bug Report T1004441
Visible to All Users

Blazor - Error NU1605 is thrown when publishing a self-contained application with the Reports V2 Blazor module

created 4 years ago (modified 4 years ago)

Steps to reproduce:

Create a XAF Blazor application with the Reports V2 Blazor module;
Try to publish it with the following settings
Clipboard-File-1.png

Alternatively, publish it via a console:
C:\Users\Admin\source\repos\T1004441_Sample\T1004441_Sample.Blazor.Server>dotnet publish --runtime win-x64 --self-contained true

Actual results:

Publishing fails with the NU1605 error. See the Publish output for details.

Workaround:

Use the solution from the following help topic: NuGet Warning NU1605.
Add the following PackageReference to your Blazor project:

XML
<ItemGroup> <PackageReference Include="Microsoft.NETCore.Targets" Version="5.0.0" /> </ItemGroup>

Publish output:

Code
Build started... 1>------ Build started: Project: T1004441_Sample.Module, Configuration: Release Any CPU ------ 1>T1004441_Sample.Module -> C:\Users\Admin\source\repos\T1004441_Sample\T1004441_Sample.Module\bin\Release\net5.0\T1004441_Sample.Module.dll 2>------ Build started: Project: T1004441_Sample.Module.Blazor, Configuration: Release Any CPU ------ 2>T1004441_Sample.Module.Blazor -> C:\Users\Admin\source\repos\T1004441_Sample\T1004441_Sample.Module.Blazor\bin\Release\net5.0\T1004441_Sample.Module.Blazor.dll 3>------ Build started: Project: T1004441_Sample.Blazor.Server, Configuration: Release Any CPU ------ 3>T1004441_Sample.Blazor.Server -> C:\Users\Admin\source\repos\T1004441_Sample\T1004441_Sample.Blazor.Server\bin\Release\net5.0\T1004441_Sample.Blazor.Server.dll 3>T1004441_Sample.Blazor.Server -> C:\Users\Admin\source\repos\T1004441_Sample\T1004441_Sample.Blazor.Server\bin\Release\net5.0\T1004441_Sample.Blazor.Server.Views.dll 4>------ Publish started: Project: T1004441_Sample.Blazor.Server, Configuration: Release Any CPU ------ Connecting to C:\Users\Admin\source\repos\T1004441_Sample\T1004441_Sample.Blazor.Server\bin\Release\net5.0\publish\... Determining projects to restore... Restored C:\Users\Admin\source\repos\T1004441_Sample\T1004441_Sample.Module\T1004441_Sample.Module.csproj (in 1.19 sec). C:\Users\Admin\source\repos\T1004441_Sample\T1004441_Sample.Module.Blazor\T1004441_Sample.Module.Blazor.csproj(0,0): Error NU1605: Detected package downgrade: System.Diagnostics.Debug from 4.3.0 to 4.0.11. Reference the package directly from the project to select a different version. T1004441_Sample.Module.Blazor -> DevExpress.ExpressApp.ReportsV2.Blazor 21.1.3 -> DevExpress.Blazor.Reporting.JSBasedControls 21.1.3 -> DevExpress.AspNetCore.Reporting 21.1.3 -> Microsoft.AspNetCore.Mvc.Core 2.0.0 -> Microsoft.Extensions.DependencyModel 2.0.0 -> Microsoft.DotNet.PlatformAbstractions 2.0.0 -> System.IO.FileSystem 4.0.1 -> runtime.win.System.IO.FileSystem 4.3.0 -> System.Diagnostics.Debug (>= 4.3.0) T1004441_Sample.Module.Blazor -> DevExpress.ExpressApp.ReportsV2.Blazor 21.1.3 -> DevExpress.Blazor.Reporting.JSBasedControls 21.1.3 -> DevExpress.AspNetCore.Reporting 21.1.3 -> Microsoft.AspNetCore.Mvc.Core 2.0.0 -> Microsoft.Extensions.DependencyModel 2.0.0 -> System.Diagnostics.Debug (>= 4.0.11) ... 4>Build failed. Check the Output window for more details. ========== Build: 3 succeeded, 0 failed, 0 up-to-date, 0 skipped ========== ========== Publish: 0 succeeded, 1 failed, 0 skipped ===========

Answers approved by DevExpress Support

created 4 years ago

We have addressed the issue described in this ticket and will include a fix in our next maintenance update. Should you need to apply our fix prior to official release, you can request a hotfix here.

Note: Hotfixes may be unavailable for betas/updates set for release within a week.

    Comments (2)

      Hi,

      In version 21.1.5, without the workaround, the error still occurs

      Call Stack
      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. XXXX.Module.Blazor -> DevExpress.ExpressApp.Blazor.All 21.1.5 -> DevExpress.ExpressApp.ReportsV2.Blazor 21.1.5 -> DevExpress.Blazor.Reporting.JSBasedControls 21.1.5 -> DevExpress.AspNetCore.Reporting 21.1.5 -> Microsoft.AspNetCore.Mvc.Core 2.0.0 -> Microsoft.Extensions.DependencyModel 2.0.0 -> Microsoft.DotNet.PlatformAbstractions 2.0.0 -> System.IO.FileSystem 4.0.1 -> runtime.unix.System.IO.FileSystem 4.3.0 -> System.IO.FileSystem.Primitives (>= 4.3.0) XXXX.Module.Blazor -> DevExpress.ExpressApp.Blazor.All 21.1.5 -> DevExpress.ExpressApp.ReportsV2.Blazor 21.1.5 -> DevExpress.Blazor.Reporting.JSBasedControls 21.1.5 -> DevExpress.AspNetCore.Reporting 21.1.5 -> Microsoft.AspNetCore.Mvc.Core 2.0.0 -> Microsoft.Extensions.DependencyModel 2.0.0 -> Microsoft.DotNet.PlatformAbstractions 2.0.0 -> System.IO.FileSystem 4.0.1 -> System.IO.FileSystem.Primitives (>= 4.0.1) XXX.Module.Blazor XXX\XXX.Module.Blazor\XXX.Module.Blazor.csproj 1
      DevExpress Support Team 4 years ago

        Hi Isa,

        I can successfully publish an XAF Blazor application with the ReportsV2 Module as a self-contained application with v21.1.5. Please check the following screenshot.

        Would you please clarify if you created your application using v21.1.5 or updated it to v21.1.5 from an older version? Would you please send me your project so that I can check its settings?

        Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

        Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.