In this recipe, we will create a NuGet package with .NET 4.5.1 in order to use it in an ASP.NET CORE application under DNX 4.5.1.
- Let's open Visual Studio 2015 and create a class library:
- We will now create a class in this library:
- Right-click on the project name and then click on Properties.
- We will set the project build option to Release Mode.
- We will then check the Generate XML documentation.
- To create a package, we will need the DLL and the associated XML documentation, which are the .xml comments in the code:
- Let's build the library. We can see the output window result for this build.
- We can see the DLL and the XML files that are generated:
- Let's download
NuGet Package Explorer
on the Codeplex website, at https://npe.codeplex.com/. This is a free tool to create and explore NuGet packages very easily: