Solvedazure functions host Support .NET Standard 2.0 class libraries

Now that .NET Standard 2.0 is RTM, we should include the facades that enable support on full framework. This is especially important once we port to .NET Core.

50 Answers

✔️Accepted Answer

I think this is still not fixed.

I have an Azure Functions project referencing a .NET Standard 2.0 project. My .NET Standard project references Microsoft.Extensions.Logging.Abstractions 2.1.1.

When I debug the project in Visual Studio I get the error

Could not load file or assembly 'Microsoft.Extensions.Logging.Abstractions, Version=2.0.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' or one of its dependencies. The system cannot find the file specified.

Notice the version number 2.0.1.0 different from version 2.1.1 I'm referencing in the .NET Standard Nuget package
I have no idea why it is looking for this version, I've zero result for the string 2.0.1 in my entire solution

I thought I was again in one of these binding redirects issues. So I changed the target Framework version of my Azure Functions project to 4.7.2 which is supposed to be the version fixing all the binding redirects issue when referencing a .NET Standard project.

But this didn't solve the problem. So I also tried to install the Microsoft.Extensions.Logging.Abstractions Nuget package version 2.0.1 in a separate .NET Framework Console Application.

I copied the Microsoft.Extensions.Logging.Abstractions.dll (I verified with ildasm.exe it's version 2.0.1) to the bin folder of my Azure Functions project but still the same error.

And this is actually not the only DLL causing problems. My Azure Functions project also references another .NET Standard project which has a dependency to System.Data.SqlClient and I get the same issue.

So I'm confused on why this issue has been closed and supposed to be fixed. On my side it's clearly not fixed.
Anyone has a workaround?

Thank you

Related Issues:

19
azure functions host using appsettings.json + IConfiguration in Function App
I have the same issue as well In the context of a Function an ExecutionContext object is injected fr...
12
azure functions host Common errors when upgrading to 2.0.12050 (or newer)
I'm seeing the same dependency errors as @davemurphysf along with a few other dependency errors with...
9
azure functions host Azure function project doesn't copy system.private.servicemodel.dll to the output directory
I had to create a CopyToPublishDirectory ItemGroup and specify direct path to the assembly just like...
6
azure functions host Support .NET Standard 2.0 class libraries
I think this is still not fixed I have an Azure Functions project referencing a .NET Standard 2.0 pr...
6
azure functions host ILogger is not injected when using new DI functionality
Just to correct myself it doesn't throw an exception in my case but it doesn't log anything Tested i...
6
azure functions host Allow External Startup to update the config when Runtime Scale Monitoring is enabled
Hi Guys any update on this Now we can include appsettings by doing and we should be able to use thos...
151
serverless How do I enable CORS?
@lakinducker Thanks No problem! I updated your comment with the corresponding markdown and now the i...
93
serverless Error: spawn java ENOENT
Have you tried running sls dynamodb install? This downloads the DynamoDb libs you need. ...
88
serverless Schedule event not created when supplying options
Sorry this was user error and I actually just had the wrong indentation Correct indentation ...
66
serverless Serverless using AWS profiles only half working
You can use AWS Profiles with Severless including IAM cross-account role assumption ...
62
serverless Narrowing the Serverless IAM Deployment Policy
I think I have the serverless deployment policy nailed at this point A bit more testing is in order ...
46
serverless Ignore check for unchanged files after failed deployment
Have you tried to use sls deploy --force @tom10271 ? After a failed deployment due to remote (CloudF...
42
serverless Serverless Error - Function not found...
I had the same problem after killing a running sls deploy @mrosett's workaround worked for me as wel...
40
serverless Cannot deploy/remove stack because S3 bucket is gone
Here is a workaround that's been working for me without needing --force: Run sls deploy to generate ...
40
serverless Allow explicitly specifying serverless.yml file in CLI options or env var
We should have a command like sls deploy --file serverless-foo.yml This is a (Feature Proposal) Desc...
40
serverless Unable to deploy to Serverless due to 'empty zip'
Yeah Node version was the problem Here's a quick script that I made if anyone needs it: ...
38
serverless AWS Now Supports Max Retry Attempts
Although the async config can be added as a custom resource I would argue that limiting the retry at...
33
serverless FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
Had similar issues with largish typescript projects and serverless-webpack-plugin Try export NODE_OP...
29
serverless Access Outputs from CF template in serverless.yml
RE: cross-stack references.. Hi y'all Trying to transition to v1 and porting my CF template too I am...
26
serverless Deploy: pathmapping - Invalid stage identifier specified.
After some digging I figured out that the cause here was basically order of ops on the deploy ...
23
serverless Unable to remove serverless stack that doesn't use API gateway...
In my case I have not http events but I had declared apiKeys under provider I solved this problem ...
23
serverless FetchError: network timeout on tracking.serverlessteam.com
I couldn't find a correct way to fix it so I ended up disabling slsstats so it would no longer make ...
23
serverless graceful-fs crashes with "RangeError: Maximum call stack size exceeded"
Same problem here graceful-fs not being graceful. ❗️ NOTE FROM MAINTAINERS ❗️ This issue is result o...
23
serverless AWS HTTP API: Support IAM and Lambda authorizers
Hello folks thanks to everyone for your patience on this one Unfortunately due to other ongoing task...
22
serverless Support all intrinsic functions for SNS definition
Just figured out This is a Bug Report Description The docs state ...
21
serverless Can't subscribe to events of existing S3 bucket
@flomotlik I feel like we need this support but for a different reason than most of the other commen...
21
serverless AWS SAM Integration
I don't think SAM needs to be a breaking change AWS recently announced their Serverless Application ...
20
serverless Allow for escaping of variable syntax in serverless.yml
Maybe escaping should follow the same pattern as terraform; provide a double dollar sign ($${}) opti...
20
serverless Golang, internal server error? Path Error
Hi guys I had same issue Here is a working code example just add StatusCode: 200 ...
19
serverless Concat multiple function files
TL;DR: We got it working example shown below Hey fellas I have a base code with some legacy apis ...
19
serverless Mac: aws-go-mod deploy failed Uploaded file must be a non-empty zip
Thanks everyone for checking out and confirming that it's in fact related to node v15.6.0 ...
16
serverless AWS API Gateway stages are deployed as different API instances (no AWS stages are used)
In regards to #2918 (since that was marked as a duplicate to this) This is a (Bug Report) Descriptio...
14
serverless Profile [profilename] does not exist. Using Cross account roles. credentials_source=EcsContainer
@ghinks does it work if you set the aws-sdk's AWS_SDK_LOAD_CONFIG env var option? ...
13
serverless module initialization error: Error
For me this was down to using the bcrypt module The version in my node_modules directory was compile...
13
serverless Support custom target path inside ZIP file when packaging
I still think this should be part of the core functionality as this is really common use case on lam...
13
serverless Windows: Uploaded binaries cannot be executed
Some kind of workaround is really needed because go applications can not be used if deployed using w...
12
serverless Cross region SNS trigger
This is now supported in cloudformation however you have to add target region within cfn ...
12
serverless CodeSHA256 is different from current CodeSHA256 in $LATEST
Adding versionFunctions: false to the provider property of serverless.yml is a possible workaround. ...
12
serverless Serverless + NodeJS v8.0 = error on sls deploy
Looks like this was fixed with v8.1.0 I was able to verify it with that version so this issue can pr...
12
serverless Deploy fails with error 'An error occurred: ServerlessDeploymentBucketPolicy - The bucket policy already exists on bucket...''
Hello 👋 In recent release v2.16.0 skipPolicySetup setting was introduced which should allow avoidin...
11
serverless function run causes aws-sdk error 'ConfigError: Missing region in config'
I ran into the same thing I think the root cause is the AWS JavaScript SDK not setting a region by d...
11
serverless s3 events can't refer to existing bucket
Hey @razbomi thanks for commenting 👍 A quick solution would be to overwrite the HelloLambdaPermissi...
11
serverless Serverless package does not include all modules when a package.json file is provided
I'm experiencing the same issue in version 1.26.0 Any one else? This is a (Bug Report) Description W...
7
serverless Permission error when using serverless deploy
I have this error every time I try to deploy I sudo rm -r the downloadCacheslspyc directory and then...
6
serverless Rate exceeded
Ok Then this is a severe bug in the variable resolution part of Serverless Description I have 8 time...
6
serverless Go function is not supporting local invoke
Hey folks I've created a PR that adds support for golang & other runtimes by utilizing the lambci/la...
4
serverless Postinstall script installation fails when installing locally
as a quick fix you can use npm install --legacy-bundling in your project dir This will make sure tha...
595
react starter kit How to call child component method from parent?
For example you can use Refs to Components approach like so: Demo: https://jsfiddle.net/frenzzy/z9c4...
373
Zappa bad magic number in 'application': b'\x03\xf3\r\n': ImportError
I was able to fix this too by doing find -name \*.pyc -delete Mine definitely wasn't caused by PY2 -...