Skip to content
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

GenerateStaticWebAssetEndpointsManifest - An Item with the same key has already been added #57992

Open
vsfeedback opened this issue Sep 20, 2024 · 1 comment
Assignees
Labels
area-blazor Includes: Blazor, Razor Components Author: Migration Bot 🤖 The issue was created by a issue mover bot. The author may not be the actual author. bug This issue describes a behavior which is not expected - a bug. feature-static-web-assets
Milestone

Comments

@vsfeedback
Copy link

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.

@dotnet-issue-labeler dotnet-issue-labeler bot added the area-blazor Includes: Blazor, Razor Components label Sep 20, 2024
@dotnet-policy-service dotnet-policy-service bot added the Author: Migration Bot 🤖 The issue was created by a issue mover bot. The author may not be the actual author. label Sep 20, 2024
@mkArtakMSFT mkArtakMSFT added feature-static-web-assets bug This issue describes a behavior which is not expected - a bug. labels Sep 20, 2024
@mkArtakMSFT mkArtakMSFT added this to the 9.0-rc2 milestone Sep 20, 2024
@martincostello
Copy link
Member

Might be a duplicate of #57512.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-blazor Includes: Blazor, Razor Components Author: Migration Bot 🤖 The issue was created by a issue mover bot. The author may not be the actual author. bug This issue describes a behavior which is not expected - a bug. feature-static-web-assets
Projects
None yet
Development

No branches or pull requests

4 participants