I've got a PrimaryBuild.targets file, which I build with MSBuild, through Team Foundation Server build definition. This file invokes other msbuild tasks to build all VB solutions contained in my component and lots of other targets.
(msbuild PrimaryBuild.targets)
/t:FullBuild;Deploy /p:Decorator=NTBMDev;DropLocation=\\xxx.xxx.xxx.xxx\;CurrentBranch=DEV;Configuration=Debug
When I build it from batch on my local computer,everything seems fine. When I build it on build server, there is a PrimaryBuild.target.vsprops file created during build process. I开发者_JAVA百科T overrides the OutputDirectory for my projects and all output files are copied to wrong folder (my deployment targets can't find it)
<?xml version="1.0" encoding="utf-8"?>
<VisualStudioPropertySheet ProjectType="Visual C++" Version="8.00" Name="Team Build Overrides" OutputDirectory="C:\Builds\7\NexTra\BMDEV\Binaries" />
There is no VC++ project built anywhere in the build process, I use only VB projects or write my own targets. Also, this is the only component that creates .vsprops during build on server, other components work fine. I don't even know where should I search to find, why this project creates this file.
If it helps - this is CoreCompile from my log:c:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Vbc.exe /noconfig /baseaddress:11000000 /imports:Microsoft.VisualBasic,System,System.Collections,System.Data,System.Diagnostics /optioncompare:Binary /optionexplicit+ /optionstrict+ /nowarn:42353,42354,42355 /optioninfer+ /nostdlib /removeintchecks- /sdkpath:"C:\Program Files\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0" /doc:obj\Debug\RuleSet.BM.xml /define:"CONFIG=\"Debug\",DEBUG=-1,TRACE=-1,_MyType=\"Windows\",PLATFORM=\"AnyCPU\"" /reference:**********.dll,***********.dll,***********.dll,*************.dll,"C:\Program Files\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Core.dll","C:\Program Files\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Data.dll","C:\Program Files\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.dll","C:\Program Files\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Drawing.dll","C:\Program Files\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Windows.Forms.dll","C:\Program Files\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Xml.dll" /debug+ /debug:full /keyfile:..\..\..\Transformer.snk /optimize- /out:obj\Debug\RuleSet.BM.dll /target:library /warnaserror- RuleSet.BM.vb AssemblyInfo.vb RuleSetInfo.vb "C:\Documents and Settings\pl-nextrabuild\Local Settings\Temp\.NETFramework,Version=v4.0.AssemblyAttributes.vb" /warnaserror+:41999,42016,42017,42018,42019,42020,42021,42022,42032,42036
The .vsprops file is created by TFS just in case there are any C++ projects, it isn't being used in your build. It does however contain the same alteration of $(OutDir) that TFS also creates for all other projects. Check out the file,
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\TeamBuild\Microsoft.TeamFoundation.Build.targets
and look at the CoreCleanSolution target to see the logic. Search for OutDir in your TFS build process template to see how TFS is altering this property, which is why your projects build to an alternate location.
精彩评论