Search code examples
c#asp.netasp.net-mvcumbraco

Type or namespace name 'xxx' could not be found in Umbraco


When I created a class, there is no existing namespace declaration and I need the namespace declaration to access the class from a view (cshtml).

Normally when you create a class, there should be a namespace declaration included right? But for me I don't see any.

I already tried to add a namespace declaration, but I still can't access it from another class.

I hope you could help me with this.

Screenshots: https://drive.google.com/open?id=0B5TGcf9mTeg2V2ZDaldWelp6WXc

ScreenShot


Solution

  • Just as what Nico Said (https://stackoverflow.com/users/5685258/nico)

    Follow this instructions and this will be resolved: https://our.umbraco.org/documentation/Getting-Started/Setup/Install/install-umbraco-with-nuget

    Although I started all over again.

    ~I created a new project from Visual Studio 2017 using ASP.NET Web Application

    ~Selected an empty file

    ~ Right click on the project

    ~ Click Manage NuGet Packages and installed Umbraco CMS

    ~ Run it from VS and install the umbraco platform using the browser

    ~ As soon as I create a class, a namespace declaration will also be included.

    Thanks!