IntermediateOutputPath absolute path causes exe to be overwritten #11110
Labels
Documentation
Issues about docs, including errors and areas we should extend (this repo and learn.microsoft.com)
Priority:2
Work that is important, but not critical for the release
triaged
Issue Description
Discovered in dotnet/BenchmarkDotNet#2664, passing
/p:IntermediateOutputPath=
with an absolute path causes the exe of a referenced project to be overwritten by the project referencing it.Steps to Reproduce
ConsoleApp2.exe
in the bin directory of ConsoleApp1.Additional notes:
If I also include
/p:OutDir=
so that both projects output to the same bin directory, theConsoleApp2.exe
is correct if I do not include/p:IntermediateOutputPath=
, and incorrect if I do include it.Likewise, with both
/p:IntermediateOutputPath=
and/p:OutDir=
included, theConsoleApp2.exe
is correct if I do not include the project reference in step 3, and incorrect if it is included.Expected Behavior
Console prints
Hello World from ConsoleApp2
.Actual Behavior
Console prints
Hello World from ConsoleApp1
.Analysis
No response
Versions & Configurations
msbuild -version
Microsoft (R) Build Engine version 16.6.0 for Mono Copyright (C) Microsoft Corporation. All rights reserved. 16.6.0.22901
dotnet --version
The text was updated successfully, but these errors were encountered: