Skip to content

Commit 859e82c

Browse files
authored
.Net: Remove old warnings (#11070)
### Motivation and Context For quite a while the SYSLIB1222, are present in the solution. This PR suppress them and another new JSON001 warning. ![image](https://github.com/user-attachments/assets/4e39833d-6453-4440-9efa-01f561f80743)
1 parent f85c217 commit 859e82c

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

dotnet/src/Connectors/Connectors.Onnx.UnitTests/Connectors.Onnx.UnitTests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<IsTestProject>true</IsTestProject>
88
<Nullable>enable</Nullable>
99
<IsPackable>false</IsPackable>
10-
<NoWarn>$(NoWarn);SKEXP0001;SKEXP0070;CS1591;IDE1006;RCS1261;CA1031;CA1308;CA1861;CA2007;CA2234;VSTHRD111</NoWarn>
10+
<NoWarn>$(NoWarn);SKEXP0001;SKEXP0070;CS1591;IDE1006;RCS1261;CA1031;CA1308;CA1861;CA2007;CA2234;VSTHRD111;SYSLIB1222</NoWarn>
1111
</PropertyGroup>
1212

1313
<ItemGroup>

dotnet/src/Connectors/Connectors.Onnx/Connectors.Onnx.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
<TargetFrameworks>net8.0;netstandard2.0</TargetFrameworks>
88
<IsAotCompatible Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net7.0'))">true</IsAotCompatible>
99
<VersionSuffix>alpha</VersionSuffix>
10+
<NoWarn>SYSLIB1222</NoWarn>
1011
</PropertyGroup>
1112

1213
<!-- IMPORT NUGET PACKAGE SHARED PROPERTIES -->

dotnet/src/SemanticKernel.UnitTests/Utilities/ExceptionConverterTests.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ public ExceptionJsonConverterTests()
2121
#pragma warning disable CA1031 // Do not catch general exception types
2222
try
2323
{
24+
#pragma warning disable JSON001 // Invalid JSON pattern
2425
JsonSerializer.Deserialize<object>("invalid_json");
26+
#pragma warning restore JSON001 // Invalid JSON pattern
2527
}
2628
catch (Exception ex)
2729
{

0 commit comments

Comments
 (0)