I am working on a project that consists of multiple independently running Blazor applications. Each of these applications has the same submodule, let's call it CustomLib, which provides common components. It has its own git repository.I added a folder with some custom components to this lib, so that each of the applications can use them.But here is the problem:One of the applications, let's call it App X, doesn't recognize this new folder (or other new folders I create) inside the lib and Visual Studio shows several errors. However, you can compile the program and it runs without any problems. The errors only affect the parts where you are using a CustomLib-component.The error message says
Found markup element with unexpected name {CustomComponentName}.If this is intended to be a component, add a @using directive for its namespace.
I added a using directive, but it returns the following error:
The type or namespace does'n exist in the namespace >'CustomLib.Components' (are you missing an assembly reference?).
However, it does find another folder within CustomLib.Components which was part of CustomLib before App X was created.
@using CustomLib.Components.FolderA; @*<- no problem *@@using CustomLib.Components.MyNewFolder; @* MyNewFolder is underlined in red, namespace unknown error*@@* the following is completely red/green underlined, unexpected name error*@<MyNewComponent>...</MyNewComponent>I have no idea how to fix this. I deleted the bin, .vs and obj folders, cleaned up the application and rebuilt it, but to no avail.The other applications in this project have no problems using CustomLib. The only difference is that App X was created by my colleague using Rider while the rest of us uses Visual Studio. Is it possible that the use of different IDEs caused this error? If so, where can I fix it? Do any of you have experience with this kind of situation? Or is it something else?I looked at similar questions (e.g. Blazor Shared Component Library can't resolve Blazor component), but none of it could fix my problem.
My last resort is to create the application in Visual Studio again and copy paste everything from App X, but I wanted to ask you first. I am not yet completely comfortable with Blazor and Visual Studio and thus fail to find the reason for this error.
Edit:I just noticed that the bar where it shows you project, class and variable/method, that the path is completely wrong. It should show AppX as project and as class e.g. AppX.Pages.Overview. Currently, it shows CustomLib as project and CustomLib.C_.projects.appxfolder.AppX_App.Pages.Overview. What? Why? This doesn't make any sense to me