Whenever i press Ctrl+S from keyboard or whenever i click on any file in Solution Explorer it automatically opens output window only in Visual Studio 2012.
I tried
Tools > Options > Projects and Solutions > Show output window when build starts
I am using Visual Studio Professional 2012
But its just not working. Its irritates a lot. Please suggest how to get rid of it.
if someone is facing this issue in visual studio community 2015, in my case the issue was caused because of the use of Backup and sync utility from google, I have synced my source directory to my google drive to maintain the latest copy of source backed up.
The backup utility locks the file which you might be editing for syncing it to cloud storage. since the file is locked by another process, the visual studio cannot save the changes in the file.
The fix was to pause the syncing for the time you are doing frequent changes.
In your case, it might be some other process which might be locking the file.
If you're using an extension, one of them could be the reason.
I had the same problem while saving the CMakeLists.txt files. I checked one of the extension's setting, "CMake Tools", it has a "Cmake: Reveal Log" settings which causing this problem. I simply deactivated it
I suggest you to check extensions' settings or try to find on settings with searching "output", "focus" etc.
Related
I am having a very weird issue. I am able to build my C++/CLR Win Forms project with visual studio 2017 only once. Every next time I am getting “LNK1104 cannot open file ….\Debug\….exe” error.
What I have noticed is that after stopping debugging the program is still visible in Task Manager which is I believe the reason of getting the above message.
When I try to kill it am getting “access denied”.
The only way to compile the project is to restart visual studio. The process shuts down immediately together with visual studio. Once the visual studio is back on I can do a single build again.
I have tried to run "clean" project and solution.
I have also created new project and moved my files in it. What I have noticed is that before having my form filled with controls the problem was not appearing. It started happening after adding few textBoxes, ListView and buttons.
Any ideas how to fix it?
I figured out what was causing the issue. I have tried with switching off multiple Windows security features and finally I found the right one. The problem appeared to be a Windows 10 built in "Real-time protection" against malware. It can be disabled under "Virus & threat protection settings".
I'm using TFS for source control and the other day I undocked my laptop while running VS. I couldn't connect to the internet and then unfortunately there was an unexpected shutdown. Since then I have not been able to go into pending changes and compare the file to it's previous version. When I do, it crashes Visual Studio.
I can change the user tool in Options > Source Control > Visual Studio Team Foundation Server to use a third party diff checker and it works no problem. However, I've gotten used to Visual Studio's diff checker and would like to continue using it, if only because it doesn't open a separate window to diff in.
Since I'm not sure as to the source of the problem, my question is two-fold:
First, how do I fix Visual Studio's diff checker and stop it from crashing every time I try to compare with previous version.
Or, if the issue lies with TFS, why is it crashing and how do I fix it?
Click on Visual Studio Menu:
TOOLS > Options
Then on Left Panel:
Text Editor > HTML > Advanced
And finally on Right Panel:
Extension Management > Identify Helpful Extensions
Change this setting to false.
This is an old question, but I needed to fix this recently, so the bug still exists!
I solved this problem by going to Tools -> Options -> Source control -> Plug-in Selection and changing the plug-in to "Git"
Try to disable ability to Identify Helpful Extensions:
Go to Tools->Options->Text Editor->Html->Advanced->Extension Management->Identify Helpful Extensions and switch to false.
You can start VS in safe mode with "/SafeMode" param.
Background
I maintain several web sites that are Visual Studio "Web Site Projects".
Problem
I've found that with a couple of these projects, Visual Studio regularly freezes while I'm working on the code. This doesn't happen for some of the web site projects, and I haven't seen it happen on any Web Application projects.
Symptoms
Each time it freezes, it takes about half a minute before I can use it again.
During a freeze, Windows Task Manager reports that Microsoft.VisualStudio.Web.Host.exe is maxing out one of the CPU cores.
Steps to Reproduce
Open a .cs file under the App_Code directory.
Make a change to the file.
Save the file.
Navigate somewhere else (eg switch tab, close the file, open different program in Windows).
Navigate back to the file (eg switch tab to it, open it, or go back to Visual Studio).
Other actions that sometimes seem to trigger the problem:
"Go to definition"
Opening a file
Previewing a file
Closing a file
Using a refactoring
"Find usages"
What I've Tried
Both Visual Studio 2012 and Visual Studio 2015
Changing the website project's build action
Disabling "Build Web site as part of solution"
Deleting web references and the Bin folder seems to minimise the problem, but obviously this breaks the web site. Maybe web site projects experience this problem when they contain a lot of C# code other than code-behind files?
Similar problems
I found the following potentially-related problems using Google, but none of them seemed to contain a workaround or solution.
Microsoft.VisualStudio.Web.Host.exe Time Theft
Microsoft.VisualStudio.Web.Host.exe
Visual Studio 2012 freezes for approximately 30 seconds after every build
I noticed that the problem happened less often when I suspended ReSharper.
The problem still happened occasionally when editing classes under App_Code, but restarting Visual Studio worked around it.
I was facing a similar problem. A single Web application project with dozens of class libraries, migrated over from VS 2010 into VS 2013.
I was able to solve my problem by disabling the "Hosting Process" option:
To disable the hosting process
Open an executable project in Visual Studio. Projects that do not
produce executables (for example, class library or service projects)
do not have this option.
On the Project menu, click Properties.
Click the Debug tab.
Clear the Enable the Visual Studio hosting process check box.
Full details on MSDN: http://msdn.microsoft.com/en-us/library/ms185330.aspx
Another option for people experiencing this on old web applications that don't have the properties page in the accepted answer above.
Disable "Allow this precompiled site to be updatable".
Open Site/Solution
Right click and view Property Pages
Go to MSBuild Options
Uncheck "Allow this precompiled site to be updatable"
This worked for me.
This problem stopped happening when the Web Site project was converted into a Web Application project.
Not an easy solution, but it did stop the problem.
They symptoms in the question of this post sound exactly like the nightmares I just had today:
Other actions that sometimes seem to trigger the problem:
"Go to definition"
Opening a file
Previewing a file
Closing a file
Using a refactoring "Find usages"
Plus intellisense wasn't working (even with CTRL + J) and
'Peek definition' was hanging as well.
I had to keep task killing visual studio (both 2015 and 2017).
My fix was to go into the project that I was having problems with, open the 'Package Manager Console' and uninstall and re-install the 'DotNetCompilerPlatform'
uninstall-package Microsoft.CodeDom.Providers.DotNetCompilerPlatform
and then
install-package Microsoft.CodeDom.Providers.DotNetCompilerPlatform
So far every problem I was encountering has not resurfaced (but this was just today so still need to give it time).
UPDATE:
It started creeping back again. I noticed also that whomever had installed to the solution had only done it to two of the various projects. Uninstalling the compiler platform (which means using the compilers that came with Visual Studio) has made life sane again.
I have an ASP.NET MVC4 application solution (.sln). When I close Visual Studio and then reopen it and my solution, my tabs and my navigation structure in the solution explorer do not restore to the way they were.
The solution is big and it takes me a long time to reopen many tabs and open lots of folders in the solution explorer.
Is there an option in VS that would allow me to restore the solution to where it was when I left it?
I've already done "Reset all settings" in the Import and Export Settings Wizard, but it didn't help.
I've also tried booting VS in /SafeMode which disables any extensions. No difference.
Searching around I can't see anyone have similar issues.
As far as I know the .suo-File saves which files are opened. Try to delete this file (VS will generate it new) and make sure that windows-file-permissions are set correct (read, write access).
I had the same problem with Visual Studio 2013, and I solved it by doing this:
Export my current settings, making sure to UNMARK General Settings > Window Layouts.
Re-import the settings I just exported, but making sure I left General Settings > Window Layouts MARKED now (so it would overwrite the current Window Layouts with the "clean slate" of the imported settings.
Perhaps you can try the Workspace Reloader plugin that Scott Hanselman blogged about?
http://www.hanselman.com/blog/IntroducingWorkspaceReloaderAVisualStudioAddInToSaveYourOpenFilesAcrossProjectReloads.aspx
You can install it from here - http://visualstudiogallery.msdn.microsoft.com/6705affd-ca37-4445-9693-f3d680c92f38
Got this issue also for Microsoft Visual Studio 2022 Community Edition.
How to fix :
First, be sure, that tools->Project and solutions->General:'Reopen documents on solution load' and 'Restore Solution Explorer project hierarchy state on solution load' enabled
Second, just close VS and delete .vs folder, then re-start VS.
Works fine for me
I am trying to reset every single setting inside Visual Studio as I have completely lost all IntelliSense. I tried the Tools -> Import/Export settings -> Reset, but that is not clearing all the settings. I know it is not since the color theme was not reset, and I still do not have IntelliSense. Short of uninstalling and deleting every trace of the program including the registry, is there another way to reset every single setting to the factory default?
Visual Studio has multiple flags to reset various settings:
/ResetUserData - (AFAICT) Removes all user settings and makes you set them again. This will get you the initial prompt for settings again, clear your recent project history, etc.
/ResetSettings - Restores the IDE's default settings, optionally resets to the specified VSSettings file.
/ResetSkipPkgs - Clears all SkipLoading tags added to VSPackages.
/ResetAddin - Removes commands and command UI associated with the specified Add-in.
The last three show up when running devenv.exe /?. The first one seems to be undocumented/unsupported/the big hammer. From here:
Disclaimer: you will lose all your environment settings and customizations if you use this switch. It is for this reason that this switch is not officially supported and Microsoft does not advertise this switch to the public (you won't see this switch if you type devenv.exe /? in the command prompt). You should only use this switch as the last resort if you are experiencing an environment problem, and make sure you back up your environment settings by exporting them before using this switch.
How to hard reset Visual Studio instance
When developing extensions sometimes you just mess up, others someone else does. If you start getting errors loading even the most mundane extensions, these are the instructions to hard reset your instance.
Close Visual Studio (if you haven’t already).
Open the registry editor (regedit.exe)
Delete the HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\{version}
Delete the HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\{version}_Config
Delete the %LOCALAPPDATA%\Microsoft\VisualStudio\{version} directory.
Enjoy your brand new Visual Studio instance.
Use {version}=10.0 for Visual Studio 2010
Use {version}=11.0 for Visual Studio 2012
Use {version}=12.0 for Visual Studio 2013
If on the other side you want to reset the experimental hive you can do the same to with the ‘{version}Exp’ ones.
Happy coding!
Source: http://www.corvalius.com/site/hacks/how-to-hard-reset-visual-studio-instance/
Click on Tools menu > Import and Export Settings > Reset all settings > Next > "No, just reset settings, overwriting all current settings" > Next > Finish.
To reset your settings
On the Tools menu, click Import and Export Settings.
On the Welcome to the Import and Export Settings Wizard page, click Reset all settings and then click Next.
If you want to delete your current settings combination, choose No, just reset settings, overwriting all current settings, and then click Next. Select the programming language(s) you want to reset the setting for.
Click Finish.
The Reset Complete page alerts you to any problems encountered during the reset.
Executing the command: Devenv.exe /ResetSettings like :
C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE>devenv.exe /ResetSettings , resolved my issue :D
For more: https://msdn.microsoft.com/en-us/library/ms241273.aspx
Just repair Visual Studio itself from the control panel and that should do the trick!
1) Run Visual Studio Installer
2) Click More on your Installed version and select Repair
3) Restart
Worked on Visual Studio 2017 Community