[Bug]: Artifacts are placed in directory of lowest `Directory.Build.props` if more than one is present
just-ero opened this issue · comments
Ero commented
Issue Description
I import ./Directory.Build.props
into ./src/Directory.Build.props
. In ./Directory.Build.props
, I set ArtifactsOutputPath
to $(MSBuildThisFileDirectory)\artifacts
. This causes a ./src/artifacts
directory to be used for the artifacts of the projects in ./src
. I don't want this, I want all artifacts to be placed in ./artifacts
.
Steps to Reproduce
- Create or open any project.
- Create or open
./Directory.Build.props
, add the following to it:<Project> <PropertyGroup> <UseArtifactsOutput>true</UseArtifactsOutput> <ArtifactsOutputPath>$(MSBuildThisFileDirectory)\artifacts</ArtifactsOutputPath> </PropertyGroup> </Project>
- Create or open
./src/Directory.Build.props
, add the following to it:<Project> <Import Project="$([MSBuild]::GetPathOfFileAbove('$(MSBuildThisFile)', '$(MSBuildThisFileDirectory)\..'))" /> </Project>
- Build any project in
./src/*
. - Observe
./src/artifacts
being used for the build results.
Expected Behavior
Artifacts are placed in ./artifacts
.
Actual Behavior
Artifacts are placed in ./src/artifacts
.
Analysis
No response
Versions & Configurations
dotnet --version
: 8.0.204
Ero commented
It's ArtifactsPath
. That's embarrassing.