Tasklist control in Visual Studio 2010 - visual-studio-2010

Usually when I being a project at some place, the VS installation already includes the tasklist stuff. In this new position the tasklist window does not show up under View/Other Windows. How do I get the tasklist to work? We are on a closed network and cannot connect to the internet with VS so that may add some difficulty.

You can try it via the Default Shortcut for the Task List
Shortcut: ctrl + w,t

Related

How to avoid multiple windows opening on subsequent instances of Visual studio?

Say I have one instance of Visual Studio running where I have opened few windows like Unit Test Explorer, Resharper TODO explorer and so on and to take advantage of multiple monitors I have moved these windows out of visual studio to different monitors.
Now if I open different solutions in new instances of Visual studio (say from Visual Studio > Recent items jump lists) all the new instances also open with similar windows in each instance, even though I don't really need those in those new instances. These clutter my work space and I have hunt and close these one by one.
This continues until I close all the news Visual studio instances, close all the windows on the first one instance I had and close that instance as well.
I understand this behavior stems from the fact that the new instances inherit the opened windows etc. configuration from the first opened instance.
Is there any way to prevent the same windows from opening on subsequent instances of visual studio?
Or may be a configuration to launch visual studio with default windows?
Or quick way to kill all these unwanted windows?
I looked through the VS > Options > Environment > Startup and Tabs and Windows etc., devenv.exe command lines but don't find anything useful.
While the solution provided by #Richard to establish your "baseline" window layout, then save that (Window | Save Window Layout) and apply the layout using Window | Apply Windows Layout | name or the assigned shortcut helped as a workaround, I see Microsoft Visual Studio 2019 now comes with a preview feature, Autohide tool windows at startup,
that addresses this problem.
When enabled, any new instances of Visual Studio open only Solution Explorer and not any other windows opened on previous instances. This also improves startup performance noticeably.

how fully remove Visual Studio

Please tell me how to fully remove Visual Studio with all components and also remove registry(Any batch file or any Command which runs from Command prompt)
Go to Programs and Features (in Control Panel)
click on 'Microsoft Visual Studio {your distribution e.g. Pro/Ent etc} 20XX'
click on Change
click Uninstall
Do the same for all other existing Microsoft Visual Studio components in that list.
EDIT:
based on your comment below, I'd suggest you to use Windows 7 Manager or Windows 10 Manager based on your OS, its quite handy and fast, it even cleans registry as well. I've personally had good experience with it.

Visual Studio does not let me drag drop items into it?

