dotnet / dotnet/format

Feature Request: Allow format to select only one framework in case of multi-target projects.

Open
#2,057 1 comment 6 reactions 0 assignees View on GitHub
Feature Request Help Wanted
Dominant language
No language data
Stars
1.9k
Forks
173
Avg merge
10d 13h
Merged PRs (30d)
1

Description

**Why this feature is needed:.**
When run 'dotnet format' in multi target project, there may cases where format tool can not merges the changes in multi frameworks eg net6, net472 and had to add unhelpful comments like:

```
/* Unmerged change from project 'xxxx (net6.0)'
Before:
}
After:
}
*/
```

see this [open issue](https://github.com/dotnet/format/issues/1634)
and source code is distorted with these such comments which loose the value of formating and we had to run our developed scripts to remove these comments.

**Suggestion**
It is great if we can avoid such problems by passing framework option in commandLine , e.g:

```
dotnet format --Framework net472
```

especially, `dotnet build` allow building one framework and also `dotnet format` allow filtering in files/diagon.Id, ..

```

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.