You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
And have a .editorconfig file that the class does not follow (e.g. ClassB.cs is written using TABs). Note that the .editorconfig should also be different from the default settings in VS.
When opening ClassB.cs it is noted "user preferences for this file type are overridden by this project's coding conventions". However, when manipulating the file (e.g. removing and readding the last } or using "Format Document") the settings used are not taken from the .editorconfig file, but from the settings in VS.
I've uploaded a small example to https://github.com/mikkelbu/EditorConfig-and-ContentFiles. The example contains two C# files ClassA.cs and ClassB.cs that are identical except for the class name, and both files use TABs (thus not following the .editorconfig in the project). ClassA is compiled, whereas the content of ClassB is copied to the output.
When applying "Format Document" only ClassA make use of the .editorconfig-settings (ClassB "just" uses the standard settings in VS).
Expected Behavior:
That the configuration in .editorconfig is also used for files included as content.
Actual Behavior:
That the (default) VS configuration is used for files included as content.
The text was updated successfully, but these errors were encountered:
mikkelbu
added a commit
to mikkelbu/nunit.analyzers
that referenced
this issue
Apr 18, 2018
Only indention I think (tabs and 2 spaces => 4 spaces).
(By changing my VS defaults, as .editorconfig is not applied to
files included as content, see dotnet/roslyn#25888)
Version Used:
Visual Studio Version 15.3.5
Steps to Reproduce:
ClassB.cs
) as contentClassB.cs
is written using TABs). Note that the .editorconfig should also be different from the default settings in VS.ClassB.cs
it is noted "user preferences for this file type are overridden by this project's coding conventions". However, when manipulating the file (e.g. removing and readding the last}
or using "Format Document") the settings used are not taken from the .editorconfig file, but from the settings in VS.I've uploaded a small example to https://github.com/mikkelbu/EditorConfig-and-ContentFiles. The example contains two C# files
ClassA.cs
andClassB.cs
that are identical except for the class name, and both files use TABs (thus not following the .editorconfig in the project).ClassA
is compiled, whereas the content ofClassB
is copied to the output.When applying "Format Document" only
ClassA
make use of the .editorconfig-settings (ClassB
"just" uses the standard settings in VS).Expected Behavior:
That the configuration in .editorconfig is also used for files included as content.
Actual Behavior:
That the (default) VS configuration is used for files included as content.
The text was updated successfully, but these errors were encountered: