-
Notifications
You must be signed in to change notification settings - Fork 10k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Blazor] DefineStaticWebAssetEndpoints unexpected exception #56176
Comments
@arivoir thanks for contacting us. Can you share a binlog (create an issue through the visual studio report a problem dialog and share it the issue, then link it here)? (Also try with a nightly SDK to see if thas gone away) |
Very likely a dupe of #56029 |
https://developercommunity.visualstudio.com/t/Net-9-Blazor-compilation-bug/10681427 I recorded the issue and reported it here. |
@arivoir we are looking into this issue, but while we do so, there's a good chance that this got fixed in preview6 or preview7, so if you can give it a try with the nightly SDK that would be great. |
@arivoir did you upload the binlog to the Visual Studio issue? We can't find it. You should be able to capture one with |
@javiercn this issue looks fixed in preview6. Thank you very much! |
Looks like this problem is back in 9.0.0-preview.7.24405.7 Just got the same exception after upgrading today. |
I have the same issue with : 9.0.100-preview.7.24407.12 |
Blazor WASM net9.0 (or net8.0, same result)
dotnet build -v diag [Shows wasm file as the conflicting key]
Output of dotnet --info:
|
Same here: failed for .net8 and .net9 |
@GitClickOk probably would be ideal to copy your own output instead of mine. |
@webprofusion-chrisc I quoted you, I did not copy you. |
I am experiencing the same issue as described here. I believe the cause might be the reference to the Microsoft.NET.Sdk.WebAssembly.Pack library, which is in version 9.0.0-preview.7.24405.7, while my project is in version .NET 8.0. |
@arivoir Shouldn't this be reopen, then? |
Is there an existing issue for this?
Describe the bug
After migrating a WASM Blazor project from net8 to net9 I'm having an exception at build time
Expected Behavior
No exception should happen and the application should be build normally
Steps To Reproduce
No response
Exceptions (if any)
Error (active) MSB4018 The "DefineStaticWebAssetEndpoints" task failed unexpectedly.
System.ArgumentException: An item with the same key has already been added.
at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
at System.Collections.Generic.Dictionary
2.Insert(TKey key, TValue value, Boolean add) at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable
1 source, Func2 keySelector, Func
2 elementSelector, IEqualityComparer`1 comparer)at Microsoft.AspNetCore.StaticWebAssets.Tasks.DefineStaticWebAssetEndpoints.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.d__26.MoveNext() AccordionExplorer.Client C:\Program Files\dotnet\sdk\9.0.100-preview.4.24267.66\Sdks\Microsoft.NET.Sdk.StaticWebAssets\targets\Microsoft.NET.Sdk.StaticWebAssets.Compression.targets 227
.NET Version
9.0.100-preview.4.24267.66
Anything else?
No response
The text was updated successfully, but these errors were encountered: