Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

CS0246 in Blazor project with Components. #2567

Open
YordanYanakiev opened this issue Nov 20, 2020 · 0 comments
Open

CS0246 in Blazor project with Components. #2567

YordanYanakiev opened this issue Nov 20, 2020 · 0 comments

Comments

@YordanYanakiev
Copy link

YordanYanakiev commented Nov 20, 2020

#Versions

  • Visual Studio version: 16.9.0 preview 1.0

What happened

Severity	Code	Description	Project	File	Line	Suppression State
Error	CS0246	The type or namespace name 'StatusListView' could not be found (are you missing a using directive or an assembly reference?)	SMobile	G:\SMobile\SMobile\SMobile\Shared\MainLayout.razor	554	Active

If I put a .razor control, then rename the project, and then set namespace appropriate to the folder location of the component - it starts appearing in the Error list.
the project still compile and runs, but it stays there like it is an actual issue.

for instance SMobile.Components.Desktop.Unified.StatusListView

Steps to Reproduce

Steps to reproduce the behavior:

  1. Create a new Blazor server side project
  2. Add a new folder called Components, create inaide a subfolder Desktop, and inside it subfolder Shared.
  3. In the last folder create a new control .razor
  4. Reference it on the main razor form.
  5. Save the project.
  6. Close and start again VS.
  7. Open the project.
  8. Error CS0246 appears for the control disregarding it is there and working.

Expected behavior

The control will appear as it is not part of the project, and/or lack reference in the Error list, but still the project will run and the control will works.

Screenshots

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant