Open vedion opened 5 months ago
For us this is an issue when the Microsoft-hosted agents are being updated. While updating the agents are running different .NET Core SDK versions and we will get this error on the pipeline:
"error NU1004: The package reference Microsoft.NET.Sdk.WebAssembly.Pack version has changed from [8.0.3, ) to [8.0.2, ).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."
Hi,
I have a project using:
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">
and<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
I get two Auto-referenced packages added to the "packages.lock.json" file:
I do not have a direct reference to "Microsoft.NET.ILLink.Tasks" and "Microsoft.NET.Sdk.WebAssembly.Pack". They are also marked with "(A)" when doing a "dotnet list .\Client.csproj package":
It is correct that the auto-referenced packages gets added to the "packages.lock.json" file?
Best Regards, Anders Havn
.NET Version
8.0.203