Unicorn.MSBuild 1.0.0-beta

This is a prerelease version of Unicorn.MSBuild.
There is a newer version of this package available.
See the version list below for details.
dotnet add package Unicorn.MSBuild --version 1.0.0-beta                
NuGet\Install-Package Unicorn.MSBuild -Version 1.0.0-beta                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Unicorn.MSBuild" Version="1.0.0-beta">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Unicorn.MSBuild --version 1.0.0-beta                
#r "nuget: Unicorn.MSBuild, 1.0.0-beta"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Unicorn.MSBuild as a Cake Addin
#addin nuget:?package=Unicorn.MSBuild&version=1.0.0-beta&prerelease

// Install Unicorn.MSBuild as a Cake Tool
#tool nuget:?package=Unicorn.MSBuild&version=1.0.0-beta&prerelease                

Unicorn.MSBuild

The extension adds SyncUnicorn target for your project that can be used by MSBuild.

Installation

Install the Unicorn.MSBuild NuGet package in the web root project.

Usage

Command line

The easiest way is to execute it manually from command line:

msbuild Website.csproj /t:SyncUnicorn /p:UnicornControlPanelUrl=https://habitat.sc/unicorn.aspx /p:UnicornSharedSecret=zUcdjtAKn21fEXIqFnrSzUcdjtAKn21fEXIqFnrSzUcdjtAKn21fEXIqFnrS

Of course you can store UnicornControlPanelUrl and UnicornSharedSecret in your project file, publish profile or another targets file. You can also integrate it into your build pipeline.

Visual Studio menu button

To add a new menu button, go to Visual Studio, click Tools and select External Tools. Add a new external tool with following parameters:

  • Title: Sync Unicorn,
  • Command: Path to msbuild.exe for example: C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe
  • Arguments: The same arguments you add in command line, but in the following example we stored url and secret in publish profile $(ProjectFileName) /t:SyncUnicorn /p:PublishProfile=FileSystem
  • Initial Directory: $(ProjectDir)

Build

To build nuget package you can use following command:

nuget.exe pack Unicorn.MSBuild.csproj -properties Configuration=Release -Tool

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.0 16,106 9/12/2018
1.0.0-beta 652 9/7/2018

Preview version of the package. SyncUnicorn target added for msbuild.