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

razor.g.cs file: The type or namespace name "Pages" does not exist in the namespace "MyApp.Client" in Components_Pages_Users_razor.g.cs

$
0
0

I have a Blazor class which I'm trying to include in a component with @inherits like so:

@page "/Users"@inherits MyApp.Client.Pages.UsersBase...

The Base class, UsersBase.cs:

using Microsoft.AspNetCore.Components;namespace MyApp.Client.Pages{    public class UsersBase: ComponentBase    {           //...code...    }}

When I try compiling my project I get an error:

The type or namespace name "Pages" does not exist in the namespace "MyApp.Client" in Components_Pages_Users_razor.g.cs

The file, Components_Pages_Users_razor.g.cs, existed in the obj folder, so I tried both clearing the "bin" and "obj" files and rebuilding the solution. Neither solved the problem.

What is causing this?


Viewing all articles
Browse latest Browse all 4839

Trending Articles



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