You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add <Nullable>enable</Nullable> in csproj.
The compiler will complain about that field m_Window of class App is not initialized, as expected.
Add nullable annotation onto the field declaration, making it become private Window? m_Window;. Then compile the project again.
Expected Behavior:
No warning about nullability present.
Actual Behavior:
The IDE IntelliSense warning goes away. But there will be warning CS8632: you can only use nullable annotations in #nullable enable context in IDE output window. The warning does not go into IDE error list window.
Other Information:
I haven't confirmed whether it's caused by WinUI or CsWinRT. But I can confirm that it doesn't apply to WPF (.NET5).
The text was updated successfully, but these errors were encountered:
Version Used:
Visual Studio 16.7 Preview 6
.NET SDK 5.0.100 Preview 7
WinUI 3 Preview 2
Steps to Reproduce:
Building the package project requires workaround for this VS version, but building the main .NET project will success.
<Nullable>enable</Nullable>
incsproj
.The compiler will complain about that field
m_Window
of classApp
is not initialized, as expected.private Window? m_Window;
. Then compile the project again.Expected Behavior:
No warning about nullability present.
Actual Behavior:
The IDE IntelliSense warning goes away. But there will be
warning CS8632: you can only use nullable annotations in #nullable enable context
in IDE output window. The warning does not go into IDE error list window.Other Information:
I haven't confirmed whether it's caused by WinUI or CsWinRT. But I can confirm that it doesn't apply to WPF (.NET5).
The text was updated successfully, but these errors were encountered: