Visual studio 2015 / TFS Access is denied - visual-studio

When I try to add new item to project in visual studio 2015 I always get this message
Access is denied.
The file is created and added to the project, but it is not added to Source Control, although the project is in source control. However, when I try to manually add the file to source control by right-clicking in Solution Explorer -> Add to source control, the file is added to TFS.
I have upgraded to windows 10 and installed Visual Studio 2015. I'm working on existing solution in C:\Projects\ and the solution was created and added to source control before I upgraded.
EDIT: If I run VS in admin mode, the error is gone

Access is denied. returns very little information. For more detail info, you can repro the error and run a procmon trace using Process Monitor tool filtered on DEVENV.EXE. Detail for how to use the tool: http://www.mztools.com/articles/2008/MZ2008024.aspx
Normally, this error message can be corrected with the followings:
Add your Windows account to the Administrators group on the local PC
Run your Visual Studio in Administrator mode.
Check if your project folder is set to read only.

Related

another instance of an application is already in process - visual studio 2013

I am attempting to log into Microsoft Visual Studio, so I can connect to TFS, and I am unable to login.
After I enter my credentials, it acts like everything is good to go but I do not login in the top right. When I hover over Sign in I get an error stating "Another instance of the application is already in the process of signing in."
I did just remove my user settings because of another issue not allowing me to actually connect to anything because I just branched a product.
I have attempted to shutdown the computer, restart visual Studio, reinstall visual studio and I also reinstalled microsoft office; as well as. added the two sites mentioned from another forum to my trusted sites (*.accesscontrol.windows.net)(https://app.vsaex.visualstudio.com/me?mkt=en-US). if anyone has any information on this that would be greatly appreciated. Thank You
Just try below things to narrow down the VS sign in issue:
Disable any Anti-Virus or Anti-Spyware software on your
computer, navigate to <Visual Studio Installation Path>\Common7\IDE
and run the following commands: devenv.exe /resetuserdata, it will
take a couple of minutes to run as Visual Studio cleans up and sets
itself back to its original state.
Close visual studio --> delete the following registry key
HKEY_CURRENT_USER\SOFTWARE\Microsoft\VSCommon\ConnectedUser\IdeUserV2
--> restart visual studio --> Try and sign in
Remove credenticals from Credential Manager (Control Panel\All
Control Panel Items\Credential Manager)
Clean VS caches:
Close Visual Studio (ensure devenv.exe is not present in the Task
Manager)
Delete the %USERPROFILE%\AppData\Local\Microsoft\VisualStudio\12.0\ComponentModelCache directory
Restart Visual Studio.
Open the following file in notepad:
C:\windows\system32\drivers\etc\hosts
Add
65.52.55.39 and app.vsspsext.visualstudio.com then re-open vs and try the sign in again.
However it's not necessary to sing in Visual Studio if you just want to connect to TFS. You can only manage the connections in Team Explorer. When you add a new TFS server and try to connect, it will prompt to enter the credetical. Just enter the appropriate TFS credentical to connect the TFS server.

Requested Operation requires elevation VS 2017

I have set my Visual Studio to run as Admin (by changing running the troubleshoot compatibility on VSLauncher.exe) always. Now, if I try to open a folder in visual studio, by right clicking on the folder and selecting Open in Visual Studio, I receive the message "Requested Operation requires elevation". How to solve this by having VS run as Admin all the time but able to open any folder in VS by right clicking. Please Help.

unable to create new project in visual studio 2015

i am not able to create new project in visual studio 2015. The error is access to path is denied
C:\Users\good\Documents\visual studio 2015\windowsapplication1\windowsapplication1' is denied.
I had a similar problem in Visual Studio 2017. I removed this folder to get it working again:
C:\Users\USERNAME\AppData\Local\Microsoft\VisualStudio\15.0_4f8023be
15.0_4f8023be is a unique hexadecimal number for my AppData, yours will be a different.
It might also work by just removing:
C:\Users\USERNAME\AppData\Local\Microsoft\VisualStudio\15.0_4f8023be\privateregistry.bin
and that way you won't lose your settings and extensions.
i found the solution run visual studio as administrator or
Open visual studio. Tools Menu | Options | Projects and Solutions | Check the checkbox "Save new projects when created".
Also, you can change projects location in same dialog. Change it to somewhere else like D:\VBProjects etc..
What worked for me is this:
I uninstalled Visual studio 2015 completely and then installed Visual studio 2015 with option for update 3 unchecked.
I guess update 3 can cause this issue.
I got this problem while trying to create a project under a virtual disk path (created by command SUBST), so the solution for me was to create a project under a path the virtual disk path was referring to.

Visual Studio 2008 SP1 with GDR2 - DBMDL could not be created

I get the following dialog when I try to load any DB project in Visual Studio.
There is nothing else locking it, nor are the permissions on that specific folder restrictive.
This used to work, but I re-installed VS2008, then Sp1, a few hot fixes and GDR2.
Now, when I try to load any DB project, I get the dialog above.
When I open VS, I get the following dialog; it's different, but message is the same..
Try opening Visual Studio as Administrator.
You can check locks on files by using process explorer:
http://windowsxp.mvps.org/processlock.htm
You can download process explorer here:
http://technet.microsoft.com/en-us/sysinternals/bb896653

Cannot add SourceSafe Database as Visual Studio 2010 source control

My issue is that I cannot add SourceSafe Database for source control within Visual Studio 2010.
Our team was initially using VSS for source control in Visual Studio 2010. During an evaluation of TFS, I switched my source control to TFS. It will be a few weeks before a decision is made on TFS, so I needed to switch my source control back to VSS. However I'm now unable to add a SourceSafe Database in Visual Studio.
Steps to Reproduce in Visual Studio 2010:
1) Access the 'Open SourceSafe Database' form via Tools->Options->Source Control->Plug-in Settings-->Advanced
or via File->Source Control
2) The list of available database is blank so I choose 'Browse'.
3) I browse to the srcsafe.ini file for my VSS database and select it.
4) I'm promted to confirm the Database Name - Click OK.
5) The database does not appear in the 'Open SourceSafe' Database form. The list of available databases is still blank.
Note that I can add the database fine outside of Visual Studio using VSS directly. However the databases I add via VSS do not appear in the Visual Studio forms.
I'm suspicious that this is related to "down-grading" from TFS to VSS which may not have been heavily tested at MS.
Any assistance is appreciated.
I installed VS2010, then i install VSS, then i have the same problem, cant connect to my VSS it by default opens (TFS)
the suggestion here, to reinstall, dont sound good, did a bit more searching and found this:-
http://social.msdn.microsoft.com/Forums/en/vssourcecontrol/thread/6c927805-bca6-445b-b406-0a0da8fa21d3
and found the easy solution that 'CletusLoomis' is looking for:
simply:-
hanks for your post.
Could you please try the following steps?
Open VS2010, then choose the menu: Tools->Options, then click "Souce Control"
click drop-down box under text"Current souce control plug-in", use "None", rather than "Microsoft Visual Source Safe"
thats it, problem solved!
:)
hope this helps someone else who found this page via google.
To do that you must run Visual Studio 2010 as Administrator. Just click on Icon using right button, Go to Properties, Compatibility, at the botton of screen you should mark Run this program as administrator.
That's all.
Must exist some file that the permission should be granted to all users, but instead of searching for the file, I preffer this solution.
Regards,
Luiz Ricci
My Visual Studio 2010 had very similar symptoms: having selected Visual SourceSafe 2005 in the Options I had the only menu option: Launch Microsoft SourceSafe
While following the steps provided by 'visual' (as of Nov 30 '10 at 8:00) I have found the following registry key, which needs to be switched to 0 to enable the SourceSafe menu options to be displayed in Visual Studio 2010. Once the registry key value has been changed to zero Visual Studio needs to be restarted and .. voila! Now I have an additional menu option Open from source control...
The registry key is as follows (for 32bit OS it would need to be slightly modified): HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\SourceSafe\Namespace Extension\DisableOpenFromSourceControl
Now, why it was disabled by default is beyond me.
Your installation of VS might be corrupted. I would recommend uninstalling VSS, VS, and TFS and then reinstalling VS and VSS. Unfortunately, this could take 4+ hours, but it should fix your issue.
I don't believe that my VS installation was corrupted. I do believe there is a bug in VS 2010 which does not allow me to use VSS for source control after having used TFS. Fortunately for me, our team decided to go forward with TFS for our project's source control. I never had to solve the problem. I believe that reinstalling Visual Studio alone would have been enough to solve the issue.
I had the same problem with Windows 7, Visual Studio 2010 and VSS. I noticed several things:
VSS as standalone program does always work on my system.
VSS works perfectly in my projects, if the UAC Level is the lowest, but not with the default UAC Level.
If I open a project file with VSS source control, Visual Studio tries to read the registry. It fails to read/write the keys in the registry with access denied. Therefore I changed the permissions in the registry of the SourceSafe keys to full access for all users. Now, VSS works perfectly on my system with default UAC security level.
I faced the same problem.
I am using Visual Studio 2010 and my projects added to Visual SourceSafe 6.0
The VSS database list was not prompted on my machine as well.
After a number of attempts for over 3 hours. Finally got a solution.
I run the VS2010 using Run As Administrator option. The VSS database list was visble.
I think the issue might be due to Access Rights of Registry in Windows 7.
What a nightmare this has been. Ultimately, you can set in domain or local policy.
Local Security Policy\Security Settings\Local Policies\Security Options\User Account Control: Run all administrators in Admin Approval Mode - Disabled
This means anyone in the administrator group does not have to have approval (The Dreaded Run as Administrator)to be an administrator. Can be set locally as above or domain wide. Solved a lot of problems for us.
Options -> Source Control -> Make sure the "Current Source Control Plugin" is correctly set.
Mine was set to Microsoft Visual Source Safe (Internet), and should have been Microsoft Visual Source Safe.
First, make sure you can view the database by visual source safe explorer.
Then, trying to proceed with these step...
Open Visual studio as Administrator.
Log in visual source safe by the database path. (it still disappears the database in "Available database" list.)

Resources