davidwhitney / System.Configuration.Abstractions

Injectable, mockable, extensible, configuration for .NET
MIT License
42 stars 7 forks source link

Getting error Could not load file or assembly #19

Open Shubbi opened 5 years ago

Shubbi commented 5 years ago

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

It doesn't work

Why is the PublicKeyToken null?

Shubbi commented 5 years ago

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

YasirSyed commented 5 years ago

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.

davidwhitney commented 5 years ago

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?