index > Team Foundation Server - Build Automation > $(VSINSTALLDIR) problem

$(VSINSTALLDIR) problem


Hi All,

I have a Build where I am trying to install some dll in the Gac after the Build.

I added the following entry in the build file.

<Exec Command="&quot;$(VSINSTALLDIR)\SDK\v2.0\Bin\GacUtil.exe&quot; -i $(DropLocation)$(Slash)$(BuildNumber)$(Slash)Release/Foundation.Build.Tasks.dll"/>

The entry result in this error:

\BuildType\TFSBuild.proj(172,5): error MSB3073: The command ""\..\..\SDK\v2.0\Bin\GacUtil.exe" -i \\vsts\Drops\Foundation_20061009.9\Release/Foundation.Build.Tasks.dll" exited with code 3.

Where if I use

<Exec Command="&quot;C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin\GacUtil.exe&quot; -i $(DropLocation)$(Slash)$(BuildNumber)$(Slash)Release/Foundation.Build.Tasks.dll"/>

Everything works perfectly.

I can use the second entry in the short run but I would like to have a more portable solution.

Thank you for any help.

Alessandro

seduto

On the build machine, there is a file called Microsoft.TeamFoundation.Build.targets, usually found in C:\Program Files\MSBuild\Microsoft\VisualStudio\v8.0\TeamBuild.

In this Team Build targets file, you can find the following line:

<VSINSTALLDIR Condition=" '$(VSINSTALLDIR)'=='' and '$(NetSamplePath)'!=''" >$(NetSamplePath)\..\..</VSINSTALLDIR>

The purpose of the line is to help find the code analysis assemblies on the build machine. Somehow it looks like your NetSamplePath is a space or something else that is not empty, but looks empty. So, vsinstalldir gets set to a completely invalid path. It's hard to say what's really happening. But I definitely think you need to set that variable for now. You might want to try using the following property that we pass in to MSBuild on the command line:

/p:TeamBuildRefPath="C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies"

Jason Pricket - MSFT
reply 2

You can use google to search for other answers

 

More Articles

TF53010 - The build request is not from the configured Team Found...
Build number for tasks and changesets.
How to change default "assigned to" of bug workitem (TF...
Build Type problem
Build failures after upgrade to RTM trial
Best Practice for Exception Management in Custom Tasks
How to copy binary results of TeamBuild to common directory
Config to run all unit tests without test list
Team System Builds and dropping an MSI
Time Log for Customized Tasks
Welcome to Bokebb   New Update   Joins the collection  
 

New Articles

Project reference
Failed to create New Team Build Type
How to build only project, not soluion.
One OutDir for all Solutions in a Team B…
RTM: Build Type running Test List alway…
Error while trying to get sources from t…
Unit tests on Team Build
TFS labels don't match AssemblyInfoTask …
TF42056: The build service could not con…
Problem in creating the Release Mode Bui…
Team Foundation Server Build Process
Team Foundation Build status is "Fa…
Error: The "CreateWorkspaceTask&quo…
Automated Build, have trouble building …
Team Build taking 10-15 minutes to gener…

Hot Articles

Build doesnt compile/ publish web servic…
Build for setup project failing
Shared Components between VSTS Projects
Inserting Build Date and Time in a Prope…
Send mail on Build Failure?
Automated Builds with unit tests require…
NUnit and MSBuild on VS2005 Team Build S…
Changing the drop location (overriding ?)
multi-platform project dependencies
Config to run all unit tests without tes…
Storing Common Data Between Build Types
Print build summary?
Build Multiple TFS Projects not working
Development, Staging and Production - ho…
tfsbuild.exe.config AllowedTeamServer

Recommend Articles

Problem building Setup Projects with Tea…
Interaction with Visual Studio Team Buil…
How to do strong name signing and digita…
Implementing Customized Tasks in Team Bu…
including files fails
Build fails with: The binary form of an …
Merge by Work Items
One build type for two branches of a sol…
Build Failed on RC
Getting a project from another Team Proj…
2 questions about Automation Build / Bui…
Undefined variable in TFS Build (MSB4102)
Team Foundaion Build vs. Visual Build Pro
Traffic to the teamsystem server after a…
Problems with run test coverage analisys…