When building a web Application project, TFS 2008 Builds two spearate projects in the _PublishedFold
Posted
by Steve Johnson
on Stack Overflow
See other posts from Stack Overflow
or by Steve Johnson
Published on 2010-06-14T03:48:14Z
Indexed on
2010/06/14
3:52 UTC
Read the original article
Hit count: 319
Hi all,
I am trying to a perform build automation on one of web application projects built using VS 2008.
The _PublishedWebSites contains two folders: Web and Deploy.
I just want the TFS 2008 to generate only the Deploy Folder and Not the Web Folder.
Here is my TFSBuild.proj File
<Project ToolsVersion="3.5" DefaultTargets="Compile" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\TeamBuild\Microsoft.TeamFoundation.Build.targets" />
<Import Project="$(MSBuildExtensionsPath)\Microsoft\WebDeployment\v9.0\Microsoft.WebDeployment.targets" />
<ItemGroup>
<SolutionToBuild Include="$(BuildProjectFolderPath)/../../Development/Main/MySoftware.sln">
<Targets></Targets>
<Properties></Properties>
</SolutionToBuild>
</ItemGroup>
<ItemGroup>
<ConfigurationToBuild Include="Release|AnyCPU">
<FlavorToBuild>Release</FlavorToBuild>
<PlatformToBuild>Any CPU</PlatformToBuild>
</ConfigurationToBuild>
</ItemGroup>
<!--<ItemGroup>
<SolutionToBuild Include="$(BuildProjectFolderPath)/../../Development/Main/MySoftware.sln">
<Targets></Targets>
<Properties></Properties>
</SolutionToBuild>
</ItemGroup>
<ItemGroup>
<ConfigurationToBuild Include="Release|x64">
<FlavorToBuild>Release</FlavorToBuild>
<PlatformToBuild>x64</PlatformToBuild>
</ConfigurationToBuild>
</ItemGroup>-->
<ItemGroup>
<AdditionalReferencePath Include="C:\3PR" />
</ItemGroup>
<Target
Name="GetCopyToOutputDirectoryItems"
Outputs="@(AllItemsFullPathWithTargetPath)"
DependsOnTargets="AssignTargetPaths;_SplitProjectReferencesByFileExistence">
<!-- Get items from child projects first. -->
<MSBuild
Projects="@(_MSBuildProjectReferenceExistent)"
Targets="GetCopyToOutputDirectoryItems"
Properties="%(_MSBuildProjectReferenceExistent.SetConfiguration); %(_MSBuildProjectReferenceExistent.SetPlatform)"
Condition="'@(_MSBuildProjectReferenceExistent)'!=''">
<Output TaskParameter="TargetOutputs" ItemName="_AllChildProjectItemsWithTargetPathNotFiltered"/>
</MSBuild>
<!-- Remove duplicates. -->
<RemoveDuplicates Inputs="@(_AllChildProjectItemsWithTargetPathNotFiltered)">
<Output TaskParameter="Filtered" ItemName="_AllChildProjectItemsWithTargetPath"/>
</RemoveDuplicates>
<!-- Target outputs must be full paths because they will be consumed by a different project. -->
<CreateItem
Include="@(_AllChildProjectItemsWithTargetPath->'%(FullPath)')"
Exclude=
"$(BuildProjectFolderPath)/../../Development/Main/Web/Bin*.pdb;
*.refresh;
*.vshost.exe;
*.manifest;
*.compiled;
$(BuildProjectFolderPath)/../../Development/Main/Web/Auth/MySoftware.dll;
$(BuildProjectFolderPath)/../../Development/Main/Web/BinApp_Web_*.dll;"
Condition="'%(_AllChildProjectItemsWithTargetPath.CopyToOutputDirectory)'=='Always' or '%(_AllChildProjectItemsWithTargetPath.CopyToOutputDirectory)'=='PreserveNewest'"
>
<Output TaskParameter="Include" ItemName="AllItemsFullPathWithTargetPath"/>
<Output TaskParameter="Include" ItemName="_SourceItemsToCopyToOutputDirectoryAlways"
Condition="'%(_AllChildProjectItemsWithTargetPath.CopyToOutputDirectory)'=='Always'"/>
<Output TaskParameter="Include" ItemName="_SourceItemsToCopyToOutputDirectory"
Condition="'%(_AllChildProjectItemsWithTargetPath.CopyToOutputDirectory)'=='PreserveNewest'"/>
</CreateItem>
</Target>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.WebDeployment.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="BeforeMerge">
</Target>
<Target Name="AfterMerge">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
I want to build everything that the builtin Deploy project is doing for me. But i dont want the generated Web Project as it conatains App_Web_xxxx.dll assemblies instead of a single compiled assembly.
Please help.
Thanks
© Stack Overflow or respective owner