Nuget connection failure
--- Restore content start ---
In. net project development management, we often use Nuget to manage our class libraries. For some reason, nuget v3's mirror source https://api.nuget.org/v3/index.json often fails to connect.
Blog garden provides image source https://nuget.cnblogs.com/v3/index.json For details see: http://www.cnblogs.com/cmt/p/nuget-mirror.html.
However, it seems that this is also dependent on the nuget source and often cannot be connected. Microsoft official website also has an image source http://go.microsoft.com/fwlink? LinkID = 206669. In short, these sources are often unable to connect, all kinds of complaints .....
Refer to the online method to add the local source to point to the local packages folder. This method can solve some problems, but the symptoms are not the root cause.
First, we know that some packages are dependent on other packages. When loading these packages, we will search for dependent packages. If the search fails, the installation will fail. In addition, nuget's automatic dependency loading function is not used.
Then we need to build an internal nuget source. Set up an empty web project to install NuGet. Server, and then release it. Or use the package I provided to publish it directly to your iis. The address is shown below.
After version 2.13, you must use netFramework4.6 or later. After NuGet. Server is installed, the default. aspx page is generated. Publish this website. Or use the release package that I provide. It is provided at the end of the article.
3. Use nuget explorer to publish your package to the iis website.
Change requireApiKey to false, and then do whatever you want.
Visit after publishing, and you will be able to see this interface:
This is the operation interface. This is the search interface. The connection is still relatively stable and can be basically searched.
Of course, you can also publish it to the nuget official website to register your own key. Use this interface to submit or directly upload the nuget file to the nuget official website.
Vs Configuration
When downloading a package is slow or fails, check the output window.
Find the slow package and publish it to your source address in nugetexolorer. Because the nuget package may have dependency and version relationships, multiple operations may be required to cache the package to the iis website. However, the next time you use the package, you can search for the package from the internal iis website much faster, it also helps companies manage their nuget packages.
Summary: what really works is NuGetPackageExplorer. You can search, download, decompress, and package it, and publish an iis website to share the nuget package, which is conducive to the management of class libraries in the company.
Attachment of relevant information and:
NuGetPackageExplorer (github): https://github.com/NuGetPackageExplorer/NuGetPackageExplorer
My project package: https://github.com/wtujvk/LearningMeCSharp.git
View directly: https://github.com/wtujvk/LearningMeCSharp/tree/master/LearningMeCSharp/NugetServer.Demo
My compiled package (which can be directly published to iis): https://pan.baidu.com/s/1gJhH6XbnQe3cI3YuB21nNA password: w35j
--- Restore content end ---