jvance
jvance

Reputation: 551

How do you remove the build configuration from .Net Core Library prooject output paths?

I am adding a new .Net 5.0 library project to a solution with several older .Net Framework library projects already present. All of the existing projects build to a common directory above the root directory of the project. Specifically, our CommonLibraries.sln builds all of the project outputs to a References directory structured like below:

-Common --CommonLibraries.sln -References --<various .dll files output from the projects inside CommonLibraries.sln> -<other solutions that reference the .dll files in the References folder>

However, I cannot figure out how to get the .Net 5.0 project to stop building to References/Debug instead of just References. I've already added:

<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>

to get rid of the other extraneous bits that you can't modify from the UI, but I can't find any information on removing the Debug or Release level from the output path.

Upvotes: 1

Views: 1595

Answers (1)

dzilbers
dzilbers

Reputation: 392

You probably set just BaseOutputPath configuration property. If this is the case, MSBUILD appends $(Configuration) value to it as a subfolder. If you want to override this policy you have to set OutputPath configuration property instead of (or in addition to) BaseOutputPath, for example:

<OutputPath>$(SolutionDir)\bin\</OutputPath>

Upvotes: 6

Related Questions