Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not load file or assembly 'System.Text.Encoding.CodePages, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. #500

Open
shibayan opened this issue Mar 8, 2021 · 4 comments

Comments

@shibayan
Copy link

shibayan commented Mar 8, 2021

Repro steps

Provide the steps required to reproduce the problem:

  1. Create function app project
  2. Install System.Text.Encoding.CodePages nuget package
  3. Adding Encoding.RegisterProvider(CodePagesEncodingProvider.Instance); to function
  4. Run function app

Expected behavior

Function app is executed without error

Actual behavior

The following error occurs and the function cannot be executed.

[2021-01-15T07:00:17.378Z] A host error has occurred during startup operation 'e356b46a-f0fb-44a1-8494-df0ad91f3d36'.
[2021-01-15T07:00:17.380Z] FunctionApp34: Could not load file or assembly 'System.Text.Encoding.CodePages, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. 指定されたファイルが見つかりません。.
Value cannot be null. (Parameter 'provider')

Known workarounds

  • Adding _FunctionsSkipCleanOutput setting
  • Downgrade System.Text.Encoding.CodePages to v4.7.1
@milkyjoe90
Copy link

I have ta similar issue with System.Runtime.Caching, v5.0.0 works with Microsoft.NET.Sdk.Functions up to v3.0.2, anything higher breaks. Microsoft.NET.Sdk.Functions v3.0.11 work perfectly with System.Runtime.Caching v4.7.0

@morrisonbrett
Copy link

Similar issue with System.IO.Abstractions. The only version of MIcrosoft.NET.Sdk.Functions that works is v3.0.3. After that, it will not load `System.IO.Abstractions'.

@morrisonbrett
Copy link

I got past it! THIS fixed it for me. Add this to a <PropertyGroup> in your .csproj.

<_FunctionsSkipCleanOutput>true</_FunctionsSkipCleanOutput>

@morrisonbrett
Copy link

Cross-reference: TestableIO/System.IO.Abstractions#761

This issue is being transferred. Timeline may not be complete until it finishes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants