Azure-Functions
Azure-Functions copied to clipboard
System.Private.CoreLib: Could not load file or assembly azure function
Creating this issue on behalf of the VS customer. Details of the issue are available here.
https://developercommunity.visualstudio.com/content/problem/953719/systemprivatecorelib-could-not-load-file-or-assemb.html
There is a screenshot of the func cli error available under the diagnostics section in the bug.
i also have this issue with azure function. I already tried if this is related to azure function which runs on a linux app service plan but it doesn't.
csproj setup:
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<AzureFunctionsVersion>v3</AzureFunctionsVersion>
<_FunctionsSkipCleanOutput>false</_FunctionsSkipCleanOutput>
</PropertyGroup>
host.json
{
"version": "2.0",
"logging": {
"applicationInsights": {
"samplingExcludedTypes": "Request",
"samplingSettings": {
"isEnabled": true
}
}
}
}
error in the azure portal console: System.Private.CoreLib: Value cannot be null. (Parameter 's').
Hitting the same issue. Were you able to find a solution?
Imho most probably you try Environment.GetEnvironmentVariable("somevariable") somewhere and you don't have that "somevariable" in either local.settings.json when running locally, or in azure configuration when running in Azure. At least that's what was causing me this error.
@mhgames thanku for your comment. i almost went bald looking for the solution and issue was spell mistake in app settings vairable