Add command in visual studio 2010 and make it stay - visual-studio-2010

In Visual Studio 2010, I'm adding a command by going tools -> customize -> commands. However, the changes I make there appear to be temporary. After I open Visual Studio another time, my command is not there.
How do I add a command so that it stays?

The problem probably comes from VS not having permissions to modify its settings, when running as a non-administrator, due to UAC limitations. I actually don't have this problem - on my Win7, VS10 settings stick even when running as regular user, but this might be an issue with specific installation settings.
Bottom line, running VS as administrator should remove the permissions limitations, and allow VS to store the modified settings properly.

Related

After Visual Studio 2015 installation, hard drives seem to be locked

I have a Windows 2012 system with Visual Studio 2010 installed. It worked fine on this system. Today I installed Visual Studio 2015 Community Edition on it. After installation, when I try to open existing solutions with Visual Studio 2010, the loading becomes very slow. Also, I am not able to save any modified files in the solutions. It seems that all the solution folders and files have become read-only. When I tried to change the attribute in Explorer, I was shown "You will need to provide administrator persmissions to change these attributes", even though I already logged in as administrator.
When I tried to save an ordinary text file, I was also not able to because some process is locking it. The same thing happens to C:\ as well.
Also, I notice that if I right click and select "New" from the pop-up menu in Explorer, the only option is "Folder" (this only happens for D:\ and not C:).
What could be the problem?
The local security policy was changed when I installed Visual Studio 2015 Community Edition. In Security Settings -> Local Policies -> Security Options, "User Account Control: Run all administrators in Admin Approval Mode" was changed to "Enabled". All I needed to do was to change it back to "Disabled" and then restart the system. The problems described disappeared after that.

How to handle Visual Studio 2010 Not Responding?

First of all, I am not asking the same question here. ( This may be a duplicate post on Stack Overflow.) I have searched other solutions on MSDN, ASP .NET Forum, Stack Overflow, Code Project and everywhere on internet. But none of them solved my problem. These are the links that I found:
http://blogs.msdn.com/b/kirillosenkov/archive/2012/01/11/vs-hangs-for-1-minute-on-start-debugging-check-for-dead-symbol-paths.aspx
http://www.codeproject.com/Questions/272109/Visual-Studio-2010-Hangs-When-Debugging-App
And a lot more...
My CPU is 4th Generation Intel Core i7 and memory capacity is 8 GB. I think it is more than recommended hardware requirements.
Problem:
My visual studio hangs on these situations.
Opening a solution (Hangs for a minute when I open a file from solution explorer)
Running the debugging (Freezes consistently when I click on debug button) and
Stopping the debugging (Freezes immediately after the UI returns to the Developer layout after debugging)
I have tried the following steps:
I ensured that I deleted all the breakpoints in the solution.
I ensured that I am not using any resources from network drive.
I ensured Step over properties is enabled.
I ensured Enable .NET Framework source stepping is NOT enabled.
I start visual studio with SafeMode to suppress extensions
I cleared watch window.
I cleaned and rebuilt the solution.
Before I encounter this problem, I installed "Install Web Components" Visual Studio Add-In a few weeks ago. May be because of extensions and add-ins?
How can I do it to solve my problem?
If you suspect that Visual Studio settings get corrupted after installing "Install Web Component" bundle, why don't you try to reset the settings?
You can perform the steps below to reset Visual Studio settings:
Open Visual Studio Command Prompt (2010) under Start menu > All Programs > Microsoft Visual Studio 2010 > Visual Studio Tools (Run it with Administrator privilege: Right-click the program > Run as administrator)
Run devenv /Resetsettings to restore the IDE's default settings, optionally resets to the specified VSSettings file.
Run devenv /ResetSkipPkgs to clear all SkipLoading tags added to VSPackages.
Run devenv /Safemode to see if you can apply it correctly. This can eliminate the possibility that third party Add-ins or packages are causing problems.
Open your solution in Safemode and see whether it works.
Found this to happen also when the solution is connected to a Team Foundation Server and the service is not available at the moment, so the solution could not connect. In this case do not end the Visual Studio instance and wait until a message box show up giving the option to Go Offline. This is usually associated with the "Visual Studio is waiting for an operation to complete...." notification message.
My solution was simply to reload a saved GOOD (backup) copy of my settings (made a year ago). Worth trying before resetting everything to blank. My VS2010 would take 60 seconds to start debugging and approx. 3 minutes to stop debugging. I saved the corrupted settings and to my surprise they were over 3MB instead of 260Kb. I loaded the good backup copy and everything is great again :-)
If Visual Studio doesn't respond only when attempting to open solutions, then open a raw instance of Visual Studio then Reset Settings
Check How to: Reset Your Settings from the Tools Menu
http://msdn.microsoft.com/en-us/library/ms247075%28v=vs.90%29.aspx
This is Visual Studio 2013 and Windows 8.1
Open developer command prompt.
Start -> All programs -> Visual Studio -> Visual studio tools -> developer command prompt
Make sure that you don't have any pending changes that need to be checked in.
run this command : "tf workspace /delete 'your workspace/ machine name'"
yes for removing the unnecessary pending changes if at all present.

