Saurabh Palatkar
Saurabh Palatkar

Reputation: 3384

How to set environment variable in the .Net Core app which is automated deployed with Teamcity

I have configured continuous integration (BitBucket) of my .Net Core app to Azure/IIS using Teamcity. I am following this article.

Now my continuous integration is happening properly and app is deployed to Azure correctly whenever I check in any changes to Bitbucket repo.

The problem is, environment variable of my .Net Core app is by default set to Production.

I know we can set environment variable using command:

set ASPNETCORE_ENVIRONMENT="Development"

But I wonder, how I can specify this setting in my Teamcity build?

Upvotes: 2

Views: 897

Answers (1)

VMAtm
VMAtm

Reputation: 28355

At the end of the linked article you can find an update and another link to the TeamCity team blog article, where you can find a way to set up the environment variable:

If you want to tune some parameters in your build steps, the .NET Core plugin provides details about configuration options and hints at their possible values

So you need to select Runner type equal to .Net Core (dotnet), and Configuration equal to Development:

enter image description here

Upvotes: 1

Related Questions