Using Visual studio 2010 I got problems when double-clicking, for example a config file (*.config). Visual Studio would open but give me a error message about parameters. If I simple try to drag and drop a file that Visual Studio usually can read in to it, the icon will give me the "not possible icon"?
I have now installed Visual Studio 2012 and it has the same problem?!
This makes my work a lot harder, it should be easy to just drag & drop files into Visual Studio, but it's not so? Now I have to manually find the file with the file menu?
Please note, I have re-installed the computer before installing Visual Studio 2012.
On Windows Vista and newer Windows Explorer runs with medium integrity level.
If you run Visual Studio as administrator (high integrity level) then for security reasons OS will disable drag and drop from Explorer to Visual Studio.
You can either run Visual Studio as normal user or you can install VSCommands for Visual Studio 2012 extension. It has several features that can help with this such as:
Elevated Windows Explorer - small tool which looks like Windows Explorer but runs with elevated permissions allowing Drag And Drop
Directory Explorer - tool window inside Visual Studio which again looks like Windows Explorer and allows Drag And Drop
Run Visual Studio with medium integrity - allows Drag And Drop from Windows Explorer, but you won't be able to attach to processes run by other users (e.g. IIS)
If you run VS as administator, instead drag n drop, do copy (either ctrl+c, context menu "copy") the file selection in explorer and paste (ctrl+v, context menu) on selected node in VS
This was driving me nuts. In my Visual Studio solution I have two Web Application which use IIS as web server so because of this I have to always start my Visual Studio in Administrator mode. After starting as Admin I wasn't able to drag and drop files from Explorer to Visual Studio.
Solution:
Open Command Prompt as Administrator (Shortcut for Windows 8.1 is ⊞ Win + X + A)
Type "explorer" this would open Windows Explorer with Admin privileges.
And now you should be able to drag and drop any file from explorer to Visual Studio
If you disable UAC completely you can drag & drop from anywhere again. To do this you can't use the slider in the Control Panel because that only brings the UAC level down to 1. Make this registry change, reboot, and you can again use your computer like god intended.
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System]
"EnableLUA"=dword:00000000
I think the main goal of this question is how to add many folders and files to your project in a comfortable way. Drag and Drop files into your project is one solution, which fails under certain circumstances.
Another very easy way is:
Copy the new folders and files where you physically want them in your project
Open the project explorer in VS and click the button "Show all files"
All the folders and files, which are now not part of your project yet appear white
Select the the white folders or files, right-click and choose "Bind to project"
Done
This is also possible, if you run VS as admin.
Have some fun!
By the way: I found this question, because I had the same issue with drag and drop. I understand the security issues, but it is an annoying feature.
I'm using this easiest approach. When you run Visual Studio in Administrator Mode. When you need to drag and drop, just press CTRL+O to open up a file browser within visual studio, and use that file browser as an Elevated Explorer to do your drag and drop.
I had a similar problem but my issue was a bit different. I was trying to drag and drop a file from inside a zipped folder. Once I unzipped the folder drag & drop started working again.
I had this problem as well because I was opening VS in admin mode and the file explorer by default is not in admin mode.
Ended up creating a PowerShell and bat script to start explorer in admin mode every time the computer start.
admin.bat file:
#ECHO OFF
PowerShell.exe -Command "& {Start-Process PowerShell.exe -ArgumentList '-ExecutionPolicy Bypass -File ""%~dpn0.ps1""' -Verb RunAs}"
admin.ps1 file:
taskkill /f /im explorer.exe
start-process explorer.exe
The files just have to be in the same folder. Doesn't matter what they are called. Run the .bat file to restart explorer in admin mode or just create a shortcut to the .bat file in the startup folder ;) the script and ps1 file can be hidden.
On windows 8.1, change the registry key: Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\EnableLUA and set value = 0.

How do I cancel a build that is in progress in Visual Studio?

Almost unconsciously I hit the keyboard build macro that builds my entire solution. This can happen just as I notice a code change. The build dominates my computer, and I basically have to wait till it finishes. 10 seconds!
How can I cancel a build?
You can hit Ctrl+Break on the keyboard to cancel/stop a build that is currently in progress.
Go to Visual Studio Build Menu -> cancel build , easy :)
This is crude, but it works well. The Visual Studio on one of my projects (I turn MVC view building on to catch markup errors), well, the project becomes unresponsive while building. I can't cancel the build using the keyboard shortcuts.
So I made this batch file that sits on my quick launch task bar.
#echo off
echo KILL BILLd
for /L %%i in (1,1,10) do (
Taskkill /IM aspnet_compiler.exe /F
timeout 1
)
I also made the batch file launch minimized. The build stops and Visual Studio just throws in the error window that there was a problem building.
Ctrl + Break works, but only if the Build window is active. Also, interrupting the build will sometimes leave a corrupted .obj file that will have to be manually deleted in order for the build to proceed.
If all else fails go to task manager and kill the msbuild task under Visual Studio 2017
Ctrl + End works for me on Visual C++ 2010 Express.
Visual Studio 2015 Professional Update 3
If you are using Mac you can do following
Click Build --> Cancel from the Visual Studio Menu
or
Select Azure App Service Activity window --> Cancel
it will cancel the publish activity.
I'm using Visual Studio 2015. To stop build you can follow:
Ctrl + Pause
Ctrl + Break
The "pause" command was a function button underneath my right shift key, so the below combination of keys did the trick for me.
Ctrl + Fn + Shift
I was hit by an unresponsive build and absolutely nothing would allow me to either kill or cancel the build. Even trying to end the task would trigger a user input window, saying that it could not be ended while the build is still going on (quite ironic because that was precisely the intention, to leave that broken state).
The build was taken care of by MSBuild, so the one way I found is to end its task. When forcing MSBuild.exe to end, VS will wake up and finally see the build as cancelled, allowing you to work again.
Hope this helps someone in the same situation.
The build context menu has a Cancel build in Visual Studio 2013.
Go to the Window menu and choose "Web Publish Activity"
There will be a cancel button.
Cancel button on "Web Publish Activity" tab
For users of Lenovo Thinkpad T470s like me, you can simulate the break key by hitting Ctrl+Fn+P, which cancels the build.
If you do not have a break key on your keyboard, you can change the keyboard shortcut to cancel the build.
Just search hotkeys in the search menu. This should take you to Environment > Keyboard. From there, search for Build.Cancel and you can change it to whatever keyboard shortcut ( eg. Ctrl+Alt+End ). This is a good keyboard shortcut because it won't conflict with other uses of Ctrl+End or Ctrl+Shift+End .
Ctrl + Shift + Pause/Break
I am using Visual Studio Community 2022

