Type or Namespace Name Does Not Exist

The type or namespace name does not exist in the namespace (are you missing an assembly reference?)

Your GlobalClass is in the namespace ProiectSera.App_Code.

So the class name is ProiectSera.App_Code.GlobalClass

Make sure you don't have a ProiectSera class in the ProiectSera namespace also, otherwise if declaring using ProiectSera on top, it'll try to use it (as a general rule, don't name any class the same as your namespace).

If that still doesn't work, you may want to try using the global namespace:

global::ProiectSera.GlobalClass.Update(ValRefTempSol.Text, ValRefTempAer.Text);

and see if that works: if it doesn't, and GlobalClass is in the same project, then there's something else you haven't shown us

Update

The only other thing that comes to mind, if you are positive that both files are on the same project/assembly, is that GlobalClass.cs is not being actually compiled. Make sure the Build Action is set to Compile (you can see the build action right clicking on the GlobalClass.cs in the solution explorer and selecting Properties).

error CS0234: The type or namespace name does not exist in the namespace (are you missing an assembly reference?)

The problem was in the platforms section in the desired dll, once i changed it to any it became visible to the other dll

Sample Image

The type or namespace name does not exist in the namespace - without reference

Mat's comment helped me with the problem: I found reference in Generic.xaml.

The type or namespace name does not exist in the namespace while building

I just found the problem.
The referenced project (client) had a new reference to Bcl...
Apperently every project that references the client needs to reference Bcl too now.

Thanks for all your help!

The type or namespace name 'Mvc' does not exist in the namespace 'Microsoft.AspNetCore' (are you missing an assembly reference?)

The problem was fixed here: https://github.com/OmniSharp/omnisharp-vscode/issues/3990

When my dotnet core sdk updated to 3.1.401 it made it so that I had to change a setting in vscode involving mono.

I went to File > Preferences > Settings then searched "omnisharp use global mono" and changed the resulting value from "auto" to "never." This stopped the errors when linting.



Related Topics



Leave a reply



Submit