I am currently working with TFS2012 and VS2012 technology to Build and Deploy Web Application and Non Web Application.
Research carried out:
- Read the Inside the Microsoft Build Engine, Using MSBuild and Team Foundation Build book.
- Read Stackoverflow, msdn, and other forums for help on my problem.
Unfortunately I'm still faced with the issue.
Current setup:
I have a:
- Solution called ClassLib1.sln
- Build.proj file within the solution
- 2 Project within the Solution:
- ClassLib1.csproj - Non Web Application
- MvcApp1.csproj - Web Application
- Build server that performs the builds
- Build Definition (DefaultTemplate.11.1.xaml) that builds Build.proj file.
The Build.proj file contains following configuration:
<?xml version="1.0" encoding="utf-8" ?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<DirectoriesToDelete Include="\\server\build\test\MvcApp1" />
<DirectoriesToDelete Include="\\server\build\test\ClassLib1" />
<SolutionsToBuild Include="ClassLib1.sln" />
<ProjectsToPublish Include="MvcApp1\MvcApp1.csproj">
<Properties>
OutputPath=$(MSBuildProjectDirectory)\build\test\ClassLib1\MvcApp1\;
UseWPP_CopyWebApplication=true;
PipelineDependsOnBuild=false;
SkipInvalidConfigurations=true;
DeployOnBuild=true;
DeployTarget=PipelinePreDeployCopyAllFilesToOneFolder;
AutoParameterizationWebConfigConnectionStrings=false;
_PackageTempDir=\\server\build\test\MvcApp1
</Properties>
</ProjectsToPublish>
<ProjectsToPublish Include="ClassLib1\ClassLib1.csproj">
<Properties>
OutputPath=\\server\build\test\ClassLib1\
</Properties>
</ProjectsToPublish>
</ItemGroup>
<Target Name="Build">
<RemoveDir Directories="@(DirectoriesToDelete)" />
<MSBuild Projects="@(SolutionsToBuild)" />
<MSBuild Projects="@(ProjectsToPublish)" />
</Target>
</Project>
What works:
When executing the msbuild locally (e.g. msbuild Build.proj /t:Build), everything works. Both projects are built and output to the specified PackageTempDir or OutPutPath.
Problem at hand:
However, once I try to perform the build via Build definition then only the MvcApp1.csproj files are output in the specified place. The ClassLib1.csproj files are missing.
I've tried number of things, nothing worked so far (apart from doing it manually).
Please note I am somewhat new to this, so may have easily miss understood or missed something.