Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CS8602 Warning: Dereference of a Possibly Null Reference in Weather.razor (BlazorApp) #3265

Open
gladjohn opened this issue Feb 26, 2025 · 2 comments · Fixed by #3266
Open

Comments

@gladjohn
Copy link
Contributor

Microsoft.Identity.Web Library

Microsoft.Identity.Web

Microsoft.Identity.Web version

latest

Web app

Not Applicable

Web API

Not Applicable

Token cache serialization

Not Applicable

Description

During the build of Microsoft.Identity.Web.sln, the BlazorApp project generates CS8602 warnings due to the possible null dereference of the forecasts variable in Weather.razor.

Reproduction steps

During the build of Microsoft.Identity.Web.sln, the BlazorApp project generates CS8602 warnings due to the possible null dereference of the forecasts variable in Weather.razor.

Error message

##[warning]microsoft-identity-web\tests\DevApps\blazor\BlazorApp\Components\Pages\Weather.razor(42,27): Warning CS8602: Dereference of a possibly null reference.
C:__w\1\s\microsoft-identity-web\tests\DevApps\blazor\BlazorApp\Components\Pages\Weather.razor(42,27): warning CS8602: Dereference of a possibly null reference. [C:__w\1\s\microsoft-identity-web\tests\DevApps\blazor\BlazorApp\BlazorApp.csproj::TargetFramework=net9.0]

Id Web logs

No response

Relevant code snippets

private WeatherForecast[]? forecasts;

Regression

No response

Expected behavior

No warnings

@jennyf19
Copy link
Collaborator

I thought there was a PR for this yesterday, can you please link it?

@gladjohn
Copy link
Contributor Author

I thought there was a PR for this yesterday, can you please link it?

linked it now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: In Progress
3 participants