Update .net 5 to 6: 'The path must be absolute'
See original GitHub issueI am updating my project from .net 5 to .net 6 and have run into an issue. The project is running VS 2022 using docker-compose and container tools on linux containers.

The problem comes from the .ConfigureAppConfiguration() where I am trying to pass in configuration to be shared across containers.

If I comment out the .ConfigureAppConfiguration() the error goes away (other than I don’t have my configuration anymore).
This worked fine previously and the only change is the upgrade to .net 6 (and corresponding nuget files) so it certainly appears to be some kind of regression. I see that a number of other issues were raised for a similar problem but appears to be different from this.
I have confirmed that “User Docker Compose V2” was not enabled.
Issue Analytics
- State:
- Created 2 years ago
- Comments:31 (4 by maintainers)
Top Related StackOverflow Question
On my machine I have to manually modify the
bin\Debug\net6.0\*.staticwebassets.runtime.DT.jsonfile.There is a
ContentRootsthat has my Windows absolute path but it should be the containers relative path. So in my case I changeContentRootsto look like the following (your relative path may be something else):As long as I don’t rebuild it stays like that.
Agreed, is there any workaround for this or information about when a fix will be available? I am experiencing the exact same issue after upgrading from .NET 5 to 6.