MVC Error

Posted on 2011-04-30
Last Modified: 2012-05-11
I am getting the following error when I try to build a basic MVC application;

Error      1      The type or namespace name 'Controllers' does not exist in the namespace 'MvcBasicWalkthrough' (are you missing an assembly reference?)      c:\users\milligram\documents\visual studio 2010\Projects\MvcBasicWalkThrough\MvcBasicWalkThrough.Tests\Controllers\MapsControllerTest.cs      8      27      MvcBasicWalkThrough.Tests

I am following the  isntructions found here:

I am building at the section "Adding Unit Tests for Action Methods"

The MvcBasicWalkThrough is a added as a reference under MvcBasicWalkThrough

I have the
Question by:wademi
    LVL 40

    Expert Comment

    There error appears to be in your test project, not the MVC app.

    Add a reference to the main project from your test project.

    Author Comment

    mrjoltcola: the reference is already added to the main project. Look at the last line of my question

    Accepted Solution

    I found the problem:
    I didnt know that using a namespace is case sensitive.

    I had: using MvcBasicWalkthrough.Controllers
    instead of
    using MvcBasicWalkThrough.Controllers

    Author Closing Comment

    No other resolution was provided

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Why You Should Analyze Threat Actor TTPs

    After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

    For most people, the WrapPanel seems like a magic when they switch from WinForms to WPF. Most of us will think that the code that is used to write a control like that would be difficult. However, most of the work is done by the WPF engine, and the W…
    This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
    This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA.…
    In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor ( If you're interested in additional methods for monitoring bandwidt…

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now