Skip to content

Commit 7dc903c

Browse files
Copilotpetesramek
andauthored
Fix RS0017 enforcement via WarningsAsErrors in csproj
Agent-Logs-Url: https://github.com/petesramek/polyline-algorithm-csharp/sessions/1c652162-2d70-48dc-a57e-4a97a697213e Co-authored-by: petesramek <2333452+petesramek@users.noreply.github.com>
1 parent 28c87a9 commit 7dc903c

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,5 +275,5 @@ dotnet_naming_style.underscore_camel_case.capitalization = camel_case
275275

276276
dotnet_public_api_analyzer.require_api_files = true
277277

278-
# RS0017: Symbol removed from public API - always an error (breaking change detection)
278+
# RS0017: Symbol removed from public API - error severity (IDE guidance; build enforcement via WarningsAsErrors in .csproj)
279279
dotnet_diagnostic.RS0017.severity = error

src/PolylineAlgorithm/PolylineAlgorithm.csproj

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,13 @@
88
<GenerateDocumentationFile>True</GenerateDocumentationFile>
99
</PropertyGroup>
1010

11+
<PropertyGroup>
12+
<!-- RS0017: Symbol removed from public API — hard error so breaking changes can never be
13+
silently committed. The editorconfig dotnet_diagnostic setting alone is not honoured
14+
by MSBuild for third-party NuGet analyzers; WarningsAsErrors is required. -->
15+
<WarningsAsErrors>$(WarningsAsErrors);RS0017</WarningsAsErrors>
16+
</PropertyGroup>
17+
1118
<PropertyGroup>
1219
<PublishRepositoryUrl>true</PublishRepositoryUrl>
1320
</PropertyGroup>

0 commit comments

Comments
 (0)