Using The NuGet Package Explorer
A NuGet package is a package of source, scripts, binaries, etc., plus metadata for use in Visual Studio. The best way to think about a NuGet package is to think about it in terms you might already be familiar with: basically a zip or tar ball plus metadata. The NuGet Package Explorer is a GUI tool which packages source, binaries, scripts, etc., plus metadata into a single file (a package) which is published to a server. Developers can go to the server and pull your package into their Visual Studio project.
If you are more command-line inclined, then go to this link:
You can download the NuGet Package Explorer GUI and read about it at this link:
The following are some helpful topics for using the NuGet Package Explorer.
To create a package:
1. You will most likely be publishing packages to some internal repository, http://nuget.internal-url.net, so you can skip Step 2.
2. If you want to publish to the world-wide http://nuget.org repository, create a NuGet account by going here:
3. Use the GUI to build package:
4. When filling out the Package Metadata fields, the Package Explorer will require you to enter certain values, like the Id and Version. The Id can not contain white space characters, the Version can only contain numbers and periods.
5. Make sure to create a tools folder in your package and add "init.ps1", "install.ps1", and "uninstall.ps1" found here:
6. Make sure you also create a lib folder at the top level, and create two child folders in the lib folder: native and net45. Make these folders even if they will be empty. They provide compatibility with .Net. Like so:
lib\
lib\native
lib\net45
lib\native
lib\net45
6. Your project will look something like this:
7. When you save the package locally, the Package Explorer will create a file name that is the Version appended to the end of the Id. For example, if you had an Id of "MyPackage" and a Version of "3.1", the file name created will be MyPackage.3.1.nupkg
8. Publish to:
Url: http://nuget.internal-url.net
Key: SOME-GUID-THING
You must use that key, not the key assigned to your NuGet account if you performed step 2 above.
Key: SOME-GUID-THING
You must use that key, not the key assigned to your NuGet account if you performed step 2 above.
To delete a package:
Official way:
Private way:
Go to \\internal-packages-url
Just delete your package.
Just delete your package.
Comments
Post a Comment