A few small nuget utilities.
C#
Clone or download
Latest commit c85fc5f Jul 6, 2017
Permalink
Failed to load latest commit information.
PepitaPackage.Tests
PepitaPackage fix ncrunch include Jul 6, 2017
Tools
.gitattributes
.gitignore
CommonAssemblyInfo.cs
Key.snk
Pepita.sln
Pepita.sln.DotSettings
README.md
Samples.sln
license.txt

README.md

A few small nuget utilities

PepitaPackage

Get it via nuget

PM> Install-Package PepitaPackage

Introduction

The aim of PepitaPackage is to provide a lightweight way of building a nuget package. It does this by, before each build, checking that all your nuget references exists as packages in you solution. This way when someone else 'gets' your code they will get all the nuget packages when they initially build.

What PepitaPackage actually does

  • Take a single parameter which is a path to a directory containing the files you want to package. A single .nuspec file should exist at the root of the directory.

eg

-Solution
  -NuGetBuild
    -MyProject.nuspec
    -Content
      -Readme.txt
    -Lib
      -MyAssembly.exe
    -Tools
      -MyTool.exe
  • Derive the package file name {Id}.{VersionNumber}.nupkg.
  • Delete the .nupkg file if it exists.
  • Create a new .nupkg (zip) file.
  • Extract the package properties from the .nuspec file.
  • Add the package properties as metadata to the .nupkg file.
  • Add the metadata as a manifest to the .nupkg file.
  • For each file in the directory add it to the .nupkg file.
  • Save the .nupkg