-
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
net9 - Build a RCL fails if multiple files with same name but different extensions are under wwwroot #58859
Comments
Can confirm that I have the same issue, tested with released .net9. |
+1 Upgraded a Workaround was to rename the |
Same issue, working net8.0 project, upgraded to net9.0 just now and getting this too.
|
+1 |
same here |
Haven't had the opportunity to debug this my self yet. But it seems like this is were things explode https://github.com/dotnet/sdk/blob/2d87cb8327aa0d998bc5a5e34cbcf6585c8dc5af/src/StaticWebAssetsSdk/Tasks/GenerateStaticWebAssetsDevelopmentManifest.cs#L66 For history:
We're experiencing the same issue, when we include the output from a webpack build in our wwwroot directory for a blazor wasm project. We're not using either |
I had the same issue. Disabling gzip in |
@rmin001 I confirm that only gzipped files cause the problem.. if I disable gzip and keep only brotli compression through webpack the build works |
@asabia we have the same configuration as you but the assets then will be pushed to cdn storage so our workaround was to exclude the scripts "as content" and include then in the nuget package through csproj. But then the issue moved to the project which has the reference to the library with another exception always related to a duplicated file under wwwroot directory.. |
Having same issue disabling GZip isn't a option guess ill wait to come from NET 8 |
I'm also experiencing this error. This makes it impossible for most apps to migrate to .NET 9. Even having both the regular and minified version of a static asset (like css or js) seems to trigger the error. We need a fix or workaround. |
Seems to explode a step deeper on the Single: |
Ps: this got changed 3 weeks ago: dotnet/sdk@825b59e#diff-3a76e81cb491f70d5c0256f4e335a13e9e42a8f2033a55d04c4ede53a307dd82R105 |
Sorry for replying again... You can detect files with identical names but different extensions with the following: grep -oP "(?<=<RelativePath>).*(?=</RelativePath>)" YourProject/obj/Release/net9.0/staticwebassets/msbuild.YourProject.Microsoft.AspNetCore.StaticWebAssets.props | sed 's/\.[^.]*$//' | sort | uniq -c | less It will list duplicate files on top, replace |
Is there an existing issue for this?
Describe the bug
We have a RCL which produce multiple scripts, fonts, styles etc.. under the
wwwroot
directory in order to ship them along the NuGet package and consume from aspnet blazor projects.Each of these files have "gzip" and "brotli" compression version with the filename "[name].[ext].[compressionextension]", so for example "interops.js" have "interops.js.gz" and "interops.js.br" files.
Until net8 it works good, but after update to net9 the build fails with and exception from
StaticWebAssets.targets
.Deleting the "compressed version" ones the build completes.
Expected Behavior
We expect the same behavior of net8 build.
Steps To Reproduce
Exceptions (if any)
Thrown from
C:\Program Files\dotnet\sdk\9.0.100-rc.2.24474.11\Sdks\Microsoft.NET.Sdk.StaticWebAssets\targets\Microsoft.NET.Sdk.StaticWebAssets.targets(634,5)
:.NET Version
9.0.100-rc.2.24474.11
Anything else?
.NET SDK:
Version: 9.0.100-rc.2.24474.11
Commit: 315e1305db
Workload version: 9.0.100-manifests.3424025a
MSBuild version: 17.12.0-preview-24473-03+fea15fbd1
Runtime Environment:
OS Name: Windows
OS Version: 10.0.22631
OS Platform: Windows
RID: win-x64
Base Path: C:\Program Files\dotnet\sdk\9.0.100-rc.2.24474.11\
.NET workloads installed:
[aspire]
Installation Source: SDK 9.0.100-rc.2, VS 17.12.35424.110
Manifest Version: 8.2.2/8.0.100
Manifest Path: C:\Program Files\dotnet\sdk-manifests\8.0.100\microsoft.net.sdk.aspire\8.2.2\WorkloadManifest.json
Install Type: Msi
[wasm-tools]
Installation Source: SDK 9.0.100-rc.2, VS 17.12.35424.110
Manifest Version: 9.0.0-rc.2.24473.5/9.0.100-rc.2
Manifest Path: C:\Program Files\dotnet\sdk-manifests\9.0.100-rc.2\microsoft.net.workload.mono.toolchain.current\9.0.0-rc.2.24473.5\WorkloadManifest.json
Install Type: Msi
Configured to use loose manifests when installing new manifests.
Host:
Version: 9.0.0-rc.2.24473.5
Architecture: x64
Commit: 990ebf52fc
.NET SDKs installed:
8.0.403 [C:\Program Files\dotnet\sdk]
9.0.100-rc.2.24474.11 [C:\Program Files\dotnet\sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 8.0.10 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 9.0.0-rc.2.24474.3 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 8.0.10 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 9.0.0-rc.2.24473.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 8.0.10 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 9.0.0-rc.2.24474.4 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Other architectures found:
x86 [C:\Program Files (x86)\dotnet]
registered at [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x86\InstallLocation]
Environment variables:
Not set
global.json file:
Not found
Learn more:
https://aka.ms/dotnet/info
Download .NET:
https://aka.ms/dotnet/download
The text was updated successfully, but these errors were encountered: