cakebuild

How to update only version info in assemblyinfo.cs using cake?

丶灬走出姿态 提交于 2019-12-22 04:13:11
问题 I am very new to cakebuild. I want to update the version info of assemblyinfo.cs using cakebuild. public static void CreateAssemblyInfo() method overwrites the entire content of the assemblyinfo file. But I need just version info to be updated. How can I achieve this.? Regards, Aradhya 回答1: If you do not want to have separate files you can also use a regex replace: #addin "Cake.FileHelpers" var yourVersion = "1.0.0.0"; Task("SetVersion") .Does(() => { ReplaceRegexInFiles("./your/AssemblyInfo

How do we authenticate against a secured NuGet server with Cake build?

给你一囗甜甜゛ 提交于 2019-12-21 03:58:22
问题 We are working on automating our builds using Cake Build and we use NuGet packages from nuget.org but we also have our own NuGet Feed server which has a username/password authentication to access. How do we utilize Cake Build with a custom NuGet feed server with authentication? 回答1: Cake utilizes the NuGet.exe for installing tools, addins and the NuGet aliases. Unless you have a source specified in the #tool / #addin directives or provided to the NuGet aliases, then NuGet.exe will look for

Why does NuGetPack respond with “Cannot create a package that has no dependencies nor content”

自古美人都是妖i 提交于 2019-12-13 11:47:53
问题 I am trying to use the following Cake script: Task("Create-NuGet-Packages") .IsDependentOn("Build") .WithCriteria(() =>DirectoryExists(parameters.Paths.Directories.NugetNuspecDirectory)) .Does(() => { var nuspecFiles = GetFiles(parameters.Paths.Directories.NugetNuspecDirectory + "/**/*.nuspec"); EnsureDirectoryExists(parameters.Paths.Directories.NuGetPackages); foreach(var nuspecFile in nuspecFiles) { // TODO: Addin the release notes // ReleaseNotes = parameters.ReleaseNotes.Notes.ToArray(),

Issue building UWP app using MSBuild (GENERATEPROJECTPRIFILE)

我的梦境 提交于 2019-12-13 00:32:39
问题 I am trying to build a UWP app from the command-line in an effort to automate the builds from check-in to publishing to the store. Everything works fine when running the builds from within Visual Studio and when I create app packages, it all works fine (but takes too long, 15 minutes or so). While invoking msbuild per platform (x86, x64 & ARM), only ARM seems to fail with the following error: _CreatePriConfigXmlForSplitting "C:\Source\MyProject\src\MyProject\MyProject.csproj" (Build target)

Git clone issue in cake

假如想象 提交于 2019-12-12 06:59:21
问题 Cloning the source using below link http://cakebuild.net/api/Cake.Git/GitAliases/2ACDDC0F GitClone("https://github.com/cake-build/cake.git", "c:/temp/cake", "username", "password", new GitCloneSettings{ BranchName = "development" }); It works for cloning the branch source. When i use the tag name(tags/12.4.2.1) instead of branchName facing the below issue reference 'refs/remotes/origin/tags/12.4.2.1' not found Note: tags/12.4.2.1 is exist 回答1: As a starting point, for the moment found only

Cake - install dotnet core tool

让人想犯罪 __ 提交于 2019-12-11 17:43:07
问题 I have a build.cake file where I need an external dotnet tool package installed. I would prefer managing installation of that tool in the cake file itself, so other people do not have to be aware that they need one more tool to be installed to be able to build the repository. Is it possible to install it using #tool directive same way as for Nuget packages? Or do I need to use DotNetCoreTool() method for that purpose? Or probably there is another way? 回答1: UPDATE: This functionality is now

Generating SpecFlow Reports with the CakeBuild Specflow plugin possible?

南楼画角 提交于 2019-12-11 04:50:13
问题 Is it possible to generate SpecFlow Reports with the CakeBuild Specflow plugin (CakeBuild SpecFlow) ? 回答1: Yes it's possible to create Test Execution report with Cake build. Here's a quick example using NUnit3 as test runner (other supported runners are MSTest, XUnit and NUnit2). #tool "nuget:?package=NUnit.ConsoleRunner" #tool "nuget:?package=SpecFlow" var target = Argument("target", "Default"); Task("Default") .Does(() => { SpecFlowTestExecutionReport(tool => { tool.NUnit3("/path/to/your

Build Net Framework web application referencing net-standard library with Cake build

允我心安 提交于 2019-12-11 04:13:13
问题 I have two projects: NET Standard class library and regular NET Framework web application. Web application references class library. I use Visual Studio 2017 Preview . When I try to build the solution with Cake using MSBuild command I get the unsupported project message: error MSB4041: The default XML namespace of the project must be the MSBuild XML namespace. If the project is authored in the MSBuild 2003 format, please add xmlns="http://schemas.microsoft.com/developer/msbuild/2003" to the

How do you export an IPA/APK when using CakeBuild and Xamarin ?

给你一囗甜甜゛ 提交于 2019-12-11 02:03:56
问题 I am trying to use CakeBuild & FastLane to automate the build process for my Xamarin Project. I have a script that is working to execute a "build" command with Cake, but it does not output a IPA/APK file. Here is my current script MSBuild("./MyDirectory/MyProject.sln", settings => settings.SetConfiguration("Release") .WithTarget("Build") .WithProperty("Platform", "iPhone") .WithProperty("BuildIpa", "true") .WithProperty("OutputPath", "bin/Release/") .WithProperty("TreatWarningsAsErrors",

Log the warning messages in a text file from a cake script

假装没事ソ 提交于 2019-12-10 15:13:46
问题 I'm using the below cake script to compile my C# project. There are few warning messages shown in PowerShell while executing the script. I like to log the warnings in a text file which is in a physical location(ex: D:\WarningReport.txt) . The below is the cake script task I use to compile the project. Task("Build") .Does(() => { if(IsRunningOnWindows()) { MSBuild("./src/Example.sln", settings => settings.SetConfiguration(configuration)); } }); I like to add something like below,