I created a Blazor Server project targeting .NET 7:
dotnet new blazorserver -n DevExpressBlazorApp -f net7.0cd DevExpressBlazorAppdotnet add package DevExpress.Blazor --version 25.1.5dotnet restoreI added this line to the program.cs file:
builder.Services.AddDevExpressBlazor();This however throws this error
CS1061: 'IServiceCollection' does not contain a definition for 'AddDevExpressBlazor' and no accessible extension method 'AddDevExpressBlazor' accepting a first argument of type 'IServiceCollection' could be found (are you missing a using directive or an assembly reference?)
I have added this namespace
using DevExpress.Blazor;Then it throws this error:
The type or namespace name 'DevExpress' could not be found (are you missing a using directive or an assembly reference?)
I tried to build, but I get:
CS0246: The type or namespace name 'DevExpress' could not be found
Why does this error appear, and what is the correct way to set up DevExpress Blazor 25.1.5 in a .NET 7 Blazor Server project so it builds successfully even before using any components?