I try to build .csproj
that references some projects in solution. These references are marked with CopyLocal=False
. And this is the desired behavior.
I build it for CI using MSBuild, so I set output folder via /p:OutputPath="some output dir"
. I also set /p:SolutionDir="path to the solution"
to correctly resolve some NuGet references.
The problem is: when I specify OutputPath with absolute path to the output directory (like d:\solution\build\buildgroupsubfolder
), then MSBuild copies every dependency into output directory, I don't know why it is doing so. And if I specify output path with relative path (like ..\..\..\..\..\build\buildgroupsubfolder
) then MSBuild correctly handles CopyLocal=false
and doesn't copy references to output directory.
We had some nesting in our solution, projects are divided into groups, so we want them to be build into sub folders. And I want to be able to specify build path relative to base build path and not to path of project itself.
Why does MSBuild ignore CopyLocal=false when absolute path is specified and treats it correctly when relative path is specified?