C# 找不到资源。MVC

C# 找不到资源。MVC,c#,asp.net-mvc-4,visual-studio-2013,C#,Asp.net Mvc 4,Visual Studio 2013,错误如下: Server Error in '/' Application. The resource cannot be found. Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review t

错误如下:

Server Error in '/' Application.

The resource cannot be found.

Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable.  Please review the following URL and make sure that it is spelled correctly. 

Requested URL: /Home/Offers
我正在使用Visual Studio 2013在MVC中编程一个web应用程序,除了HomeController.cs文件之外,我没有修改任何其他内容

HomeController.cs:

namespace MvcApplication1.Controllers
{
    public class HomeController : Controller
    {
        public ActionResult Index()
        {
            ViewBag.Pid = "page1";

            return View();
        }

        public ActionResult Contact()
        {
            ViewBag.Pid = "page6";

            return View();
        }

        public ActionResult Book()
        {
            ViewBag.Pid = "page3";

            return View();
        }

        public ActionResult Book2()
        {
            ViewBag.Pid = "page3";

            return View();
        }

        public ActionResult Offers()
        {
            ViewBag.Pid = "page2";

            return View();
        }

        public ActionResult Safety()
        {
            ViewBag.Pid = "page5";

            return View();
        }

        public ActionResult Services()
        {
            ViewBag.Pid = "page4";

            return View();
        }
    }
}
我的视图文件夹:

Views
    Account
    Home
        Book.cshtml
        Book2.cshtml
        Contract.cshtml
        Index.cshtml
        Offers.cshtml
        Safety.cshtml
        Services.cshtml
    Shared
除了模板附带的前三个cshtml文件,即Index、Contract和About(改为Book),我添加的所有其他文件都不起作用

请帮忙~~~~

*编辑: RouteConfig.cs:

public class RouteConfig
    {
        public static void RegisterRoutes(RouteCollection routes)
        {
            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

            routes.MapRoute(
                name: "Default",
                url: "{controller}/{action}/{id}",
                defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
            );
        }
    }

路由是默认路由。听起来您的站点在运行之前没有被编译,因此无法识别控制器中的任何更改。检查您的配置管理器,以确保在调试时相关站点对于生成处于活动状态。您也可以通过在解决方案资源管理器中右键单击项目节点并单击“构建”来手动构建它。@NightOwl888,这就是问题所在!非常感谢~!但为什么在调试时它对构建是非活动的呢?我想我们永远也不会知道