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?
The temporary files generated by Visual Studio after creating and running an ASP.NET application reside in: %SYSTEMROOT%\Microsoft.NET\Framework[64]\<vernum>\Temporary ASP.NET Files folder. The folders and files under this folder can be removed with no harm to your development computer.
To delete the cached files on the server, follow these steps: Open the IIS Temporary Compressed Files folder. The default path is %windows%\IIS Temporary Compressed Files. Delete all the files in this folder.
I had similar issue, after adjusting project namespace globally renaming WebApplication3 to another name, performing entire solution search didn't help because .config extension wasn't wildcard specified. Anyways anyone running into similar issue, check the web.config files both project root and views folder
<system.web.webPages.razor>
<host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=5.2.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<pages pageBaseType="System.Web.Mvc.WebViewPage">
<namespaces>
<add namespace="System.Web.Mvc" />
<add namespace="System.Web.Mvc.Ajax" />
<add namespace="System.Web.Mvc.Html" />
<add namespace="System.Web.Routing" />
**<add namespace="WebApplication3" />**
</namespaces>
</pages>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With