Debugging with Visual Studio 2012, Windows 8 and User Account Control

First of all - this is all about the RTM Versions. And Windows 8 has some changes regarding the UAC, as we all learned from http://www.brianbondy.com/blog/id/140/, it cannot be disabled side-effect-free.
Now the problem starts:
Our main app requires elevated privileges (at least the server part). Debugging will only work when running VS in elevated mode, too. But when I'm starting a Silverlight Project in elevated mode of VS, the IE fired up for debugging is started as with normal privileges and debugging is not possible, too. To make things more complicated, we're not running solutions with all (700+) projects loaded, but do lot of our dev-stuff (compiling, starting, testing) in command line. Which needs to be elevated, too.
What is the correct configuration of UAC for this purpose: I want to be able to debug Silverlight applications running in Internet Explorer, Applications of any kind started by VS "F5", a server process started from commandline and (maybe) C#/XAML Metro-Apps?
In Windows 7 it was just disabling UAC and everything's fine. Now I feel like fighting against my own toolset and have a bad feeling about this.
And please - do not tell me that UAC is important and useful. I'm totally okay with it, but for a developer things are slightly different.
See this answer on Superuser:
The Only way I'm aware of which ensures it will always open as
Administrator (including when you open from file associations, jump
list etc) is:
Locate the devenv.exe file in Explorer eg mine is in C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\
Right-click devenv.exe and choose "Troubleshoot compatibility"
Select "Troubleshoot program"
Select "This program requires additional permissions"
You'll need to let it launch VS before it lets you click Next, but
then you're done.
EXTREMELY annoying that you can't just do this through the normal
properties dialog any more. It's like Microsoft are going out of their
way to ensure Windows 8 alienates as many people as possible...
Have you tried installing VSCommands and using the Always start Visual Studio with elevated permissions option? I'm not sure how this would function differently than restarting with elevated permissions but it can't hurt to try.
I ran into the same issues with the command line, debugging, and other things such as once you're running with elevated permissions you can no longer drag & drop files into Visual Studio, or open files associated with Visual Studio when it's set to always run with elevated permissions. This is why I've always disabled UAC.
In the end I just turned off UAC in the registry. I'm not missing out on anything by doing so. It would be nice to hear how Microsoft uses the Win8 + VS2012 combo internally after seeing how broken it feels.

Visual Studio 2008 Blank Tool Window

