beatcracker / VSCELicense

PowerShell module to get and set Visual Studio Community Edition license expiration date in registry
Microsoft Public License
306 stars 94 forks source link

VS2019 Updating License Issue #11

Open georgekustanza opened 3 years ago

georgekustanza commented 3 years ago

I'm trying to update the license of my VS2019 in a standalone PC. It "successfully" updates the license when I run Set-VSCELicenseExpirationDate and shows the "updated" license correctly when I run Get-VSCELicenseExpirationDate, but whenever I start Visual Studio, the "license gone sale" popup message immediately pops.

Any help would be appreciated

Biswa96 commented 3 years ago

No issue in my case. What is the version of Visual Studio? When did you install it?

georgekustanza commented 3 years ago

No issue in my case. What is the version of Visual Studio? When did you install it?

Thanks for answering, Version 16.1.6 with .NET Framework Version 4.8.03761 Visual Studio Community 2019

Biswa96 commented 3 years ago

This project works fine in my clean VS setup. I am using Microsoft Visual Studio Community 2019 Version 16.8.3 with .NET Framework Version 4.8.04161.

beatcracker commented 3 years ago

I'm not sure why this could happen, but as a last resort I'd suggest removing VS 2019 licensing registry key and repairing installation.

  1. Remove this registry key
    HKEY_CLASSES_ROOT\Licenses\41717607-F34E-432C-A138-A3CFD7E25CDA\09278
  2. Run Repair here Repair
MeatyCheesy commented 3 years ago

I'm encountering the same thing. I've tried the deleted registry key and repair also and still no luck. I'm on Visual Studio 2019 Community 16.7.10. Build is 16.0.30816.78 D16.7.

aaronrsiphone commented 2 years ago

I am on VS2019 v16.0.3 and as OP described the tool is successful at updating the registry but it appears the older versions of v16/2019 look for the date in \09262 instead of \09278.

So updating the LicenseMap at the top of VSCELicense.psm1 to be '2019' = 'Licenses\41717607-F34E-432C-A138-A3CFD7E25CDA\09262' instead of '2019' = 'Licenses\41717607-F34E-432C-A138-A3CFD7E25CDA\09278' worked for me.

Found via trial an error.

uwydoc commented 2 years ago

correct. maybe the scripts should iterate through all sub folders in the registry path, and choose the maximum one with all digits (instead of hex chars, there exists an folder named 0bcad for all supported vs versions, 2013, 2015, 2017, 2019)