Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

I have a problem with my sintak controller on asp.net mvc,

 using Toyota.Common.Web.Platform;
 using FAMS.Models;

 namespace FAMS.Controllers 
 {
    public class HomeController : Controller
    {
        public ActionResult Index()
        {
            return View();
        }

        public ActionResult About()
        {
            return View();
        }
    }
 }

And have error:

Error 1 The type or namespace name 'Toyota' could not be found (are you missing a using directive or an assembly reference?) e:\ExampleApplication\ExampleApplication\Views\Shared_Layout.cshtml 1 8 ExampleApplication

share|improve this question
add comment

2 Answers

Assuming Toyota reference which is you referred from your own class Library or dll.

  1. If that project/dll is having any issue. referred project will not load the dll properly in this solution. So you may get an error (as you got).

  2. As per the @Khaltazar answer you may missed the reference to add. You have referred the NameSpace as using Toyota.Common.Web.Platform; in your controller. But add the reference dll in to your current project references.

  3. Finally Clean the solution and Build / ReBuild.

  4. Stop the process if the referred dll is being process with any other (It may be Locked).

share|improve this answer
add comment

It's most likely because you are missing a reference to Toyota. Right click on References and add that reference mentioned.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.