Skip to content

Commit

Permalink
Resolve WFO1000 build warnings
Browse files Browse the repository at this point in the history
Resolve build warning/error (new in `net9.0`):

> Error WFO1000: Property 'ABC' does not configure the code serialization for its property content
  • Loading branch information
nil4 committed Sep 18, 2024
1 parent c882e29 commit 5b7aa41
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<!-- <TargetFramework>net462</TargetFramework>-->
<Nullable>enable</Nullable>
<LangVersion>10</LangVersion>
<ImplicitUsings>false</ImplicitUsings>
</PropertyGroup>

<PropertyGroup>
<TargetFramework>net7.0-windows</TargetFramework>
<TargetFramework>net9.0-windows</TargetFramework>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<OutputType>WinExe</OutputType>
<UseWindowsForms>true</UseWindowsForms>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
using Windows.Win32.Storage.Xps;
using Windows.Win32.UI.Accessibility;
using Windows.Win32.UI.WindowsAndMessaging;
using System.ComponentModel;
// ReSharper disable CommentTypo
// ReSharper disable StringLiteralTypo

Expand All @@ -36,6 +37,7 @@ public class ExternalAppHost : Control
/// <summary>
/// The Handle property as HWND.
/// </summary>
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
internal HWND ControlHandle { get; private set; }

private ExternalApp? _externalApp;
Expand All @@ -45,6 +47,7 @@ public class ExternalAppHost : Control
/// Gets or sets the <see cref="ILoggerFactory" /> used to create instances of <see cref="ILogger" />.
/// Defaults to <see cref="NullLoggerFactory" />.
/// </summary>
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public ILoggerFactory LoggerFactory { get; set; }

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<LangVersion>latest</LangVersion>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<NoWarn>$(NoWarn);NU1603,NU1701,NU5100,CS8981;WFO1000</NoWarn>
<NoWarn>$(NoWarn);NU1603,NU1701,NU5100,CS8981</NoWarn>
<Configurations>Debug;Release</Configurations>
<Platforms>AnyCPU;x64;ARM64</Platforms>
</PropertyGroup>
Expand Down

0 comments on commit 5b7aa41

Please sign in to comment.