Simple Nuget

Bored by the thousands of way to build nuget packages automatically under VS2010... I started my quest too. And after creating my own php implementation of nuget server, i was finally able to find a -simple- way to solve everything without external tools or messing around with weird packages.

I concluded with the following steps:

mkdir  "$(SolutionDir)NugetPackages"
$(SolutionDir).nuget\nuget pack "$(ProjectPath)" -OutputDirectory "$(SolutionDir)NugetPackages" 
 -Prop "Configuration=$(ConfigurationName);Platform=$(PlatformName)"
<?xml version="1.0"?>
<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">
  <metadata>
    <id>$id$</id>
    <version>$version$</version>
    <title />
    <authors>$author$</authors>
    <owners>$author$</owners>
    <requireLicenseAcceptance>false</requireLicenseAcceptance>
    <description>$description$</description>
    <dependencies>
      <group targetFramework=".NETFramework4.0">
        <dependency id="ZakCoreUtilsInterfaces" version="$version$" />
        <dependency id="ZakCoreUtils" version="$version$" />
      </group>
    </dependencies>
  </metadata>
  <files>
    <file src="bin\$configuration$\ExtDll.dll" target="lib\net40\ExtDll.dll" />
  </files>
</package>
nuget push foo.nupkg 4003d786-cc37-4004-bfdf-c4f3e8ef9b3a -s http://customsource/

Happy Nugetting!


Last modified on: January 03, 2014