Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

C# ASP.NET MVC Basics Controllers Adding a Controller

James Matthews
James Matthews
21,610 Points

Unable to add a class for this project

I've tried looking into this but can't seem to find an answer. The Add > Class... option (along with other options) is greyed out.

2 Answers

Caleb Simmons
Caleb Simmons
8,670 Points

Ran into the same problem. You most likely had used the debugger to preview the app, as the previous video had instructed. You have to use Debug > Stop Debugging for the option to add a class to be enabled.

Steven Parker
Steven Parker
231,275 Points

:point_right: Did you first select a folder to which a class can be added?

I would only expect the option to be greyed out if you had something inappropriate selected when you opened the context menu.