Visual Studio changes USERNAME env var - visual-studio-2005

I'm trying to use the environment variable USERNAME in a Visual Studio 2005 project, but it doesn't seem to work.
In a lone command prompt, USERNAME equates to my user name - i.e. "spfolly"
In a Visual Studio 2005 Command Prompt (from the Tools menu), and during a (C++) build, USERNAME equates to " (1 user licence)"
How rude of VS to overwrite my USERNAME environment variable! So, given this situation, what's the best way to find the current username during a build?
Thanks.
Steve

Doh! Well, I could have deleted the question but I thought I'd leave it here to help others if needed...
It appears that the Visual Lint plug-in (version 1.5.5.69) is the culprit. I uninstalled Visual Link and now USERNAME works as expected.
I realise it's quite an old version; I don't know if the latest version of Visual Lint fixes this problem.

Related

How to rename Visual Studio

I just downloaded Visual Studio and the name is showing like this "Visual Studio Community 2017 (2)". Everything is working but that "2" at the end is just annoying. And of course first thing I've tried was reinstalling. Anyone can help me with this? Thanks in advance.
Screenshot of how it looks
And by the way my computer is completely new and I've never had Visual Studio installed on this computer.
The issue is that the instance of visual studio has a nickname associated with it. Use the following instructions to change the nickname of an existing Visual Studio (tested with VS2017) installation (partially lifted from https://developercommunity.visualstudio.com/content/problem/99059/not-able-to-easiliy-change-installation-nickname.html):
Set the nickname in the *.isolation.ini files in
%ProgramFiles(x86)%\Microsoft Visual
Studio\2017\[Version]\Common7\IDE.
Set the nickname in the state.json file in
%ProgramData%\Microsoft\VisualStudio\Packages\_Instances\[InstanceId]\state.json
Open regedit, go to under path
HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall, find there "Visual Studio {your version} 2017 (2)". Rename string to be without " (2)" - this will change application name appearance in control panel / program and features.
You'll need admin permission to modify these files. If you want to remove the nickname altogether, just set it to an empty string (e.g. Nickname= in the .ini files, "nickname": "" in the .json).
Note that this will only have affect within VS tools, such as the VS installer in the screenshot you posted. Any names with the suffix in, for example, the Start/Windows menu will need to be renamed manually.
If you don't want to mess up with any files on you file system, one alternative is to reinstall the product.
After you uninstall the annoying product with the nickname "(2)", you can select the Installation locations tab and specify another nickname or perhaps leave it blank. Mine does not allow to leave it blank.
Here is a screen:
If the installer says that a nickname is mandatory, even after uninstalling Visual Studio (like in the screenshot by Bernardo above), you can try the InstallCleanup.exe tool by Microsoft. You can find it in your Visual Studio Installer folder.
After running this tool with the -i flag, I was able to re-install Visual Studio 2019 without a nickname.
Link to InstallCleanup.exe docs
A nickname is mandatory for the Visual Studio installation when you are installing the same version of Visual Studio(eg.: VS 2019 or 2022) but with different editions(eg.: VS Community or Professional or Enterprise).
If we uninstall the same version of VS with different edition, then the VS Installer is not asking for the nickname and not taking the nickname as 2, the "Installation nickname" textbox is not visible under Installation locations tab in VS Installer.

Visual Studio 2015 - how to run: vs2015.1 rc.exe /override feed url <Path to feed.xml>

It happened that I cancelled an update when updating Visual Studio 2015 Community,
it cannot load the original solution I have had,
It gave such error:
Invalid entries passed to /FilterFeatureSelectionTree
then I searched on MSDN said to run:
VS2015.1 RC.exe /overridefeeduri
But it is said "Syntax incorrect in command"
Does anyone know how to run the above command successfully?
VS2015.1 RC.exe refers to the Visual Studio 2015 installer executable. So for example, if you saved the installer as C:\vs_community_ENU.exe and you want to use the English feed.xml, the command line would be:
C:\vs_community_ENU.exe /overridefeeduri "http://go.microsoft.com/fwlink/?LinkID=564093&clcid=0x409"
Note that the URL needs to be in quotes if executing from the command-line, otherwise the command-line interpreter might misinterpret the & in the URL and think that you're trying to issue multiple commands.
The best way to solve this is to download VS 2015 setup here: https://www.visualstudio.com/products/visual-studio-community-vs
then run the installer, choose "Modify" and select features you want install.
it did work for me as I wasn't able to install Python Tools from Visual Studio, but running the installer di solve the issue.
According log from failling installer, xml feed was alright, so previous answer cannot help.
Edit: I think the bug appears once you run the Web Platform installer, and if you cannot install it with VS installer, you should use Web Platform Installer instead
It looks like you need to know the path URI for the feed. MSDN says the syntax is
VS2015.1 RC.exe /overridefeeduri <Path to feed.xml>
You left off the last argument. The english feed URI is http://go.microsoft.com/fwlink/?LinkID=564093&clcid=0x409. The page you linked contains the URIs for other languages if needed.
I wasn't also able to install Python Tools from Visual Studio. Then I resolved this issue by trying multiple trial and error steps.
Trial 1:
I researched to find out the installer that installed the MSVS2015 in my Machine.As it was my office PC the installation was pushed out by the IT. The installer I found was at this directory
C:\ProgramData\Microsoft\VisualStudioSecondaryInstaller\14.0\installers\VS_SDKV1\en\0\vs****.exe
then I applied the following command
C:\ProgramData\Microsoft\VisualStudioSecondaryInstaller\14.0\installers\VS_SDKV1\en\0\vs****.exe /overridefeeduri feed.xml
After doing this My VS became unresponsive. I could not start it from the start menu.I thought I have by any chance damaged my Installation.Now I moved forward to step 2.
Trial 2:
go to Control Panel>Programs and features>select [Microsoft Visual studio 2015]>rightclick>[change]
On the screeen that appears on the window hit "Repair"
After the repair is complete. I repeated step a and this time I hit "modify" button. selected the "Python tools for Visual studio" and moved forward with "install/next" etc.
It worked out.I think only step 2 is good enough to set things right.I am not sure if Trial 1 did any good or not.
Thanks.

'exception has been thrown by a target of invocation' when starting up Visual Studio 2010

When I start up Visual Studio 2010 I often get the error 'exception has been thrown by a target of invocation' which prevents me from opening Visual Studio. A reboot of my computer makes the error go away, but a few days later it returns.
What causes this error and how can I get rid of it?
I've found a lot of questions on SO that mention this error when running their code in Visual Studio, but none when opening Visual Studio.
It seems the problem was that my system path became too long for Windows to handle: it was over the 2048 characters limit (hat tip to this article).
I had this issue with Visual Studio 2012 today. Something seemed to be gone wrong during the first setup, so it helped to delete these registry entries:
HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\11.0
HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\11.0_Config
Visual Studio will then setup again when you start it. You can also just rename it.
I had the same problem with Visual Studio 2012 and SQL Server Management Studio, solution was to reduce the SYSTEM PATH variable length.
Symptoms: After one instance of Visual Studio 2012 was started, any other attempt to start another or one of SQL Server Management Studio would fail. The computer reboot would allow me to start again a single instance of VS2012.
Repairing the VS2012 installation didn't help.
None of these solutions solved the problem with my Visual Studio 2012, but I finally managed to fix it by installing the latest Update 4 from the Visual Studio website
My path also seemed to affect accessing Advanced System Settings from Control Panel\system\Advanced system Settings so I was unable to edit the path.
Had to launch this from windows\system32 to display the Advanced System Settings dialog, then edit te environment variables from there.
A recent install of the MEAN stack had added a path statement for my user account. I removed this setting entirely and then VS2010 and the Advanced System Settings dialog started without problem.
BioGeek's answer fixed my issue. In my case, the overflow of system path not only break visual studio, it also break the GUI to change system path itself.
I got error on: Control Panel > System > Advanced system settings.
The workaround is run c:\windows\system32\SystemPropertiesAdvanced.exe.
I had a similar problem while trying to run the "Task Runner Explorer" in VS2015, I got an error:
"Exception has been thrown by the target of an invocation".
I solved it by reinstalling only the "Microsoft ASP.NET and Web Tools" patch (DotNetCore.1.0.0-VS2015Tools.Preview2.exe) from this link.
I received this error when I installed SQL Server Express 2014 on a machine that already had 2012. I installed it with tools, which apparently broke SSMS 2012. Specifically when trying to "Edit top 200 rows" the error was thrown.
Using SSMS 2014 seems to work fine.
To add to BioGeek's answer. You don't necessarily have to get rid of entries in your path, you can work around the character limitation by introducing more variables.
e.g.
PATH = {1800 CHARACTER LONG STRING}{500 MORE CHARACTERS}
You would add a EXTENDEDPATH variable, like so:
EXTENDEDPATH = {500 MORE CHARACTERS}
And finally you reference this variable in your PATH
PATH = {2000 CHARACTER LONG STRING};%EXTENDEDPATH%;
I'd recommend leaving at least 100-200 characters of breathing room in your path so you don't have to be babysitting the PATH environment variable every time you install something.
System Path variable is too long. Copy current content to notepad and remove repeated entries and unwanted enteries and copy back to path variable.
In my case this error was due to an invalid key in the web.config file. Try to revert last changes made to the file.
i had same problem but i figured out "connectionStrings" must be under "configSections" in the web.config
This problem occurs due to long path in your environment variable windows supports only 2048 characters.
In order to solve this problem you need to remove few environment varibale from your system from PATH.
I had the same problem with Atmel Studio 7. Resolved by deleting the *.componentinfo.xml file in the same folder as the project file.

MSBuild does not contain a value for the "VCTargetsPath" property

I recently installed the Visual Studio 11 Developer Preview to try it out, and now my VS 2010 projects won't open. Instead, I get the following error message:
MSBuild does not contain a value for the "VCTargetsPath" property
I found someone that had reported the issue here on Connect, and the response from Microsoft was:
Posted by Microsoft on 12/2/2011 at 5:25 PM
Hi Afshin,
Thanks for the feedback. The issue you ran into is fixed for the next public release Visual Studio.
Jim Griesmer
Visual C++ Team
Fantastic. So how do I restore VCTargetsPath so my projects will work again?
"VCTargetsPath is a toolset property that is defined in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild\ToolsVersions\4.0. "
I browsed to the VCTargetPath value in the registry and it has the value:
$(MSBuildExtensionsPath32)\Microsoft.Cpp\v4.0\
Not sure where to go from here. Any suggestions?
It seems reasonable that the solution Gavin Pugh gave would fix the problem, though I didn't try it. I too ran into this problem after uninstalling the Developer Preview of VS11. I think I know what is really wrong though.
Mladen Jankovic was on the right track. One of the follow two (necessary) registry keys was missing on my machine:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild\ToolsVersions\4.0
Key Name: VCTargetsPath
Type: REG_SZ
Value: $(MSBuildExtensionsPath32)\Microsoft.Cpp\v4.0\
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\MSBuild\ToolsVersions\4.0
Key Name: VCTargetsPath
Type: REG_SZ
Value: $(MSBuildExtensionsPath32)\Microsoft.Cpp\v4.0\
(You can edit registry keys in Windows by typing +R+regedit+Enter)
For me, the second value I listed above was the one that was missing. After I added it, I was able to work with my project again.
Here's the thing that did trick for me:
Change registry value named DefaultToolsVersion located in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild\4.0 from 2.0 to 4.0. Do the same thing in Wow6432Node too.
The registry editing method suggested by "Mladen Jankovic" didn't work for me.
I just ran a repair on Visual Studio 2010 (run the setup.exe on the VS2010 install disc, or invoke the 'uninstall' via Control Panel->Programs). It did the trick for me.
You also should run the SP1 install again.
For what it's worth, my 'add-ins' (including Incredibuild) behaved fine after this. They didn't need to be reinstalled or repaired. My settings/window/debugger placement also was retained.
Apparently this issue only presents itself if you uninstall the Developer Preview of VS11:
http://www.gamefromscratch.com/post/2011/12/15/Do-not-remove-Visual-Studio-2011-developer-preview!.aspx
For those who are here by google search :
If you had previously installed VS 2015 or any later versions of vs after vs2010, and then uninstalled, Here is the solution for you.
In the error message below :
Cannot evaluate the property expression
"$([MSBuild]::ValueOrDefault('$(VCTargetsPath)','$(MSBuildExtensionsPath32)\Microsoft.Cpp\v4.0\V140\'))"
14.0 is the version number of VS2015. Unfortunately, the VS2015/2012 uninstaller forgets one of its registry keys, which then causes that error when you go back to VS2010.
Go to start/run/ regedit >
Look for
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild\ToolsVersions\14.0 (12.0 as well)
And
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\MSBuild\ToolsVersions\14.0 (12.0 as well )
If there is a key 14.0/12.0 here, delete it and your VS2010 will hopefully work again.
Ugh I finally found the answer for this, which incidentally didn't give me the same error message - I get:
error MSB4019: The imported project "C:\Microsoft.Cpp.Default.props" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk.
For some reason it worked fine with 32-bit builds, but not 64-bit builds.
Anyway, the solution is to copy all the VCTargetPath* keys from HKLM\SOFTWARE\Wow6432Node\Microsoft\MSBuild ToolsVersions\14.0 to HKLM\SOFTWARE\Microsoft\MSBuild\ToolsVersions\14.0. They were missing for me.
Actually I only copied VCTargetsPath and VCTargestPath14 because copying is quite tedious. Seems to be sufficient for VC++ 2015.
If working with VS 2010 SP1, go to Control Panel | Uninstall a program, Uninstall/Change the VS 2010 SP1 and pick reapply SP1. It worked for me.
I've been having this same issue, and found out that the toolset tag was not set in the project node
Setting the tools version solved it for me
I used C:\Windows\SysWOW64\regedit.exe and went to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild\3.5 and in the folder for version 3.5 it had 2.0 listed in the defaulttoolsversion so I modified that to 3.5 and everything works now.
I arrived here when trying to build a c++ project without the c++ Visual Studio build tools installed. My solution was to download the Visual Studio Build Tools installer from the downloads page under 'Tools for Visual Studio 2017' tab, running the installer with the"Visual C++ build tools" and ".NET Desktop Build Tools" options.
I also suffered from the missing registry values under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild\ToolsVersions\14.0.
Adding the missing entries with the following commands fixed it.
REG ADD HKLM\SOFTWARE\Microsoft\MSBuild\ToolsVersions\14.0 /v VCTargetsPath /t REG_SZ /d '$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\MSBuild\ToolsVersions\14.0#VCTargetsPath)'
REG ADD HKLM\SOFTWARE\Microsoft\MSBuild\ToolsVersions\14.0 /v VCTargetsPath14 /t REG_SZ /d '$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\MSBuild\ToolsVersions\14.0#VCTargetsPath14)'

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