http://blogs.clariusconsulting.net/kzu

Daniel Cazzulino's Blog

Go Back to
kzu′s Latest post

DevEnvDir considered harmful

It’s quite common to refer to $(DevEnvDir) in a project, such as to specify the path to a referenced assembly, or to execute a tool on a build event or a target. It’s right there in the UI after all, why not use it?

image

 

Well, turns out that the variable is not defined when the build is run by Team Build, so it resolves to *Undefined*. Yuck.

This adds yet another reason in favor of using the less obvious $(VS100COMNTOOLS) environment variable.

Just replace all occurrences of $(DevEnvDir) with $(VS100COMNTOOLS)..\IDE\ and you’re good.

Comments

4 Comments

  1. [...] of PublicAssemblies and PrivateAssemblies (not that you should be using any from there ) is DevEnvDir. As I explained elsewhere, that variable is only populated when building from inside VS. We can [...]

  2. For Visual Studio 2013 you should replace

    $(DevEnvDir)

    with

    $(VS120COMNTOOLS)..\IDE\