Unicorn.MSBuild
1.0.0-beta
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
<PackageReference Include="Unicorn.MSBuild" Version="1.0.0-beta"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
paket add Unicorn.MSBuild --version 1.0.0-beta
#r "nuget: Unicorn.MSBuild, 1.0.0-beta"
// 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
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.