-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Open
Labels
Area-NetSDKuntriagedIssues and PRs which have not yet been triaged by a leadIssues and PRs which have not yet been triaged by a lead
Description
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
- have a .csproj
- set EnableDefaultItems to false
- within an item group add <Compile Include="Source/**/*.cs" />
- 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:
-
this only applies to when EnableDefaultItems is set to false, otherwise the same .editorconfig file works as expected and intended
-
there must be some exclusion of .editorconfig in the msbuild core xml files somewhere, but I cannot find it
-
I use a modified project file structure due to using BaseOutputPath and BaseIntermediateOutputPath as recommended in such cases:
(Setting BaseIntermediateOutputPath correctly in a SDK-based project is hard msbuild#1603 (comment))
<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>Metadata
Metadata
Assignees
Labels
Area-NetSDKuntriagedIssues and PRs which have not yet been triaged by a leadIssues and PRs which have not yet been triaged by a lead