|
| 1 | +<?xml version="1.0" encoding="utf-8"?> |
| 2 | +<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
| 3 | + <PropertyGroup> |
| 4 | + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> |
| 5 | + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> |
| 6 | + <OutputPath>bin\$(Configuration)\</OutputPath> |
| 7 | + <DebugSymbols>false</DebugSymbols> |
| 8 | + <SkipCopyBuildProduct>true</SkipCopyBuildProduct> |
| 9 | + <AddAdditionalExplicitAssemblyReferences>false</AddAdditionalExplicitAssemblyReferences> |
| 10 | + <TargetRuntime>None</TargetRuntime> |
| 11 | + <BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">obj\</BaseIntermediateOutputPath> |
| 12 | + <BaseIntermediateOutputPath Condition=" !HasTrailingSlash('$(BaseIntermediateOutputPath)') ">$(BaseIntermediateOutputPath)\</BaseIntermediateOutputPath> |
| 13 | + <IntermediateOutputPath>$(BaseIntermediateOutputPath)$(Configuration)\</IntermediateOutputPath> |
| 14 | + <ProjectReferencesOutputPath Condition=" '$(ProjectReferencesOutputPath)' == '' ">$(IntermediateOutputPath)ProjectReferences</ProjectReferencesOutputPath> |
| 15 | + <ProjectReferencesOutputPath Condition=" !HasTrailingSlash('$(ProjectReferencesOutputPath)') ">$(ProjectReferencesOutputPath)\</ProjectReferencesOutputPath> |
| 16 | + <StageArtifacts Condition=" '$(StageArtifacts)' == '' ">true</StageArtifacts> |
| 17 | + </PropertyGroup> |
| 18 | + |
| 19 | + <PropertyGroup> |
| 20 | + <DefineCommonItemSchemas>false</DefineCommonItemSchemas> |
| 21 | + <DefineCommonCapabilities>false</DefineCommonCapabilities> |
| 22 | + </PropertyGroup> |
| 23 | + |
| 24 | + <ProjectExtensions> |
| 25 | + <ProjectCapabilities> |
| 26 | + <DeploymentProject /> |
| 27 | + </ProjectCapabilities> |
| 28 | + </ProjectExtensions> |
| 29 | + |
| 30 | + <ItemDefinitionGroup> |
| 31 | + <Content> |
| 32 | + <CopyToOutputDirectory>Always</CopyToOutputDirectory> |
| 33 | + </Content> |
| 34 | + <None> |
| 35 | + <CopyToOutputDirectory>Never</CopyToOutputDirectory> |
| 36 | + </None> |
| 37 | + <ProjectReference> |
| 38 | + <Private>false</Private> |
| 39 | + <Targets>Build</Targets> |
| 40 | + </ProjectReference> |
| 41 | + </ItemDefinitionGroup> |
| 42 | + |
| 43 | + <Target Name="CreateManifestResourceNames" /> |
| 44 | + |
| 45 | + <PropertyGroup> |
| 46 | + <StageArtifactsDependsOn> |
| 47 | + _GetDeploymentProjectContent; |
| 48 | + _CalculateContentOutputRelativePaths; |
| 49 | + _GetReferencedProjectsOutput; |
| 50 | + _CalculateArtifactStagingDirectory; |
| 51 | + _CopyOutputToArtifactStagingDirectory; |
| 52 | + </StageArtifactsDependsOn> |
| 53 | + </PropertyGroup> |
| 54 | + |
| 55 | + <Target Name="_CopyOutputToArtifactStagingDirectory"> |
| 56 | + <Copy SourceFiles="@(DeploymentProjectContentOutput)" DestinationFiles="$(ArtifactStagingDirectory)\$(MSBuildProjectName)%(RelativePath)" /> |
| 57 | + <Copy SourceFiles="@(BuildProjectReferencesOutput)" DestinationFiles="$(ArtifactStagingDirectory)\$(MSBuildProjectName)\%(ProjectName)\%(RecursiveDir)%(FileName)%(Extension)" /> |
| 58 | + </Target> |
| 59 | + |
| 60 | + <Target Name="_GetDeploymentProjectContent"> |
| 61 | + <MSBuild Projects="$(MSBuildProjectFile)" Targets="ContentFilesProjectOutputGroup"> |
| 62 | + <Output TaskParameter="TargetOutputs" ItemName="DeploymentProjectContentOutput" /> |
| 63 | + </MSBuild> |
| 64 | + </Target> |
| 65 | + |
| 66 | + <Target Name="_GetReferencedProjectsOutput"> |
| 67 | + <PropertyGroup> |
| 68 | + <MsBuildProperties>Configuration=$(Configuration);Platform=$(Platform)</MsBuildProperties> |
| 69 | + </PropertyGroup> |
| 70 | + |
| 71 | + <MSBuild Projects="@(ProjectReference)" |
| 72 | + BuildInParallel="$(BuildInParallel)" |
| 73 | + Properties="$(MsBuildProperties)" |
| 74 | + Targets="%(ProjectReference.Targets)" /> |
| 75 | + |
| 76 | + <ItemGroup> |
| 77 | + <BuildProjectReferencesOutput Include="%(ProjectReference.IncludeFilePath)"> |
| 78 | + <ProjectName>$([System.IO.Path]::GetFileNameWithoutExtension('%(ProjectReference.Identity)'))</ProjectName> |
| 79 | + </BuildProjectReferencesOutput> |
| 80 | + </ItemGroup> |
| 81 | + </Target> |
| 82 | + |
| 83 | + <Target Name="_CalculateArtifactStagingDirectory" Condition=" '$(ArtifactStagingDirectory)'=='' "> |
| 84 | + <PropertyGroup> |
| 85 | + <ArtifactStagingDirectory Condition=" '$(OutDir)'!='' ">$(OutDir)</ArtifactStagingDirectory> |
| 86 | + <ArtifactStagingDirectory Condition=" '$(ArtifactStagingDirectory)'=='' ">$(OutputPath)</ArtifactStagingDirectory> |
| 87 | + <ArtifactStagingDirectory Condition=" !HasTrailingSlash('$(ArtifactStagingDirectory)') ">$(ArtifactStagingDirectory)\</ArtifactStagingDirectory> |
| 88 | + <ArtifactStagingDirectory>$(ArtifactStagingDirectory)staging\</ArtifactStagingDirectory> |
| 89 | + <ArtifactStagingDirectory Condition=" '$(Build_StagingDirectory)'!='' AND '$(TF_Build)'=='True' ">$(Build_StagingDirectory)</ArtifactStagingDirectory> |
| 90 | + </PropertyGroup> |
| 91 | + </Target> |
| 92 | + |
| 93 | + <!-- Appends each of the deployment project's content output files with metadata indicating its relative path from the deployment project's folder. --> |
| 94 | + <Target Name="_CalculateContentOutputRelativePaths" |
| 95 | + Outputs="%(DeploymentProjectContentOutput.Identity)"> |
| 96 | + <PropertyGroup> |
| 97 | + <_OriginalIdentity>%(DeploymentProjectContentOutput.Identity)</_OriginalIdentity> |
| 98 | + <_RelativePath>$(_OriginalIdentity.Replace('$(MSBuildProjectDirectory)', ''))</_RelativePath> |
| 99 | + </PropertyGroup> |
| 100 | + |
| 101 | + <ItemGroup> |
| 102 | + <DeploymentProjectContentOutput> |
| 103 | + <RelativePath>$(_RelativePath)</RelativePath> |
| 104 | + </DeploymentProjectContentOutput> |
| 105 | + </ItemGroup> |
| 106 | + </Target> |
| 107 | + |
| 108 | + <Target Name="CoreCompile" /> |
| 109 | + |
| 110 | + <PropertyGroup> |
| 111 | + <StageArtifactsAfterTargets Condition=" '$(StageArtifacts)' == 'true' "> |
| 112 | + PrepareForRun |
| 113 | + </StageArtifactsAfterTargets> |
| 114 | + </PropertyGroup> |
| 115 | + |
| 116 | + <Target Name="StageArtifacts" DependsOnTargets="$(StageArtifactsDependsOn)" AfterTargets="$(StageArtifactsAfterTargets)"/> |
| 117 | + |
| 118 | + <!-- Custom target to clean up local deployment staging files --> |
| 119 | + <Target Name="DeleteBinObjFolders" BeforeTargets="Clean"> |
| 120 | + <RemoveDir Directories="$(OutputPath)" /> |
| 121 | + <RemoveDir Directories="$(BaseIntermediateOutputPath)" /> |
| 122 | + </Target> |
| 123 | +</Project> |
0 commit comments