WalletWasabi: Failed to restore when running the Packager: Error NU1004: The package references have changed for net5.0

General Description

Can’t resolve the Fluent.csproj and the Fluent.Desktop.csproj when running the Packager with dotnet run --onlybinaries

How To Reproduce?

  1. Go to WasabiWallet.Packager folder
  2. Run dotnet run --onlybinaries
  3. See error

Operating System

Win10

Logs

Build succeeded.
    0 Warning(s)
    0 Error(s)

Time Elapsed 00:00:00.70
Process failed:
* Command: 'dotnet publish --configuration Release --force --output "E:\WalletWasabi\WalletWasabi.Fluent.Desktop\bin\dist\win7-x64" --self-contained true --runtime "win7-x64" --disable-parallel --no-cache /p:VersionPrefix=1.1.13 /p:DebugType=none /p:DebugSymbols=false /p:ErrorReport=none /p:DocumentationFile="" /p:Deterministic=true /p:RestoreLockedMode=true'
* Working directory: 'E:\WalletWasabi\WalletWasabi.Fluent.Desktop'
* Exit code: '1'
* Output:
  > Microsoft (R) Build Engine version 16.10.2+857e5a733 for .NET
  > Copyright (C) Microsoft Corporation. All rights reserved.
  >
  >   Determining projects to restore...
  >   Restored E:\WalletWasabi\WalletWasabi.Fluent.Generators\WalletWasabi.Fluent.Generators.csproj (in 291 ms).
  > E:\WalletWasabi\WalletWasabi.Fluent\WalletWasabi.Fluent.csproj : error NU1004: The package references have changed for net5.0. Lock file's package references: Avalonia:[0.10.10, ), Avalonia.Controls.DataGrid:[0.10.10, ), Avalonia.Diagnostics:[0.10.10, ), Avalonia.ReactiveUI:[0.10.10, ), Avalonia.Xaml.Behaviors:[0.10.10, ), OpenCvSharp4:[4.5.2.20210404, ), OpenCvSharp4.runtime.win:[4.5.2.20210404, ), System.Reactive:[5.0.0, ), System.Runtime:[4.3.1, ), project's package references: Avalonia:[0.10.10, ), Avalonia.Controls.DataGrid:[0.10.10, ), Avalonia.ReactiveUI:[0.10.10, ), Avalonia.Xaml.Behaviors:[0.10.10, ), OpenCvSharp4:[4.5.2.20210404, ), OpenCvSharp4.runtime.win:[4.5.2.20210404, ), System.Reactive:[5.0.0, ), System.Runtime:[4.3.1, ).The packages lock file is inconsistent with the project dependencies so restore can't be run in locked mode. Disable the RestoreLockedMode MSBuild property or pass an explicit --force-evaluate option to run restore to update the lock file. [E:\WalletWasabi\WalletWasabi.Fluent.Desktop\WalletWasabi.Fluent.Desktop.csproj]
  >   Failed to restore E:\WalletWasabi\WalletWasabi.Fluent\WalletWasabi.Fluent.csproj (in 22 ms).
  > E:\WalletWasabi\WalletWasabi.Fluent.Desktop\WalletWasabi.Fluent.Desktop.csproj : error NU1004: The project reference walletwasabi.fluent has changed. Current dependencies: Avalonia,Avalonia.Controls.DataGrid,Avalonia.ReactiveUI,Avalonia.Xaml.Behaviors,E:\WalletWasabi\WalletWasabi\WalletWasabi.csproj,OpenCvSharp4,OpenCvSharp4.runtime.win,System.Reactive,System.Runtime lock file's dependencies: Avalonia,Avalonia.Controls.DataGrid,Avalonia.Diagnostics,Avalonia.ReactiveUI,Avalonia.Xaml.Behaviors,OpenCvSharp4,OpenCvSharp4.runtime.win,System.Reactive,System.Runtime,WalletWasabi.The packages lock file is inconsistent with the project dependencies so restore can't be run in locked mode. Disable the RestoreLockedMode MSBuild property or pass an explicit --force-evaluate option to run restore to update the lock file.
  >   Failed to restore E:\WalletWasabi\WalletWasabi.Fluent.Desktop\WalletWasabi.Fluent.Desktop.csproj (in 13 ms).
  >   Restored E:\WalletWasabi\WalletWasabi\WalletWasabi.csproj (in 149 ms).
  >
Unhandled exception. System.InvalidOperationException: Process exited with unexpected exit code
   at WalletWasabi.Packager.Program.StartProcessAndWaitForExit(String command, String workingDirectory, String writeToStandardInput, String arguments, Boolean redirectStandardOutput) in WalletWasabi.Packager\Program.cs:line 563
   at WalletWasabi.Packager.Program.Publish() in WalletWasabi.Packager\Program.cs:line 273
   at WalletWasabi.Packager.Program.Main(String[] args) in WalletWasabi.Packager\Program.cs:line 78
   at WalletWasabi.Packager.Program.<Main>(String[] args)

Wasabi Version

master

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 1
  • Comments: 25 (3 by maintainers)

Most upvoted comments

@adamPetho please create PR that removes the condition and update the lock files. The packager cannot be broken. Later on the @zkSNACKs/visual-design-group can elaborate on a better solution.

@molnard IDK but given that when I run dotnet restore && dotnet build --configuration Release in master branch and packages.lock.json files change and they change only for fluent projects, I would guess that it is somehow linked to Avalonia.

I guess we can call dotnet restore && dotnet build --configuration Release for any commit before .NET 6 was merged and we will have better sense what might be the issue.