can't right click and add a view to action methods

时间:2015-08-10 12:44:37

标签: asp.net-mvc visual-studio-2015

When I create a new action method and right click it doesn't show me the "add view" option, it shows me the "go to view" option and when I click that it tells me "unable to find a matching view".

Creating a view on its own with a name that fits the action method works but I want to create strongly typed views and as far as I know I can't do that without the wizard thing that opens when you create view from an action method.

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

Like this is how the most basic action method looks like right?

1 个答案:

答案 0 :(得分:0)

正如@Scotch对此问题的评论所说,可能是你处于调试模式(f5)所以在右键单击之前停止它(shift + f5) - >添加