Skip to content

Commit 87614b6

Browse files
committed
Mitigated .NET 9 Visual Studio code analysis misbehavior with additional editorconfig settings.
1 parent 2466df3 commit 87614b6

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

.editorconfig

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
[*.cs]
22

3-
# IDE0008: Use explicit type
4-
csharp_style_var_elsewhere = true
3+
csharp_prefer_braces = when_multiline
54
csharp_style_namespace_declarations=file_scoped:warning
5+
csharp_style_var_when_type_is_apparent = true
6+
csharp_style_var_for_built_in_types = true
7+
csharp_style_var_elsewhere = true
8+
9+
# IDE0040: Add accessibility modifiers
10+
dotnet_diagnostic.IDE0040.severity = none

WebAssembly/WebAssembly.csproj

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,7 @@
2727
<PublishRepositoryUrl>true</PublishRepositoryUrl>
2828
<EmbedUntrackedSources>true</EmbedUntrackedSources>
2929
<DebugType>embedded</DebugType>
30-
<!--
31-
Starting in .NET 9, this causes a huge amount of IDE errors in Visual Studio for some reason.
3230
<AnalysisMode>Minimum</AnalysisMode>
33-
-->
3431
</PropertyGroup>
3532

3633
<ItemGroup>
@@ -44,8 +41,6 @@
4441

4542
<PropertyGroup Condition="'$(GITHUB_ACTIONS)' == 'true'">
4643
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
47-
<!-- Even though this is broken in .NET 9 + VS 2022 for this project, it builds fine so we should still run it. -->
48-
<AnalysisMode>Minimum</AnalysisMode>
4944
</PropertyGroup>
5045

5146
</Project>

0 commit comments

Comments
 (0)