Unicorn.MSBuild 1.0.0

Install-Package Unicorn.MSBuild -Version 1.0.0
dotnet add package Unicorn.MSBuild --version 1.0.0
<PackageReference Include="Unicorn.MSBuild" Version="1.0.0">
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
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
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Unicorn.MSBuild, 1.0.0"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. 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

// Install Unicorn.MSBuild as a Cake Tool
#tool nuget:?package=Unicorn.MSBuild&version=1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.


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


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


Add <ProjectName>.wpp.targets file to your project's directory with the following content:


For example, if your project file is Website.csproj, create Website.wpp.targets file in the same directory and put the above content into the file. The Website.wpp.targets file will be loaded by msbuild automatically.


Visual Studio Extension

The easiest way to execute SyncUnicorn target is by installing Sync Unicorn extension. The extension adds Sync Unicorn button to Build menu and to right click context menu of your project.

Command line

You can also execute SyncUnicorn target from command line:

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

SyncUnicorn target requires two parameters: UnicornControlPanelUrl and UnicornSharedSecret. You can pass them directly in command line or use Website.wpp.targets file decribed above.

Visual Studio external tool

To add a new menu button without installing extension, 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)

Now you can select your Webroot project in Solution Explorer and go to Tools->Sync Unicorn


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 8,244 9/12/2018
1.0.0-beta 507 9/7/2018

SyncUnicorn target added for msbuild.