You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

123 lines
5.6 KiB

  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. <PropertyGroup>
  19. <DefineCommonItemSchemas>false</DefineCommonItemSchemas>
  20. <DefineCommonCapabilities>false</DefineCommonCapabilities>
  21. </PropertyGroup>
  22. <ProjectExtensions>
  23. <ProjectCapabilities>
  24. <DeploymentProject />
  25. </ProjectCapabilities>
  26. </ProjectExtensions>
  27. <ItemDefinitionGroup>
  28. <Content>
  29. <CopyToOutputDirectory>Always</CopyToOutputDirectory>
  30. </Content>
  31. <None>
  32. <CopyToOutputDirectory>Never</CopyToOutputDirectory>
  33. </None>
  34. <ProjectReference>
  35. <Private>false</Private>
  36. <Targets>Build</Targets>
  37. </ProjectReference>
  38. </ItemDefinitionGroup>
  39. <Target Name="CreateManifestResourceNames" />
  40. <PropertyGroup>
  41. <StageArtifactsDependsOn>
  42. _GetDeploymentProjectContent;
  43. _CalculateContentOutputRelativePaths;
  44. _GetReferencedProjectsOutput;
  45. _CalculateArtifactStagingDirectory;
  46. _CopyOutputToArtifactStagingDirectory;
  47. </StageArtifactsDependsOn>
  48. </PropertyGroup>
  49. <Target Name="_CopyOutputToArtifactStagingDirectory">
  50. <Copy SourceFiles="@(DeploymentProjectContentOutput)" DestinationFiles="$(ArtifactStagingDirectory)\$(MSBuildProjectName)%(RelativePath)" />
  51. <Copy SourceFiles="@(BuildProjectReferencesOutput)" DestinationFiles="$(ArtifactStagingDirectory)\$(MSBuildProjectName)\%(ProjectName)\%(RecursiveDir)%(FileName)%(Extension)" />
  52. </Target>
  53. <Target Name="_GetDeploymentProjectContent">
  54. <MSBuild Projects="$(MSBuildProjectFile)" Targets="ContentFilesProjectOutputGroup">
  55. <Output TaskParameter="TargetOutputs" ItemName="DeploymentProjectContentOutput" />
  56. </MSBuild>
  57. </Target>
  58. <Target Name="_GetReferencedProjectsOutput">
  59. <PropertyGroup>
  60. <MsBuildProperties>Configuration=$(Configuration);Platform=$(Platform)</MsBuildProperties>
  61. </PropertyGroup>
  62. <MSBuild Projects="@(ProjectReference)"
  63. BuildInParallel="$(BuildInParallel)"
  64. Properties="$(MsBuildProperties)"
  65. Targets="%(ProjectReference.Targets)" />
  66. <ItemGroup>
  67. <BuildProjectReferencesOutput Include="%(ProjectReference.IncludeFilePath)">
  68. <ProjectName>$([System.IO.Path]::GetFileNameWithoutExtension('%(ProjectReference.Identity)'))</ProjectName>
  69. </BuildProjectReferencesOutput>
  70. </ItemGroup>
  71. </Target>
  72. <Target Name="_CalculateArtifactStagingDirectory" Condition=" '$(ArtifactStagingDirectory)'=='' ">
  73. <PropertyGroup>
  74. <ArtifactStagingDirectory Condition=" '$(OutDir)'!='' ">$(OutDir)</ArtifactStagingDirectory>
  75. <ArtifactStagingDirectory Condition=" '$(ArtifactStagingDirectory)'=='' ">$(OutputPath)</ArtifactStagingDirectory>
  76. <ArtifactStagingDirectory Condition=" !HasTrailingSlash('$(ArtifactStagingDirectory)') ">$(ArtifactStagingDirectory)\</ArtifactStagingDirectory>
  77. <ArtifactStagingDirectory>$(ArtifactStagingDirectory)staging\</ArtifactStagingDirectory>
  78. <ArtifactStagingDirectory Condition=" '$(Build_StagingDirectory)'!='' AND '$(TF_Build)'=='True' ">$(Build_StagingDirectory)</ArtifactStagingDirectory>
  79. </PropertyGroup>
  80. </Target>
  81. <!-- Appends each of the deployment project's content output files with metadata indicating its relative path from the deployment project's folder. -->
  82. <Target Name="_CalculateContentOutputRelativePaths"
  83. Outputs="%(DeploymentProjectContentOutput.Identity)">
  84. <PropertyGroup>
  85. <_OriginalIdentity>%(DeploymentProjectContentOutput.Identity)</_OriginalIdentity>
  86. <_RelativePath>$(_OriginalIdentity.Replace('$(MSBuildProjectDirectory)', ''))</_RelativePath>
  87. </PropertyGroup>
  88. <ItemGroup>
  89. <DeploymentProjectContentOutput>
  90. <RelativePath>$(_RelativePath)</RelativePath>
  91. </DeploymentProjectContentOutput>
  92. </ItemGroup>
  93. </Target>
  94. <Target Name="CoreCompile" />
  95. <PropertyGroup>
  96. <StageArtifactsAfterTargets Condition=" '$(StageArtifacts)' == 'true' ">
  97. PrepareForRun
  98. </StageArtifactsAfterTargets>
  99. </PropertyGroup>
  100. <Target Name="StageArtifacts" DependsOnTargets="$(StageArtifactsDependsOn)" AfterTargets="$(StageArtifactsAfterTargets)"/>
  101. <!-- Custom target to clean up local deployment staging files -->
  102. <Target Name="DeleteBinObjFolders" BeforeTargets="Clean">
  103. <RemoveDir Directories="$(OutputPath)" />
  104. <RemoveDir Directories="$(BaseIntermediateOutputPath)" />
  105. </Target>
  106. </Project>