October 10, 2016 I’ve been automating a number of builds recently. And like in the past, I have to learn a language and process. While the new Build system in TFS 2015/VSTS is awesome and so much nicer than past Builds offerings (aka XAML Build and Build v1), I’m still learning something new.My apps are built with C#, why can’t my Build be C# too?It can! C# Make, better known as Cake is now available! It’s cross VCS (TFS, VSTS, TeamCity, Jenkins, etc.), cross platform (Windows, OS X,, Linux) and free & OSS…Cake for Visual StudioAdds support for the Cake build tool in Visual Studio 2015. Includes support for the Task Runner Explorer, new item and project templates and bootstrapping important Cake filesOriginally based off Mads Kristensen’s Brunch Task Runner extension.Install CakeIn order to use this extension, you must have Cake installed on your machine or in your solution.Use chocolatey to install it globally by typing the following in an elevated command prompt:choco install -y cake.portableAlternatively, if you have run the bootstrapper at least once, Visual Studio should automatically discover it (see below).Build scriptsThe Cake Task Runner automatically triggers when it finds a build.cake file.Task Runner ExplorerOpen Task Runner Explorer by right-clicking the Cake script and select Task Runner Explorer from the context menu:…Template InstallersChoose Cake Build from the Build menu to quickly install the default bootstrapper scripts or Cake configuration files into your solution.…TemplatesThe extension includes an item template for build scripts and project templates for Cake modules, addins, and unit tests.[Click through for the download]CakeWhat is Cake?Cake (C# Make) is a cross platform build automation system with a C# DSL to do things like compiling code, copy files/folders, running unit tests, compress files and build NuGet packages.FamiliarCake is built on top of the Roslyn and Mono compiler which enables you to write your build scripts in C#.Cross platformCake is available on Windows, Linux and OS X.ReliableRegardless if you’re building on your own machine, or building on a CI system such as AppVeyor, TeamCity, TFS, VSTS or Jenkins, Cake is built to behave in the same way.Batteries includedCake supports the most common tools used during builds such as MSBuild, MSTest, xUnit, NUnit, NuGet, ILMerge, WiX and SignTool out of the box.Open sourceWe believe in open source and so should you. The source code for Cake is hosted on GitHub and includes everything needed to build it yourself.Cake FeaturesCake is a build automation system with a C# DSL to do things like compiling code, copy files/folders, running unit tests, compress files and build NuGet packages.Cake uses a dependency based programming model just like Rake, FAKE and similar build automation systems where you declare tasks and the dependencies between those.Supported functionalityMSBuildBuild systemsAppVeyorBambooContinua CIJenkinsMyGetTeamCityAssemblyInfo patchingRelease notes parsingUnit Test RunnersxUnit (v1 and v2)NUnitMSTestNuGetInstallPackPushRestoreSetApiKeySourcesUpdateILMergeWiXNSISSignToolOctopus DeployCompression (Zip)SpecFlowFile hash calculation (MD5, SHA256, SHA512)Cake also contains functionality to conveniently work with file system paths as well as performing common file/directory/environment operations, manipulating XML, parsing Visual Studio solutions, starting processes and more.[Insert lame joke about getting started baking now…]Follow @CH9 Follow @coding4fun Follow @gduncan411 Source link