I have Visual Studio 2019 installed on an Azure machine and every time I run it, it asks for username and password which I enter. It then says Elevation is required. The System Admin grants this but it is only for 15 mins. What permission do I need to be able to run VS19 without permission or elevation? Systems Admin doesn't know either.
Run Visual Studio as an administrator follow these steps to open the IDE:
NOTE: These instructions are for Windows 10. They are similar for other versions of Windows.
Open the Start menu, and scroll to Visual Studio 2019.
From the right-click or context menu of Visual Studio 2019, select More > Run as administrator.
When Visual Studio starts, (Administrator) appears after the product name in the title bar.
You can also modify the application shortcut to always run with administrative permissions:
Open the Start menu, scroll to the version of Visual Studio that you're using, and then select More > Open file location.
In File Explorer, locate the Visual Studio shortcut for the version that you're using. Then, right-click the shortcut and select Send to > Desktop (create shortcut).
On the Windows desktop, right-click the Visual Studio shortcut, and then select Properties.
Select the Advanced button, and then select the Run as administrator check box.
Select OK, and then select OK again.
For reference follow this Visual Studio 2019 troubleshoot
Or, When it shows elevation is required ,
Please close the VS Installer and try running it as administrator from start menu.
Or trying to run
C:\Program Files (x86)\Microsoft VisualStudio\Installer\vs_installer.exe directly.
Related
My web application was working fine for months till today, don't know what has changed suddenly the project in my solution file says that it is "unavailable" when I open the solution. When I right-click on the web project and reload the project, I get the following error:.
The Web Application Project myproject.myapp.mywebproject is configured
to use IIS. You do not have permission to access the IIS configuration
file. Opening and creating web sites on IIS requires running visual
studio under Administrator account.
Note - All these months i was running visual studio normally(not under administrator account) and the application was working fine.
By seeing the above error i tried running my visual studio under administrator account and the project got loaded but the Source Control File Status beside all the files disappeared, i no longer see any blue lock icon beside any of the files and even when i edit any file also there is no status beside the file in my project and also when i right click on any of the file i don't see the view history option.
My project which was running successfully till now not loading the project. any suggestions on this ?
Browse to C:\Windows\System32\inetsrv and then double-click the “config” directory to get this warning dialog:
Click on the Continue button.
Do the same for the C:\Windows\System32\inetsrv\config\export directory and also the other directories in C:\Windows\System32\inetsrv.
Now you will be able to open the Visual Studio Web Application Project without a problem.
Just run Visual Studio as an Administrator and the problem will be solved.
from the Start menu or when Visual Studio is open on the taskbar, right-click the VS icon.
in the context menu, right-click the visual studio icon again.
left click on properties.
advanced choice.
choose Run as administrator.
This is a bit of an odd one.
I am running Visual Studio 2019 Enterprise in a VM in Azure, and whenever I elevate to Admin any files that I build/save are locked by my user, i.e. I right-click on File Properties -> Security -> Advanced my user is the owner, but there is a shield icon next to it. This is causing me problems as when I run Visual Studio un-elevated I can't save the file until I have removed the shield icon by re-taking ownership. On other machines running Visual Studio 2019, I can do this without having to reset the permissions. Both machines have Windows 10 Pro with 1909 Build 18363.836 and both are set to be in Developer mode. The project accessed from the root of the C: drive.
I'm trying to open a project from TFS 2018 (on-premises installation but I guess that would happen with any version or VSTS as well) dashboard but I can't.
I click on url Open in Visual Studio:
And an error form shows up:
The error description says:
Input args:/openurivsweb://vs/Product=Visual_Studio&EncFormat=UTF8&tfslink=dnN0ZnM6Ly8vRnJhbWV3b3JrL1RlYW1Qcm9qZWN0L2I1MjI0OWRjLTdhMDUtNDI1Yi1iZTE5LWNmMDM5YzE1YTJlND91cmw9aHR0cHM6Ly90ZnMubWFucG93ZXIuaXQvTmV4dEcv
Exception thrown:'Microsoft.VisualStudio.VSWebHandler.VSWebHandlerException'.
I have installed both VS2012 and 2017.
I tried also this workaround, but with no success:
Launch Developer Command Prompt for VS 2017 as Administrator
Go to VS 2017 installation folder, for example: pushd C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise
Launch command: gacutil -if Common7\IDE\PublicAssemblies\Microsoft.VisualStudio.Shell.Interop.8.0.dll
In the Windows Default Apps panel open the protocol handlers and scroll down to the vsweb: and the vstfs: protocol handlers. It could have multiple instances of the handler, one of which has to have the 2017 icon. Mine is showing 2 2017 icons because I have the 2017 preview installed side by side.
Change the default, restart the browser and try again.
In addition to jessehouwing answer, that works for Windows Metro UI systems (8 and superiors), this is what you need for Windows 7.
Go to Control Panel, select Default Programs and click the second option:
Then it opens the window where you have to change the association between Visual Studio Web Handler Selector and TFS Procotol Handler (vstfs:):
From the icon, as suggested, you can see that's Visual Studio 2012 symbol.
Now we change it:
Sorry bout Italian language, but procedure would be the same with any localization.
my visual studio is not opening in administrator mode on opening a project by clicking a solution. By default i set it as run as administrator. but, still it is not opening if i directly open the project by clicking the project solution file.
If you open Visual Studio, right-click on the Taskbar icon of it, and select Properties.
In the tab Shortcut, press the Advanced button and tick 'Run as administrator'. Click OK.
In the tab Compatibility, tick the 'Run this program as an administrator' option. Click OK.
Apply and close the properties dialog.
I changed those settings on my computer and it always starts in administrator mode.
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.
When I'm trying to open any solutions that worked fine before in Visual Studio 2012, the error "Package 'Visual C++ package' failed to load" keeps showing up. And the solution can't be opened.
I'm not sure what's wrong with my Visual Studio 2012 installation.
click the TOOLS--->VISUAL STUDIO COMMAND PROMPT to open the command window
input the command "devenv /Setup"
open the visual studio 2012 again, it will works.
Source: http://happyivyli.blogspot.com/2013/07/visual-c-package-failed-to-load.html
Running command prompt from inside Visual Studio.
For easier access, you can add the Visual Studio Developer Command Prompt or any other command prompt to the Tools menu on Visual Studio, by adding it to the external tools list. This is how you can accomplish that:
Open Visual Studio.
Select the Tools menu and choose External Tools...
On the External Tools dialog box, choose the Add button. A new entry appears.
Enter a Title for your new menu item such as Command Prompt.
In the Command field, specify the file you want to launch such as %comspec% or C:\Windows\System32\cmd.exe.
In the Arguments field, specify where to find the specific command prompt you want to use such as /k "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools\VsDevCmd.bat" (this will launch the Developer Command Prompt installed with Visual Studio 2015). This value needs to be changed according to your Visual Studio version and installation location.
Choose a value for the Initial directory field such as Project Directory.
Choose the OK button.
After that, the new menu item is added and you can access the command prompt from the Tools menu.
Then:
Right-click the Visual Studio icon
Choose Run As Administrator
Click the menu TOOLS → *Command Prompt** to open the command window
Input the command "devenv /Setup"
Open Visual Studio again, and it will work.
None of the solutions I found around, including those listed here, seemed to help. What did work was going in the software install/uninstall management, right clicking on Visual Studio and choosing "change" (that's where you would normally uninstall something from).
That should pop up the Visual Studio package manager, and from there you can choose repair.
In my case, looking at the systems backlog and restore points, it seems it was one of the Visual C++ redistributables, possibly installed by some game, that compromised the environment.
This is on Windows 8.
Possibly same fix as this https://stackoverflow.com/a/21266545/990618
Check your User environment variables for VCHOME, VCINSTALLDIR and vsinstalldir.
Change
X:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\
to
X:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\
Or
X:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\
depending VS 2012 or 2013.