I am at my wits' end struggling for over two hours now.
The ASP.NET Temporary Files cache still has an old copy of my assemblies and as a result, I am not able to run my app.
I'd actually changed the name of one of my classes from HomePage
to HomePageViewModel
. So, when I run my app now, it still picks up the old assemblies from the cache no matter what I do, and it reports:
2014-06-25 21:17:30,840 [13] ERROR ExceptionLogger
Error: System.Web.HttpCompileException (0x80004005):
c:\Users\computer\AppData\Local\Temp\Temporary ASP.NET
Files\root\0ee70bca\3973e798\App_Web_index.cshtml.a8d08dba.na12ukjv.0.cs(30):
error CS0234: The type or namespace name 'HomePage' does
not exist in the namespace 'MyProduct.Web.Presentation.
ViewModels' (are you missing an assembly reference?)
I have done the following many times now:
a) Closed Visual Studio
b) Stopped IIS using the Internet Services
Manager (inetmgr.exe) tool.
c) Stopped the World Wide Publishing Service from
the Services applet in the Control Panel
d) Deleted all files from the %tmp%\Temporary
ASP.NET Files folder
e) Deleted all files from the %windir%\temp folder
f) Deleted all files from the %windir%\Microsoft.NET\
Framework\v4.0.30319\Temporary ASP.NET Files folder
g) Deleted all files from the %windir%\Microsoft.NET\
Framework64\v4.0.30319\Temporary ASP.NET Files folder
h) Started the WWW service (the one stopped in step c)
and IIS from inetmgr.exe.
i) Opened and started debugging my ASP.NET MVC Web
application project
In the project properties, I have configured the project to run in IISExpress instead of the local IIS.
I am running 64-bit Windows 7 Home Premium.
Is there something else I need to do?
Try, try but never say die.
Fixed it. It was my code. I had the old name in one of my views. I am not sure why the compiler didn't tell me about the wrong type in the model declaration of that view.
Anyways, 3 hours wasted. Precious lesson learnt: always check your code. It's mostly your own fault.