dotnet / dotnet/project-system

Simplify property dimensional configuration

Open
#8,089 0 comments 1 reaction 1 assignee Claimed by @adamint View on GitHub
Design Discussion Required Feature-Project-Properties-Designer MAUI Triage-Approved
Dominant language
C#
Stars
1k
Forks
415
PR merge metrics
No merged PRs in 30d

Description

## Summary
When setting a value for any subset of the possible varied dimensions, we default to setting the entire dimensional configuration in the project file.

For example, setting the debug and release values for the trimming property:
![MicrosoftTeams-image](https://user-images.githubusercontent.com/20359921/164311815-7f23e842-229d-43e4-89c5-b12242546ebb.png)

sets all 4 dimensional configurations associated with each
![MicrosoftTeams-image (1)](https://user-images.githubusercontent.com/20359921/164311914-d446c91e-d7c1-4961-a37f-1c7e7ec97e6f.png)

Instead, we should default to creating/adding the property value to a propertygroup with the least required dimensions. For the above example, setting the Debug value should create a propertygroup with the condition `'$(Configuration)'=='Debug'`.

Note that there is additional complexity when properties with different numbers of dimensions are set. For example,
```

Value

```

If trying to set the Debug value for property Property2, that is only varied by configuration, should create a new property group if one doesn't exist for this condition.
```

Value2

```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.