You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a DLL which uses Microsoft.Extensions.Http.
Then, I have a project which references my DLL.
When I run my project, it throws the exception:
System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Extensions.Http, Version=9.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. The system cannot find the file specified.
File name: 'Microsoft.Extensions.Http, Version=9.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'
...
If I reference Microsoft.Extensions.Http nuget from my project, it doesn't.
But, I shouldn't have to, because it doesn't reference it directly.
I think making the nuget package being transitive or copying the Microsoft.Extensions.Http DLL in some way via nuget would resolve this, so that's why I'm creating this issue.
Reproduction Steps
Have a DLL which references Microsoft.Extensions.Http, implement some method which uses that nuget package and call that method from another project.
Expected behavior
The project runs
Actual behavior
Exception thrown
Regression?
No response
Known Workarounds
Including direct reference to the nuget package from the project
Configuration
I'm running .NET 8 and referencing Microsoft.Extensions.Http 9.0.0
Other information
No response
The text was updated successfully, but these errors were encountered:
Just because one assembly references another assembly it doesn't mean the second assembly will be automagically included in the dependency graph. The NuGet package that contains the first assembly must declare a dependency on Microsoft.Extensions.Http, only then it will get included.
Description
I have a DLL which uses Microsoft.Extensions.Http.
Then, I have a project which references my DLL.
When I run my project, it throws the exception:
System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Extensions.Http, Version=9.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. The system cannot find the file specified.
File name: 'Microsoft.Extensions.Http, Version=9.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'
...
If I reference Microsoft.Extensions.Http nuget from my project, it doesn't.
But, I shouldn't have to, because it doesn't reference it directly.
I think making the nuget package being transitive or copying the Microsoft.Extensions.Http DLL in some way via nuget would resolve this, so that's why I'm creating this issue.
Reproduction Steps
Have a DLL which references Microsoft.Extensions.Http, implement some method which uses that nuget package and call that method from another project.
Expected behavior
The project runs
Actual behavior
Exception thrown
Regression?
No response
Known Workarounds
Including direct reference to the nuget package from the project
Configuration
I'm running .NET 8 and referencing Microsoft.Extensions.Http 9.0.0
Other information
No response
The text was updated successfully, but these errors were encountered: