master | feature/v20 | latest |
---|---|---|
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
https://ci.appveyor.com/nuget/msbuild-msbnuget
- Add a new project to your solution by using the MSBuild-project-template
- Install nuget package MSBuild.MSBNuget
- Open build.props and configure common settings, eg:
<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'
- build.targets will be replaced during install with nuget package MSBuild.MSBBuildConvention
https://github.com/DanielTheCoder/MSBuild.MSBNuget/tree/master/src/MSBNuget.Nuget
If you are interested in contributing,
- Get a Github account
- Fork the project
- Make your feature addition or bugfix. Please also update the changelog.
- Send me a pull request via GitHub