ASP.NET Web Application - compiling .cs files

人走茶凉 提交于 2019-12-11 06:47:52

问题


I guess I have been using the Web Site model ever since .NET 2.0 and never looked back. Now I'm using the Web Application mode on a few projects. How do you tell the compiler to compile .cs files in the project? I assume you can do this since the newer-MVC projects do it for the Controllers.

I have a class, RestRouteHandler, that implements the IRouteHandler interface but because I think the .cs file is not being compiled I can't use it in my Global.asax.


回答1:


Right-click the .cs file in the Solution Explorer and click Properties. Set the "Build Action" to compile.




回答2:


use the "Build" menu in Visual Studio



来源:https://stackoverflow.com/questions/508689/asp-net-web-application-compiling-cs-files

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!