Visual Studio 2010 now opens XSD files in design mode by default. I can't find any option for disabling this. Is there a way to always open XSD files in text mode?
Right click on an XSD file, choose "Open with..." and select the appropriate option - then click on "Set as Default" before you actually open it.
Visual Studio 2012, right click XSD file, Advanced, View with.
Related
I was using .NET Core API project with 2.2 Framework in VS 2017. Now we have migrated all the .NET Core API Projects to 3.0 Framework.I have both VS 2017 and 2019 installed in my machine. When we click on ".sln" file it gets openend in VS 2017. But i want the .sln file to be openend in VS 2019.
Please let me know the changes required to achieve this.
Thanks
For one, you can delete the solution file and create a new one dotnet new sln.
Assuming you have .NET Core 3.0 sdk installed and active (in case of globa.json being present), it should create you an *.sln file for VS 2019.
Alternatively edit your sln and change the first few lines to
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.29512.175
MinimumVisualStudioVersion = 10.0.40219.1
thats the sln header VS 2019.4 (16.4) creates on new solutions
Right-click on the .sln file
From the popup menu click on "Open with" and in the submenu click on "Choose another app"
In the splash window select "Microsoft Visual Studio Version Selector", don't forget to tick the "Always use this app to open .sln files" checkbox, and click "OK".
If prompted to save changes to the "devenv.sln" file, save changes.
In this way, a double click on a .sln should open it with the version of Visual Studio that was used to create it.
Open Visual Studio 2019 and select File-->Open than browse to the solution file that should be ported to VS2019 to open it.
After the solution file was successfully opened in VS2019, chose to Save All.
From now on, your solution file will be opened with VS2019 once you doubleclick solution file in file explorer.
P.S.
Editing solution file manually to update VS version is not recommended because it does not respect possible structural changes of the solution file that may appear between VS versions.
Or,
create a shortcut to the .sln file
right-click the shortcut, choose Properties, General
Opens with, click Change and select Visual Studio 2019
(note - this only changes the shortcut, not the .sln itself, but it's a quick safe fix)
Is it possible to code against file in the Solution Explorer such as adding to the right click menu items when clicking on a file?
What i want to get: after double click on file in Source Control Explorer, connected to TFS, it must be opened in external text editor ( like Notepad++ ).
Problem: 'View with..' menu item is missing, so i don't know how to change default editor to files listed in Source Control Explorer.
Apps installed: Visual Studio 2013 + Team Explorer for Visual Studio 2013 + TFS 2010 on server
I installed the Power Tools...
http://visualstudiogallery.msdn.microsoft.com/f017b10c-02b4-4d6d-9845-58a06545627f
... and then in my context menu "Advanced" --> "View With" appeared.
Rather than using loads of half-supported add-ins on Visual Studio (2012), I would like to be able to right-click a file or folder in Solution Explorer or a document tab and have all the options I have on Windows explorer (e.g. Tortoise SVN, edit with Sublime Text, etc.). Is there an add-in, or something quick I can write myself that will allow this?
Check this extension in gallery
link
.
Works ok for VS2010 Ultimate
how do I create a shortcut that runs Visual Studio with Administrator rights?
Actually I have to navigate to the Visual Studio start menu folder, click on the icon with the right mous button and choose "Run as Administrator".
Right-click on the shortcut, select Properties. On the Shortcut tab, click the Advanced button (bottom right). Check the Run As Administrator box.
I know the OP was about how to create a shortcut that runs VS as admin, but using the steps below you can just always have VS launch as admin.
This is a copy of my answer to a similar post on SuperUser:
Option 1 - Set VSLauncher.exe and DevEnv.exe to always run as admin
To have Visual Studio always run as admin when opening any .sln file:
Navigate to C:\Program Files (x86)\Common Files\Microsoft Shared\MSEnv\VSLauncher.exe.
Right-click on VSLauncher.exe and choose Troubleshoot compatibility.
Choose Troubleshoot program.
Check off The program requires additional permissions and hit Next.
Click the Test the program... button to launch VS.
Click Next, then hit Yes, save these settings for this program, and then the close buton.
To have Visual Studio always run as an admin when just opening visual studio directly, do the same thing to the DevEnv.exe file(s). These file are located at:
Visual Studio 2010
C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\devenv.exe
Visual Studio 2012
C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\devenv.exe
Visual Studio 2013
C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe
Visual Studio 2015
C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\devenv.exe
Option 2 - Use VSCommands extension for Visual Studio
Install the free VSCommands extension for Visual Studio (it's in the Visual Studio Extensions Gallery) and then configure it to always have Visual Studio start with admin privileges by going to Tools -> VSCommands -> Options -> IDE Enhancements -> General and check off Always start Visual Studio with elevated permissions and click the Save button.
Note: VSCommands is not currently available for VS 2015, but their site says they are working on updating it to support VS 2015.
My Opinion
I prefer Option 2 because:
it also allows you to easily turn off this functionality.
VSCommands comes with lots of other great features so I always have it installed anyways.
it's just easier to do than option 1.
What I was looking for was a way of running Visual Studio Solution files (.sln) as Administrator. I just found a pretty good way of doing this...
Place this content inside a file named RunAsAdministrator.reg:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\VisualStudio.Launcher.sln\Shell\runas\Command]
#="\"C:\\Program Files (x86)\\Common Files\\Microsoft Shared\\MSEnv\\VSLauncher.exe\" \"%1\""
Double click the file to execute it.
Now, when you right click a file you'll have the option of running it as Adminstrator like this:
Here's the full story by the AWESOME David Ebbo: Open your solution files as admin
Create a shortcut to Visual Studio on your desktop
Right-click on the program
"Send to"
"Desktop (create shortcut)"
Open up properties
Right-click on the shortcut
"Properties"
Within the "Shortcut" tab, click on "Advanced..." (somewhat towards bottom right)
Select "Run as administrator" in the new window
Apply and OK all the windows.
Now when you use this shortcut, it should run the program as administrator.
The above answers works, but on Windows 10 you might bump with disabled advanced shortcut screen. So for windows 10 do the following:
Create shortcut to the solution file
Right click the shortcut => properties
Choose Shortcut tab
Under Target add the visual studio executable location before the sln path. For example:
"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\devenv.exe" C:\mypath\example\example.sln
Press Advanced under the shortcut tab - you'll be able to edit the advances window.
Select "Run as administrator"
Press ok
Double click the shortcut - you should be able to run the solution as administrator now.
Ctrl + Shift + Clicking on Visual Studio 2019 shortcut seems to open Visual Studio Professional 2019 in admin mode.