简体   繁体   中英

How to give reference of Nuget package in Visual Studio

I have a vb.net project and that is uploaded to GIT . For the lib like Oracle.Data.Access.dll i have created the Nuget package and that is stored on the another server.

Now I need to build the code, So I took the code from GIT and download the Nuget package from server and install it. Everything works fine.

But if build my code from jenkins it is failing.

What steps should i need to follow? Or I need to give Nuget reference from my project?

Please suggest.

What steps should i need to follow?

You should restore the NuGet packages before attempting to build the source:

Some Steps:

  1. Navigate to the “project” page.

  2. Select “Configure”.

  3. Find the “Add build step”.

  4. Click “Add build step”.

在此处输入图片说明

  1. Select “Execute Windows batch command”.

  2. Re-arrange the build order by dragging the new build step to the top.

在此处输入图片说明

  1. In the Command field insert: \\nuget.exe restore "\\Yousolution.sln"

  2. Save.

Note:The step should be moved above the MSBuild step because in order the build to be successful you are going to need all package downloaded beforehand.

For some more details, please refer to Integrate Jenkins with MSBuild and NuGet .

需要告知Jenkin将Packages \\文件夹拉出源代码管理。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM