Open pccai opened 2 months ago
@pccai what do you mean by
Upgrading vs before is good
? Can you please provide a sample to reproduce the issue?
vs2022 17.9 it works,but up to 17.10.2 is not.
@pccai I notice you provided the docker version, but it seems like the stack is from Windows and VS. Is docker an important part of reproducing the issue? As @gfoidl mentioned, a sample app demonstrating the issue would be very helpful.
cc @javiercn, who may know more about static web assets.
I change "ASPNETCORE_ENVIRONMENT": "Development" to "ASPNETCORE_ENVIRONMENT": "Production",then it works(F5).
"Container (Dockerfile)": {
"commandName": "Docker",
"launchBrowser": false,
"launchUrl": "{Scheme}://{ServiceHost}:{ServicePort}",
"environmentVariables": {
"ASPNETCORE_URLS": "http://+:7001",
"ASPNETCORE_ENVIRONMENT": "Production"
},
"publishAllPorts": true
},
We see the same issue in our project. When running Visual Studio v17.10.x we get the "Path must be absolute" error:
For us it seems that rolling back to Visual Studio v17.8 mitigates the issue.
We are also running a containerized app using dotnet 6, using the WSL2 based engine.
Unfortunately I can't share our solution publicly, but I'll try to create a minimal project to reproduce the issue.
Is there an existing issue for this?
Describe the bug
The path must be absolute. (Parameter 'root')
Expected Behavior
Upgrading vs before is good
Steps To Reproduce
Docker version 26.1.4, build 5650f9b Docker Desktop 4.31.1
Exceptions (if any)
在 Microsoft.Extensions.FileProviders.PhysicalFileProvider..ctor(String root, ExclusionFilters filters) 在 Microsoft.AspNetCore.Hosting.StaticWebAssets.StaticWebAssetsLoader.<>c.b__1_0(String contentRoot)
在 Microsoft.AspNetCore.StaticWebAssets.ManifestStaticWebAssetFileProvider..ctor(StaticWebAssetManifest manifest, Func
2 fileProviderFactory) 在 Microsoft.AspNetCore.Hosting.StaticWebAssets.StaticWebAssetsLoader.UseStaticWebAssetsCore(IWebHostEnvironment environment, Stream manifest) 在 Microsoft.AspNetCore.Hosting.StaticWebAssets.StaticWebAssetsLoader.UseStaticWebAssets(IWebHostEnvironment environment, IConfiguration configuration) 在 Microsoft.AspNetCore.Hosting.BootstrapHostBuilder.RunDefaultCallbacks() 在 Microsoft.AspNetCore.Builder.WebApplicationBuilder.InitializeHosting(BootstrapHostBuilder bootstrapHostBuilder) 在 Microsoft.AspNetCore.Builder.WebApplicationBuilder..ctor(WebApplicationOptions options, Action
1 configureDefaults) 在 Microsoft.AspNetCore.Builder.WebApplication.CreateBuilder(String[] args) 在 HY.Web.Program.Main(String[] args) 在 C:\projects\XYZ.Web\Program.cs 中: 第 41 行.NET Version
8.0.300
Anything else?
VS17.10.2