Email: Password:       Forgot Password 
    .netCodeSG
A Saarsha Group Online Community for dot net codes group like C#, Asp.NET, VB.NET, Sharepoint, JavaScript, JQuery, Ajax, SQL, WCF, WPF.
 
TECHNOLOGIES:
 

Azure Function App - Install NuGet Packages through project json file

Article:
Viewed:  280 
Posted On:  21/09/2019 12:59:43 
Azure Function App : project.json is not working to install NuGet packages 

 

When working with Azure Function in portal, added a project.json file to add NuGet package. However, this is not triggering and compilation failed due to required NuGet package.

Repro steps

Step 1:  Created a new "Function app" resource, specified .NET as runtime stack.

Step 2:  Created a new Function, and as Programming Environment,  => "In-Portal".

Step 3:   Added BlobTriggerCSharp function

Step 4:   Added a  project.json which contains  required NuGet package information.

Step 5:  Click on Save.

Nothing happen.


Ideally NuGet package should install.

(Problem is that your Azure Function run time environment is ~2, which should be ~1) 


SOLUTION FOR THIS PROBLEM:

Create a new Function App.

Go to the Function app settings and find the Run time version.

Switch it to 1 (like below)

Azure Function NuGet packages

Now Add a new function and add project.json and make your function run J!

 

  Comment:
         HOME   |   Submit Article   |   Contact Us   |   About Us   |   Terms & Condition   |   Advertise With us