Can't run the default project?

Aug 27, 2010 at 4:54 AM

Hello,

I'm following the tutorial in "Professional ASP.NET MVC 2" to create the initial NerdDinner project.

1. Click on File-> New Project.

2. Choose ASP.NET MVC 2 Web Application and name project "NerdDinner". Then click OK.

3. A dialog appears to allow me to create test project. Choose Visual Studio Test Framework and click OK. A new solution with 2 projects created.

4. Run project by pressing F5, errors appear:

[code]Error    1    The type or namespace name 'Controllers' does not exist in the namespace 'NerdDinner' (are you missing an assembly reference?)    c:\users\leecom\documents\visual studio 2010\Projects\NerdDinner.Tests\Controllers\AccountControllerTest.cs    9    18    NerdDinner.Tests
Error    2    The type or namespace name 'Models' does not exist in the namespace 'NerdDinner' (are you missing an assembly reference?)    c:\users\leecom\documents\visual studio 2010\Projects\NerdDinner.Tests\Controllers\AccountControllerTest.cs    10    18    NerdDinner.Tests
Error    3    The type or namespace name 'AccountController' could not be found (are you missing a using directive or an assembly reference?)    c:\users\leecom\documents\visual studio 2010\Projects\NerdDinner.Tests\Controllers\AccountControllerTest.cs    290    24    NerdDinner.Tests
Error    4    The type or namespace name 'IFormsAuthenticationService' could not be found (are you missing a using directive or an assembly reference?)    c:\users\leecom\documents\visual studio 2010\Projects\NerdDinner.Tests\Controllers\AccountControllerTest.cs    302    56    NerdDinner.Tests
Error    5    The type or namespace name 'IMembershipService' could not be found (are you missing a using directive or an assembly reference?)    c:\users\leecom\documents\visual studio 2010\Projects\NerdDinner.Tests\Controllers\AccountControllerTest.cs    332    47    NerdDinner.Tests
Error    6    The type or namespace name 'Controllers' does not exist in the namespace 'NerdDinner' (are you missing an assembly reference?)    c:\users\leecom\documents\visual studio 2010\Projects\NerdDinner.Tests\Controllers\HomeControllerTest.cs    8    18    NerdDinner.Tests
Error    7    The type or namespace name 'HomeController' could not be found (are you missing a using directive or an assembly reference?)    c:\users\leecom\documents\visual studio 2010\Projects\NerdDinner.Tests\Controllers\HomeControllerTest.cs    16    13    NerdDinner.Tests
Error    8    The type or namespace name 'HomeController' could not be found (are you missing a using directive or an assembly reference?)    c:\users\leecom\documents\visual studio 2010\Projects\NerdDinner.Tests\Controllers\HomeControllerTest.cs    16    45    NerdDinner.Tests
Error    9    The type or namespace name 'HomeController' could not be found (are you missing a using directive or an assembly reference?)    c:\users\leecom\documents\visual studio 2010\Projects\NerdDinner.Tests\Controllers\HomeControllerTest.cs    29    13    NerdDinner.Tests
Error    10    The type or namespace name 'HomeController' could not be found (are you missing a using directive or an assembly reference?)    c:\users\leecom\documents\visual studio 2010\Projects\NerdDinner.Tests\Controllers\HomeControllerTest.cs    29    45    NerdDinner.Tests
[/code]

 

How can i fix this problem. Notice again that I just test the default project but it fails. :(

Aug 27, 2010 at 4:57 AM

oh just fixed it by add "NerdDinner" reference onto the Reference folder on NerDinner.Tests. :D