5

I am working on Azure Functions and these are created in .Net Core version 3.1 whereas the other libraries are written in .Net Framework 4.8. While executing the functions, I am getting following error -

System.Private.CoreLib: Exception while executing function: XXXXXX. System.Private.CoreLib: One or more errors occurred. (The type initializer for 'XXXXX' threw an exception.). XXXX.Service: The type initializer for 'XXXXX.Service.XXXXX' threw an exception. XXXX.Service: Could not load file or assembly 'System.Configuration.ConfigurationManager, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. The system cannot find the file specified.

Suggestions would be appreciated.

Anil C
  • 1,045
  • 3
  • 16
  • 38
  • Do you have the libraries reachable ? Check https://stackoverflow.com/a/50563417/5853218 – Mihai Albert Mar 21 '20 at 15:16
  • Can't find this nuget package from nuget official website. https://www.nuget.org/packages/System.Configuration.ConfigurationManager/5.0.0-preview.1.20120.5 – Cindy Pau Mar 23 '20 at 01:48
  • I've hit the same issue today `: Could not load file or assembly 'System.Configuration.ConfigurationManager, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. The system cannot find the file specified.` When I look in the bin dir I'm not seeing the DLL. I can't find it in my packages dir either but it says been installed. – Stringer Bell Mar 26 '20 at 19:02
  • 1
    Same Error. There is no package with that specific version and there are no explicit reference to it. – Christopher Cabezudo Rodriguez May 31 '20 at 15:14

2 Answers2

1

You can work around the issue by adding the _FunctionsSkipCleanOutput to the project file.

<PropertyGroup>
  <_FunctionsSkipCleanOutput>true</_FunctionsSkipCleanOutput>
</PropertyGroup>
Chris Stubbs
  • 358
  • 2
  • 10
0

Make sure your package version exists. From this it seems that there is no package version in which you reported an error, check this link:

https://www.nuget.org/packages/System.Configuration.ConfigurationManager/5.0.0-preview.1.20120.5

Click Version History, and you will find:

enter image description here

Cindy Pau
  • 13,085
  • 1
  • 15
  • 27