Skip to content
Building NuGet packages with Visual Studio and MSBuild
C# Other
  1. C# 99.6%
  2. Other 0.4%
Branch: master
Clone or download
AArnott Merge pull request #296 from sagmor/issue-295
Prevent double import of Microsoft.Common.props
Latest commit 55350b5 Dec 17, 2017
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
docs Adding an example of the syntax to copy an entire file tree without f… Oct 9, 2017
lib
lib14 Brought Xaml2Cs generated files up to spec with Dev14. Jan 28, 2015
src Prevent double import of Microsoft.Common.props Dec 7, 2017
tools Moved tasks source files back Mar 26, 2017
.gitattributes Add .gitattributes to avoid line-ending issues Oct 12, 2014
.gitignore Switch to project.json May 3, 2016
CONTRIBUTING.md Fix missing angle bracket Oct 17, 2014
LICENSE Initial commit of "NuProj", an MSBuild integration for NuGet. Feb 24, 2013
README.md Remove newlines from property definition Oct 18, 2015
appveyor.yml Stop storing another copy of MSI Jul 25, 2017
build.cmd Updated NuGet packages to fix CI Jul 26, 2015
build.proj Updated NuGet packages to fix CI Jul 26, 2015
install.cmd Add build.cmd to invoke the build May 17, 2014
install_build.cmd Add script to only install the build support Sep 22, 2014
uninstall.cmd Add scripts for installing and uninstalling Jun 23, 2013
version.json Version bump so that master and vs2015 build different versions Jun 12, 2017

README.md

Welcome to NuProj!

Join the chat at https://gitter.im/nuproj/nuproj

dev version Issue Stats Issue Stats

NuProj provides MSBuild based support for creating NuGet packages (.nupkg).

Creating NuGet packages is as simple as:

NuGet.exe pack MyPackages.nuspec -basepath D:\source\bin

Well, except for the part where you need to integrate this into your build process.

NuProj allows defining the entire .nuspec file via a regular MSBuild project:

msbuild MyPackage.nuproj /p:BasePath=D:\source\bin

At first this might not look like a big deal but this gives you the following advantages:

  • Easy integration into existing build processes
  • No placeholder limitations -- every piece of information can be injected via the build process
  • Proper reporting of errors and warnings
  • Enables a Visual Studio Integration

Below is an example how HelloWorld.nuproj would look like:

<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0"
         DefaultTargets="Build"
         xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <Id>HelloWorld</Id>
    <Version>1.0.0</Version>
    <Title>HelloWorld</Title>
    <Authors>Me</Authors>
    <Owners>Me</Owners>
    <Description>Hello World</Description>
    <ReleaseNotes>Hello World</ReleaseNotes>
    <Summary>Hello World</Summary>
    <ProjectUrl>http://nuproj.codeplex.com</ProjectUrl>
    <LicenseUrl>http://nuproj.codeplex.com/license</LicenseUrl>
    <Copyright>Copyright (c) Immo Landwerth</Copyright>
    <RequireLicenseAcceptance>False</RequireLicenseAcceptance>
    <Tags>HelloWorld</Tags>
  </PropertyGroup>
  <ItemGroup>
    <Library Include="$(BasePath)HelloWorld.dll">
      <TargetFramework>net40</TargetFramework>
    </Library>
  </ItemGroup>
  <PropertyGroup>
    <NuProjTargetsPath Condition=" '$(NuProjTargetsPath)' == '' ">$(MSBuildExtensionsPath)\NuProj\NuProj.targets</NuProjTargetsPath>
  </PropertyGroup>
  <Import Project="$(NuProjTargetsPath)" />
</Project>

Visual Studio Integration

Also, make sure to check out the Visual Studio Integration:

Visual Studio Integration

Documentation

For more details, check out the documentation.

You can’t perform that action at this time.