How do I force Visual Studio 2008 to use an Open instance when double clicking a file?

Certain non-project files that I use Visual studio for (.build, .xml, free-roaming html and css files) are already associated with visual studio and open in it when i double click them.
How can I get them to open in an existing instance of visual studio? Right now If i double-click the same file twice, it will open two instances of visual studio, I'd like it just to basically ignore the second open attempt if there is already an instance of VS open.
Windows 7 vs2010 answer;
Because "Default Programs > Associate a file type or protocol with a program" is so useless, use regedit.
Navigate to HKEY_CLASSES_ROOT\VisualStudio.XXX.10.0\shell\Open\Command and add /edit to the end of the open with line, where XXX is the filetype you wish to affect.
Example .reg file for .cpp;
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\VisualStudio.cpp.10.0\shell\Open\Command]
#="\"C:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\Common7\\IDE\\devenv.exe\" /dde /edit"
Ok Richard helped point me in the right direction a bit, but I think I found exactly what I want.
from an explorer window, go to Tools->Folder Options->File Types tab
find the extension you wish to change.
If there is a restore button click it.
Click Advanced
Click New... to create a new action.
I set the following:
Action: Open in VS 2008
"C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\devenv.exe" /dde
check use dde
DDE Message: Open("%1")
Application: VisualStudio.9.0
DDE Application Not Running: (left blank)
Topic: System
Hit Ok
Set the new action as the default.
Hit Ok, Hit Ok
Now that extension will behave exactly as described in the question. The file will open in an existing VS if visual studio is already open.
I also used this to fix a few extensions that got broken when I reinstalled VS 2005 after 2008.
Win 7/ VS 2012
You can right click a file, go to properties.
Then there is an "Opens With" line and a change button. But I don't see a way to force other command line options. VS2012 seems to use the open instance by default.
Which version of VS?
For 2003, there's VSEdit.
In 2005, well, that's the way it works for me out-of-the-box. A quick Google search found something that may help.
Hope that helps.
Later versions of Visual Studio also seem to have problems opening files via DDE from certain applications (e.g. in SSHCommunications' Secure File Transfer Client; Winzip and explorer seem to work fine). This still happens with the solutions given previously.
When IDE already loaded, the IDE focuses but gives error 'The template specified cannot be found. Please check that the full path is correct'
When IDE not loaded, it intermittently gives error 'The file cannot be opened because it is being used by another process. Please close all applications that might access this file and try again'. Trying again proceeds as 1)
You can get it working in all situations using a combination of all the previous posts!
Install the VSEdit application (as suggested by Richard/Jeff for .Net 2003), regardless of the version (or versions) of msdev that you use: the post by Sara Ford to which they refer recommends VSEdit for command line operation in VS2005 - it also seems to work for later versions.
Alter the DDE (Tools->Folder Options->File Types) as Jeff proposes but to open via VSEdit.exe instead of devenv.exe directly. Specifically:
Action: Open "C:\Program Files\PowerToys for Visual Studio .NET
2003\VSEdit\VSEdit.exe" /c "C:\Program Files\Microsoft Visual Studio
9.0\Common7\IDE\devenv.exe /Edit """%1"""" "%1" use dde: (checked) DDE Message: (left blank) Application: VSEdit DDE Application Not
Running: (left blank) Topic: System
N.B. The triple/quad quotation marks are deliberate - they add the first opened file (quoted) to the end of the launch command to prevent msdev complaining about the command line usage of the /Edit mode if launched. Obviously command paths will need changing for different installations.

Resources