Quantcast
Channel: Active questions tagged nuget-package - Stack Overflow
Viewing all articles
Browse latest Browse all 3067

'Microsoft.Extensions.Hosting' causes error to 'Microsoft.Extensions.Logging.Abstractions', any solution?

$
0
0

Behind the problem

I want to store my connection sting using the 'Users Secret' feature on Visual Studio 2022. To do this the following extensions must be installed:

<ItemGroup><PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="7.0.0" /><PackageReference Include="Microsoft.Extensions.Hosting" Version="7.0.0" /></ItemGroup>

The code solution works on its own, and I am now trying to implement it on another solution. By doing so it creates the following error

function is in error: Could not load file or assembly 'Microsoft.Extensions.Logging.Abstractions, Version=7.0.0.0OR this .

What I have managed so far:

I have managed to narrow it down to the following extension to cause the problem:

<PackageReference Include="Microsoft.Extensions.Hosting" Version="7.0.0" />

This extension used for managing Users Secret and is necessary to have in the code.

I have managed to try a few examples from Google, but without luck. I now ask here in hope that anyone have a solution to this problem.

I cannot see a relation between those two extensions, and why it causes the problem.

Thanks ahead.


Viewing all articles
Browse latest Browse all 3067

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>