Skip to content

Instantly share code, notes, and snippets.

Param(
[string]$Script = "build.cake",
[string]$Target = "Default",
[ValidateSet("Release", "Debug")]
[string]$Configuration = "Release",
[ValidateSet("Quiet", "Minimal", "Normal", "Verbose", "Diagnostic")]
[string]$Verbosity = "Verbose",
[switch]$Experimental,
[switch]$WhatIf,
[switch]$Mono,
version.cake...
Processing build script...
Installing tools...
Installing NuGet package Mono.TextTransform...
Unable to find package 'Mono.TextTransform'.
Error: Cake.Core.CakeException: Failed to install tool 'Mono.TextTransform'.
at Cake.Core.Scripting.ScriptProcessor.InstallTools (Cake.Core.Scripting.Analysis.ScriptAnalyzerResult analyzerResult, Cake.Core.IO.DirectoryPath installPath) <0x11339cfb0 + 0x0032b> in <filename unknown>:0
at Cake.Core.Scripting.ScriptRunner.Run (IScriptHost host, Cake.Core.IO.FilePath scriptPath, IDictionary`2 arguments) <0x11338cff0 + 0x00232> in <filename unknown>:0
at Cake.Commands.BuildCommand.Execute (Cake.CakeOptions options) <0x11338cf30 + 0x00046> in <filename unknown>:0
at Cake.CakeApplication.Run (Cake.CakeOptions options) <0x113388b60 + 0x00068> in <filename unknown>:0
Task("WiX-Directory")
.IsDependentOn("Nuget-Restore")
.Does(() =>
{
var harvestDirectory = Directory("./");
var filePath = File("Wix.Directory.wxs");
var settings = new HeatSettings { HarvestType = WiXHarvestType.Dir };
Information(MakeAbsolute(harvestDirectory).FullPath);
WiXHeat(harvestDirectory, filePath, settings);
});
@RLittlesII
RLittlesII / gist:8a3f616848483d0b5d1bc84b1302b0b8
Created April 7, 2017 16:08
Configure WebApi Custom Errors
/// <summary>
/// Configures the Web Api custom errors.
/// </summary>
/// <param name="config">The configuration.</param>
/// <exception cref="System.ArgumentOutOfRangeException"></exception>
public static void ConfigureErrors(HttpConfiguration config)
{
var customErrors = (CustomErrorsSection) ConfigurationManager.GetSection("system.web/customErrors");
switch (customErrors.Mode)
@RLittlesII
RLittlesII / Sqlite Linking Errors
Created June 16, 2017 14:29
Akavache-SqlCipher Sqlite linking erorrs
/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/bin/mtouch --cache /Users/src/Project.iOS/obj/iPhoneSimulator/Debug/device-builds/iphone9.1-10.3.1/mtouch-cache --sim /Users/src/Project.iOS/bin/iPhoneSimulator/Debug/device-builds/iphone9.1-10.3.1/ProjectiOS.app --executable ProjectiOS --debug --linksdkonly --sdkroot /Applications/Xcode.app/Contents/Developer --sdk 10.3 --targetver 9.0 --http-message-handler=HttpClientHandler --abi=x86_64 --symbollist /Users/src/Project.iOS/obj/iPhoneSimulator/Debug/device-builds/iphone9.1-10.3.1/mtouch-symbols.list --dsym=no --linkskip=Akavache --gcc_flags "-Xlinker -sectcreate -Xlinker __TEXT -Xlinker __entitlements -Xlinker /Users/src/Project.iOS/obj/iPhoneSimulator/Debug/device-builds/iphone9.1-10.3.1/Entitlements.xcent" -r /Users/packages/Acr.Support.2.1.0/lib/Xamarin.iOS10/Acr.Support.iOS.dll -r /Users/packages/Acr.UserDialogs.6.3.8/lib/Xamarin.iOS10/Acr.UserDialogs.dll -r /Users/packages/Acr.UserDialogs.6.3.8/lib/Xamarin.iOS10/Acr.UserDialogs.Interface.dll -r
#load nuget:https://www.myget.org/F/cake-contrib/api/v2?package=Cake.Recipe&prerelease
Environment.SetVariableNames();
BuildParameters.SetParameters(context: Context,
buildSystem: BuildSystem,
sourceDirectoryPath: "./src",
title: "PROJECT_TITLE");
BuildParameters.PrintParameters(Context);
@RLittlesII
RLittlesII / cake-environment.ps1
Last active October 6, 2017 02:02
Powershell script to load cake environment variables
[CmdletBinding()]
Param(
[string]$ToolPath,
[string]$NugetSource,
[string]$AddinPath,
[string]$ModulePath,
[switch]$SkipVerification,
[switch]$InProcessNuget
)
@RLittlesII
RLittlesII / cake bash profile environment variables
Last active October 6, 2017 02:56
Cake environment variables for shell startup
export CAKE_PATHS_TOOLS=$HOME/.cake/tools
export CAKE_PATHS_ADDINS=$HOME/.cake/tools/addins
export CAKE_PATHS_MODULES=$HOME/.cake/tools/modules
export CAKE_SETTINGS_SKIPVERIFICATION=true
export CAKE_NUGET_USEINPROCESSCLIENT=true
@RLittlesII
RLittlesII / Omnisharp Error
Created March 27, 2018 18:55
Omnisharp 1.29.1; Cake.Bakery 0.2.0
Starting OmniSharp server at 2018-3-27 13:48:25
Target: /Users/rodneylittlesii/Source/github/Cake.Homebrew/src/Cake.Homebrew.sln
[ERROR] Error: spawn EACCES
@RLittlesII
RLittlesII / fastlane.match.cake
Created April 9, 2018 18:46
Cake script for running Fastlane Match
#addin nuget:?package=Cake.Fastlane&version=0.1.0
//////////////////////////////////////////
// ARGUMENTS
//////////////////////////////////////////
var target = Argument<string>("target", "Default");
var development = Argument<bool>("development", true);
//////////////////////////////////////////
// VARIABLES