I have a blank property window that I can not get rid of in Visual Studio 2008 SP1. I have tried every thing to get rid of it.
If I close it it shows right back up after going into debug mode or restarting visual studio. I have tried every thing to fix all the way to reinstalling VS with no luck.
Does any one have a solution for this?
Use the following fix:
Close all instances of Visual Studio Navigate to the following directory (I am using 2008 – for a different version change the 9.0 to reflect the correct version number/folder)
"%userprofile%\Local Settings\Application Data\Microsoft\VisualStudio\9.0".
You should see four files:
toolbox.tbd
toolbox_reset.tbd
toolboxIndex.tbd
toolboxIndex_reset.tbd
Move these files to another folder (or, if you are very brave, delete them altogether. Note, this is very much a case of “Worked on my (colleague’s) PC” – do this at your own risk. Restart Visual Studio and hey presto, your Toolbox should be back to where it needs to be. The user in question did not have any custom items in his toolbox so I can only assume that the fix reverted the toolbox to the original Visual Studio state.
Click Window, Reset Window Layouts.
If that doesn't help, click Tools, Import and Export Settings, Reset all settings. (But backup your current settings)
One thing to try is via the Visual Studio 2008 command line you can run the following command.
devenv /resetsettings
This will restore to factory settings, this could clear up the issue, re-install wouldn't do this for you.

How do I fix an "Invalid license data. Reinstall is required." error in Visual C# 2010 Express?

I've tried to install Visual C# 2010 Express edition onto my PC, but whenever I try to run it, I get a error message.
Invalid license data. Reinstall is required.
I've already tried reinstalling it, and the message persists.
OS is Vista Home Premium. I already have VC# 2008 Express installed.
I am using Visual Studio 2013 and I have the same issue but it occurs when I try to open a solution that was made using Visual Studio 2010.
The solution for me is to open the solution file (.sln), using notepad and change this line:
[# Visual Studio 2010]
to this:
[# Visual Studio 2013]
I just right-clicked, and opened with Visual Studio XXXX (in my case 2015). Then save it. Done.
I have the same problem with Windows 7 Pro. Have tried everything suggested by the Microsoft people, including uninstalling, cleaning up, reinstalling both from the web installer and the VS2010 Express iso - with the same result every time.
To say it's frustrating is an understatement and the disinterest from Microsoft in fixing what appears to be a common problem (you can find lots of search engine 'hits' for the problem, none for a solution) is quite unbelievable.
Since this is virtually a virgin Win7 install, the only conclusion is that MS have broken their licesing checks again (why check for a license on a free product?).
Edit: Following further investigation I have concluded that the advice given by Microsoft is useless and does not attempt to diagnose the problem. It simply assumes a corrupt installation source. I believe that the problem is in fact corrupt permissions/ownership of registry keys. HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Licenses and subkeys needs to be owned by SYSTEM with admins having full access. On my affected system the owner cannot be displayed and no permissions are shown when viewed by admin.
I don't have the definitive fix for this so far, as I cannot adequately edit the permissions for the affected registry keys.
Re-installing Windows is an almost certain fix, but also an extremely drastic one.
I have had this EXACT problem with VS2010 Professional Trial / Evaluation download. I can provide clear and concise steps to reproduce:
Set your system clock ahead by 1 day (oops!)
Install the trial software.
Set your system clock back to the correct date.
Start VS2010, you will receive the vague message indicating "Invalid license data. Reinstall is required."
In my case, the resolution was quite simple - set the clock back ahead to the wrong date. The next day, I was able to set the clock back to the correct date and continue using the product.
Based on other answers to this question, it would appear there are numerous reasons that you could receive this message. This specific issue is most likely to be encountered by someone with a "virgin" install of Windows since it is not so difficult to set the clock incorrectly when setting up a new computer and then fix it later (and if you fix the clock hours after installing the product, it might be hard to put it all together and realize what happened).
Hope this helps someone else.
I had this issue but I was able to resolve this by right clicking and using Run as Administrator. This boots up the program just fine.
This worked for me on Vista. It's based on work-around at MS: http://connect.microsoft.com/VisualStudio/feedback/details/520110/invalid-license-data-reinstall-is-required
Download subinacl command line tool
http://www.microsoft.com/downloads/en/confirmation.aspx?FamilyID=e8ba3e56-d8fe-4a91-93cf-ed6985e3927b&displaylang=en
Run these commands:
subinacl /subkeyreg HKEY_CLASSES_ROOT\Licenses /setowner=everyone
subinacl /subkeyreg HKEY_CLASSES_ROOT\Licenses /grant=everyone=f
Start VS 2010 Express again and this time it asks for a license key.
(On Windows 7 Home I had to run the above commands twice before they worked correctly)
I got the problem when instelled MS SQL 2012 with IngegrationService, the MS Visual Studio 2010 (Isolated) was installed from sql installer .
This VS returned error: Invalid license data. Reinstall is required.
I've fixed the problem by reinstalling SSDT with MS VS 2012 (Integrated)
http://msdn.microsoft.com/en-us/jj650015
I had this problem when installing a new SQL Server 2012 standalone Server.
Cause: When installing SQL Managemnt Tools it will install the VS Shell. It seems like this is all you need but this ist not enough! (it actually shows it will install VS)
Strangly the path and the application are shown in windows put you can't open them without the error.
Fix: You need to also install "SQL Server Data Tools" via Feature Add with the SQL-Server.iso
Hope this helps someone... i took me quite a while.
I get this error only when trying to open older solution files. For instance, I've got VS2013 installed and this error message pops up when I double click on a VS2010 solution file.
Getting rid of it is so simple:
Launch VS2013
Open the old solution file by clicking
"File->Open->Project/Solution..." from the menu (or simply by
pressing Shift+Ctrl+O)
Save the solution with the new format by clicking "File->Save
Solution As..." and overwrite the old file.
It appears that this has been reported as a bug, but has been closed as "Not Reproducible". One suggestiong from the Microsoft supporter is to redownload and reinstall:
Please try downloading the complete ISO from http://www.microsoft.com/express/Downloads/#2010-All, mount it as virtual drive. Then execute Visual C# setup from the ISO media and select an option to remove the product. Once the Visual C# has been uninstalled, please try installing it again from the ISO media.
It sounds a bit far fetched to me, but you might want to give it a try.
If that does not help you, I would suggest that you either post a new bug report to Microsoft or vote to reopen the existing one (I am not sure if/how this is possible).
I have faced this problem when installing the Visual studio 2010 - C# express using the local administrator account, then trying to register the application using another account that doesn't have Admin privileges, due to corporate polices this account can’t edit in the Registry by any means, so suddenly that’s how I figured out how to solve this issue I open VS 2010 as a local administrator then entered the registration key, and it is worked , I don’t understand how do that Microsoft itself didn’t mention this solution or even try hard to investigate or solve this issue
I just encountered this problem on a virgin install with a system that has a bad clock battery (when I turn off the power, it resets the date/time. Syncing to time.windows.com again allowed me to run VS2010 successfully.
It was not the clock for me, and all the hours spent re-downloading and reinstalling were a waste of time (except for the last one, of course....).
Also, for some odd reason, just adding Read permissions to the HKCR node using psexec -i -s regedit did not work by itself.
To fix my problem on Windows 7, I made sure (using psexec -i -s regedit) that my login account had full control permission over every node in the registry and that the everyone group had read permission over every node in the registry, and did all of the steps in the following link (rebooting after each step):
http://windows.microsoft.com/troubleshootwindows7sp1
This is probably overkill, but after spending 10+ hours trying to get this working, I am just happy it works... Good luck!
I was stuck for several days with the same problem. Investigating the registry i found several keys in HKCR were i was denied access even as adminstrator. Among these keys were the Licences key. Tried a lot of things to resolve this access problem but could not fix it.
Finally i worked around this problem with a reinstall of Windows 7 - choosing the Upgrade option when prompted to choose between upgrade or a fresh install. Had to reinstall video drivers but all my programs and user accounts survived.
http://windows.microsoft.com/en-US/windows7/Installing-and-reinstalling-Windows-7
After the upgrade i have access to the HKCR\Licenses again and Visual Studio 2010 starts as expected.
I had this problem and finally got passed it. I tried the solutions above to no effect. (I set my license keys to open permissions, set my clock forward, etc.) After two days I gave up...
In the end, I installed VS 2012 Express, which could handle VS 2010 solutions but could not compile 2010 code (without a COFF error). After finding this article on requiring VS 2010 to be installed to compile 2010 solution in VS 2012, I reinstalled VS 2010 even though I assumed it wouldn't work on its own. I tried opening 2010 anyway and it worked!
Analysis: as per the previous correct note by reece (and the original workaround author), I used ProcessMonitor to see what devenv.exe tries to do and fails.
Unfortunately, it was attempting to read a number of reg keys which were not under the Licenses node (so it wouldn't have been enough to take ownership of the latter with subinacl). Furthermore, even after taking ownership, the affected keys still yielded "ACCESS DENIED". Doing it as Administrator was equally useless. Plus, Visual Studio didn't fall for any date change nonsense either.
Solution - Don't try this at home :D though: I downloaded pstools and ran psexec -i -s regedit to get System privileges, then I changed permissions on the entire HKCR node to allow Everyone to Read (:P what can I say, viva el comandante).
I want to point out that adding "Everyone" to have read permissions on HKEY_Classes_Root did fix this issue for me.
I am not sure exactly what permission is needed, but this "worked for me" ... YMMV
This may also occur if you are trying to invoke an xml file instead of the exe application.
An another solution I have found to work is the one mentioned Mac by over at SuperUser: https://superuser.com/questions/651261/how-do-i-fix-an-invalid-license-data-reinstall-is-required-error-in-visual-s
When simply reinstalling the Visual Studio 2010 shell doesn't work, he points out that installing it through SSMS 2010 can solve the problem:
I was able to resolve my issue without making any manual changes to
the Windows Registry by installing SQL Server Data Tools 2010, which
is also free and includes the Visual Studio 2010 Shell.
You don't have to go through the entire install process. I cancelled the process when it was done installing the shell and it worked our fine.
If you're here from Google and are experiencing this issue with GFI MailEssentials's config export tool, check to make sure you aren't trying to open WebMon.SettingsImporterTool.exe.xml instead of WebMon.SettingsImporterTool.exe
If you have "hide common file extensions" enabled, you will see the .exe but not the .xml
Just happened to me with a new install of Visual Studio 2010 ultimate in a new computer.
This new computer had the internal time correctly set, but the date was set to one day late. I installed Visual Studio 2010 with the incorrect date. Then, I noticed of the incorrect date and changed it by sync'ing with a NTP server, and from that moment Visual Studio 2010 would not work... so I'll have to stop using Visual Studio 2010 until DateTime.Now > installationDate.
I met the same problem yesterday.And I fixed already.
Please follow the steps:
Run setup.exe again; Change or Remove Microsoft Visual Studio 2010;
Upgrade license Key (Enter new license key); Complete.
GOOD LUCK !
To everyone who has internet connection. Don't mingle with your
registry it's just a waste of time. Set your CMOS clock right then
just click on the button that say's "Obtain registry key online" fill
up the form(two fields are only required) then the registry key would
show up to your screen then just copy and paste it. then everything
works fine. sorry I can't post any images I still need to earn more points...
Background: Visual Studio 2012 Pro installed by Administrator account.
As "Joe User" (member of Win 7 Users group, but NOT Adminstrators) I got the error message.
On reading this forum I concluded this is a generic error message.
Steps to fix:
As an adminstrator, open HK_CLASSES_ROOT.
Open context menu on the Licenses subkey
Select Permissions...
Set Full Control for all users.
Now log on as "Joe" again.
Voila!
Next, as Administrator change the permission on HKCR/Licenses back to read only for Users.
Two hints for developers.
If you can develop and run an application as an ordinary user, then presumably your poor
clients don't need admin rights to run it either.
Don't leak security information in "helpful" error messages. Microsloth are probably following their own advise and giving a vague and unhelpful error message here.
I have no idea why changing the permission to FC then back again to the original setting worked. I can only assume the Visual Studio writes something to that key the first time it runs.
While none of the above solution worked for me (else than running the application with an other username),Renaming the application folder in %appdata% fixed the porblem for me.
"C:\Users...\AppData\Roaming\Microsoft\MS Project"
I had this issue while installing dynamic ax setup in VM, while installing it was showing me to 'licence is not valid, Reinstall visual studio shell 2010 version', so i uninstalled the visual studio shell 2010 version and its following component and tried to install again the AX admin it worked.
I'm having this problem with Visual Studio 2015 installed.
ramonsantana over at forum.unity3d.com had the solution for me: https://forum.unity3d.com/threads/if-anyone-is-having-visual-studio-shell-2010-invalid-license-data-reinstall-is-required.298824/
Copied here for reference
Use regedit go to HKEY_CLASSES_ROOT and look for Visual Studio.DTE
Since i have Visual Studio 2015 CTP installed i have 3 DTE, one is
VisualStudio.DTE, the other Visual StudioDTE.10.0 and
VisualStudio.DTE.14.0 Go to VisualStudio.DTE.14.0 ( or whatever
version of Visual studio you have installed) and click CLSID.
Copy the
Default (Double click Default and Copy the key inside), now go back to
Visua Studio.DTE and double click the Default there and paste the key
you just copied.
Almost there
On VisualStudio.DTE go to CurVer and
double click the key there to Edit it. Change the 10.0 in the end to
12.0 or 13.0 or 14.0, depending on what version of Visual Studio you have and you are done.
Installing SQL server data tools for visual studio 2010 did it for me! SSDT has an VS2010 IDE along with it, which overwrites the required registry entries.
You can find SSDT here.
My problem:
VS works fine, but when I create new Solution Setup and Deployment it make Setup file but when I run this Setup file, it say: "Invalid license data. Reinstall is required."
subinacl do not work.
My PC:
OS: Windows 7 64bit.
Visual Studio 2012
My way:
Close Visual Studio
Run regedit.
Pull down HKEY_CLASSES_ROOT
Looking for Licenses
Right click on Licenses -> click Permissions... -> click Advanced -> click User you want edit -> click Edit -> choose This key and subkey -> check all Allow: Full Control, Query Value, SetValue, Create Subkey, Enumerate Subkeys, Notyfy, Create Link, Delete, Write DAC, Write Owner, Read Control... -> check Apply these permissions to objects... -> click OK -> click OK -> click OK -> Close Registry Edit
Start VS
Hope this help
This was my problem with my Visual Basic Net 2005.
This is how I got it solved:
Click start :-> type run (Or press win+r)
Type regedit
Click HKEY_CLASSES_ROOT
Click Licenses
Double click (Default)
Clear all text written in Value data field
Press Ok
Run again Microsoft visual studio
Believe it or not, I have found cases where this problem occurred due to a build error when the build error was due to an error in xcopy in the pre-build events.
We had this problem at a colleges computer, and after trying everything here we set to forget it and fix the error from xcopy. When this was fixed the Visual Studio 2010 shell error stopped popping up, for some reason.

Resources