dotnet / dotnet/msbuild

Option to exclude properties from /restore

Open
#3,322 3 comments 0 reactions 0 assignees View on GitHub
triaged
Dominant language
C#
Stars
5.5k
Forks
1.5k
Avg merge
1d 13h
Merged PRs (30d)
133

Description

Currently there is no option to exclude certain `/p` arguments from the restore (`/restore`) pass.
`/restoreProperties` only allows to use a different set of global properties as arguments, and (de-facto) unsetting a property via `/rp:Foo=` has a different semantic than not passing a property during restore.

I'm looking to remove [this hack](https://github.com/dotnet/cli/blob/508f902ed0d49891400a806e9b9785e5434d9789/src/dotnet/commands/RestoringCommand.cs#L73) from the CLI that removes arguments starting with a certain `-p:…` prefix. If a proper way to exclude global properties during restore, this may even remove the need for a separate msbuild invocation when a propery to exclude is present.

I'm thinking of `/noRestoreProperty:`

Is this appropriate? I'm willing to implement this myself but want to ask/discuss before submitting a PR :)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.