pusher-websocket-dotnet: Could not load file or assembly 'System.Configuration.ConfigurationManager

Greetings,

I am having some issues using this lib for .netcore. here is the error. I am using a .netcore 2.0.0-preview1-005977 in macos.

Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'System.Configuration.ConfigurationManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. The system cannot find the file specified.

   at PusherClient.Pusher.Connect()

thank you

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 14
  • Comments: 26 (4 by maintainers)

Most upvoted comments

I fixed the problem I had. I was using the libraries that used System.Configuration.ConfigurationManager in another solution. When I used NuGet to add the System.Configuration.ConfigurationManager in the solution that called these other libraries it worked.

Installing Nuget package for System.Configuration.ConfigurationManager has solved the problem for us using .net core 2.0.

My problem also solved Installing Nuget package for System.Configuration.ConfigurationManager

InvalidOperationException: Cannot find compilation library location for package

Hi, I have a .NET FX46 referencing a NET standard lib which uses Serilog. The build on my local works but on build agent does not. The error is System.IO.FileloadException: could not load file or assembly System.Configuration.configurationManager, version=4.0.0.0, Culture=neutral, PublicKeyToken=… from Serilog.Settings.AppSettings. I tried adding System.Configuration.configurationManager directly to my FX project, the build still fails. I also tried adding

<PropertyGroup>
  <_HasReferenceToSystemRuntime>true</_HasReferenceToSystemRuntime>
</PropertyGroup>

No luck. Would you please help? Thank you!

Hi,

If you’re using the .net core you need to install the system.configuration.configurationamanger nuget package.

Best regards, John

I had the same issue, the reason was a package conflict between the same package in different project I solved by installing the same version in all my projects.

The above solutions seem more like a hack? I am feeling reluctant to add an “unused” reference to my .NET framework 4.7.2 project (System.Configuration.ConfigurationManager). What happens in the future if a teammate sees this reference as unused and removes it? The build will still pass, but will result in runtime errors.

Does anyone have a proper fix?

Also in this situation - I am converting a class library to .NET standard for an enterprise solution - we may have 50+ projects that consume this - so potentially I need to add this reference in 50 places?

I had the same problem when I tried to connect to CosmosDb from a time triggered Azure Function. Here what I did to solve the problem 1- downgraded the projecto to netcoreapp3.1 2- Used the Azure Function V3 3- used Microsoft.NET.Sdk.Functions version 3.1.1(any version 3) 4- Added <_FunctionsSkipCleanOutput>true</_FunctionsSkipCleanOutput> in the property Group tag in the .csproj

It worked for me. Hope this helps