GenerateStaticWebAssetEndpointsManifest - An Item with the same key has already been added
This issue has been moved from a ticket on Developer Community.
[severity:I'm unable to use this version] [regression] [worked-in:17.11.3] Updated to the Latest Visual Studio Version 17.12.0 Preview 2.0, Blazor WASM App that is still building as .net 8 no longer builds... Nothing changed other than updating to get .net 9 installed.
I then performed a Full Repair using Visual Studio Installer for both installed versions Version 17.12.0 Preview 2.0 Version 17.11.3
Application Builds and Runs on Version 17.11.3, but doesn't build on Preview 2 version.
Error:
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, Func`2 keySelector, Func`2 elementSelector, IEqualityComparer`1 comparer)
at Microsoft.AspNetCore.StaticWebAssets.Tasks.GenerateStaticWebAssetEndpointsManifest.Execute()
When I click to Show the error source. the following is shown
<GenerateStaticWebAssetEndpointsManifest
Source="$(PackageId)"
ManifestType="Build"
Assets="@(StaticWebAsset)"
Endpoints="@(StaticWebAssetEndpoint)"
ManifestPath="$(StaticWebAssetEndpointsBuildManifestPath)">
</GenerateStaticWebAssetEndpointsManifest>
I did double check and the Assets.targets file doesn't have a second header called GenerateStaticWebAssetEndpointsManifest and I've never changed this file...
Original Comments
Feedback Bot on 9/17/2024, 06:17 PM:
We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.
Might be a duplicate of https://github.com/dotnet/aspnetcore/issues/57512.
Thank you for filing this issue. In order for us to investigate this issue, please provide a minimal repro project that illustrates the problem without unnecessary code. Please share with us in a public GitHub repo because we cannot open ZIP attachments, and don't include any confidential content.
Hi @vsfeedback. We have added the "Needs: Author Feedback" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.
This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. If it is closed, feel free to comment when you are able to provide the additional information and we will re-investigate.
See our Issue Management Policies for more information.