Skip to content
This repository has been archived by the owner on Jun 1, 2022. It is now read-only.

Convention based nuget package creation using MSBuild

License

Notifications You must be signed in to change notification settings

DanielTheCoder/MSBuild.MSBNuget

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MSBuild.MSBNuget

master feature/v20 latest
Build status Build status Build status

Easily create NuGet packages with this collection of MSBuild targets. It uses the method described here: http://docs.nuget.org/docs/creating-packages/creating-and-publishing-a-package#From_a_convention_based_working_directory

Nuget Package Feed

https://ci.appveyor.com/nuget/msbuild-msbnuget

HOW TO USE

  <PropertyGroup>
    <NugetPublishToReleaseFolder Condition="'$(NugetPublishToReleaseFolder)'==''">false</NugetPublishToReleaseFolder>
    <NugetPublishToLocalNugetFeed Condition="'$(NugetPublishToLocalNugetFeed)'==''">false</NugetPublishToLocalNugetFeed>

    <NugetPublishLocalNugetFeedFolder Condition="'$(NugetPublishLocalNugetFeedFolder)'==''">$(MSBuildProjectDirectory)\..\..\Publish\</NugetPublishLocalNugetFeedFolder>
    <NugetPublishReleaseFolder Condition="'$(NugetPublishReleaseFolder)'==''">$(MSBuildProjectDirectory)\..\..\Releases\</NugetPublishReleaseFolder>
  </PropertyGroup>
  • Use item groups to add additional files, eg: add file 'my.dll' to convention based folder
  <ItemGroup>
    <additionalFiles Include="$(MSBuildThisFileDirectory)\..\..\MSBNuget\my.dll">
      <targetFolder>MSBNuget/content/libs/net45</targetFolder>
    </additionalFiles>
  </ItemGroup>
  • Or use convention folders (libs, tools, content, build), eg:
project  
|-'folder: nuspecname'  
|-|-build  
|-|-content  
|-|-libs  
|-|-tools  
|-|-'file: nuspecname.nuspec'  
|-|-'file: nuspecname.nuspec.props'  

Sample

https://github.com/DanielTheCoder/MSBuild.MSBNuget/tree/master/src/MSBNuget.Nuget

Contributing

If you are interested in contributing,

  1. Get a Github account
  2. Fork the project
  3. Make your feature addition or bugfix. Please also update the changelog.
  4. Send me a pull request via GitHub

About

Convention based nuget package creation using MSBuild

Resources

License

Stars

Watchers

Forks

Packages

No packages published