Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
moh-hassan opened this issue Dec 22, 2023 · 1 comment
Labels
Feature Request This issue is requesting an enhancement or new feature Help Wanted This issue is up for grabs by the community

Comments

@moh-hassan
Copy link

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
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, ..

@sharwell sharwell added the Feature Request This issue is requesting an enhancement or new feature label Feb 15, 2024
@sharwell
Copy link
Member

We would likely accept a pull request with this improvement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request This issue is requesting an enhancement or new feature Help Wanted This issue is up for grabs by the community
Projects
None yet
Development

No branches or pull requests

2 participants