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
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.
- Go to Team Explorer
- Select Build Defintion >> Edit Build Definition
- Switch to Process tab
- Navigate to Advanced Section and locate MSBuild Arguments
- Add the following: /p:ReferencePath=”{File path}”
© Tech Dreams or respective owner