341

I installed the supposedly free VS Community 2017 on my PC and 30 days later I get this message from VS saying that my license has expired.

License? Expired? I thought the community edition was "free forever" therefore sporting the "community" tag. What's going on? I tried signing in with my outlook.com account but it says "something went wrong" and comes back to the same screen.

How do I get a fully free version of VS 2017 so I can work on my FOSS projects?

trial

Alexander Abakumov
  • 13,617
  • 16
  • 88
  • 129
Robin Rodricks
  • 110,798
  • 141
  • 398
  • 607
  • 1
    Possible duplicate of [Visual Studio Community 2015 expiration date](https://stackoverflow.com/questions/32235116/visual-studio-community-2015-expiration-date) – Franklin Yu Aug 18 '17 at 18:27
  • 4
    If you are already signed in and see this message you need to sign out then back in again. – soutarm Oct 12 '17 at 23:01
  • 3
    It also periodically says the license has gone stale and prompts you to refresh the license by clicking a button and signing in again. Happened to me just now in the middle of a rather lengthy debugging session, and ruined the session. – Eric J. Jun 21 '18 at 20:04
  • 1
    Check [\[SO\]: VisualStudio Community 2013 prompts to update trial license (@CristiFati's answer)](https://stackoverflow.com/questions/27939437/visualstudio-community-2013-prompts-to-update-trial-license/45055395#45055395). – CristiFati May 20 '19 at 15:36
  • Here is the Visual Studio Licensing guide. Refer to Page 8, which states "Any individual developer can use Visual Studio Community to create their own free or paid apps. In addition, any number of users may use the software to develop and test device drivers for the Windows operating system." There are additional permissions alloing for use in small organizations, which are defined as < 250PCs and < 1M US revenue https://visualstudio.microsoft.com/wp-content/uploads/2020/09/Visual-Studio-Licensing-Whitepaper-Aug-2020.pdf – SteveS Apr 22 '21 at 17:43

15 Answers15

299

Sign in and the 30 day trial will go away!

"And if you're already signed in, sign out then sign in again." –b1nary.atr0phy

Nick Rolando
  • 25,879
  • 13
  • 79
  • 119
Peter
  • 37,042
  • 39
  • 142
  • 198
  • 4
    More info here: https://learn.microsoft.com/en-us/visualstudio/ide/signing-in-to-visual-studio `Why should I sign in to Visual Studio?` -> `Unlocks the Visual Studio Community Edition instead of being limited to the trial period of 30 days.`. You can use any MS Account (e.g. Live/Hotmail/Outlook.com) – Peter B Sep 09 '17 at 17:53
  • 31
    (And if you're already signed in, sign out then sign in again.) – arkon Oct 19 '17 at 10:30
  • 93
    Why should I need to sign in to use a free product? – Fueled By Coffee Jun 06 '18 at 15:44
  • (And of course I'm already logged into my Windows login if using Windows 10... so can't that be communicated?) – JeopardyTempest Jul 13 '18 at 23:34
  • 7
    I thought logging out of my linux box onto microsoft would be less painful than getting used to c# on visual studio code. I should just uninstall this piece of crap. – aaaaaa Sep 14 '18 at 02:33
  • 29
    @FueledByCoffee: cause "data mining." – c00000fd Sep 26 '18 at 20:01
  • I am signed in. It itn's going away. – Ortund Feb 22 '19 at 07:32
  • 3
    If you create a new account you also have to provide phone number even more silly. – Legends Feb 24 '19 at 16:28
  • 29
    This is so insulting.... a Community Edition you have to REGISTER AND SIGN IN. I hate M$ even more than I already did. PH! Back to Netbeans thank you very much!! – chrips Apr 02 '19 at 07:54
  • 5
    Who in the world thought this was a sane idea. Same with their garbage "authenticator app" that requires you to log in, scans your entire address book for no reason and then when you actually try to use your timestamp-generated one-time use code, it instead sends you notifications you need to tap over the live connection that apparently has been kept open on a background service you never asked for. All for your ease of use and security of course! – G_V Jun 13 '19 at 12:43
  • 5
    @G_V while i agree that a `authenticator app` that scans you address book is insane. Comparing that to `Visual Studio Community Edition` seems unfair, they give you a application that cost money for free (with a few restrictions), if creating an account and logging in is to much to ask then don't use it? – Peter Jul 03 '19 at 08:10
  • I have signed out and signed back in to two different accounts, it is still not letting me close the box. Restarting did fix this, however. – Nulano Nov 02 '19 at 22:04
  • 1
    @FueledByCoffee, because if you sign in, they can upload all telemetry that they have collected from computer + GodKnowsWhat under your name to microsoft. By the way you are working on community edition, so your code is open source, isn't it? so you don't mind sharing it with Microsoft staff community, right? – AaA Nov 24 '19 at 02:32
83

To bypass "30days left must go online to sign-in", sign-in once to Microsoft account, you'll get %LocalAppData%\Microsoft\VSCommon\OnlineLicensing folder that you can copy to offline PCs.

  • 22
    Brilliant, for those of us cursed with enterprise policies and no or limited internet access this is the ONLY way to get this supposedly free version to work! – Martin Laukkanen Feb 22 '18 at 09:17
  • This is still somehow tied to the account you use to generate it. For example, I copied from an install where I had signed in with my MSDN account, and I see a notification "you have a license for enterprise version", however, I see no other information about my account... I'm wondering if it's safe to share with colleagues (on VM image for example)? – FizxMike Jul 19 '18 at 13:06
  • 1
    I ended up using an account not tied to anything important... seems safe enough since it looks like the license is treated separately from logged in account(s). – FizxMike Jul 19 '18 at 18:35
  • 1
    Argh, that doesn't work for me anymore with Visual Studio 2019 :-( – Ruslan Garipov Apr 05 '19 at 08:48
  • 1
    I'm working on an offline pc. Didn't work for me for Visual Studio 2019 Community – Can Nov 29 '20 at 16:27
  • I an getting popup of login and it's resolve by removing data from mentioned folder files – Hardik Masalawala Feb 18 '21 at 17:28
48

IMPORTANT DISCLAIMER: Information provided below is for educational purposes only! Extending a trial period of Visual Studio Community 2017 might be ILLEGAL!

So let's get started.

Registry key of interest: HKEY_CLASSES_ROOT\Licenses\5C505A59-E312-4B89-9508-E162F8150517\08878. I assume the 08878 subkey may differ from installation to installation (why not, isn't?). I have tested only on my own one. So check other subkeys if you can not match proper values described below. Binary value stored in that key is encrypted with CryptProtectData. So decrypt it first with CryptUnprotectData. Bytes of interest (little-endian):

  • [-16] and [-15] is a year of expiration;
  • [-14] and [-13] is a month of expiration;
  • [-12] and [-11] is a day of expiration.

Increasing these values (preferable the year :) ) WILL extend your trial period and get rid of a blocking screen! I know nothing of such a tool that allows to edit encrypted registry values, so my small program in C++ and Windows API looks like:

RegGetValue
CryptUnprotectData
Data.pbData[Data.cbData-16]++;
CryptProtectData
RegSetValue

Actual language doesn't matter if you have access to registry and crypto functions in your language. I'm just fluent in C++. Sorry, I do not publish a ready-to-use code for ethical reason.

Dmitrii
  • 509
  • 4
  • 2
  • 28
    I don't see anything unethical with using basic technology knowledge about the operating system people are using for over 30 years to circumvent a functionality of a product that is advertised as free. My data is a currency and having to pay with it for basically a gloified IDE and a C/C++ compiler that should be outright basic funcionality of the system makes this product not as free as it advertises it to be. And if simply changing a value in a random file on my computer stops that program to ask for my data, I am happy to do so. – salbeira Jan 13 '19 at 03:23
  • 2
    Dimitrii or @beatcracker Can you post your source code, please? I tried this approach in Python and did manage to decrypt the reg key, but that's as far as I get. My Python source is here: https://paste2.org/6G5V34hI – WackGet Jan 30 '19 at 02:40
  • 21
    @WackGet Sure, did it already: https://github.com/beatcracker/VSCELicense . Have fun! – beatcracker Jan 30 '19 at 05:27
  • 5
    Do you know what is the key for VS2019 ? – NN_ Feb 12 '19 at 11:47
  • 3
    Thanks, @beatcracker and Dmitrii. For beatcracker's PowerShell module to import, I first had to execute `Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope CurrentUser` as admin in PowerShell. – TimH - Codidact Sep 27 '19 at 21:25
  • Thanks Dimitrii, @beatcracker and TimH - Codidact. I could not directly use Dmitrii's PowerShell script because of some policies I guess, but copy-pasting functions one by one to thePS console and then calling get and set worked! I also had to add types as noted at https://stackoverflow.com/a/49019486 – burkay Apr 02 '20 at 17:45
22

In my case, I already was signed in. So I had to sign out and sign in again.

In spanish Cerrar Sesion is sign out.

screenshot

Melebius
  • 6,183
  • 4
  • 39
  • 52
Juan Carlos Oropeza
  • 47,252
  • 12
  • 78
  • 118
  • 9
    You can also click `Check for an updated license` without having sign out and back in again. – Timothy Gonzalez Sep 04 '17 at 18:44
  • 2
    @TimothyGonzalez I tried that it didn't work. It said `We could not download the license. Please check your network connection or proxy settings.` - my network connection is fine, btw... – erikvimz Oct 12 '17 at 17:50
9

Another answer, when you have a machine where you do not have an internet connection and cannot log in, is here - https://dimitri.janczak.net/2019/07/13/trial-period-reset-of-visual-studio-community-edition/.

The files are on github - https://github.com/1Dimitri/VSCELicense/releases/tag/1.0.

From the readme file:

Original Module Usage

  1. Download/clone this repository

  2. Run PowerShell.exe as an Administrator

  3. Import module:

    Import-Module -Name X:\PATH\TO\VSCELicense
    
    

Usage :

Get Visual Studio Community Edition license expiration date
Get-VSCELicenseExpirationDate -Version VS2019
Set license expiration date to current date + 10 days
Set-VSCELicenseExpirationDate -Version VS2019 -AddDays 10
R13mus
  • 752
  • 11
  • 20
7

VS 17 Community Edition is free. You just need to sign-in with your Microsoft account and everything will be fine again.

shawkyz1
  • 886
  • 5
  • 19
  • 15
    Well, if you have to sign in, then it is not "free" - you're paying for it with your personal information, which Microsoft will likely sell elsewhere – sdaau May 07 '20 at 18:54
  • 5
    > You just need to sign-in with your Microsoft account -- "just"? I don't want anything to do with MS because of exactly this behaviour. – user3779002 Sep 06 '20 at 10:59
4

IMPORTANT DISCLAIMER: Information provided below is for educational purposes only! Extending a trial period of Visual Studio Community 2017 might be ILLEGAL!

You have the same effect when You remove all files from HKEY_CLASSES_ROOT\Licenses\5C505A59-E312-4B89-9508-E162F8150517. Run "Visual Studio Installer" and chose option "repair". Now You have new 30 days of trial. But You lost all configuration in Your VS.

Adam G.
  • 81
  • 1
  • 10
3

For VS2019 I was able to signup with my github account:

enter image description here enter image description here enter image description here enter image description here

Then it will send password to your email and you will be able to sign.

Stepan Yakovenko
  • 8,670
  • 28
  • 113
  • 206
2

visual studio

A. Sign in if you are not signed in already.

account settings

B. If signed in already, click the link Check for an updated license on the account settings page.

account settings

C. "We could not download a license. Please ensure your accounts are authenticated." If this message is encountered, sign out and sign back in. You can either sign out by clicking on the Sign out link and then signing back in by clicking on the account icon in the upper right corner of Visual Studio. Or you can just click the link Reenter your credentials. This link is a good indication that your account is not synced up with Microsoft servers and the error message is right in that your account is not authenticated and the license cannot be refreshed.

sign in sign in

account settings

Once you have signed back in and your account is successfully authenticated, you will see that the "Reenter your credentials" link is gone. This is a good indicator that you can now go ahead and refresh the license. If it does not do that automatically you can click the Check for an updated license link once again. This time you will see a short confirmation message and your associated email address will be listed.

account settings

visual studio

Signing in is inevitable if you want to get rid of this annoying warning. But even if you have always been signed from day one, you may still run into this warning. Based on my experience, this may happen if you have recently changed the password for your account, or you have added 2FA (two step verification) to your account, or you have reset the recovery code for the account and with it the app passwords. It may also have to do with inactivity or the recent changes Microsoft has been making to the "sign in experience" for Microsoft accounts.

Whatever the reason may be, signing in, or signing out and then signing back in again appears to be the best treatment for this annoyance.

Samir
  • 1,213
  • 1
  • 15
  • 27
  • This doesn't work for me. I've tried to reinstall, relog and click the link. The link says the same every time – VB_Dojnaz Sep 27 '19 at 10:48
1

I had this problem. Signing in or pressing the "Check for an updated license" link did not work for me. My solution was to restart Visual Studio, try again (sign in and check for license). Restart Visual Studio, try again. I had to do this several times and then it worked! (I also tried pressing the "File" menu that is available for a short period of time before the annoying request window appears again.) Maybe you just don't get connected to the server or the server itself doesn't update its database fast enough.

tomihasa
  • 138
  • 1
  • 13
0

In my case it was most trivial solution - I just needed to run Vistual Studio as Administrator.

It's trivial thing, but i didn't see this mentioned anywhere.

PayteR
  • 1,727
  • 1
  • 19
  • 35
0

I'm using Visual Studio Professional licensed over the MAPS Action Pack subscription. Since the new version of the Microsoft Partner Center one have to add the subscribed user to the partner benefit software.

Partner Center->Benefits->Visual Studio Subscriptions->Add user

After that one have to sign out and reenter the credentials in the account settings of VS.

Stefan Michev
  • 4,795
  • 3
  • 35
  • 30
0

Remember, if you are inside of private red with some proxy, you must be logout and relogin with an external WIFI for example.

0

For my case the problem was in fact that i broke machine.config and looks like VS couldn't have a connection I've added the following lines to my machine.config

<!--
<system.net>
 <defaultProxy>
  <proxy autoDetect="false" bypassonlocal="false" proxyaddress="http://127.0.0.1:8888" usesystemdefault="false" />
 </defaultProxy>
</system.net>
<!--
-->

After replacing the previous section to:

<!--
<system.net>
 <defaultProxy>
  <proxy autoDetect="false" bypassonlocal="false" proxyaddress="http://127.0.0.1:8888" usesystemdefault="false" />
 </defaultProxy>
</system.net>
-->

VS started to work.

Maxim Kitsenko
  • 2,042
  • 1
  • 20
  • 43
0

No, Community edition is free, so just sign-in and rid the warning. For more detail please check following link.
https://visualstudio.microsoft.com/vs/support/community-edition-expired-buy-license/

Wai Ha Lee
  • 8,598
  • 83
  • 57
  • 92
  • 10
    Well, if you have to sign in, then it is not "free" - you're paying for it with your personal information, which Microsoft will likely sell elsewhere – sdaau May 07 '20 at 18:55