Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
<PropertyGroup Label="Repository Paths">
<RepoRoot>$(MSBuildThisFileDirectory)</RepoRoot>
<SrcPath>$([MSBuild]::NormalizeDirectory($(RepoRoot), 'src'))</SrcPath>
<RepoBinRoot>$([MSBuild]::NormalizeDirectory($(RepoRoot), 'bin'))</RepoBinRoot>
<RepoIntermediateRoot>$([MSBuild]::NormalizeDirectory($(RepoRoot), 'obj'))</RepoIntermediateRoot>

<!-- This file only exists during an official pipeline build -->
<PipelineVersionAssemblyInfoFilePath>$([MSBuild]::NormalizePath($(RepoRoot), '.version', 'PipelineAssemblyInfo.cs'))</PipelineVersionAssemblyInfoFilePath>
Expand All @@ -22,6 +20,20 @@
<AssemblyOriginatorKeyFile>$(RepoRoot)35MSSharedLib1024.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>

<!--
Enable Artifacts output layout (https://learn.microsoft.com/en-us/dotnet/core/sdk/artifacts-output)
Benefits of using this layout:
- we no longer own customizing output paths
- The default layout meets most needs that called for custom output paths to begin with
- can be customized further if needed
- folder paths are also much more consistent and predictable
- ArtifactsPivots folder name is normalized to lowercase, allowing for cross-platform compatibility
-->
<PropertyGroup Label="Artifacts output config">
<!-- Allow pipeline to override ArtifactsPath -->
<ArtifactsPath Condition="'$(ArtifactsPath)' == ''">$([MSBuild]::NormalizeDirectory($(RepoRoot), 'artifacts'))</ArtifactsPath>
</PropertyGroup>

<PropertyGroup Label="Nuget Config">
<RestorePackagesPath>$([MSBuild]::NormalizeDirectory($(RepoRoot), 'pkg'))</RestorePackagesPath>
<!-- <RestoreIgnoreFailedSource>true</RestoreIgnoreFailedSource> -->
Expand Down
17 changes: 0 additions & 17 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,6 @@
<!-- See: https://docs.microsoft.com/en-us/visualstudio/msbuild/customize-your-build?view=vs-2019#directorybuildprops-and-directorybuildtargets -->
<Import Project="$([MSBuild]::GetPathOfFileAbove($(MSBuildThisFile), '$(MSBuildThisFileDirectory)../'))" />

<PropertyGroup Label="Project output paths">
<RelativeProjectPath>$([MSBuild]::MakeRelative($(SrcPath), $(MSBuildProjectDirectory)))</RelativeProjectPath>

<!-- Latest MSBuild tools uses the $(BaseOutputPath) and $(OutputPath) properties. Legacy properties are set based on them in Microsoft.Common.targets.
By default, we configure the BaseOutputPath to the drop folder. Other adaptations to the final OutputPath can be done after this occurs.
-->
<BaseOutputPath>$([MSBuild]::NormalizeDirectory($(RepoBinRoot), $(RelativeProjectPath)))</BaseOutputPath>
<!--
Since we won't know the target framework folder (if applicable) when this file gets evaluated, we can't set
the OutputPath correctly here. In general, this should be done in a Directory.Build.targets if needed.
But it's preferable to only change the BaseOutputPath and let the OutputPath be computed by standard MSBuild props/targets.
<OutputPath>$(BaseOutputPath)\$(TargetFramework)\</OutputPath> -->

<!-- WARNING: DO NOT use Configuration to change the base Intermediate path, as it circumvents common .net SDK build assets which do not depend on it. -->
<BaseIntermediateOutputPath>$([MSBuild]::NormalizeDirectory($(RepoIntermediateRoot), $(RelativeProjectPath)))</BaseIntermediateOutputPath>
</PropertyGroup>

<PropertyGroup Label="Nuget defaults">
<!-- These settings allow projects to only need to include the properties unique to that project -->
<Authors>Microsoft</Authors>
Expand Down