Quantcast
Channel: WE MOVED to github.com/nuget. This site is not monitored!
Viewing all articles
Browse latest Browse all 7612

New Post: How to make NuGet "optional"?

$
0
0
For Q1, I will use my open source project to describe the steps,
  1. Clone or download the source code from https://github.com/lextm/sharpsnmplib to a machine that has Internet connection.
  2. Execute prepare.bat (copy an snk file) and release.bat (set package restore to true and initialize the build). The binaries are in the bin folder, and the packages are restored to packages folder.
  3. Download the source code cleanly again, and copy to another machine without Internet connection. This simulates the situation of your client.
  4. Now what you need to do is to copy the entire packages folder from the machine in step 1, to the machine in step 3. Then on it you can repeat step 2. NuGet is smart enough to skip package restore as it detects all necessary packages are present.
There is no need to disable package restore at all as far as I can think of, as your other clients might want to play with it.

For Q2 it is rather hard to say whether copy local is efficient. For each existing ways to handle references, they have pros and cons. So far I don't see an obvious way that NuGet should move on to. We will see what's coming in the future.

Viewing all articles
Browse latest Browse all 7612

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>