Quantcast
Channel: Active questions tagged blazor - Stack Overflow
Viewing all articles
Browse latest Browse all 4839

CS0246: The type or namespace name 'DevExpress' could not be found in Blazor Server (.NET 7)

$
0
0

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 restore

I 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?


Viewing all articles
Browse latest Browse all 4839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>