System.Configuration.Abstractions icon indicating copy to clipboard operation
System.Configuration.Abstractions copied to clipboard

Getting error Could not load file or assembly

Open Shubbi opened this issue 6 years ago • 3 comments

InnerException {"Could not load file or assembly 'System.Configuration.Abstractions.NetStandard, Version=2.0.2.45, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.":"System.Configuration.Abstractions.NetStandard, Version=2.0.2.45, Culture=neutral, PublicKeyToken=null"} System.Exception {System.IO.FileNotFoundException}

Tried adding
<dependentAssembly> <assemblyIdentity name="System.Configuration.Abstractions.NetStandard" culture="neutral" publicKeyToken="null"/> <bindingRedirect oldVersion="0.0.0.0-2.0.2.45" newVersion="2.0.2.45" /> </dependentAssembly>

It doesn't work

Why is the PublicKeyToken null?

Shubbi avatar Aug 28 '19 15:08 Shubbi

Tried adding < dependentAssembly> < assemblyIdentity name="System.Configuration.Abstractions.NetStandard" culture="neutral" publicKeyToken="null"/> < bindingRedirect oldVersion="0.0.0.0-2.0.2.45" newVersion="2.0.2.45" /> < /dependentAssembly> doesn't work

Shubbi avatar Aug 28 '19 15:08 Shubbi

I am getting this issue too. I am injecting the dependency like this: services.AddSingleton<IConfigurationManager, ConfigurationManager>();

And then calling a class that depends upon the IConfigurationManager.

But I get the error that Shubbi is mentioning.

YasirSyed avatar Aug 30 '19 16:08 YasirSyed

Hey folks - can you provide more information on the runtime versions you're using (or a small repro) and I'll dig through all of this.

Looks like they're both netcore issues above?

davidwhitney avatar Sep 05 '19 09:09 davidwhitney