bug -> .shfpproj file - BuildLogFile & OutputPath do not resolve environmental variables

Topics: Developer Forum, User Forum
Oct 16, 2010 at 12:21 AM

These two tags for some reason are not resolving environmental variables.

I get a %VARIABLE% folder  created instead of having it resolve to the proper path. This is making the project file format very inflexible.

Coordinator
Oct 16, 2010 at 8:39 PM

BuildLogFile will resolve environment variables like most of the other path properties.  Output path won't though since it's a plain string property.  This is by design as the default is a path relative to the project folder.  If it were like the other path properties, it would change the location in unpredictable ways if the project is moved to a different location.

Eric

 

Oct 26, 2010 at 11:23 PM
On 16 Oct 2010 13:39:40 -0700, "EWoodruff" <notifications@codeplex.com>
wrote:
> From: EWoodruff
>
> BuildLogFile will resolve environment variables like most of the other
> path properties. Output path won't though since it's a plain string
> property. This is by design as the default is a path relative to the
> project folder. If it were like the other path properties, it would
change
> the location in unpredictable ways if the project is moved to a
different
> location.Eric
>
>

The context is that I am working on a large project, and in turn building
in a console based build environment with a variable output path. The
OUTPUT FOLDER cannot be the same folder as the SOURCE PATH.

I was hoping to set the outputpath to something like
%systemdrive%\build\%buildenvironment%\ etc... so that it would resolve
properly. Currently I have to hard-code the project output directory to
something like C:\documentation\ etc... which is not scalable.

Is their no way to simply expand the environment variables on the output
dir property, so it is consistent with the other properties?

-J
Coordinator
Oct 27, 2010 at 2:12 AM

If you are building from the command line, you can override the property from there (/p:OutputPath=.....).  Environment variable expansion should work from there since they are expanded before being passed on to MSBuild.

Eric