-
Created global.json with version 8.0.100
-
dotnet new blazor --use-program-main -o BlazorApp
-
dotnet new blazor --use-program-main -o BlazorPlugin
-
dotnet add .\BlazorApp\BlazorApp.csproj reference .\BlazorPlugin\BlazorPlugin.csproj
-
dotnet build .\BlazorApp\BlazorApp.csproj
-
dotnet clean
-
Manuall delete obj and bin directories
-
Change global.json to use version 10.0.100
-
Change projects to reference net10.0
-
dotnet build .\BlazorApp\BlazorApp.csproj
dotnet build .\BlazorApp\BlazorApp.csproj
Restore complete (1,1s)
BlazorPlugin net10.0 succeeded (3,1s) → BlazorPlugin\bin\Debug\net10.0\BlazorPlugin.dll
BlazorApp net10.0 failed with 1 error(s) (1,0s)
C:\Program Files\dotnet\sdk\10.0.100\Sdks\Microsoft.NET.Sdk.StaticWebAssets\targets\Microsoft.NET.Sdk.StaticWebAssets.Compression.targets(297,5): error MSB4018:
The "DiscoverPrecompressedAssets" task failed unexpectedly.
System.ArgumentException: An item with the same key has already been added. Key: C:\Users\daniel\.nuget\packages\m
icrosoft.aspnetcore.app.internal.assets\10.0.0\_framework\blazor.web.js
at System.Collections.Generic.Dictionary`2.Add(TKey key, TValue value)
at System.Linq.Enumerable.SpanToDictionary[TSource,TKey](ReadOnlySpan`1 source, Func`2 keySelector, IEqualityCo
mparer`1 comparer)
at System.Linq.Enumerable.ToDictionary[TSource,TKey](IEnumerable`1 source, Func`2 keySelector, IEqualityCompare
r`1 comparer)
at Microsoft.AspNetCore.StaticWebAssets.Tasks.DiscoverPrecompressedAssets.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(TaskExecutionHost taskExecutionHost, TaskLogging
Context taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask)
Build failed with 1 error(s) in 5,8s