Exported Settings not working in tfs build

Sysprogs forums Forums VisualGDB Exported Settings not working in tfs build

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #21186
    dabramson
    Participant

    Hello,

    I have a few libraries and an application in a solution. The libraries export settings for the dependents to consume. The exported include directories use environment variables to form complete paths.

    From looking at the TFSBuild output I see that correctly formed paths are being used in the compilation for the files in the project that exports the include directories, but the part of the path defined by environment variables is not being resolved when building the files in projects that reference the exporting project.

    I can manually build the entire solution without errors or warnings from the agent’s workspace when logged in as the same user that the agent runs as.

     

    So I guess I’m missing something, or exported setting are broken in the MSBuild step.

     

    Thanks,

    Dave

    #21190
    support
    Keymaster

    Hi,

    Some environment variables are defined differently for different user accounts (also once the process is started, its environment won’t be automatically updated once you change the Windows environment settings), so we would advise checking where the variables are defined and also confirming that the build agent process inherits them properly (e.g. by running “cmd /c echo %VARNAME%” as a part of the build).

    If this doesn’t help, please give us an example of a variable that doesn’t get resolved (i.e. where is it defined and what value you are observing) and we will try to help you get it to work.

    #21199
    dabramson
    Participant

    Thanks!

    That was the clue I needed. I stopped and started the agent (the process), and now the solution builds successfully. I knew that you had to restart Visual Studio to get it to load new environment variables, but I’m pretty new to using build agents so didn’t realize the same rule applied with them. Makes sense though…

     

    Regards,

    Dave

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.