Unclear why this happened for my installation, but Visual Studio (VS 2022 preview at this time) had an offline location (good), but no package source to nuget.

This caused my build to fail on packages not found in the offline directory.

Hence I ended up adding a Package source in Visual Studio for Nuget as:

 nuget.org
 https://api.nuget.org/v3/index.json

Which then allowed VS to do a Restore of packages to succeed.

So, I did not have to do a nuget install Newtonsoft.json -source ... type command on each failed package, as mentioned in other posts.

Answer from ΩmegaMan on Stack Overflow
🌐
Microsoft Learn
learn.microsoft.com › en-us › visualstudio › install › create-an-offline-installation-of-visual-studio
Create an offline installation - Visual Studio (Windows) | Microsoft Learn
You can use the Download all, then install feature from the Visual Studio Installer to download an installation package on the local machine before you install it locally, or you can use the command line to create a local installation package ...
Discussions

Downloading only selected packages for Visual Studio Offline
Yes, it can be done. Go here first. https://docs.microsoft.com/en-us/visualstudio/install/create-an-offline-installation-of-visual-studio Scroll down to the section on customizing the offline installer. The trick is to use the --add option and specify the "workloads" as MS calls them. You can get the workload IDs from this page: https://docs.microsoft.com/en-us/visualstudio/install/workload-and-component-ids More on reddit.com
🌐 r/VisualStudio
4
1
March 27, 2017
how can i download an offline install file of Visual studio
You can refer to: Download the Visual Studio bootstrapper and do an offline installation of VS2022. More on learn.microsoft.com
🌐 learn.microsoft.com
1
0
July 10, 2022
How to install Visual Studio 2022 offline ?
Hello, I have tried to install Visual Studio 2022 Professional offline and I have encountered the issue with certificate revocation checks describes in this post and comment. I have downloaded 3 days ago the last version of VS Installer (version… More on learn.microsoft.com
🌐 learn.microsoft.com
4
0
November 6, 2025
NuGet packages has Offline Only
Download Microsoft Edge More info about Internet Explorer and Microsoft Edge ... I'm setting up a new PC to do development on. Got VS 2019 Community Edition. I went to install Entity Framework Core, but couldn't. It cannot be found. All that I could find was "Microsoft Visual Studio Offline Packages... More on learn.microsoft.com
🌐 learn.microsoft.com
2
0
🌐
Microsoft Learn
learn.microsoft.com › en-us › troubleshoot › developer › visualstudio › installation › set-up-vs-professional-2022-offline-machine
Set Up Visual Studio on an Offline Machine - Visual Studio | Microsoft Learn
December 27, 2024 - Navigate to the Downloads and Keys tab. Search for Visual Studio Professional 2022 and select Key. Select the 25-digit volume license key and copy it. Launch the Visual Studio shortcut as an administrator.
🌐
Reddit
reddit.com › r/visualstudio › downloading only selected packages for visual studio offline
r/VisualStudio on Reddit: Downloading only selected packages for Visual Studio Offline
March 27, 2017 -

I was thinking of making an offline installer for Visual Studio 2017 and I was successful in doing that. But, it downloaded everything and it was around 20 GB, which is just too much.

Is there any way to download only selected components/Packages for VS 2017 offline? I just want to use VS for C# development and with Xamarin for Android dev. Any suggestions?

Please don't down-vote for no reason.

EDIT:

Found a command on SO which should get me basic stuff for Xamarin and Android dev and C#.

vs_community__198857855.1490528169.exe --layout "C:\vs2017" -add Microsoft.VisualStudio.Workload.NetCrossPlat -add Microsoft.VisualStudio.Workload.ManagedDesktop -add Microsoft.VisualStudio.Workload.NetCoreTools --lang en-US

I haven't tested if it downloaded everything or not. Will share if it works perfectly. But, please do share some more info if you something new :D

🌐
Microsoft Learn
learn.microsoft.com › en-us › answers › questions › 5611529 › how-to-install-visual-studio-2022-offline
How to install Visual Studio 2022 offline ? - Microsoft Q&A
November 6, 2025 - I have downloaded 3 days ago the last version of VS Installer (version 3.14.2086.54749) but I always have the problem. Where can I find the version 3.15 of Vs Installer ? ... The process of installing, configuring, and customizing Visual Studio to support development workflows across languages, platforms, and workloads. ... Thanks for reaching out! You may face certification revocation check errors during offline installation because the installer can't reach Microsoft validation servers.
Find elsewhere
🌐
Microsoft Learn
learn.microsoft.com › en-us › answers › questions › 2281933 › portable-nuget-package
PORTABLE NUGET PACKAGE - Microsoft Q&A
August 1, 2022 - During Visual Studio installation, Visual Studio Installer installs default NuGet packages into the directory "%programfiles(x86)%\Microsoft SDKs\NuGetPackages". Visual Studio`s package manager has an entry named "Microsoft Visual Studio Offline ...
Top answer
1 of 2
3

If you want to do an offline update from VS17.12 to 17.13 , you can follow below steps:

  1. Update the layout to a specific version of the product.
  • Go to the Visual Studio 2022 Release History page and download a particular fixed version bootstrapper(e.g vs_Enterprise17.13.0), copy it into your layout, and use it to update the layout to that exact version specified in the bootstrapper.
  • Run the --layout command in an elevated prompt to download the latest packages into your layout.
vs_enterprise.exe --layout c:\VSLayout
  1. Update your Visual Studio 2022 by running the Visual Studio Installer > Update or you can also use the following command:
vs_enterprise.exe update --noWeb --quiet --installpath "C:\Program Files\Microsoft Visual Studio\2022\Enterprise"

Update

The easiest and fastest way to update your offline Visual Studio instances: using a minimal offline layout.

Do i have to download the entire VS Layout package everytime if there is an version update?

Unlike a full Visual Studio layout, a minimal layout only contains the updated packages, so it is always smaller and faster to generate and deploy.

1.Generating a minimal layout.

MinimalLayout.exe generate --targetLocation c:\VSLayout\ --productIds Microsoft.VisualStudio.Product.Enterprise --baseVersion 17.12.5 --targetVersion 17.13.0  --languages en-US

2.Update the Visual Studio Installer

vs_enterprise.exe --quiet --update --offline C:\VSLayout\vs_installer.opc

3.Update the Visual Studio application

vs_enterprise.exe update --noWeb --quiet --installpath "C:\Program Files\Microsoft Visual Studio\2022\Enterprise"

Docs Referred:

Update the layout to a specific version of the product

Update Visual Studio from a layout

2 of 2
1

Microsoft has a handy post that details what you need to do. Essentially, at the command line on the computer with internet access, execute:

vs_enterprise.exe --layout c:\localVSlayout

Replace c:\localVsLayout with where you want to dump the files. It's going to be big! You may need to change vs_enterprise.exe with the correct executable name for your version of Visual Studio.

Top answer
1 of 2
1

Hi Billy,

Thank you for contacting us.

Regarding your concern, please note that Microsoft enforces activation per machine to prevent piracy and ensure compliance. You can still install Visual Studio Professional offline, but it requires manual product key entry or volume license setup, not a universal multi-access key. Below are the steps you should take:

  • You first need to install Visual Studio online
  • Create a layout for offline install, you can check this link for more specific guidance
  • Manually download and install missing certificate: 
    1. Download the certificate: http://www.microsoft.com/pkiops/certs/Microsoft%20Windows%20Code%20Signing%20PCA%202024.crt 
    2. Double-click the .crt file to open the Certificate window.  
    3. Click “Install Certificate…”  
    4. Choose “Local Machine” (you may need admin rights).  
    5. Select “Place all certificates in the following store”  
    6. Click “Browse…” and choose: Trusted Root Certification Authorities. Click Next, then Finish.  
    You should see a confirmation message: “The import was successful.”  
  • Copy the layout folder that you have just created to your offline device and run this command in the layout folder
      vs_professional.exe --noweb
    
    → Visual Studio Professional 2022 will be install offline
  • Go to Help → About Visual Studio → License Status Click Unlock with a Product Key. Enter the Product Key and click Apply
  • Visual Studio creates a request file containing your installation ID. Save this file and transfer it to an internet-accessed device.
  • On a device with internet access, go to the Microsoft Licensing Activation site (provided in the Visual Studio activation dialog) Upload the request file Microsoft will generate a response file then transfer the response file back to the offline machine.
  • In Visual Studio’s activation dialog, select Use Response File → Browse to the file and apply it Visual Studio will confirm activation.

I hope that these instructions will be helpful! If you have any other questions, feel free to reach out, I'm here to help.

Happy holiday!

2 of 2
0

Yes, Visual Studio can be installed on an offline PC. To do this, you need to create an offline installer using the Visual Studio installer on a machine with internet access. You can follow these steps:

  1. Download the Visual Studio installer from the Visual Studio page.
  2. Use the command line to create an offline installer layout. For example:
       "vs_professional.exe" --LayOut "C:\Temp\VS2022Offline" --Lang "en-US"
    
  3. Copy the created offline installer folder to the target offline machine.
  4. Run the installer from the copied folder using an administrator command prompt.
  5. Follow the setup wizard to complete the installation.

Additionally, Visual Studio Professional and Enterprise editions support offline activation via a product key, while Visual Studio Community does not support offline activation.


References:

  • Set up Visual Studio on an offline machine
  • Install certificates required for Visual Studio offline installation
  • SSIS Projects extension for Visual Studio 2022+ troubleshooting guide
🌐
GitHub
gist.github.com › spajce1 › 534d7562104afa2d3cb592ab76e6d4aa
How add offline nuget packages on visual studio 2019/2022 · GitHub
Download ZIP · How add offline nuget packages on visual studio 2019/2022 · Raw · machine-wide-package-source · This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
🌐
Gnostice
gnostice.com › docs › docstudio_net › guide › _faq_nugetpackages_should_i_use_the_online_or_off.html
Gnostice Document Studio .NET > Frequently Asked Questions (FAQs) > NuGet Packages > Should I use the online or offline NuGet packages?
February 13, 2026 - The full product installer bundles with all the NuGet packages built when the installer was created and these are placed in the "Microsoft Visual Studio Offline Packages" folder. This folder is usually at "C:\Program Files (x86)\Microsoft SDKs\NuGetPackages\".
🌐
Scott Hanselman's Blog
hanselman.com › blog › how-to-make-an-offline-installer-for-vs2017
How to make an offline installer for VS2017 - Scott Hanselman's Blog
February 7, 2017 - Visual Studio generally - and Visual Studio 2017 specifically - has an online installer and if you lose connectivity during the installation you can run into problems. However, they haven't got an ISO available for downloading for legal reasons. They can't package up the Android Installer from Google, for example, into an ISO. The user needs to download certain things themselves dynamically. Fortunately there's docs that walk you through making an offline installer.
🌐
GitHub
github.com › MicrosoftDocs › visualstudio-docs › blob › main › docs › install › create-an-offline-installation-of-visual-studio.md
visualstudio-docs/docs/install/create-an-offline-installation-of-visual-studio.md at main · MicrosoftDocs/visualstudio-docs
You can use the Download all, then install feature from the Visual Studio Installer to download an installation package on the local machine before you install it locally, or you can use the command line to create a local installation package ...
Author   MicrosoftDocs
Top answer
1 of 3
1

Hi @Mehdi Khaleghian | MOQdigital ,

Apologies for the delayed response. Can you please follow the steps below and see if it resolves this issue?

  1. Open Visual Studio, go to "Debug" --> "Options.."
  2. Search for "Nuget Package Manager" --> General
  3. Click on "Clear All Nuget Cache(s)" and wait for it to clear. (If it throws error, please note the error, and close all running instance of Visual Studio/applications that might be using the package manager). This would ensure that the local cache is cleared properly. You may get more details of caches being cleared by looking into "Output" window after performing this step.
  4. After the step above completes, go to "Debug" --> "Options.." again.
  5. Under "Nuget Package Manager" --> Package Sources. Make a copy of the sources available there (Name and URL) in notepad. (This should help get rid of any non-printable characters which might be present in the copied string)
  6. Delete all sources and click "OK". (This is to ensure that removal gets persisted, in case there was an error saving the sources originally due to non-visible characters etc.)
  7. After the step above completes, go to "Debug" --> "Options.." again.
  8. Under "Nuget Package Manager" --> "Package Sources", add the sources with details from notepad copied in step 5 above.
  9. Click on "OK"

Check if you can build the project successfully.
In addition to the steps mentioned above, please ensure that "ASP.NET and web development" and "Azure Development" workloads are installed for this instance of Visual Studio. You can verify it by

  1. "Start" --> "Visual Studio Installed"
  2. Locate your version of VS in here (16.11.3) --> click on "Modify". If the above 2 workloads are not present, please select them and install.

In case you still run in to similar issues, you may try running dotnet restore with detailed verbosity (-v d parameter) to examine the error details. More details available here. Please let me know if you have any questions.

Please 'Accept as answer' if it helped so that it can help others in the community looking for help on similar topics.

2 of 3
0

The only problem I had with this is that the TargetFramework version in the example I downloaded was net8.0 in the .csproj file. I just had to change that to the version I was actually running net10.0, and everything worked fine.