2

例外很奇怪,似乎我错过了什么。有任何想法吗?

查找“C:\src\ServiceStack\src\ServiceStack.FluentValidation.Mvc3\Mvc\FunqControllerFactory.cs”的源代码。校验和:MD5 {eb 6 8b dc fb 97 cb 8 2b 74 bc 37 37 79 7b f8} 文件“C:\src\ServiceStack\src\ServiceStack.FluentValidation.Mvc3\Mvc\FunqControllerFactory.cs”不存在。在脚本文档中查找 'C:\src\ServiceStack\src\ServiceStack.FluentValidation.Mvc3\Mvc\FunqControllerFactory.cs'... 在项目中查找 'C:\src\ServiceStack\src\ServiceStack.FluentValidation.Mvc3 \Mvc\FunqControllerFactory.cs'。在项目中找不到该文件。查看目录'C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\crt\src\'... 查看目录'C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\atlmfc\ src\mfc\'... 查看目录'C: \Program Files (x86)\Microsoft Visual Studio 10.0\VC\atlmfc\src\atl\'... 查看目录 'C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\atlmfc\include\'。 ..活动解决方案的调试源文件设置表明调试器不会要求用户查找文件:C:\src\ServiceStack\src\ServiceStack.FluentValidation.Mvc3\Mvc\FunqControllerFactory.cs。调试器找不到源文件“C:\src\ServiceStack\src\ServiceStack.FluentValidation.Mvc3\Mvc\FunqControllerFactory.cs”。\src\ServiceStack\src\ServiceStack.FluentValidation.Mvc3\Mvc\FunqControllerFactory.cs。调试器找不到源文件“C:\src\ServiceStack\src\ServiceStack.FluentValidation.Mvc3\Mvc\FunqControllerFactory.cs”。\src\ServiceStack\src\ServiceStack.FluentValidation.Mvc3\Mvc\FunqControllerFactory.cs。调试器找不到源文件“C:\src\ServiceStack\src\ServiceStack.FluentValidation.Mvc3\Mvc\FunqControllerFactory.cs”。

4

1 回答 1

3

认为我自己找到了解决方案。如果通过nuget将servicestack安装到MVC3项目中,需要将Global.ascx.cs中原来的routs.MapRoute注释掉

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

        //routes.MapRoute(
        //    "Default", // Route name
        //    "{controller}/{action}/{id}", // URL with parameters
        //    new { controller = "Home", action = "Index", id = UrlParameter.Optional } // Parameter defaults
        //);

        routes.IgnoreRoute("api/{*pathInfo}");
        routes.IgnoreRoute("{*favicon}", new { favicon = @"(.*/)?favicon.ico(/.*)?" }); //Prevent exceptions for favicon

    }
于 2012-02-09T10:33:30.983 回答