dotnet / dotnet/Scaffolding

Adding a new class (scaffolding) does not pay attention to tab settings.

Open
#662 5 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
C#
Stars
818
Forks
260
Avg merge
1d 8h
Merged PRs (30d)
10

Description

_From @vsfeedback on December 11, 2017 16:13_

This worked in previous versions of VS but using Core and VS 2017 when I add a new class the file is created and it has the VS default tab settings applied not what is currently set. We have changed our tabs from 4 to 3 spaces (don't ask why - 15 year old decision) and when a new class is added there are 4 space tabs. I have to reformat the document every time to get it to change to 3 spaces. This will cause tab inconsistencies in our project long term. The scaffolding needs to format the document using the current tab settings when the file is created.

_This issue has been moved from https://developercommunity.visualstudio.com/content/problem/159713/adding-a-new-class-scaffolding-does-not-pay-attent.html
VSTS ticketId: 532832_
_These are the original issue comments:_

Jeff Kelly [MSFT] on 12/7/2017, 10:26 AM (3 days ago):

Thank you for your feedback!


Is there an .editorconfig file anywhere up the directory structure under the project where you observe this problem? These config files will conflict with the tab settings you specify in Tools ->Options.


We look forward to hearing from you!

Steve Overton on 12/7/2017, 10:30 AM (3 days ago):

Jeff, I cannot find any.

Jeff Kelly [MSFT] on 12/8/2017, 03:45 PM (2 days ago):

Thanks for checking. I can reproduce your issue in a .NET Core project (although .NET Framework classes work as you expect in both VS 2015 and VS 2017).


We'll keep this marked as under investigation to allow others to find and vote on it, and will keep this issue updated as we make progress towards a fix.


_These are the original issue solutions:_
(no solutions)

_Copied from original issue: dotnet/project-system#3038_

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.