Unless they are already unlocked, Visual Studio Professional and Enterprise start as a trial. Your product key turns the trial into a licensed installation. This guide assumes Visual Studio is installed. If not, start with Install Visual Studio Professional or Enterprise.
What you received
Your product key is in your order confirmation email and in your Lizensa account under My Library. It has the format XXXXX-XXXXX-XXXXX-XXXXX-XXXXX.
Your order names the version and edition the key is for, for example Visual Studio 2022 Professional or Visual Studio 2026 Enterprise. Fixed-term licences for 12, 24 or 36 months, such as Visual Studio 2022 Enterprise for 12 months, are also delivered as a product key only.
Until Visual Studio is unlocked with a product key or a Visual Studio subscription, Microsoft's trial rules apply:
- Professional and Enterprise run as a free trial for 30 days.
- If you sign in with a Microsoft account, the trial extends once to 90 days.
- When the trial ends, Visual Studio asks you to unlock it with a subscription or a product key.
Check the installed version
Before you enter the key, check that the installed version and edition match your order:
- Start Visual Studio.
- Select Help > About Microsoft Visual Studio.
- Read the first lines. They name the version, for example Visual Studio Professional 2022, and the edition.
If the edition does not match your order, install the right one first. Lizensa supplies no installer; the bootstrapper comes from Microsoft:
- Visual Studio 2026: the Microsoft downloads page
- Visual Studio 2022: the 2022 release history
- Visual Studio 2019: the 2019 release history
Choose Professional or Enterprise to match your order.
Is Visual Studio installed?
You enter the key inside Visual Studio, so the installation must be complete and Visual Studio must start. In short:
- Check Microsoft's system requirements for your version, install Windows updates and restart the PC.
- Run the Microsoft installer with administrator rights. Select Yes when Windows asks for permission, then Continue.
- In the Visual Studio Installer, choose your workloads and select Install. When it finishes, select Launch.
If the installation is unfinished, complete it before you open Visual Studio to enter your key. All steps are in the installation guide.
Enter your product key
- Start Visual Studio. If the trial has ended, the licence dialog may open by itself. Otherwise continue with the next step.
- Select File > Account Settings.
- In the Account Settings dialog, select License with a Product Key. Microsoft's documentation also calls this link Unlock with a Product Key.
- In the Enter a product key dialog, type your key exactly as it appears in your order.
- Confirm the dialog. The licence information on the right of Account Settings updates.
- Close the dialog and restart Visual Studio.
You do not need to sign in to use a product key.
Signing in: optional
When you first start Visual Studio, it invites you to sign in. You can skip this. With a Microsoft account, Visual Studio synchronises settings such as key bindings, window layout and colour theme across your devices, and connects to Azure services without asking again. Signing in with an account that has an assigned Visual Studio subscription can also unlock Visual Studio. Lizensa delivers your order as a product key, so the key is what you use.
Several versions on one PC
Visual Studio 2019, 2022 and 2026 can be installed side by side. Each installed version shows its own licence information under File > Account Settings. Open the version your key belongs to and enter the key there, then check the licence information in each version you use.
Offline or in a closed network
A product key suits PCs that are often offline. Microsoft recommends a product key for environments with limited or no internet access, so that Visual Studio does not interrupt your work to refresh a licence. Enter the key once as described above.
Visual Studio 2026 and subscriptions
Microsoft says that subscribers to a Visual Studio subscription do not need a product key for Visual Studio 2026: signing in with the subscribed account unlocks it. Microsoft adds that Visual Studio 2026 keys may be available through Volume Licensing for offline or managed deployments. Microsoft's general licensing guide for the current Visual Studio describes the License with a Product Key link in Account Settings. Enter the key from your order there. If the link is missing or Visual Studio 2026 does not accept the key, contact our support before you try anything else.
Check it worked
- Select File > Account Settings.
- Read the licence information on the right of the dialog. It should name your edition and refer to a product key. It should no longer describe the installation as a trial.
- Restart Visual Studio once more. It should open without a licence prompt.
If something goes wrong
Visual Studio says the trial has ended. Open File > Account Settings and check whether your key was accepted. If the licence information still shows the trial, enter your key as described above.
The key is not accepted. Check the version and edition in Help > About Microsoft Visual Studio. Make sure they match the product in your order. Then compare the key character by character with the one in My Library.
"Your license has gone stale and must be updated." This message concerns the licence token of an online subscription: it was not refreshed, for example because you did not use Visual Studio or were offline for a long time, or because you signed out. Microsoft's fix is to re-enter the credentials of that account. If you use Visual Studio with the key from your order, check under File > Account Settings that the key is applied.
Visual Studio says your licence has expired. Microsoft names three ways out: renew a subscription, add another account that has one, or enter a product key. If you have not entered the key from your order yet, do that under File > Account Settings. If your fixed-term licence has run out, contact our support about the options.
You are using a preview or Insiders build. Microsoft's prerelease versions have no product keys and need a sign-in. Install the released version from the installation guide and enter your key there.
The licence information shows the trial again after you entered the key. Enter the key once more under File > Account Settings and restart Visual Studio. If the trial returns, contact us with a screenshot of the licence information.
Still stuck? Contact our support with your order number, the Visual Studio version and edition, and the exact message you see.
