Blazor 5.0 server - warning CS1998 #34

Closed
opened 2026-01-29 17:30:27 +00:00 by claunia · 2 comments
Owner

Originally created by @Foizman on GitHub (Feb 16, 2021).

Hi,

I tried your solution, created a simple test project directly without adaptation and imported a test DB from SQL server.
There are many warnings when I press RUN.

Then I analyzed the code in Visual Studio and there I also get a lot of "CS1998" warnings:

6f5b59c2738eb4f941d81099502681804b4f3e75

Visual Studio says there is an asynchronous task method, but no waiting time, as can be clearly seen in the generated code:

421e3d2f41913478bc54b9cba63950269814aeec

Any idea to avoid that?

Cheers,
FM

Originally created by @Foizman on GitHub (Feb 16, 2021). Hi, I tried your solution, created a simple test project directly without adaptation and imported a test DB from SQL server. There are many warnings when I press RUN. Then I analyzed the code in Visual Studio and there I also get a lot of "CS1998" warnings: ![6f5b59c2738eb4f941d81099502681804b4f3e75](https://user-images.githubusercontent.com/60654005/108036229-3f745480-7038-11eb-88fd-d3021c48abef.png) Visual Studio says there is an asynchronous task method, but no waiting time, as can be clearly seen in the generated code: ![421e3d2f41913478bc54b9cba63950269814aeec](https://user-images.githubusercontent.com/60654005/108036234-400ceb00-7038-11eb-8fa4-2e49e7769f4e.png) Any idea to avoid that? Cheers, FM
Author
Owner

@akorchev commented on GitHub (Feb 16, 2021):

This repository is about the Radzen.Blazor component library. You seem to be using the Radzen IDE which is a different product.

To answer your question - yes, Radzen generates async methods by default as certain Radzen actions lead to async code. Since it is now known initially all methods are async. All Radzen applications address that warning by suppressing it in the csproj file.

Next time please follow the issue template.

@akorchev commented on GitHub (Feb 16, 2021): This repository is about the Radzen.Blazor component library. You seem to be using the Radzen IDE which is a different product. To answer your question - yes, Radzen generates async methods by default as certain Radzen actions lead to async code. Since it is now known initially all methods are async. All Radzen applications address that warning by suppressing it in the csproj file. Next time please follow the issue template.
Author
Owner

@Foizman commented on GitHub (Feb 17, 2021):

Thank you!

@Foizman commented on GitHub (Feb 17, 2021): Thank you!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/radzen-blazor#34