Hello,
I am using the latest version of Radzen Studio V.1.70.5. I only created a blank server site application. When trying to run this app. I getting the following errors:
C:\Develop\KI\projects\ccom.comserver\src\CCom.AlarmMonitor\CCom.AlarmMonitor.csproj : error NU1008: The following PackageReference items cannot define a value for Version: Radzen.Blazor. Projects using Central Package Management must define a Version value on a PackageVersion item. For more information, visit Central Package Management | Microsoft Learn
C:\Develop\KI\projects\ccom.comserver\src\CCom.AlarmMonitor\Components\Layout\MainLayout.razor.cs(11,14): error CS0234: The type or namespace name 'Blazor' does not exist in the namespace 'Radzen' (are you missing an assembly reference?)
C:\Develop\KI\projects\ccom.comserver\src\CCom.AlarmMonitor\Components\Pages\Index.razor.cs(11,14): error CS0234: The type or namespace name 'Blazor' does not exist in the namespace 'Radzen' (are you missing an assembly reference?)
C:\Develop\KI\projects\ccom.comserver\src\CCom.AlarmMonitor\Components_Imports.razor(10,15): error CS0234: The type or namespace name 'Blazor' does not exist in the namespace 'Radzen' (are you missing an assembly reference?)
C:\Develop\KI\projects\ccom.comserver\src\CCom.AlarmMonitor\Components\App.razor(30,13): error CS0246: The type or namespace name 'ThemeService' could not be found (are you missing a using directive or an assembly reference?)
C:\Develop\KI\projects\ccom.comserver\src\CCom.AlarmMonitor\Components\Pages\Index.razor.cs(24,19): error CS0246: The type or namespace name 'DialogService' could not be found (are you missing a using directive or an assembly reference?)
C:\Develop\KI\projects\ccom.comserver\src\CCom.AlarmMonitor\Components\Layout\MainLayout.razor.cs(24,19): error CS0246: The type or namespace name 'DialogService' could not be found (are you missing a using directive or an assembly reference?)
C:\Develop\KI\projects\ccom.comserver\src\CCom.AlarmMonitor\Components\Layout\MainLayout.razor.cs(27,19): error CS0246: The type or namespace name 'TooltipService' could not be found (are you missing a using directive or an assembly reference?)
C:\Develop\KI\projects\ccom.comserver\src\CCom.AlarmMonitor\Components\Pages\Index.razor.cs(27,19): error CS0246: The type or namespace name 'TooltipService' could not be found (are you missing a using directive or an assembly reference?)
C:\Develop\KI\projects\ccom.comserver\src\CCom.AlarmMonitor\Components\Layout\MainLayout.razor.cs(30,19): error CS0246: The type or namespace name 'ContextMenuService' could not be found (are you missing a using directive or an assembly reference?)
C:\Develop\KI\projects\ccom.comserver\src\CCom.AlarmMonitor\Components\Pages\Index.razor.cs(30,19): error CS0246: The type or namespace name 'ContextMenuService' could not be found (are you missing a using directive or an assembly reference?)
C:\Develop\KI\projects\ccom.comserver\src\CCom.AlarmMonitor\Components\Layout\MainLayout.razor.cs(33,19): error CS0246: The type or namespace name 'NotificationService' could not be found (are you missing a using directive or an assembly reference?)
C:\Develop\KI\projects\ccom.comserver\src\CCom.AlarmMonitor\Components\Pages\Index.razor.cs(33,19): error CS0246: The type or namespace name 'NotificationService' could not be found (are you missing a using directive or an assembly reference?)
C:\Develop\KI\projects\ccom.comserver\src\CCom.AlarmMonitor\Components\Layout\MainLayout.razor(2,9): error CS0246: The type or namespace name 'CookieThemeService' could not be found (are you missing a using directive or an assembly reference?)
C:\Develop\KI\projects\ccom.comserver\src\CCom.AlarmMonitor\Program.cs(45,18): error CS1061: 'IServiceCollection' does not contain a definition for 'AddRadzenComponents' and no accessible extension method 'AddRadzenComponents' accepting a first argument of type 'IServiceCollection' could be found (are you missing a using directive or an assembly reference?)
C:\Develop\KI\projects\ccom.comserver\src\CCom.AlarmMonitor\Program.cs(46,18): error CS1061: 'IServiceCollection' does not contain a definition for 'AddRadzenCookieThemeService' and no accessible extension method 'AddRadzenCookieThemeService' accepting a first argument of type 'IServiceCollection' could be found (are you missing a using directive or an assembly reference?)
C:\Develop\KI\projects\ccom.comserver\src\CCom.AlarmMonitor\Components\App.razor(20,76): error CS0234: The type or namespace name 'Colors' does not exist in the namespace 'Radzen' (are you missing an assembly reference?)
C:\Develop\KI\projects\ccom.comserver\src\CCom.AlarmMonitor\Program.cs(8,18): error CS1061: 'IServiceCollection' does not contain a definition for 'AddRadzenComponents' and no accessible extension method 'AddRadzenComponents' accepting a first argument of type 'IServiceCollection' could be found (are you missing a using directive or an assembly reference?)
C:\Develop\KI\projects\ccom.comserver\src\CCom.AlarmMonitor\Program.cs(9,18): error CS1061: 'IServiceCollection' does not contain a definition for 'AddRadzenCookieThemeService' and no accessible extension method 'AddRadzenCookieThemeService' accepting a first argument of type 'IServiceCollection' could be found (are you missing a using directive or an assembly reference?)
C:\Develop\KI\projects\ccom.comserver\src\CCom.AlarmMonitor\Components\App.razor(42,30): error CS1061: 'ThemeService' does not contain a definition for 'SetTheme' and no accessible extension method 'SetTheme' accepting a first argument of type 'ThemeService' could be found (are you missing a using directive or an assembly reference?)
C:\Develop\KI\projects\ccom.comserver\src\CCom.AlarmMonitor\Components\App.razor(27,25): error CS8618: Non-nullable property 'HttpContext' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable.
C:\Develop\KI\projects\ccom.comserver\src\CCom.AlarmMonitor\Components\Layout\MainLayout.razor.cs(18,30): error CS8618: Non-nullable property 'JSRuntime' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable.
C:\Develop\KI\projects\ccom.comserver\src\CCom.AlarmMonitor\Components\Layout\MainLayout.razor.cs(21,37): error CS8618: Non-nullable property 'NavigationManager' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable.
C:\Develop\KI\projects\ccom.comserver\src\CCom.AlarmMonitor\Components\Pages\Index.razor.cs(18,30): error CS8618: Non-nullable property 'JSRuntime' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable.
C:\Develop\KI\projects\ccom.comserver\src\CCom.AlarmMonitor\Components\Pages\Index.razor.cs(21,37): error CS8618: Non-nullable property 'NavigationManager' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable.
C:\Develop\KI\projects\ccom.comserver\src\CCom.AlarmMonitor\Controllers\ReportController.cs(103,100): error CS8601: Possible null reference assignment.C:\Develop\KI\projects\ccom.comserver\src\CCom.AlarmMonitor\Components\Pages\Index.razor.cs(18,30): error CS8618: Non-nullable property 'JSRuntime' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable. [C:\Develop\KI\projects\ccom.comserver\src\CCom.AlarmMonitor\CCom.AlarmMonitor.csproj]
C:\Develop\KI\projects\ccom.comserver\src\CCom.AlarmMonitor\Components\Pages\Index.razor.cs(21,37): error CS8618: Non-nullable property 'NavigationManager' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable. [C:\Develop\KI\projects\ccom.comserver\src\CCom.AlarmMonitor\CCom.AlarmMonitor.csproj]
C:\Develop\KI\projects\ccom.comserver\src\CCom.AlarmMonitor\Components\Pages\Index.razor.cs(24,33): error CS8618: Non-nullable property 'DialogService' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable. [C:\Develop\KI\projects\ccom.comserver\src\CCom.AlarmMonitor\CCom.AlarmMonitor.csproj]
C:\Develop\KI\projects\ccom.comserver\src\CCom.AlarmMonitor\Components\Pages\Index.razor.cs(27,34): error CS8618: Non-nullable property 'TooltipService' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable. [C:\Develop\KI\projects\ccom.comserver\src\CCom.AlarmMonitor\CCom.AlarmMonitor.csproj]
C:\Develop\KI\projects\ccom.comserver\src\CCom.AlarmMonitor\Components\Pages\Index.razor.cs(30,38): error CS8618: Non-nullable property 'ContextMenuService' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable. [C:\Develop\KI\projects\ccom.comserver\src\CCom.AlarmMonitor\CCom.AlarmMonitor.csproj]
C:\Develop\KI\projects\ccom.comserver\src\CCom.AlarmMonitor\Components\Pages\Index.razor.cs(33,39): error CS8618: Non-nullable property 'NotificationService' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable. [C:\Develop\KI\projects\ccom.comserver\src\CCom.AlarmMonitor\CCom.AlarmMonitor.csproj]
C:\Develop\KI\projects\ccom.comserver\src\CCom.AlarmMonitor\Components\App.razor(27,25): error CS8618: Non-nullable property 'HttpContext' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable. [C:\Develop\KI\projects\ccom.comserver\src\CCom.AlarmMonitor\CCom.AlarmMonitor.csproj]
C:\Develop\KI\projects\ccom.comserver\src\CCom.AlarmMonitor\Components\App.razor(30,26): error CS8618: Non-nullable property 'ThemeService' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable. [C:\Develop\KI\projects\ccom.comserver\src\CCom.AlarmMonitor\CCom.AlarmMonitor.csproj]
C:\Develop\KI\projects\ccom.comserver\src\CCom.AlarmMonitor\Components\Layout\MainLayout.razor.cs(18,30): error CS8618: Non-nullable property 'JSRuntime' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable. [C:\Develop\KI\projects\ccom.comserver\src\CCom.AlarmMonitor\CCom.AlarmMonitor.csproj]
C:\Develop\KI\projects\ccom.comserver\src\CCom.AlarmMonitor\Components\Layout\MainLayout.razor.cs(21,37): error CS8618: Non-nullable property 'NavigationManager' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable. [C:\Develop\KI\projects\ccom.comserver\src\CCom.AlarmMonitor\CCom.AlarmMonitor.csproj]
C:\Develop\KI\projects\ccom.comserver\src\CCom.AlarmMonitor\Components\Layout\MainLayout.razor.cs(24,33): error CS8618: Non-nullable property 'DialogService' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable. [C:\Develop\KI\projects\ccom.comserver\src\CCom.AlarmMonitor\CCom.AlarmMonitor.csproj]
C:\Develop\KI\projects\ccom.comserver\src\CCom.AlarmMonitor\Components\Layout\MainLayout.razor.cs(27,34): error CS8618: Non-nullable property 'TooltipService' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable. [C:\Develop\KI\projects\ccom.comserver\src\CCom.AlarmMonitor\CCom.AlarmMonitor.csproj]
C:\Develop\KI\projects\ccom.comserver\src\CCom.AlarmMonitor\Components\Layout\MainLayout.razor.cs(30,38): error CS8618: Non-nullable property 'ContextMenuService' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable. [C:\Develop\KI\projects\ccom.comserver\src\CCom.AlarmMonitor\CCom.AlarmMonitor.csproj]
C:\Develop\KI\projects\ccom.comserver\src\CCom.AlarmMonitor\Components\Layout\MainLayout.razor.cs(33,39): error CS8618: Non-nullable property 'NotificationService' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable. [C:\Develop\KI\projects\ccom.comserver\src\CCom.AlarmMonitor\CCom.AlarmMonitor.csproj]
C:\Develop\KI\projects\ccom.comserver\src\CCom.AlarmMonitor\Controllers\ReportController.cs(103,100): error CS8601: Possible null reference assignment. [C:\Develop\KI\projects\ccom.comserver\src\CCom.AlarmMonitor\CCom.AlarmMonitor.csproj]Build FAILED.
C:\Develop\KI\projects\ccom.comserver\src\CCom.AlarmMonitor\Components\Pages\Index.razor.cs(18,30): error CS8618: Non-nullable property 'JSRuntime' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable. [C:\Develop\KI\projects\ccom.comserver\src\CCom.AlarmMonitor\CCom.AlarmMonitor.csproj]
C:\Develop\KI\projects\ccom.comserver\src\CCom.AlarmMonitor\Components\Pages\Index.razor.cs(21,37): error CS8618: Non-nullable property 'NavigationManager' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable. [C:\Develop\KI\projects\ccom.comserver\src\CCom.AlarmMonitor\CCom.AlarmMonitor.csproj]
C:\Develop\KI\projects\ccom.comserver\src\CCom.AlarmMonitor\Components\Pages\Index.razor.cs(24,33): error CS8618: Non-nullable property 'DialogService' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable. [C:\Develop\KI\projects\ccom.comserver\src\CCom.AlarmMonitor\CCom.AlarmMonitor.csproj]
C:\Develop\KI\projects\ccom.comserver\src\CCom.AlarmMonitor\Components\Pages\Index.razor.cs(27,34): error CS8618: Non-nullable property 'TooltipService' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable. [C:\Develop\KI\projects\ccom.comserver\src\CCom.AlarmMonitor\CCom.AlarmMonitor.csproj]
C:\Develop\KI\projects\ccom.comserver\src\CCom.AlarmMonitor\Components\Pages\Index.razor.cs(30,38): error CS8618: Non-nullable property 'ContextMenuService' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable. [C:\Develop\KI\projects\ccom.comserver\src\CCom.AlarmMonitor\CCom.AlarmMonitor.csproj]
C:\Develop\KI\projects\ccom.comserver\src\CCom.AlarmMonitor\Components\Pages\Index.razor.cs(33,39): error CS8618: Non-nullable property 'NotificationService' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable. [C:\Develop\KI\projects\ccom.comserver\src\CCom.AlarmMonitor\CCom.AlarmMonitor.csproj]
C:\Develop\KI\projects\ccom.comserver\src\CCom.AlarmMonitor\Components\App.razor(27,25): error CS8618: Non-nullable property 'HttpContext' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable. [C:\Develop\KI\projects\ccom.comserver\src\CCom.AlarmMonitor\CCom.AlarmMonitor.csproj]
C:\Develop\KI\projects\ccom.comserver\src\CCom.AlarmMonitor\Components\App.razor(30,26): error CS8618: Non-nullable property 'ThemeService' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable. [C:\Develop\KI\projects\ccom.comserver\src\CCom.AlarmMonitor\CCom.AlarmMonitor.csproj]
C:\Develop\KI\projects\ccom.comserver\src\CCom.AlarmMonitor\Components\Layout\MainLayout.razor.cs(18,30): error CS8618: Non-nullable property 'JSRuntime' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable. [C:\Develop\KI\projects\ccom.comserver\src\CCom.AlarmMonitor\CCom.AlarmMonitor.csproj]
C:\Develop\KI\projects\ccom.comserver\src\CCom.AlarmMonitor\Components\Layout\MainLayout.razor.cs(21,37): error CS8618: Non-nullable property 'NavigationManager' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable. [C:\Develop\KI\projects\ccom.comserver\src\CCom.AlarmMonitor\CCom.AlarmMonitor.csproj]
C:\Develop\KI\projects\ccom.comserver\src\CCom.AlarmMonitor\Components\Layout\MainLayout.razor.cs(24,33): error CS8618: Non-nullable property 'DialogService' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable. [C:\Develop\KI\projects\ccom.comserver\src\CCom.AlarmMonitor\CCom.AlarmMonitor.csproj]
C:\Develop\KI\projects\ccom.comserver\src\CCom.AlarmMonitor\Components\Layout\MainLayout.razor.cs(27,34): error CS8618: Non-nullable property 'TooltipService' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable. [C:\Develop\KI\projects\ccom.comserver\src\CCom.AlarmMonitor\CCom.AlarmMonitor.csproj]
C:\Develop\KI\projects\ccom.comserver\src\CCom.AlarmMonitor\Components\Layout\MainLayout.razor.cs(30,38): error CS8618: Non-nullable property 'ContextMenuService' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable. [C:\Develop\KI\projects\ccom.comserver\src\CCom.AlarmMonitor\CCom.AlarmMonitor.csproj]
C:\Develop\KI\projects\ccom.comserver\src\CCom.AlarmMonitor\Components\Layout\MainLayout.razor.cs(33,39): error CS8618: Non-nullable property 'NotificationService' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable. [C:\Develop\KI\projects\ccom.comserver\src\CCom.AlarmMonitor\CCom.AlarmMonitor.csproj]
C:\Develop\KI\projects\ccom.comserver\src\CCom.AlarmMonitor\Controllers\ReportController.cs(103,100): error CS8601: Possible null reference assignment. [C:\Develop\KI\projects\ccom.comserver\src\CCom.AlarmMonitor\CCom.AlarmMonitor.csproj]
0 Warning(s)
15 Error(s)Time Elapsed 00:00:03.15
C:\Develop\KI\projects\ccom.comserver\src\CCom.AlarmMonitor\Components\App.razor(27,25): error CS8618: Non-nullable property 'HttpContext' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable.
C:\Develop\KI\projects\ccom.comserver\src\CCom.AlarmMonitor\Components\App.razor(30,26): error CS8618: Non-nullable property 'ThemeService' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable.
C:\Develop\KI\projects\ccom.comserver\src\CCom.AlarmMonitor\Components\Pages\Index.razor.cs(18,30): error CS8618: Non-nullable property 'JSRuntime' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable.
C:\Develop\KI\projects\ccom.comserver\src\CCom.AlarmMonitor\Components\Pages\Index.razor.cs(21,37): error CS8618: Non-nullable property 'NavigationManager' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable.
C:\Develop\KI\projects\ccom.comserver\src\CCom.AlarmMonitor\Components\Pages\Index.razor.cs(24,33): error CS8618: Non-nullable property 'DialogService' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable.
C:\Develop\KI\projects\ccom.comserver\src\CCom.AlarmMonitor\Components\Pages\Index.razor.cs(27,34): error CS8618: Non-nullable property 'TooltipService' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable.
C:\Develop\KI\projects\ccom.comserver\src\CCom.AlarmMonitor\Components\Pages\Index.razor.cs(30,38): error CS8618: Non-nullable property 'ContextMenuService' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable.
C:\Develop\KI\projects\ccom.comserver\src\CCom.AlarmMonitor\Components\Pages\Index.razor.cs(33,39): error CS8618: Non-nullable property 'NotificationService' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable.
C:\Develop\KI\projects\ccom.comserver\src\CCom.AlarmMonitor\Components\Layout\MainLayout.razor.cs(18,30): error CS8618: Non-nullable property 'JSRuntime' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable.
C:\Develop\KI\projects\ccom.comserver\src\CCom.AlarmMonitor\Components\Layout\MainLayout.razor.cs(21,37): error CS8618: Non-nullable property 'NavigationManager' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable.
C:\Develop\KI\projects\ccom.comserver\src\CCom.AlarmMonitor\Components\Layout\MainLayout.razor.cs(24,33): error CS8618: Non-nullable property 'DialogService' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable.
C:\Develop\KI\projects\ccom.comserver\src\CCom.AlarmMonitor\Components\Layout\MainLayout.razor.cs(27,34): error CS8618: Non-nullable property 'TooltipService' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable.
C:\Develop\KI\projects\ccom.comserver\src\CCom.AlarmMonitor\Components\Layout\MainLayout.razor.cs(30,38): error CS8618: Non-nullable property 'ContextMenuService' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable.
C:\Develop\KI\projects\ccom.comserver\src\CCom.AlarmMonitor\Components\Layout\MainLayout.razor.cs(33,39): error CS8618: Non-nullable property 'NotificationService' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable.
I was then fixing this with Claude AI. The AI makes the following fixes:
CCom.AlarmMonitornow builds clean. Fixed three issues:
CCom.AlarmMonitor.csproj— removedVersion="*"from theRadzen.BlazorPackageReference(Central Package Management forbids per-project versions; the version is already centrally pinned to 11.2.3 inDirectory.Packages.props).
App.razor,MainLayout.razor.cs,Index.razor.cs—[Inject]/[CascadingParameter]properties lacked nullable initializers, which fails under this repo'sNullable enable+TreatWarningsAsErrors. (requiredforApp.razor,= default!;for code-behind).
Controllers/ReportController.cs:103—header.Value(aStringValues) implicitly converts to nullablestring?, which failed CS8601 when boxed into astring[]. Matched the fix already present in the siblingTestRadzenproject by calling.ToString().
When generating a new app, there should be no error at all.