简体   繁体   English

VS2012中未将RouteConfig声明为错误消息

[英]RouteConfig is not declared Error Message in VS2012

I am trying out FriendlyUrls in VS2012. 我正在VS2012中尝试FriendlyUrls I am using the readme and Hanselman's post as a guide. 我使用自述文件和Hanselman的帖子作为指南。 i added the following to Application Start but VS tells me RouteConfig is not declared. 我在“应用程序启动”中添加了以下内容,但VS告诉我未声明RouteConfig。

RouteConfig.RegisterRoutes(RouteTable.Routes)

I have googled but have not found an answer. 我已经用谷歌搜索,但是没有找到答案。 I have imported system.web.routing. 我已经导入了system.web.routing。 How do I correct this error message 如何更正此错误消息

I solved it. 我解决了 The FriendlyUrls Package when installed from the package manager console creates a RouteConfig.cs file in App_Start even if the project is a VBNet project. 从项目管理器控制台安装的FriendlyUrls软件包,即使该项目是VBNet项目,也会在App_Start中创建RouteConfig.cs文件。 So just create the equiavlent vbnet file and the erro will go away. 因此,只需创建等效的vbnet文件,错误就会消失。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM