Open developarratoutlookdotcom opened 2 years ago
I'm facing the same problem. Currently, uncheck the single file
works but it makes the deployment process complicated.
As of .Net 6, getting the DependencyContext of an application deployed as a single-file is not supported. Carter is using the DependencyContext
in the DependencyContextAssemblyCatalog.
The issue can be tracked here https://github.com/dotnet/runtime/issues/70438
Error
I receive the error when trying to run an app 'published' with the following settings:
Current workaround
Simply remove the 'single file' option.
Additional information
Basically it works OK as long as you don't try to publish with the 'single file' option. Tested all other combinations and it works OK. Reason for using 'single file' is more for simplicity, massive reduction in files (rather than overall size - although that is a consideration). So work around is personally acceptable but def. be nice to have.