Skip to content

Commit abf4f63

Browse files
committed
Only read configuration when it's stable in targets
1 parent 848fd47 commit abf4f63

2 files changed

Lines changed: 16 additions & 8 deletions

File tree

Directory.Build.props

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,23 +15,15 @@
1515
<ArtifactsDir Condition="'$(ArtifactsDir)' == ''">$([MSBuild]::NormalizeDirectory('$(RepoRoot)', 'artifacts'))</ArtifactsDir>
1616
<ArtifactsObjDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsDir)', 'obj'))</ArtifactsObjDir>
1717
<ArtifactsBinDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsDir)', 'bin'))</ArtifactsBinDir>
18-
<ArtifactsTestResultsDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsDir)', 'TestResults', '$(Configuration)'))</ArtifactsTestResultsDir>
19-
<ArtifactsPackagesDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsDir)', 'packages', '$(Configuration)'))</ArtifactsPackagesDir>
2018
<OutDirName>$(MSBuildProjectName)</OutDirName>
2119

2220
<BaseIntermediateOutputPath>$([System.IO.Path]::GetFullPath('$(ArtifactsObjDir)$(OutDirName)\'))</BaseIntermediateOutputPath>
23-
<IntermediateOutputPath>$(BaseIntermediateOutputPath)$(Configuration)\</IntermediateOutputPath>
2421

2522
<BaseOutputPath>$([System.IO.Path]::GetFullPath('$(ArtifactsBinDir)$(OutDirName)\'))</BaseOutputPath>
26-
<OutputPath>$(BaseOutputPath)$(Configuration)\</OutputPath>
27-
28-
<PackageOutputPath>$(ArtifactsPackagesDir)</PackageOutputPath>
2923
</PropertyGroup>
3024

3125
<PropertyGroup>
3226
<UseMicrosoftTestingPlatformRunner>true</UseMicrosoftTestingPlatformRunner>
33-
<_MTPResultsDirectory>$(ArtifactsTestResultsDir)</_MTPResultsDirectory>
34-
<TestingPlatformCommandLineArguments>$(TestingPlatformCommandLineArguments) --results-directory $(_MTPResultsDirectory) --report-trx --report-trx-filename $(MSBuildProjectName).$(TargetFramework).$(OS).trx</TestingPlatformCommandLineArguments>
3527
</PropertyGroup>
3628

3729
<PropertyGroup Condition="'$(GITHUB_ACTIONS)' == 'true'">

Directory.Build.targets

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<Project>
2+
3+
<PropertyGroup>
4+
<ArtifactsTestResultsDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsDir)', 'TestResults', '$(Configuration)'))</ArtifactsTestResultsDir>
5+
<ArtifactsPackagesDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsDir)', 'packages', '$(Configuration)'))</ArtifactsPackagesDir>
6+
7+
<IntermediateOutputPath>$(BaseIntermediateOutputPath)$(Configuration)\</IntermediateOutputPath>
8+
<OutputPath>$(BaseOutputPath)$(Configuration)\</OutputPath>
9+
10+
<PackageOutputPath>$(ArtifactsPackagesDir)</PackageOutputPath>
11+
12+
<_MTPResultsDirectory>$(ArtifactsTestResultsDir)</_MTPResultsDirectory>
13+
<TestingPlatformCommandLineArguments>$(TestingPlatformCommandLineArguments) --results-directory $(_MTPResultsDirectory) --report-trx --report-trx-filename $(MSBuildProjectName).$(TargetFramework).$(OS).trx</TestingPlatformCommandLineArguments>
14+
</PropertyGroup>
15+
16+
</Project>

0 commit comments

Comments
 (0)