Visual Studio 2019 Run as admin locks file - windows-10

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.

Related

What Azure permission does a programmer need to run Visual Studio 2019?

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.

Elevator.exe in Android Studio update

During Android Studio update, it was noticed that elevator.exe (Verified publisher: JetBrains s.r.o) was installed on my computer. What is this application for and why is it required for Android Studio?
P.S - I am aware that Android Studio is Powered by the IntelliJ platform.
According to the commit history in the source code for intellij-community/bin/win/elevator.exe on Github, the very first commit (May 17, 2017) states:
Add sudo-like tool for windows to deal with UAC…
When admin user launches Intellij, Windows revokes many user
privileges to improve safety for admin users (that is how UAC works).
One can't access "Program Files": any attempt to write something there
leads on ACCESS_DENIED(5) error even if NTFS reports file is writable
The only way to elevate privileges is to launch process as elevated.
"Elevator.sln" is Win32API app that launches command as elevated. See
its sources for more info.
On Windows, application softwares (like IntelliJ or Android Studio) are limited to standard user privileges until an administrator authorizes an increase or an elevation occurs.
Since IntelliJ powers Android Studio, it makes sense for that file to show up in an Android Studio update.

Opening Project from TFS Dashboard causes Visual Studio Web Handler Exception

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.

create exe with admin rights with InstallShield in Visual Studio 2012

I would like to create my setup to install my application developed in VS 2012. The application needs to be installed in Program Files folder, so it needs to always run with administrator rights. I have created a new InstallShield project inside my solution, but I don't know if it is possible to set some settings to allow that exe always runs as administrator.
I'm using the InstallShield 2013 Limited Edition
You can only manifest an EXE to indicate to Windows that the EXE requires administrative privs. You can't simply bypass windows security.

Cannot create Windows Phone 8 project in Visual Studio 2012 Ultimate

I have a copy of Visual Studio 2102 installed on my computer. Since my computer met all the requirements for the emulator (SLAT, Hardware Assisted Virtualization etc.), i downloaded the Windows Phone 8.0 SDK and proceeded to install it.
Unfortunately, i cannot create a new Windows Phone application. Project templates (Windows phone application, Pivot application, Panorama application etc) do not appear in VS2012 main page. The only available option is "Discover Windows phone tools" (which redirects you to the download page of the SDK).
I tried to uninstall everything and repeat the process, but the result is the same.
I'm still able to open projects made with the old Windows phone SDK 7.1 and test them on the new emulator. This should be enough to prove that the installation was successfully completed.
I can't understand what went wrong. May you help me?
I had a similar bug because my Visual Studio Pro is in French. When you install Windows phone SDK, an express version of vs is already installed, you can create phone project in this version and open these projects in vs pro but you cannot create phone project directly in vs pro, that's right ?
Go to : C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\ProjectTemplates\CSharp\Windows Phone
You should have a folder called 1033, it contains phone template for english version of visual studio. Copy and paste it then rename the copy in your code language (http://msdn.microsoft.com/en-us/library/0t12k0f0.aspx , for me it's 1036).
After that, close visual studio, launch C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\Tools\VsDevCmd.bat with admin rights and type : devenv.exe /InstallVSTemplates /ResetSettings
Relaunch visual studio pro, and you should have a Windows phone entry.
Parallels provides a very good knowledge-base article on fixing this problem:
KB: Running Windows 8 Phone emulator in the Windows 8 virtual machine
Copy lang files also in:
...\IDE\ItemTemplates...
...\WindowsPhone\ProjectTemplates...
It helped me!

Resources