Addressing IDE warnings #WIP
MODIFY
Directory.Build.props
Directory.Build.props
<Version>8.0</Version>
<OutputPath Condition="'$(WSL_DISTRO_NAME)'!=''">.\bin\Linux\$(Configuration)\</OutputPath>
<NullableWarnings>CS8600,CS8601,CS8602,CS8603,CS8604,CS8610,CS8614,CS8618,CS8622,CS8625,CS8653,CS8714</NullableWarnings>
- <ExpectedWarnings Condition="'$(ChapterNumber)'==''">$(ExpectedWarnings),$(NullableWarnings)</ExpectedWarnings>
+ <ExpectedWarnings>$(ExpectedWarnings)</ExpectedWarnings>
</PropertyGroup>
</Project>
\ No newline at end of file

MODIFY
Directory.Build.targets
Directory.Build.targets
<Project>
<PropertyGroup>
+ <IgnoreExpectedWarnings>true</IgnoreExpectedWarnings>
<NoWarn Condition="'$(IgnoreExpectedWarnings)'!=''">$(ExpectedWarnings)</NoWarn>
<WarningsNotAsErrors>$(ExpectedWarnings)</WarningsNotAsErrors>
</PropertyGroup>
<Target Name="VSTestIfTestProject">
<CallTarget Targets="VSTest" Condition="'$(IsTestProject)' == 'true'" />
</Target>
- <PropertyGroup>
- <!--<Nullable Condition="'$(ChapterNumber)'!=''">enable</Nullable>-->
- </PropertyGroup>
</Project>
\ No newline at end of file

MODIFY
src/Chapter02/Listing02.29.UsingTryParseInPlaceOfAnInvalidCastException.cs
src/Chapter02/Listing02.29.UsingTryParseInPlaceOfAnInvalidCastException.cs
+// Justification: Inline variable declaration not explained yet.
+#pragma warning disable IDE0018 // Inline variable declaration
namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter02.Listing02_29
{
public class Program
@@ -5,6 +7,7 @@ namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter02.Listing02_29
public static void Main()
{
double number;
+#pragma warning restore IDE0018 // Inline variable declaration
string input;
System.Console.Write("Enter a number: ");

Addressing IDE warnings #WIP