Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to package 2 third-party dll's

I'm reading through the nuget documentation and I don't completely understand how nuget works.

I have 2 third party dll's that I have been asked to turn into a nuget package, so that our local developers can just install them to a project via nuget. This would be something that we would host locally.

Does this mean I just create a project in vs and drop the dll's in the project or do I use something like the package explorer.

I apologize in advance if this is a silly question, however I am an absolute beginner when it comes to Nuget, etc..

Any tips would be greatly appreciated.

like image 637
MissioDei Avatar asked Nov 20 '12 14:11

MissioDei


People also ask

How do I create a NuGet package from a third party DLL?

The simplest and fastest way to get a nuget package up and running is to just fire up package explorer --> create a new package --> drag and drop your dlls into the "Package Contents" area, it'll ask you whether you want the dlls in the "lib" folder, which you do --> create a bit of metadata about the package, ie give ...

How do I add another package to Visual Studio?

In Visual Studio, select Tools, and then select Options. Select NuGet Package Manager, and then select Package Sources. Enter the feed's Name and Source URL, and then select the green (+) sign to add a new package source.


1 Answers

The simplest and fastest way to get a nuget package up and running is to just fire up package explorer --> create a new package --> drag and drop your dlls into the "Package Contents" area, it'll ask you whether you want the dlls in the "lib" folder, which you do --> create a bit of metadata about the package, ie give it a description and version and whatnot, and then just save it.

After you save it, you can then copy the .nupkg file to a shared location - the file system on a centralised server is fine if you have access to one, and then setup access to this "feed" (ie, the shared folder) in visual studio (tools --> options --> Package Manager --> Package Sources), thus:

Visual Studio

Or if you want to host the packages over http you can follow the instructions here: https://github.com/NuGet/NuGetGallery/blob/master/README.markdown.

like image 60
Greg Smith Avatar answered Oct 26 '22 11:10

Greg Smith