开发者

Can not remove Default.aspx from Asp.net MVC 3 Application

开发者 https://www.devze.com 2023-03-08 05:09 出处:网络
I 开发者_JS百科am working on a project that started out using ASP.Net MVC 1 and has since been upgraded to ASP.Net MVC 3. It is my understanding that if I am running my ASP.NET MVC 3 app on IIS 7 usin

I 开发者_JS百科am working on a project that started out using ASP.Net MVC 1 and has since been upgraded to ASP.Net MVC 3. It is my understanding that if I am running my ASP.NET MVC 3 app on IIS 7 using the integrated pipeline that I no longer need the Default.aspx file. However after I have removed the file from the project and physically deleted it I get the following error every time I try to compile in Release mode:

Description: Could not load type 'ProjectName.Default'.

File: Default.Aspx

I have verified that there is no instance of ProjectName.Default or Default.aspx in my project file. I have even done a grep search in all of my files in the project for any mention those names and still have found nothing. What do I need to do to be able to remove Default.aspx from my ASP.Net MVC 3 app and get it to compile in release mode. It compiles just fine in Debug mode by the way.


From the debugging listed here you probably had a cached version of your compiled code. While Visual Studio builds the code behind files into a single DLL, ASP.NET compiles each aspx file into a DLL as well (depending on how you configure it, there can be variations on this). These DLLs are located at %WINDIR%\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files note that this directory is sensitive to .Net version, could be in 2.0 or 4.0, it is also in some way dependent on bit-ness, as there is a similar directory in Framework64.


I tried to clean my solution, delete the project temp files, remove all the leftover crud I could think of. Unfortunately none of this worked so I had to take the brute force approach and checkout a new copy of my project. After doing this I no longer had the error occur when building the new copy that had Default.aspx removed. Unfortunately this solution did not provide me any insight into what leftover file Visual Studio was holding onto.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号