Currently I'm playing a little bit with MVC application. But there is one thing that is very annoying. When I change something in my code (controller, view or whatever) the changes sometimes does not refresh. I see the old content. And there is more. Sometimes browser says "Waiting for localhost..." and it's waiting forever. When this happens the only thing that helps is to stop IIS and restart Visual Studio. What seems to be the problem? How can I make this work and see my changes every time I build and refresh the page? (Ctrl+F5 does not work)
I'm using Visual Studio 2015, IIS Express and Firefox (but this also happens on IE).
Updating visual studio 2015 helped.
Related
I am debugging an ASP.NET MVC app from Visual Studio 2013. When I start the debug process from Visual Studio, IIS Express where app is hosted gets stuck (my app is not started). It often happens to me. In this situation, I manually stop IIS Express from the tray icon. Even stopping IIS Express from the tray icon I often need to stop manually the debugging from Visual Studio through the stop button. Once debugging is stopped, If I try to debug again it does not work, well, sometimes works and sometimes not, it is random. I have verified that if I clear all browser history and cookies, it works in most cases except for some time. Also I have observed that Visual Studio 2013 takes a long time to boot IIS Express where my ASP.NET MVC app is hosted. Finally, I have observed that my ASP.NET MVC app hosted in IIS Express sometimes is not being displayed correctly when debugging from Visual Studio, I mean, it is displayed without css styles being applied, it seems like css styles are missed. In this case, if I stop debugging and start it again it works.
So How can I improve or solve these kind of weird issues?
IIS Express gets stuck and css styles sometimes not being applied when
debugging an ASP.NET MVC application from Visual Studio 2013
This is a quite strange issue and l suggest you could try these suggestions
Suggestion
1) delete all caches under C:\Users\Administrator\AppData\Local\Microsoft\VisualStudio\12.0\ComponentModelCache, C:\Users\Administrator\AppData\Local\Temp and C:\Users\Administrator\AppData\Local\Microsoft\WebsiteCache.
2) close VS Instance, delete .vs hidden folder,bin,obj folder under the physcial path of the solution and then reopen your project
3) If you have IntelliTrace, please disable Enable IntelliTrace under Tools-->Options-->IntelliTrace-->General.
4) try another port like 56000 by right-clicking on the project-->Properties-->Web--> project url.
5) disable any third party extensions by Tools-->Extensions and Updates or just use devenv /safemode in developer command prompt for vs2013.
6) try to reinstall IIS on the control panel and if your IIS is not 10.0, I suggest you could download and use it.
In addition, VS2013 is too old and Microsoft does not continue to maintain it. So l suggest you could download and use the latest VS2019. It has more optimization and stronger performance than the previous VS and fixes some remaining issues from previous releases.
I have quite an odd issue in VS 2015 CE. I'm working on a ASP MVC site and when I I try to access Model properties using Razor in view inside a method a visual studio immediately closes the intellisense window which shows the available properties.
Works perfectly:
#Model.Shared.UserName
Doesn't work
#Html.Raw(Model.Shared.UserName)
When I'm typing the "Model." inside a method, Visual studio keeps closing up the suggestion window. This is becoming really annoying. Has anyone experienced something similar?
The window I'm referring to:
A workaround that I've managed to satisfy myself with after half a year is to use ReSharper which amazingly fixed this issue as well. It's not exactly solution to why the Visual studio is acting this way, but there is probably little left to do.
Something really weird is happening with my installation of Visual Studio 2015. When I just opened VS and run the project, it deploys normally. However, when I start to change things i.e. html, js, etc and hit refresh to see my new changes, after a while the browser takes FOREVER to load the page again.
This also happens when I change server code, suppose the project is running normally, then I stop the debugger, change my code, and launch the project again.
I have Windows 10 installed in my machine, Visual Studio 2015 Update 1.
I don't know what could be happening, and I have googled it without much success. Does somebody know a way I could inspect what is happening when this occurs? Any tools?
We are attempting to add MVC to an old, large, legacy webforms app. (The intent is to gradually re-implement portions of the app using MVC until the old app is gone).
Setting it up has gone smoothly. We have an MVC Area, and I created a controller which is accessible when running the app, by means on directly typing the url.
But whenever we "Add > Controller" or "Add > View"... Visual Studio hangs for around 10 minutes "Not Responding".
Clearly there is some bug in visual studio interacting with some quirk in our legacy project.
Googling, I have so far found only a few similar cases that are old & do not seem applicable.
Not sure where to begin resolving this.
UPDATE:
For what it is worth, we have converted the original VB webforms project to C#. I then added MVC Nuget package and and MVC area. Visual studio no longer seems to hang when adding controllers. So this might be a VB specific thing. Or maybe some windows update to visual studio fixed this in the interim since i posted this. Not sure.
The problem is still present in Visual Studio 2015 Update 1.
As a workaround, instead of selecting "Add View" you can select "New Item" and choose a page template from Web/MVC instead.
It is still in Visual Studio 2017; It takes time and you can restart making Controller/View or you can wait sometimes
this seems like bugs from visual studio,
you can copy other controller and paste it then rename namespace.
for temporary until visual studio is fixed.
I'm having the same issue. This should work. I'm selecting "Add Controller" from the context menu. It just spins saying Visual Studio not responding. This is with Visual Studio 2015.
In my case this situation arises when adding view to the controller and visual studio 2015 hangs indefinitely. However it creates the view file in the directory but not shown in solution explorer. I have manually copy pasted the file from directory to solution explorer and everything worked well.
Check if the below blog could help resolve your issue
http://digioz.blogspot.co.uk/2013/06/visual-studio-2012-freezes-or-crashes.html
After upgrading to VS 2012 any changes I make in my javascript classes do not seem to take effect until after I flush the browsers cache and rerun. i.e. Make change to line of javascript, run the website by click f5, changes are not there.
This wasnt occurring previously in VS 2010, or even the VS 2012 RC. Would there be a setting that is caching this?
Thanks