Created
October 12, 2012 08:20
-
-
Save centur/3877990 to your computer and use it in GitHub Desktop.
Msbuild batch projects example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="BatchMyProjects" ToolsVersion="4.0"> | |
<ItemGroup> | |
<BuildMyProjects Include="XXXX-Project-1" /> | |
<BuildMyProjects Include="XXXX-Project-2" /> | |
</ItemGroup> | |
<Target Name="BatchMyProjects" > | |
<ItemGroup> | |
<ProjectsToBuild Condition="Exists('SomeSourcePath\%(BuildMyProjects.Identity)/%(BuildMyProjects.Identity).csproj')"> | |
<ProjectName>SomeSourcePath/%(BuildMyProjects.Identity)/%(BuildMyProjects.Identity).csproj</ProjectName> | |
<PublishSubFolder>%(BuildMyProjects.Identity)</PublishSubFolder> | |
</ProjectsToBuild> | |
</ItemGroup> | |
<MSBuild Projects="%(ProjectsToBuild.ProjectName)" Targets="Build;PipelinePreDeployCopyAllFilesToOneFolder" | |
Properties="Configuration=Release; | |
OutDir=SomePathToDeploy/Deploy/%(ProjectsToBuild.PublishSubFolder)/; | |
OutputPath= SomePathToDeploy/Deploy/%(ProjectsToBuild.PublishSubFolder)/; | |
_PackageTempDir=SomePathToDeploy/Deploy/%(ProjectsToBuild.PublishSubFolder)/ | |
" /> | |
</Target> | |
</Project> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment