Skip to content

Commit e214ae9

Browse files
committed
Mute warnings about obsolete code
We have a ton of code marked with [Obsolete] and no dependencies beyond .NET framework so we will likely not run into using code ourselves marked Obsolete. Mute this globally for now, we can later consider muting each usage instead but right now that would really pollute the code. Mute warning CS0618 usage of obsolete member Mute warning CS0809 obsolete member overrides non-obsolete member
1 parent 10bc2c6 commit e214ae9

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

UnitsNet.Serialization.JsonNet/UnitsNet.Serialization.JsonNet.Common.props

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
<FrameworkPathOverride Condition="'$(TargetFramework)' == 'net35'">C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v3.5\Profile\Client</FrameworkPathOverride>
2626
<BaseIntermediateOutputPath>obj\$(MSBuildProjectName)</BaseIntermediateOutputPath>
2727
<OutputPath>..\Artifacts\$(MSBuildProjectName)</OutputPath>
28+
<NoWarn>CS0618</NoWarn>
2829
</PropertyGroup>
2930
<!-- NuGet references that work for both signed and unsigned -->
3031
<ItemGroup>

UnitsNet.Tests/UnitsNet.Tests.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
<TargetFrameworks>netcoreapp1.1</TargetFrameworks>
55
<RootNamespace>UnitsNet.Tests</RootNamespace>
66
<OutputPath>..\Artifacts\$(MSBuildProjectName)</OutputPath>
7+
<NoWarn>CS0618</NoWarn>
78
</PropertyGroup>
89

910
<ItemGroup>

UnitsNet/UnitsNet.Common.props

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
<RootNamespace>UnitsNet</RootNamespace>
2727
<!-- Workaround for building with dotnet CLI and targeting .NET 3.5: https://github.com/Microsoft/msbuild/issues/1333#issuecomment-296346352 -->
2828
<FrameworkPathOverride Condition="'$(TargetFramework)' == 'net35'">C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v3.5\Profile\Client</FrameworkPathOverride>
29+
<NoWarn>CS0618,CS0809</NoWarn>
2930
</PropertyGroup>
3031

3132
<!-- NuGet references that work for both signed and unsigned -->

0 commit comments

Comments
 (0)