DotNetCore cross-platform ~ Precautions for restoring the nuget package on linux: dotnetcorenuget

Source: Internet
Author: User

DotNetCore cross-platform ~ Precautions for restoring the nuget package on linux: dotnetcorenuget
Background of the problem

Because we use jenkins for deployment (jenkins ~ Cluster distribution functions and responsibilities. the. net core project is cross-platform, so project pulling, package restoration, project compilation, and project release are all performed on a linux jenkins node, while we were developing on a windows system, we encountered some problems during restoration and compilation. Today's article mainly addresses these problems.

. Net frameworks age

We are. in the net era, there is a package management tool nuget, and we already know its benefits. Similar to nodejs npm, it helps us manage project dependencies, and it is very convenient to upgrade and uninstall it. the. net project is stored in the packages directory under the solution. During the release, msbuild will upgrade the project according to this directory. If there is no object packages dependency in this packages, it will be downloaded from the nuget source. The nuget global source is stored in windows, and is generally stored in C: \ Users \ lind \ AppData \ Roaming \ NuGet. in the Config file, and the local system also has a package cache, which is usually stored in the C: \ Program Files (x86) \ Microsoft SDKs \ NuGetPackages \ directory, in this way, the next installation package, you can directly install from the local, the official nuget source address is https://api.nuget.org/v3/index . Json. If you define the nuget server, you can add it to the nuget source and directly modify C: \ Users \ lind \ AppData \ Roaming \ NuGet \ Nuget. the Config file is enough, or you can add it in the tool-option of.

. Net core age

In the cross-platform core era, our packages folder is gone, and the previous packages are stored under the obj directory, while the package ing relationship is in the obj \ project. assets. json file, we can see the package referenced by the current project, the package source, the package cache, and other information.

Note: nuget source address paths in various systems

Errors occurred during the issue generation process when restoring the autonomous Nuget package

Independent dependent package not found

No execution permission for Roslyn

Finally, what is waiting for us is success!

Success is not acceptable!

We hope that through our sharing, we can help you with problems!

Thank you for reading this article!

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.