Hi MOON
I'm glad that you were able to resolve your issue and thank you for posting your solution so that others experiencing the same thing can easily reference this! Since the Microsoft Q&A community has a policy that "The question author cannot accept their own answer. They can only accept answers by others ", I'll repost your solution in case you'd like to accept the answer.
Ask: PORTABLE NUGET PACKAGE
Solution: The issue is resolved. Following instructions are the exact solution for this thread. Target operating system is Windows x64. None of the steps explicitly includes any CLI application; all of them is carried out via GUI applications.
- Go to the NuGet web site, download necessary packages and place them to a local empty folder. Pay attention to package dependencies and versions. API versions must support project SDK.
- Start Visual Studio and go to "Options/NuGet Package Manager/Package Sources". At this page, click plus button to create a new NuGet package source and refer it to the directory in which downloaded NUPKG files exist. Also uncheck box of the source named "Nuget.org" because Visual Studio`s default behavior tends to use this online service.
- Open any .NET project whose SDK version is supported by downloaded packages, then go to "Project/Manage NuGet Packages" menu section of Visual Studio. At this page, choose newly created NuGet source from dropdown list and find and install the target package into the project.
- At this point, Visual Studio makes packages ready to use. Their directory is "%userprofile%/.nuget\packages". This is not acceptable due to the fact that if current user is removed from operating system, the directory is erased, so copy the NuGet package folders.
- 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 Packages" for this directory as NuGet package source. That is why, copied files need to be pasted into the directory.
- Go to the page mentioned at step 2 and delete the entry created at step 2. At same page, make sure checkbox of "Microsoft Visual Studio Offline Packages" is signed. After now all projects and users could install the downloaded packages at that computer without network connection.
- The local folder mentioned in step 1 can be deleted since NUPKG files of that folder have already been distributed towards related locations, so they are no needed any more.
If I missed anything please let me know and I'd be happy to add it to my answer, or feel free to comment below with any additional information.
If you have any other questions, please let me know. Thank you again for your time and patience throughout this issue.
Please don’t forget to Accept Answer and Yes for "was this answer helpful" wherever the information provided helps you, this can be beneficial to other community members.
Thank You.