Skip to content

Support setting a root output path for all projects in a repo or solution with a single property #3497

Closed as not planned

Description

Currently there are several different properties that control where project output goes. If you want all project output for a repo to go under a single folder, it is certainly possible to set this up, but it involves setting several properties, and knowing how to include $(MSBuildProjectName) as part of the path. For example, you can put the following in a Directory.Build.props file (assuming all your projects use Microsoft.NET.Sdk):

<RepoRoot>$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)'))</RepoRoot>
<BaseOutputPath>$(RepoRoot)artifacts\bin\$(MSBuildProjectName)\</BaseOutputPath>
<BaseIntermediateOutputPath>$(RepoRoot)artifacts\obj\$(MSBuildProjectName)\</BaseIntermediateOutputPath>

We would like to add a single property (for example RootOutputPath) that handles this automatically.

See also dotnet/sdk#867

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions