Unicorn.MSBuild 1.0.0-beta

MSBuild extension that allows to execute Unicorn sync.

This is a prerelease version of Unicorn.MSBuild.
There is a newer version of this package available.
See the version list below for details.
Install-Package Unicorn.MSBuild -Version 1.0.0-beta
dotnet add package Unicorn.MSBuild --version 1.0.0-beta
<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
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Unicorn.MSBuild, 1.0.0-beta"
#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-beta&prerelease

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

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

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

Release Notes

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

Dependencies

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 History

Version Downloads Last updated
1.0.0 5,173 9/12/2018
1.0.0-beta 385 9/7/2018