Can I use an appsettings json file in Azure Functions

0 votes

I had a doubt if I can use an appsettings.json file in Azure Functions? I referred to this documentation for environment variables: https://docs.microsoft.com/en-us/azure/azure-functions/functions-reference-csharp#environment-variables

But I am using Octopus for deployments and would really like to have appsettings version controlled.

I have tried this:

{
  "frameworks": {
    "net46": {
      "dependencies": {
        "Microsoft.Extensions.Configuration": "1.0.0",
        "Microsoft.Extensions.Configuration.Json": "1.0.0"
      }
    }
  }
}

But I'm getting the following error:

2016-11-23T15:27:03.811 (12,16): error CS0012: The type 'Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0

Kindly help.

Apr 24, 2019 in Azure by sabby
• 4,390 points
4,657 views

1 answer to this question.

0 votes

Only environment variables are supported for app settings and connection strings. appsettings.json is not supported.

However, you can use Azure Resource Manager (ARM) Templates to configure the settings for your Function App. Here's a blog post that describe this in more detail.

Hope it helps!

To know more about Azure, join Azure course today.

Thank you!!

answered Apr 24, 2019 by Prerna
• 1,960 points

Related Questions In Azure

0 votes
1 answer

How can I remove/hide/disable excessive HTTP response headers in Azure/IIS7 without having to use UrlScan?

MSDN published an article on how to ...READ MORE

answered May 22, 2018 in Azure by club_seesharp
• 3,450 points
3,453 views
0 votes
1 answer

How can I use “Azure File Storage” with Web App Service?

If you're looking for mapping a drive ...READ MORE

answered Aug 11, 2018 in Azure by null_void
• 3,220 points
3,957 views
0 votes
2 answers

Can I Login without prompt in Azure?

You can use -Credential parameter, and DPAPI to login. First, ...READ MORE

answered Aug 17, 2018 in Azure by Priyaj
• 58,090 points
6,275 views
0 votes
1 answer

Which cloud hosting is best ( AWS or Azure or Google)

Hello @Hammer, This totally depends on your needs, ...READ MORE

answered Aug 10, 2018 in AWS by Priyaj
• 58,090 points
741 views
+15 votes
23 answers

AWS vs Azure which one will have a more promising career?

Azure is integrating with a lot of ...READ MORE

answered Jul 4, 2018 in Career Counselling by Soumodip Sinha
10,982 views
0 votes
1 answer

Azure has 3 different types of storage accounts. Is there any major difference between them?

Azure Storage provides three types of storage ...READ MORE

answered Mar 4, 2019 in Azure by Prerna
• 1,960 points
25,720 views
0 votes
1 answer

How to check if multiple files exist in Azure container?

foreach loop is the most efficient way though. ...READ MORE

answered Mar 4, 2019 in Azure by Prerna
• 1,960 points
3,391 views
0 votes
1 answer
0 votes
1 answer

Can I use .NET's HttpClient to hit an Azure Mobile service?

Yes, you can do this by adding ...READ MORE

answered Apr 15, 2019 in Azure by Prerna
• 1,960 points
1,110 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP