343

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

5
  • 1
    Possible duplicate of Visual Studio Community 2015 expiration date Aug 18, 2017 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, 2017 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, 2018 at 20:04
  • 1
  • 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 visualstudio.microsoft.com/wp-content/uploads/2020/09/…
    – SteveS
    Apr 22, 2021 at 17:43

15 Answers 15

301

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

13
  • 31
    (And if you're already signed in, sign out then sign in again.)
    – arkon
    Oct 19, 2017 at 10:30
  • 94
    Why should I need to sign in to use a free product? Jun 6, 2018 at 15:44
  • 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, 2018 at 2:33
  • 29
    @FueledByCoffee: cause "data mining."
    – c00000fd
    Sep 26, 2018 at 20:01
  • 30
    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 2, 2019 at 7:54
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.

6
  • 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! Feb 22, 2018 at 9: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, 2018 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, 2018 at 18:35
  • 1
    Argh, that doesn't work for me anymore with Visual Studio 2019 :-( Apr 5, 2019 at 8:48
  • 1
    I'm working on an offline pc. Didn't work for me for Visual Studio 2019 Community
    – Can
    Nov 29, 2020 at 16:27
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.

6
  • 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, 2019 at 3: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: paste2.org/6G5V34hI
    – WackGet
    Jan 30, 2019 at 2:40
  • 21
    @WackGet Sure, did it already: github.com/beatcracker/VSCELicense . Have fun! Jan 30, 2019 at 5:27
  • 5
    Do you know what is the key for VS2019 ?
    – NN_
    Feb 12, 2019 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. Sep 27, 2019 at 21:25
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

2
  • 9
    You can also click Check for an updated license without having sign out and back in again. Sep 4, 2017 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, 2017 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
7

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

2
  • 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 7, 2020 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. Sep 6, 2020 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.

0
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.

0
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.

1
  • 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, 2019 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.

0
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.

1
  • sure, you could ave another issue
    – PayteR
    Sep 28, 2019 at 16:10
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.

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.

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/

1
  • 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 7, 2020 at 18:55

Not the answer you're looking for? Browse other questions tagged or ask your own question.