# Setting the Action type dynamically for VS.Net Solution and C++ Builder 2006+ project

**URL:** https://www.finalbuilder.com/forums/t/setting-the-action-type-dynamically-for-vs-net-solution-and-c-builder-2006-project/7448
**Category:** Discussion
**Tags:** finalbuilder, actions
**Created:** [January 11, 2024, 1:22pm UTC](https://www.finalbuilder.com/forums/t/setting-the-action-type-dynamically-for-vs-net-solution-and-c-builder-2006-project/7448 "2024-01-11T13:22:11Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![abell1](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/a/b2d939/32.png) [@abell1](https://www.finalbuilder.com/forums/u/abell1)
#### Post date: [January 11, 2024, 1:22pm UTC](https://www.finalbuilder.com/forums/t/setting-the-action-type-dynamically-for-vs-net-solution-and-c-builder-2006-project/7448/1 "2024-01-11T13:22:11Z")

</div>

Hi

In these build steps I can use a variable to set the Configuration, making it easy to switch between Debug and Release builts.

However, the dropdown list for Built Type (C++ Builder) or Action (MSVC) don’t seem to let me use a variable.

Is there a way around this?

I’d like to be able to use a variable switch between full rebuilds (for releases) and ‘make’ style builds that only build things that have changed. Otherwise I may end up with many duplicate build steps with just this setting changed in each of them, which is unpalatable, to say the least…

Andy

---

<div class="post-metadata">

### Author: ![Vincent](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/vincent/32/938_2.png) [@Vincent](https://www.finalbuilder.com/forums/u/Vincent)
#### Post date: [January 11, 2024, 11:35pm UTC](https://www.finalbuilder.com/forums/t/setting-the-action-type-dynamically-for-vs-net-solution-and-c-builder-2006-project/7448/2 "2024-01-11T23:35:05Z")

</div>

Hi Andy

We have updated the action so that Build Type becomes Target when the compiler version \> 2006 (ie for versions that use msbuild). The Target field does allow variables.

[https://downloads.finalbuilder.com/downloads/finalbuilder/800/FB800\_3324.exe](https://downloads.finalbuilder.com/downloads/finalbuilder/800/FB800_3324.exe)

---

<div class="post-metadata">

### Author: ![abell1](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/a/b2d939/32.png) [@abell1](https://www.finalbuilder.com/forums/u/abell1)
#### Post date: [January 12, 2024, 8:40am UTC](https://www.finalbuilder.com/forums/t/setting-the-action-type-dynamically-for-vs-net-solution-and-c-builder-2006-project/7448/3 "2024-01-12T08:40:43Z")

</div>

Thanks

That works for C++ Builder. What about MSVC? I’m using Build [VS.Net](http://VS.Net) solution. Can I specify Target in the MSBuild tab or doe you need to alter that action?

Andy

---

<div class="post-metadata">

### Author: ![Vincent](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/vincent/32/938_2.png) [@Vincent](https://www.finalbuilder.com/forums/u/Vincent)
#### Post date: [January 12, 2024, 10:17am UTC](https://www.finalbuilder.com/forums/t/setting-the-action-type-dynamically-for-vs-net-solution-and-c-builder-2006-project/7448/4 "2024-01-12T10:17:51Z")

</div>

Oh sorry I missed that you mentioned MSVC, I will do the same for the MSVC (might need a day or two).

---

<div class="post-metadata">

### Author: ![abell1](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/a/b2d939/32.png) [@abell1](https://www.finalbuilder.com/forums/u/abell1)
#### Post date: [January 12, 2024, 10:26am UTC](https://www.finalbuilder.com/forums/t/setting-the-action-type-dynamically-for-vs-net-solution-and-c-builder-2006-project/7448/5 "2024-01-12T10:26:09Z")

</div>

Vincent

No worries - thanks for your help with this

Andy

---

<div class="post-metadata">

### Author: ![Vincent](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/vincent/32/938_2.png) [@Vincent](https://www.finalbuilder.com/forums/u/Vincent)
#### Post date: [January 15, 2024, 6:15am UTC](https://www.finalbuilder.com/forums/t/setting-the-action-type-dynamically-for-vs-net-solution-and-c-builder-2006-project/7448/6 "2024-01-15T06:15:25Z")

</div>

This build allows variables in the [VS.net](http://VS.net) BuildAction field - when Use MSBuild is checked the field changes to Target and allows text entry and variables will be expanded at runtime.

[https://downloads.finalbuilder.com/downloads/finalbuilder/800/FB800\_3326.exe](https://downloads.finalbuilder.com/downloads/finalbuilder/800/FB800_3326.exe)

---

<div class="post-metadata">

### Author: ![abell1](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/a/b2d939/32.png) [@abell1](https://www.finalbuilder.com/forums/u/abell1)
#### Post date: [January 18, 2024, 9:08am UTC](https://www.finalbuilder.com/forums/t/setting-the-action-type-dynamically-for-vs-net-solution-and-c-builder-2006-project/7448/7 "2024-01-18T09:08:33Z")

</div>

Vincent

Thank you - this is working well.

Andy
