I'm having trouble with Visual Studio 2015 Pro for one specific solution. The solution is a ASP.Net Web Forms application with 10 projects. The following problems only appear in this solution:
Closing the solution takes 20-30s
Opening the solution takes 1min
VS becomes completely unresponsive while opening/closing the solution
Typing has a small lag (~200ms)
IntelliSense for c#-Code also lags
IntelliSense for JavaScript does not work at all (might be an unrelated issue though)
Opening an .aspx file in designer takes 5-10s
Stopping a debugging session takes 15-30s and VS becomes completely unresponsive during that. Staring the debugging session is actually faster than stopping it.
When I was using VS 2012, these problems did not appear. I got the described problems under Windows 7 Pro and Windows 10 Pro. Reinstalling Windows and Visual Studio did not help either.
For other solutions (Windows Forms, WPF), these problems do not appear. I have also tried to delete the project's *suo file, which is known to cause perfomance issues when it gets too big. Strange thing now is that VS does not create a new *suo file in the project directory. My development machine is surely fast enough to handle the project (a few 100k LOC). I'm not using any 3rd-party plugings like ReSharper. Other things I did while troubleshooting:
Disable code lens
Install all available updates
Cache debugging symbols
I have tried several possible fixes found via Googling, but nothing helped so far. Does anybody have another suggestion what the cause of the problems might be?
Update:
Deleting all breakpoints using the function provided for that fixed some of ther problems. I can now open/close the solution within <5s and starting/stopping debugging now goes smoothly. However, input lag, designer lag and problematic IntelliSense still persist. Deleting contents in "AppData\Local\Microsoft\VisualStudio\14.0" did not help.
I think that many issues can cause this type of problem & you can never give up enough details to help identify these types of issues ...
it could be because of a million difrent things ....
I googled it and found some interesting solutions ....
have a look Here
be sure to check out the comments !
you can try the following to resolve issues in java-script and .aspx files a bit:
Remove unnecessary contents from _references.js file. it should be present in Scripts folder.
Right click on the file and uncheck "Auto Sync Java-script References"
Hope it helps
Related
I am working in C# with Visual Studio 2017. I had previously made some changes to my form, and today when I run the code, the changes don't show up. It appears to be running an older version. Note that when I originally made the changes, it ran fine with the dropdown working.
Here is the edited version:
And here is what it looks like when it runs:
I have restarted VS and restarted my computer, both to no avail. I have searched extensively and can't find the answer.
Is there some setting I accidentally hit? Please tell me it's something obvious and not a weird glitch in the VS matrix.
Thanks!
You were using an old DLL/EXE.
This can happen in a few scenarios, typically if you store your binaries (DLLs built with your project) in source control.
You'd be surprised how many developers get caught out with this. It's often due to being pedantic about EVERYTHING being in source control - including the items you build!
Best thing to do is delete the bin and obj folders from source control. If it's a new project it's often easier to start fresh with a new source control project.
GAC'ing your DLLs is another common cause of this situation.
My installation of Visual Studio was fine previously, but has started acting weird lately. Some of the symptoms include
Visual Studio randomly hangs or crashes
Visual Studio won't start
Intellisense disappears sometimes
Plugins are not working, or are failing to start
I can't install or uninstall tools
I can't connect to source control anymore
Certain known good project types fail to load properly
Known file types don't have syntax highlighting anymore
I can't add files to a solution because the option is greyed out
I can't add, remove, or update files to a solution due to an error
I can't add or remove projects to a solution due to an error
I can't open a solution due to an error
The debugger cannot launch, or attach to processes
I can't find any templates when I try to add a new item
I can't copy/paste due to an error
A DLL required by Visual Studio is missing or corrupt
Menus are suddenly empty
Something that I know should normally work, now does not work
How can I fix this?
(This question is meant to be a canonical close dupe for these types of questions)
Visual Studio is pretty reliable, and most of us using it aren't experiencing the issues you are. It's a pretty large and complex suite of components, though, which means problems are bound to occur.
First: Restart Visual Studio and, if that fails, restart your computer
The majority of small issues are fixed by restarting Visual Studio. Some of the ones involving connectivity or services can be fixed by restarting your computer.
If this doesn't fix your problem
There's no way to guarantee that something bad won't happen to a particular installation of Visual Studio. The ways a large, complex application can become misconfigured or damaged are too varied to mention.
The effort it would take to diagnose and track down every possible cause is great. Ain't nobody got time for that. The one reliable solution—which works almost every time it's tried—is:
Reinstall Visual Studio.
Go ahead, rest your eyes for a little bit. Come back when you've come to terms with this sad fact.
…
Resigned? Okay. We're going to go through the steps to fix your problem, starting with the lowest impact, but probably least likely to work, one first. While you are attempting to fix this, keep notes! Mentally, or write them down. If you get to the last step, you'll need them.
First, let's go the easiest route and return Visual Studio to its original state. We can do this by removing all extensions and by resetting all settings.
Open the "Extensions and Updates" dialog. If you can't find it, type that into the quick launch. If you can't find that, try ctrl-q. For each installed extension, highlight it and click the Uninstall button.
Next, let's reset those settings. Make sure you export them first!
From the docs:
To export your settings
1. On the menu bar, choose Tools, Import and Export Settings. Choose the Export selected environment settings option button, and then
choose the Next button.
2. Make sure that the check boxes for the kinds of settings that you want to export are selected and all other check boxes are cleared, and
then choose the Next button.
3. (Optional) Name your settings file, enter a different path where it should be saved, or both. By default, setting files are named
Currentsettings.vssettings and saved to %USERPROFILE%\Documents\Visual
Studio 2015\Settings.
4. Choose the Finish button.
You can import them later from the same location. Now, once you've saved your settings, go back and reset them.
Tools -> Import and Export Settings... -> Reset all settings
Having reset everything, try to repro your issue. Still breaking?
Heck.
There's no doubt that you need to reinstall. Let's go the easiest route and do a repair. Do the following:
Go to Control Panel > Programs > Programs and Features
Select Microsoft Visual Studio [whatever edition] [whatever year]
Click "Change"
Click "Repair"
After you've done this, try to repro your issue. Did it still happen?
Damnit, sorry.
If you want to try a different way, you may be able to do an "overlay" reinstall. Simply run the installer directly and select "install" (if this option is available to you). You can use your original media, but I'd strongly suggest you re-download the installer. This will overlay a new version over the old, without messing up your settings. After reinstalling, try to repro. Did it?
Aw hell. Here we go.
You need to try uninstalling/reinstalling. First, though, you might want to export your settings. You should have done this for step one of this answer, but if you didn't, go back and follow the instructions to do it now.
After saving them, repeat steps 1 and 2 (from the repair instructions) and this time select "Uninstall" instead of "Change". If your issue has to do with an external component, search for it in the list of other installed applications and uninstall it as well. If you're paranoid, uninstall everything Visual Studio related. They may be out to destroy you.
Now, reinstall Visual Studio. If you've found yourself at this point, you're in deep, so don't risk installing from your original media. Download a fresh, fully updated copy from where you originally got it. For example, if you got Visual Studio via your MSDN subscription, go there and download the ISO.
Now, having reinstalled everything, try to repro. Did it happen again?
F##&ing s#!t.
Now is the time to create a bug report. Go to Connect
https://connect.microsoft.com/VisualStudio/feedback/LoadSubmitFeedbackForm
Provide as much information as possible. You need to give them all the info they ask for in the form, plus details about the bug, how to repro it, and what you did to try and fix it. Remember those notes I told you to write down? Bust them out now. I'd strongly recommend you mark your issue public, as it may be found and commented on by others with your problem.
Within a day you'll get a response. They will probably want you to turn on Visual Studio logging and repro the issue. I won't tell you how to do this here, as they will give you exact instructions for the version of Visual Studio you are running. Follow them and reply as soon as you can.
There will be one of three outcomes from this process:
They will tell you that you're doing it wrong
They will discover an outside actor causing the issue
They will discover a bug
For #1, stop doing that, and you're done. For #2, they'll probably tell you to uninstall the bad actor (e.g., remove a plugin) and go tell the people responsible about the bug (don't slack--do it). For #3, they'll triage the bug and it will be fixed sometime later. It's likely they will suggest workarounds that will at least get you moving again, if it's a true bug.
And that's it. Now, go forth and reinstall Visual Studio!
I have used go to declaration to view the source code of objects/methods that are declared in the other projects within the same solution. It has been worked great. Suddenly, the go to declaration option is not available after I highlighted the method, and I don't see it in the content menu.
Note
1) I always reboot the machine every day
2) I have been working on the same project for the past few weeks. I have been working on the same solution file before and after go to declaration menu is gone
I did make a lot change on the solution. I recompiled the object so many times. Not sure, if I accidentally cause any problem
Right now, I have to traverse to different project in the solution to find the source code. I can also put the break point. Once the program stops at that break point, I can step into the code.
More about the project, many objects/classes and defined in the other projects. Technically, they are external DLL. I know how to debug external dll, but it is cumbersome. Therefore, I include those projects in the solution (actually, the developers at my show include most of them. Then I included more). Go to definition always navigates back to metadata, but go to declaration will go back to the actual code. It is a wonderful tool, but I cannot see it anymore in the past few days.
Any thing I can do to revive this menu. Oh, I did try ctrl-f12. It does not work
Thanks
Ok
I finally figured out what happened. It was resharper that was causing the problem. What happened was I had to change my machine 3 weeks ago. I slowly installed more and more software. Then I applied the product key. Then one day, the go to declaration disappeared. I did not even notice that
Intellisense and code suggestion not working in Visual Studio 2012 Ultimate RC
The above link is the long thread that has various resolutions. Different people may encounter different issues. I have tried various resolutions (restart the visual studio, etc), and none of them work.
Resharper->Options->IntelliSense->General Set to 'Visual Studio native IntelliSense
This one works for me. Oh, you need to get your R# license to have this feature turn on
I am having great problems running the application in the debugger from Visual Studio 2008.
When I'm using vshost.exe, it says:
And when vshost.exe is turned of, it simply states:
Interesting thing about it is that when i do use vshost, debugger is actually started and breakpoint is hit on the first line of the Main().
I tried:
rebuilding the project(s)
removing .ncb, .suo, .user for the projects
repairing Visual Studio 2008
changing the build architecture for the project
... no help there...
Any experience in (trouble)shooting that?
More info: some projects DO work, and one that I have to work on, does not.
I have some ideas such as:
trying to create NEW project, add thing by thing to it and see at what point it will start to miss behave
work it other way around, delete project by item by item to see when it will (if it will) be working OK again.
EDIT (for google, as I see that there are many similar questions on the web):
Errors:
Error while trying to run project: Unable to start debugging.
and
Error while trying to run project: Unable to start program '....\PlayKontrol.exe'
Try upgrading your Visual Studio to Service pack 1, if you haven't already.
Did you restarted your computer? You never know how windows will react to that :).
Also be sure there aren't any keys stuck, like the ctrl or windows key.
Note that the key does not have to be visually stuck, it can be stuck for visual studio and not for the explorer.
The most common source of sudden problems like this is corruption of one of the data files that vs uses to cache information between builds.
You've tried a clean build, but this won't delete everything. A real clean build is: quit vs, delete bin, obj, debug, release folders, delete all generated files in the root - primarily ncb. Do the same for any locally built libraries that you're project references.
The easiest way to do this is if you have the code in source control, as you can rename away your entire code folder and then force a get of all the source.
You often need to do all of these things in one hit to clear the problem.
Less frequently, a reinstall of vs will sort things out (although this sounds unlikely in your case if it is only one project that breaks)
Also think carefully about anything you might have installed just prior to it failing... And remember that some install effects may not occur until the next reboot so it could be days ago. A particular cause of this are automatic windows updates and trial versions of things like the vs 11 beta.
You might try running the application from outside of VS, but have a line of code that looks like this: Debugger.Launch(); where you want your first breakpoint.
I'm using TortiseSVN for my subversion client on a Windows Server 2008 box and I've got a folder with code checked out into it.
When I go to open the solution file that's under source control Visual Studio 2008 starts and before it can even finish loading the solution from what I can tell Visual Studio crashes. I'm trying to open a solution that has VB code in it. It gives no error messages or warnings. It's just gone.
I have checked the files and they all seem fine. The solution file seems fine when I look at it with a text editor.
This is also Visual Studio 2008 SP1 and I've got all the latest .NET service packs installed.
Has anyone else seen this before and know how to fix it?
Edit: I just did an SVN export to a new directory and it still crashes in the exported directory where there is no longer any SVN attached to it.
Additionally, it crashes EVERY time I try to open the project that came from SVN.
You should be looking at the solution file with an xml editor, at least then you will get some help for subtile flaw's in the formatting or something like that.
You can also submit feedback to Microsoft on the VIsual Studio Connect site, if the bug turns out to be real.
Some commonsense things todo however would be, goto your visual studio command prompt, start off with "devenv /ResetSettings", that often helps isolate any weirdo add-on or something lke that.
Also, try to build clean with msbuild or vcbuild, then build fully with either one (i.e. if vcbuild can not build your solution, use msbuild). That can help by laying out the symbols and such and maybe clear out some corrupted file or something.
You also may have .suo files from your subversion, those are binary files that do contain some settings, it's common for people to accidentially check them in, but they are usually better off being kept on a per-developer basis (not in the source tree). The /resetsettings will likely clear these out also, but you may want to make sure.
You can also double check the path's to all of the assemblies referenced, that your not going from a 32/64 bit host, and the CLR DLL's are in different path's now etc...
One last thing, if your really stuck, you can get a stack trace and debug the crash a bit ;), see where the fault is occuring and search that module online, your'll often find that somebody may have a specific solution.
Oh yeah, also, hooker's can be trickey. Don't trust them for a minute. Make sure you set tsvn's "only load in windows exlporer" option and configure it specifically for what folders on your system have local-svn working directories, this will greatly reduce the working set for their shell extension. On most any system, over time, one program or another (apple irw.exe or adobe pdf-preloader.exe sort's of ad-ware) will try to work it's way into your shell. You should try to make sure your dev box is rather clean from anything hook's, simular to what VladV was saying...
I had a similar problem and I fixed it and afterwards I wasn't quite sure how I managed it.
It basically involved going to the tools/options menu and setting the source control plugin to none. However, I obviously had to have had the solution open in Visual Studio if doing this was to fix the solution, but yet I thought the problem was I could not open the solution.
The only possible scenario would be if I was able to open the solution, but not open any of the projects inside it, hence able to change the source control settings immediately after opening the solution.
Does that make sense?
Try opening your solution and projects files in a text editor, and looking for anything strange.
I once heard of a similar problem: a solution contained SVN bindings created by AnkhSVN, but Visual Studio had no AnkhSVN installed, and failed to open the solution without giving any meaningful error information.