hamiltonjose
hamiltonjose

Reputation: 591

Can`t "add view" from Controller/Action in VS2013

this might be a dumb question:

In previous VS versions, one could "Add View" by right-clicking in the View portion of the code as shown below.

    public ActionResult About()
    {
        ViewBag.Message = "Your application description page.";

        return View();
    }

In VS2013/MVC5 (apparently) this options does not exist. Anyone knows how to find it, or know how to do it?

I noticed some strange behaviors: 1) When I create a new Controller through Scaffold... MVC5 Empty Controller, the corresponding view/folder is not created 2) If I try to Scaffold... MVC5 View, there is no place where one can inform the corresponding Controller

This is weird...

Thanks!!

Upvotes: 0

Views: 3051

Answers (3)

Ted Campbell
Ted Campbell

Reputation: 26

Was able to fix this today after much searching for: C# MVC5.1.2, EF 6.1.0 in VS2013 Express for Web. Be aware that this is VS2013 Update 2 RC (<-----note Release Candidate)

This is a very large update so VS2013 and all projects were closed.

see: http://www.microsoft.com/en-us/download/details.aspx?id=42307 http://www.asp.net/visual-studio/overview/2013/aspnet-and-web-tools-20132-preview-for-visual-studio-2013-release-notes

Both Add Controller and Add View are back in the context menus and have worked on my test projects.

Upvotes: 1

Umar Abbas
Umar Abbas

Reputation: 4161

Just two steps

1)Update your Visual studio 2013

2) unload your project from solution explorer then Reload it again.

Bingo!

Upvotes: 0

hamiltonjose
hamiltonjose

Reputation: 591

As Alex Dresko pointed out, the version I was using was RC and obviously I did not notice that before. One should use the RTM or above version to get this fixed. Thanks!!

Upvotes: 0

Related Questions