PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Wednesday, September 28, 2022

[FIXED] How do I set an environment variable at build time on a VSO Hosted Build Controller?

 September 28, 2022     azure, azure-devops, continuous-deployment, environment-variables, orleans     No comments   

Issue

How can I set an environmental variable on a VSO Hosted Build Controller at build time? An ideal solution would be using MSBuild arguments.

Scenario (not necessary to know): I am trying to get an Orleans based Azure Hosted Cloud Service to build and deploy using a VSO Hosted Build Controller. Currently I am hosting my own build controller using TFS however we would like to use the VSO hosted build controller. In order for this to work I have to set the Orleans Environmental Variable to a path within my project on the VSO Hosted Build Controller at build time. We are using a continuous deployment model.


Solution

The MSBuild Arg is

/p: EnvVarName = PathAsAString

It can be the full path(p:OrleansSDK="C:\a\scr\Main\Lib") or the relative path(/p:OrleansSDK="..\..\Lib"), depending on the build process template it might be able to include existing variables (p:OrleansSDK="$(SourcesDir)\Lib").



Answered By - beverts312
Answer Checked By - Candace Johnson (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing