# How to define the environment variable MSBuild\[ver\]Path

**URL:** https://www.finalbuilder.com/forums/t/how-to-define-the-environment-variable-msbuild-ver-path/6541
**Category:** Discussion
**Created:** [August 13, 2019, 5:16am UTC](https://www.finalbuilder.com/forums/t/how-to-define-the-environment-variable-msbuild-ver-path/6541 "2019-08-13T05:16:54Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![danielrail](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/d/53a042/32.png) [@danielrail](https://www.finalbuilder.com/forums/u/danielrail)
#### Post date: [August 13, 2019, 5:16am UTC](https://www.finalbuilder.com/forums/t/how-to-define-the-environment-variable-msbuild-ver-path/6541/1 "2019-08-13T05:16:55Z")

</div>

Hi,

I’m using Visual Studio 2019 and Final Builder 8(latest release 2550).

And, I’m trying to use MSBuild(with Build [VS.Net](http://VS.Net) Solution) for the action “Publish”, because it complains that devenv.exe cannot use that action. But, when I place a checkmark for “Use MSBuild”, I get the following error: “MSBuild Location: The selected version of MSBuild [v16.0] was not found. Set a windows Environment variable “MSBuild[ver]Path” to enable FinalBuilder to find it.”

What should be the variable name, for it to work? I tried multiple combinations(i.e.: MSBuild[v16.0]Path, MSBuildv16.0Path, MSBuild16.0Path, MSBuild16Path), but no success.

Daniel

---

<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: [August 13, 2019, 5:28am UTC](https://www.finalbuilder.com/forums/t/how-to-define-the-environment-variable-msbuild-ver-path/6541/2 "2019-08-13T05:28:38Z")

</div>

It should be MSBuild16Path - note this should be a windows environment variable, not a FinalBuilder variable, and you need to restart FinalBuilder after adding the variable.

---

<div class="post-metadata">

### Author: ![danielrail](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/d/53a042/32.png) [@danielrail](https://www.finalbuilder.com/forums/u/danielrail)
#### Post date: [August 13, 2019, 9:01pm UTC](https://www.finalbuilder.com/forums/t/how-to-define-the-environment-variable-msbuild-ver-path/6541/3 "2019-08-13T21:01:06Z")

</div>

Thanks for the information. That worked.

Maybe add an example in the message that is displayed, or at least in the help, would be great. Along with the message that FinalBuilder needs to be restarted if it is still open, when adding the environment variable.

Again thanks.
