How to pass MSBuild arguments for mutliple projects in TFS Build definition -
i trying pass different msbuild arguments 2 projects in tfs build definition.
i building single solution 2 projects in it. able pass msbuild arguments without specifying projects , it's working. both projects building correctly. now, want pass msbuild arguments separately both projects because have different arguments value both project. not able that.
if pass msbuild arguments below, common both project, it's working both project building correctly.
/p:deployonbuild=true /p:packagetemprootdir=\release /p:deployiisapppath="default web site";defaultpackagefilename=api.zip /p:outputpath="$(build.binariesdirectory)\$(buildplatform)\$(buildconfiguration)"
if pass msbuild arguments separate both projects,
/t:project1 /p:deployonbuild=true /p:packagetemprootdir=\release /p:deployiisapppath="default web site";defaultpackagefilename=api.zip /p:outputpath="$(build.binariesdirectory)\$(buildplatform)\$(buildconfiguration)" /t:project2 /p:deployonbuild=true /p:packagetemprootdir=\release /p:deployiisapppath="default web site";defaultpackagefilename=web.zip /p:outputpath="$(build.binariesdirectory)\$(buildplatform)\$(buildconfiguration)"
i looking change in package name based on project can see above. project1 want api.zip, project2 want web.zip. tried pass few different ways, didn't work.
with above agruments getting output both project same package name , it's web.zip. don't know why. it's building both project names same.
i found similar questions specify project file of solution using msbuild, doesn't specify how pass separate msbuild agruments mutliple projects.
since using vnext build, build 2 projects separately adding multiple vs build tasks.
for more details take @ below 2 questions:
Comments
Post a Comment