While building an ASP.NET MVC application with AngularJS, VS2013 is exhibiting very bad responsiveness when switching between the file-tabs. VS is reacting extremely slow, needing up to three and more seconds loading the file-content by switching the tabs when Resharper is activated.
I am working with .cs, .js, .html and .cshtml files including Razor syntax, etc.
I found out that Resharper was the problem. By disabling Resharper, everything now works perfectly fast. It looks like Resharper is taking ages to analyze these .html, .cshtml and .js files. However, I am currently looking for deactivating the responsible Resharper option which is causing the problem. Does someone know which option could be responsible for the problem?
I am currently running on Visual Studio (version 12.0.31101.0) and Resharper (version 9.0 Update 1).
Related
Sometimes after editing some parts of a razor source file, the editor crashes with tons of errors like the following screenshot:
It fails to recognize these external components from NuGet packages and other source files.
This problem has been around for quite a while. Since it could be simply fixed by reloading the project, I didn't pay much attention to it at first. However, it started to appear frequently recently, I have to reload the project every few minutes, which is really annoying.
Maybe someone has also encountered this problem? It sucks to have to reload the project all the time!
To be mentioned, I'm using ReSharper 2021.3 along with VS2022, but ReSharper's global analyzers still work fine when VS's crashes.
I was coding with razorpages when randomly about 2 days ago the razor pages now display boths the cshtml and cs right away. earlier I could expand the cshtml to get to the cs file and i think it was a more compact that way
i think its options somewhere in tools->options->environment () but there are so many
after a few different google searches I found nothing helpful.
here is a picture of the problem:
earlier I could expand the cshtml to show the .cs files now i just see all of them and its kind of overwhelming.
enable file nesting in solution explorer
They're not being nested, is all. It's literally two separate files, Visual Studio just recognizes that it's a Core project, and then shows them nested, since it understands that they're related. If that's not happening, then that means Visual Studio doesn't recognize it as a Razor Page, which could be a problem with VS, the project, or something else entirely. It's essentially impossible to say what the issue might be, so you'll just need to try stuff. A few things I can think of to try:
If you're not using VS 2019, upgrade. Ultimately, this is part of the ASP.NET Core tooling, and best version of that is always going to be in the latest release.
Verify that you solution is building correctly. You might also consider deleting all bin and obj directories and rebuilding to ensure the build is truly up to date.
Close Visual Studio completely and re-open it. You may consider restarting as well. (You've probably already tried this though).
Try running Visual Studio in "safe-mode", which essentially just means disabling all the extensions you have installed. You can either manually disable all your extensions and then restart or close Visual Studio and start it via the command like with devenv /safemode. If this fixes the issue, then there's an extension causing issues. You'll probably need to just disable each one by one to see which on is causing the problem, and then either remove it or see if there's an update that corrects it.
If all else fails, repair Visual Studio. Run the intaller, and click the "More" link under the installation you're working with. Then click "Repair".
As soon as I start typing data-bind in VS 2013 (fresh install with web essentials and resharper), the IDE slows to a crawl (one character typed every 3 seconds). I've applied the knockout registry fix to no avail. It seems Web Essentials is causing this. What can be done as a workaround (other than removing web essentials?)
If you have not tried already , can you try this suggestion from JetBrains web site
There are also reports on Web Essentials contributing to low
performance while editing .cshtml files. If you're affected by this
problem, consider going to Tools | Options | Web Essentials and
setting Auto-format HTML on Enter to False.
I have pages in VS2010 (C#) which when I open the markup language (aspx), once in awhile the text can't be collapsed.
I frequently collapse by tags when I need to add new sections of markup.
Has anyone else experienced this? Does anyone know a solution?
Closing and reopening the page doesn't always work.
Switching to design mode and back doesn't seem to always work either.
[I am using the most recent service pack].
Just a VS2010 quirk? It does it to me sometimes too, and we're definitely not the only ones - Automatic outlining (collapsible sections) does not start for .ASPX files in Visual Studio 2010 SP1
I am having problem in using the source view of an asp.net page in VS.net 2008 IDE. I am not using Design view at all. IDE hangs a bit every now and then, when I use intellisense in it, and I scroll the page.
Please throw some light on it.
Such issues doesnt come up while editing the HTML page, and while editing same asp.net page with the HTML editor which can be configured using Tools -> Options menu option.
Read this Post
This might help to make your visual studio a bit faster in general. I am not very sure about the exact reason for the behavior you mentioned of your Visual Studio.
I suspect that it has something to do with Graphical Interfaces like Toolbox etc.
Thanks
I've had problems like that with Visual Studio before. The intensity of the problems seem to multiply exponentially as the size of the file I work with gets larger.
Here's what I'd reccomend:
Check and make sure Visual Studio is fully updated (Help > Check For Updates) ; there have been some patches released and they will help you immensly!
If your code has any breakpoints, disable them all and start afresh later (Debug > Disable All Breakpoints)
If that fails, here are some more optimizations you can try.
In my case, I think longer file is the culprit. I think partial page concept should be applicable to asp.net page too.