running error "The path must be absolute."
See original GitHub issueerror on bare template
Describe the bug
ran the template in docker and got an error when running on windows everything is fine
To Reproduce
create .net core web application with docker (linux)
Exceptions (if any)
Exception thrown: 'System.ArgumentException' in Microsoft.Extensions.FileProviders.Physical.dll
An unhandled exception of type 'System.ArgumentException' occurred in Microsoft.Extensions.FileProviders.Physical.dll: 'The path must be absolute.'
Stack trace:
> at Microsoft.Extensions.FileProviders.PhysicalFileProvider..ctor(String root, ExclusionFilters filters)
> at Microsoft.Extensions.FileProviders.PhysicalFileProvider..ctor(String root)
> at Microsoft.AspNetCore.Hosting.StaticWebAssets.StaticWebAssetsLoader.<>c.<UseStaticWebAssetsCore>b__2_1(String contentRoot)
> at Microsoft.AspNetCore.Hosting.StaticWebAssets.ManifestStaticWebAssetFileProvider..ctor(StaticWebAssetManifest manifest, Func`2 fileProviderFactory)
> at Microsoft.AspNetCore.Hosting.StaticWebAssets.StaticWebAssetsLoader.UseStaticWebAssetsCore(IWebHostEnvironment environment, Stream manifest, Boolean isJson)
> at Microsoft.AspNetCore.Hosting.StaticWebAssets.StaticWebAssetsLoader.UseStaticWebAssets(IWebHostEnvironment environment, IConfiguration configuration)
> at Microsoft.AspNetCore.Hosting.BootstrapHostBuilder.RunConfigurationCallbacks()
> at Microsoft.AspNetCore.Builder.WebApplicationBuilder..ctor(Assembly callingAssembly, String[] args)
> at Microsoft.AspNetCore.Builder.WebApplication.CreateBuilder(String[] args)
> at <Program>$.<Main>$(String[] args) in C:\PROJECTS\Others\Uztelecom\Uztelecom.Web\Program.cs:line 2
Further technical details
- ASP.NET Core 6 preview 7 ,
- Include the output of
dotnet --info
.NET SDK (reflecting any global.json):
Version: 6.0.100-preview.7.21379.14
Commit: 22d70b47bc
Runtime Environment:
OS Name: Windows
OS Version: 10.0.19043
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\6.0.100-preview.7.21379.14\
Host (useful for support):
Version: 6.0.0-preview.7.21377.19
Commit: 91ba01788d
.NET SDKs installed:
6.0.100-preview.4.21255.9 [C:\Program Files\dotnet\sdk]
6.0.100-preview.6.21355.2 [C:\Program Files\dotnet\sdk]
6.0.100-preview.7.21379.14 [C:\Program Files\dotnet\sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 6.0.0-preview.6.21355.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 6.0.0-preview.7.21378.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 6.0.0-preview.5.21301.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.0-preview.6.21352.12 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.0-preview.7.21377.19 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 6.0.0-preview.5.21301.4 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 6.0.0-preview.6.21353.1 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 6.0.0-preview.7.21378.9 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
- visual studio 2022 preview 3
Issue Analytics
- State:
- Created 2 years ago
- Reactions:2
- Comments:24 (7 by maintainers)
Top Results From Across the Web
System.ArgumentException: 'The path must be absolute. ...
One day after pulling commits from upstream and run the C# solution (projects) I got this error message in the title. The compilation...
Read more >Error : The path must be absolute. (Parameter 'root') after ...
I tried to update HTML5 server from version Master 6973 to 1924 on IIS web server (no Docker), but now I got the...
Read more >Help..notebook error Path must be absolute - Microsoft Q&A
hi, i have notebook in azure databricks. The source and destination paths are mounted with datalake. And when i run the notebook from...
Read more >Mount path must be absolute : r/docker
I'm following this tutorial to get a media server up and running. Docker is running on headless Ubuntu server, and I'm using portainer...
Read more >mount path must be absolute error (solved)
See 'docker run --help'. This is the command I'm running: docker run --rm -t -i --mount type=bind,source= ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hi, not sure if this is the right place to put this or if I should make a new issue. But I’m seeing this same issue with .NET 6 RC 2 when running a new application through Docker Compose.
Repro Steps:
I’m running Visual Studio 17.0.0 RC2 and .NET 6.0.0-rc.2.21480.5.
I assume it an issue in other project types too, but I only checked Blazor Server.
Here’s my output from
dotnet --info
:For folks using docker-compose, there’s a separate docker-compose issue that we are fixing in VS. See https://github.com/dotnet/aspnetcore/issues/37876 for details on how to deal with it.
For other folks, if your issue is not about docker compose, please file a separate issue so that we can track the issue properly.