tag:help.appveyor.com,2012-11-13:/discussions/questions/980-custom-msbuild-propertyAppVeyor: Discussion 2018-10-19T08:17:01Ztag:help.appveyor.com,2012-11-13:Comment/360411582015-02-13T17:21:22Z2015-02-13T17:21:22ZCustom msbuild property<div><p>MsBuild properties could be specified in environment variables.
Just try setting <code>MyProp</code> environment variable.</p></div>Feodor Fitsnertag:help.appveyor.com,2012-11-13:Comment/360411582015-06-23T22:04:54Z2015-06-23T22:04:54ZCustom msbuild property<div><p>I'm looking to do something similar.</p>
<p>@feodor can you explain how that would work specifically. If I
wanted to add <code>/p:_DestinationType=AzureWebSite</code> as an
option to my msbuild, how could I do that through environment
variables?</p></div>christag:help.appveyor.com,2012-11-13:Comment/360411582015-06-23T22:08:22Z2015-06-23T22:08:22ZCustom msbuild property<div><p>Just add <code>_DestinationType</code> variable on Environment
tab of project settings (or setup it in
<code>appveyor.yml</code>).</p></div>Feodor Fitsnertag:help.appveyor.com,2012-11-13:Comment/360411582015-06-24T15:37:05Z2015-06-24T15:37:05ZCustom msbuild property<div><p>thanks @feodor. I did add that environment variable to the
Environment tab on the build settings, but I did not see it added
when msbuild was called. This is the entry from my log
<code>msbuild "src/MyProject.csproj" /m /verbosity:minimal
/logger:"C:\Program
Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
/p:DeployOnBuild=True /p:PublishProfile=appveyor</code></p></div>christag:help.appveyor.com,2012-11-13:Comment/360411582015-06-24T17:11:27Z2015-06-24T17:11:27ZCustom msbuild property<div><p>Right, it shouldn't be added to the command line, but any
environment variable can be referenced in build file (.proj,
.targets) as <code>$(variable_name)</code>, so if you have
<code>$(_DestinationType)</code> somewhere in MSBuild project and
define environment variable with the same name that should
work.</p></div>Feodor Fitsnertag:help.appveyor.com,2012-11-13:Comment/360411582015-06-24T18:03:14Z2015-06-24T18:03:14ZCustom msbuild property<div><p>Got it! thank you.</p>
<p>Would you consider adding the ability to pass additional command
switches to the msbuild.exe from the interface and yaml? Today we
have Configuration, Platform, and Project file...But I would
propose adding a 4th text box called Options || Command Line Params
which would support custom command switches. This is typical in
other CI servers like Bamboo and TeamCity and would love to see
that here as well. Thanks again.</p></div>christag:help.appveyor.com,2012-11-13:Comment/360411582015-06-24T18:18:31Z2015-06-24T18:18:31ZCustom msbuild property<div><p>Sure, though you can always switch to a custom msbuild
command.</p></div>Feodor Fitsnertag:help.appveyor.com,2012-11-13:Comment/360411582015-06-24T19:03:31Z2015-06-24T19:03:31ZCustom msbuild property<div><p>That's exactly what I'll do for now, thank you.</p>
<p>The main advantage I see to what i'm proposing though is
leveraging the ease of configuration and the automatic packaging
options. Once I go to command line, all of that is on me. That's
certainly a fine work around, but it definitely takes away from
simplicity you have here....which so many other CI servers are
missing.</p></div>chris