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

.editorconfig ignored when EnableDefaultItems = false #25801

Open
hopperpl opened this issue May 23, 2022 · 0 comments
Open

.editorconfig ignored when EnableDefaultItems = false #25801

hopperpl opened this issue May 23, 2022 · 0 comments
Assignees
Labels
Area-NetSDK untriaged Request triage from a team member

Comments

@hopperpl
Copy link

Version Used:

VS2022 - Version 17.2.0 Preview 6.0
Roslyn: 4.2.0-4.22220.5

Steps to Reproduce:

I'm not sure if this is a Roslyn issue or a msbuild issue. If the latter, please move it over to dotnet/msbuild

  1. have a .csproj
  2. set EnableDefaultItems to false
  3. within an item group add <Compile Include="Source/**/*.cs" />
  4. use a .editorconfig file at the root of the project (or at the level of folder Source)

Actual Behavior:

  • all settings in .editorconfig are fully ignored
  • all diagnostic/rule settings are ignored, the roslyn analyzer does not suppress as instructed
    (e.g. dotnet_diagnostic.IDE0042.severity = silent)
  • vs2022 does not use this new editor to change settings, it opens .editorconfig as a generic text file

Expected Behavior:

  • .editorconfig should not be removed using EnableDefaultItems, or I need the "counter"-instruction to re-include it

Notes:

<Project>
  <PropertyGroup>
    ...
    <BaseOutputPath>.build\</BaseOutputPath>
    <BaseIntermediateOutputPath>$(BaseOutputPath).intermediate\</BaseIntermediateOutputPath>
    <EnableDefaultItems>false</EnableDefaultItems>
  </PropertyGroup>

  <Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
  <Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />

  <ItemGroup>
    <Compile Include="Source\**\*.cs" />
  </ItemGroup>
</Project>
@dotnet-issue-labeler dotnet-issue-labeler bot added the untriaged Request triage from a team member label May 23, 2022
@vatsalyaagrawal vatsalyaagrawal added Bug untriaged Request triage from a team member and removed untriaged Request triage from a team member Bug labels Jun 2, 2022
@vatsalyaagrawal vatsalyaagrawal transferred this issue from dotnet/roslyn Jun 2, 2022
@dotnet-issue-labeler dotnet-issue-labeler bot added Area-NetSDK untriaged Request triage from a team member labels Jun 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-NetSDK untriaged Request triage from a team member
Projects
None yet
Development

No branches or pull requests

3 participants