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

MapStaticAssets causing exception in SDK during publish #44858

Open
bradmarder opened this issue Nov 14, 2024 · 0 comments
Open

MapStaticAssets causing exception in SDK during publish #44858

bradmarder opened this issue Nov 14, 2024 · 0 comments
Labels
Area-NetSDK untriaged Request triage from a team member

Comments

@bradmarder
Copy link

Describe the bug

Exception occurs during docker publish step when including MapStaticAssets. Will try to post more details later.

To Reproduce

 > [server 7/7] RUN dotnet publish -c Release -o out    --no-restore    --runtime linux-musl-x64        --self-contained true   /p:PublishSingleFile=true:
2.841 /usr/share/dotnet/sdk/9.0.100/Sdks/Microsoft.NET.Sdk.StaticWebAssets/targets/Microsoft.NET.Sdk.StaticWebAssets.targets(634,5): error : InvalidOperationException: Sequence contains more than one element [/app/LootGod.csproj]
2.841 /usr/share/dotnet/sdk/9.0.100/Sdks/Microsoft.NET.Sdk.StaticWebAssets/targets/Microsoft.NET.Sdk.StaticWebAssets.targets(634,5): error :    at System.Linq.ThrowHelper.ThrowMoreThanOneElementException() [/app/LootGod.csproj]
2.841 /usr/share/dotnet/sdk/9.0.100/Sdks/Microsoft.NET.Sdk.StaticWebAssets/targets/Microsoft.NET.Sdk.StaticWebAssets.targets(634,5): error :    at System.Linq.Enumerable.TryGetSingle[TSource](IEnumerable`1 source, Boolean& found) [/app/LootGod.csproj]
2.841 /usr/share/dotnet/sdk/9.0.100/Sdks/Microsoft.NET.Sdk.StaticWebAssets/targets/Microsoft.NET.Sdk.StaticWebAssets.targets(634,5): error :    at System.Linq.Enumerable.SingleOrDefault[TSource](IEnumerable`1 source) [/app/LootGod.csproj]
2.841 /usr/share/dotnet/sdk/9.0.100/Sdks/Microsoft.NET.Sdk.StaticWebAssets/targets/Microsoft.NET.Sdk.StaticWebAssets.targets(634,5): error :    at Microsoft.AspNetCore.StaticWebAssets.Tasks.GenerateStaticWebAssetsDevelopmentManifest.ComputeManifestAssets(IEnumerable`1 assets)+MoveNext() [/app/LootGod.csproj]
2.841 /usr/share/dotnet/sdk/9.0.100/Sdks/Microsoft.NET.Sdk.StaticWebAssets/targets/Microsoft.NET.Sdk.StaticWebAssets.targets(634,5): error :    at System.Linq.Enumerable.<ToArray>g__EnumerableToArray|314_0[TSource](IEnumerable`1 source) [/app/LootGod.csproj]
2.841 /usr/share/dotnet/sdk/9.0.100/Sdks/Microsoft.NET.Sdk.StaticWebAssets/targets/Microsoft.NET.Sdk.StaticWebAssets.targets(634,5): error :    at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source) [/app/LootGod.csproj]
2.841 /usr/share/dotnet/sdk/9.0.100/Sdks/Microsoft.NET.Sdk.StaticWebAssets/targets/Microsoft.NET.Sdk.StaticWebAssets.targets(634,5): error :    at Microsoft.AspNetCore.StaticWebAssets.Tasks.GenerateStaticWebAssetsDevelopmentManifest.ComputeDevelopmentManifest(IEnumerable`1 assets, IEnumerable`1 discoveryPatterns) [/app/LootGod.csproj]
2.841 /usr/share/dotnet/sdk/9.0.100/Sdks/Microsoft.NET.Sdk.StaticWebAssets/targets/Microsoft.NET.Sdk.StaticWebAssets.targets(634,5): error :    at Microsoft.AspNetCore.StaticWebAssets.Tasks.GenerateStaticWebAssetsDevelopmentManifest.Execute() [/app/LootGod.csproj]
2.841 /usr/share/dotnet/sdk/9.0.100/Sdks/Microsoft.NET.Sdk.StaticWebAssets/targets/Microsoft.NET.Sdk.StaticWebAssets.targets(634,5): error :  [/app/LootGod.csproj]
------
Error: failed to fetch an image or build from source: error building: failed to solve: process "/bin/sh -c dotnet publish -c Release -o out \t--no-restore \t--runtime $RUNTIME \t--self-contained true \t/p:PublishSingleFile=true" did not complete successfully: exit code: 1

Exceptions (if any)

InvalidOperationException: Sequence contains more than one element

Further technical details

.NET SDK:
 Version:           9.0.100
 Commit:            59db016f11
 Workload version:  9.0.100-manifests.c6f19616
 MSBuild version:   17.12.7+5b8665660
@dotnet-issue-labeler dotnet-issue-labeler bot added Area-NetSDK untriaged Request triage from a team member labels Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-NetSDK untriaged Request triage from a team member
Projects
None yet
Development

No branches or pull requests

1 participant