Team Foundation Server – How to pass ReferencePath argument to MSBuild

Posted by Gopinath on Tech Dreams See other posts from Tech Dreams or by Gopinath
Published on Sun, 25 Nov 2012 19:24:02 +0000 Indexed on 2012/11/25 23:18 UTC
Read the original article Hit count: 384

Filed under:
|
|

When we manually build a .NET project using Visual Studio, the reference paths set in Project Properties are picked up by Visual Studio for referring to dependent DLLs. But the project is built using TFS, the reference path’s specified in project properties are not considered. This is because Reference Paths are user specific settings and they are not stored in .proj files(they are stored in user settings files). The TFS build may break if it does not find the required DLLs in GAC. We can solve the problem by passing ReferencePath parameter to MSBuild in TFS build configurations.

  1. Go to Team Explorer
  2. Select Build Defintion >> Edit Build Definition
  3. Switch to Process tab
  4. Navigate to Advanced Section and locate MSBuild Arguments
  5. Add the following: /p:ReferencePath=”{File path}”

tfs_specifying_msbuild_reference_path


© Tech Dreams or respective owner

Related posts about ASP.NET

Related posts about Microsoft