Quantcast
Channel: Active questions tagged blazor - Stack Overflow
Viewing all articles
Browse latest Browse all 4839

DefineStaticWebAssetEndpoints erro in .NET 9 Blazor

$
0
0

I recently updated the .NET version and the VS version to 9.0 and I'm getting this error:

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.Dictionary2.Insert(TKey key, TValue value, Boolean add)
at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable1 source, Func2 keySelector, Func2 elementSelector, IEqualityComparer1 comparer)
at Microsoft.AspNetCore.StaticWebAssets.Tasks.DefineStaticWebAssetEndpoints.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.d__26. MoveNext()

I tried these steps:

  1. Looked for multiple entries that refer to the same file in .csproj
  2. Clean the build, cache and ran the project again.
  3. Restarted Visual Studio

I am new to .NET and looking for an answer for this issue.


Viewing all articles
Browse latest Browse all 4839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>