-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Microsoft.Extensions.DependencyModel with Net5.0-Preview7 PublishSingleFile #41265
Comments
Tagging subscribers to this area: @eerhardt |
Tagging subscribers to this area: @swaroop-sridhar, @agocke |
@vitek-karas @swaroop-sridhar @agocke - what is the expectation of how to read the .deps.json file when PublishSingleFile=true? The current DependencyModel code is reading the file from the |
I'll let @swaroop-sridhar correct me, but I think we simply don't support reading the Just curious - what do you need the |
The error occured when using https://github.com/serilog/serilog-settings-configuration , the particular exception happens in https://github.com/serilog/serilog-settings-configuration/blob/dev/src/Serilog.Settings.Configuration/Settings/Configuration/Assemblies/AssemblyFinder.cs I am not in any way associated with this project, but their usage of Microsoft.Extensions.DependencyModel.DependencyContext.Default static variable looks legitimate. |
We don't have room to fix the DependencyModel in .NET 5.0 anymore. We'll look into this for .NET 6. |
This work has now been completed in 6.0. The intentional behavior is:
Closing this issue as this is now working as designed in 6.0. |
Description
Accessing Microsoft.Extensions.DependencyModel.DependencyContext.Default in a application targetting Net5.0 and published as a SingleFile causes an exception, because the applications .deps.json file can not be found.
Configuration
Windows 10 1909 x64, Visual Studio 2019 16.7.2, Net5.0 preview7
Regression?
Worked with netcoreapp3.1 target framework.
Other information
To replicate:
<PackageReference Include="Microsoft.Extensions.DependencyModel" Version="3.1.6" />
to the project.Running the published program leads to the following stack-trace
Running the program from the debugger or the normal bin/Release folder works fine.
I stumbled upon this problem because a third party library I use (Serilog.Settings.Configuration) seems to stumble upon this problem when loading available assemblies.
The text was updated successfully, but these errors were encountered: