This repository is used as an minimal example of using the Cake build system
You can read more in the Cake Getting Started guide.
Cake example repository
Home Page: https://cakebuild.net/
License: MIT License
This repository is used as an minimal example of using the Cake build system
You can read more in the Cake Getting Started guide.
[karl@MacBook-Pro-2:Devel]$ git clone https://github.com/cake-build/example.git
Cloning into 'example'...
remote: Counting objects: 186, done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 186 (delta 0), reused 0 (delta 0), pack-reused 182
Receiving objects: 100% (186/186), 35.79 KiB | 0 bytes/s, done.
Resolving deltas: 100% (76/76), done.
Checking connectivity... done.
[karl@MacBook-Pro-2:Devel]$ cd example/
[karl@MacBook-Pro-2:example(master)]$ ls
LICENSE appveyor.yml build.ps1 src
README.md build.cake build.sh tools
[karl@MacBook-Pro-2:example(master)]$ ./build.sh
Downloading NuGet...
Feeds used:
/Users/karl/.local/share/NuGet/Cache
https://api.nuget.org/v3/index.json
Restoring NuGet package Cake.0.17.0.
WARNING: Unable to find version '0.17.0' of package 'Cake'.
/Users/karl/.local/share/NuGet/Cache: Package 'Cake.0.17.0' is not found on source '/Users/karl/.local/share/NuGet/Cache'.
https://api.nuget.org/v3/index.json: Unable to load the service index for source https://api.nuget.org/v3/index.json.
/tmp/unity-monodevelop-monoframework-4.0.5/lib/libMonoPosixHelper.dylib
/tmp/unity-monodevelop-monoframework-4.0.5/lib/libMonoPosixHelper.dylib
Could not find Cake.exe at '/Users/karl/Devel/example/tools/Cake/Cake.exe'.
Line 125 in 226a70b
http://cakebuild.net/download/bootstrapper/packages is being redirected to https://raw.githubusercontent.com/cake-build/resources/master/packages.config and System.Net.WebClient.DownloadFile does not seem to be able to handle that
On a fresh clone, running build.sh
, I get the following error. What should be my next steps to deubg or otherwise resolve?
btomasini@btomasini-laptop02 ~/D/g/example> ./build.sh
Could not load file or assembly or one of its dependencies.
System.IO.FileNotFoundException: Could not load file or assembly or one of its dependencies.
File name: 'System.ComponentModel.Composition, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
at NuGet.CommandLine.Program.MainCore (System.String workingDirectory, System.String[] args) [0x000e3] in <845485c546924737a40430d80ba302fd>:0
Could not restore NuGet packages.
Here is my config:
btomasini@btomasini-laptop02 ~/D/g/example> lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 17.10
Release: 17.10
Codename: artful
btomasini@btomasini-laptop02 ~/D/g/example> dotnet --version
2.1.401
lots of things just don't work with the nuget 2.8 that's downloaded.
I fixed many issues by actually downloading this version from build.sh
https://dist.nuget.org/win-x86-commandline/v3.4.4/NuGet.exe
I'm not sure if there's a better url to download a 'mono' version of NuGet, but the 2.8 version currently won't cut it for several scenarios
(Maybe a better issue on nuget repo)
Currently tests are defined but not executed.
e.g.
./build.sh -c Debug
fails with an error
More than one build script specified.
For usage, use parameter --help
Reported: https://gist.github.com/tiesmaster/486756281d2631d3c1828a22ca77804e
This has now happened on two different PCs, both running Windows 10 with VS 2017 installed.
Also:
NuGet Version: 3.5.0.1938
MsBuild Version: 4.6.1586.0
Preparing to run build script...
Running build script...
Analyzing build script...
Processing build script...
Installing tools...
Downloading and installing Roslyn...
Installing packages (using https://packages.nuget.org/api/v2)...
Copying files...
Copying Roslyn.Compilers.CSharp.dll...
Copying Roslyn.Compilers.dll...
Deleting installation directory...
Compiling build script...
========================================
Clean
========================================
Executing task: Clean
Creating directory C:/Users/rickysmith/Documents/Projects/cake-example/src/Example/bin/Release
Finished executing task: Clean
========================================
Restore-NuGet-Packages
========================================
Executing task: Restore-NuGet-Packages
Failed to load msbuild Toolset
Could not load file or assembly 'Microsoft.Build, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot f
ind the file specified.
An error occurred when executing task 'Restore-NuGet-Packages'.
Error: NuGet: Process returned an error (exit code 1).
Currently uses 2.6.4 update to use 3.0.1/latest bits.
It looks like this build.ps1 file is getting out of sync with the latest version?
Hi,
I've tried to execute build.ps1, following the "Getting started" page (http://cakebuild.net/docs/tutorials/getting-started).
It seems to fail on line 50 of build.ps1. First error being:
"Join-Path : cannot bind argument to parameter 'Path' because it is null.
Writing
$TOOLS_DIR = Join-Path $PS_Script_Root "tools"
instead of
$TOOLS_DIR = Join-Path $PSScriptRoot "tools"
allowed the script to execute.
I don't know about powershell or cake, but it looks like it is just the underscores missing, right ?
build.sh (https://github.com/cake-build/example/blob/master/build.sh) does not work in Cygwin. This is because path names in Cygwin are a Unix-like syntax e.g., "/cygdrive/c/foobar/". However, mono.exe does not accept these path names. Please use instead relative paths, mono will work with that. If Cygwin is not supported, add to the top a test of uname (http://stackoverflow.com/questions/3466166/how-to-check-if-running-in-cygwin-mac-or-linux).
unknown.cake (1595,43): Cake.Common.Xml.XmlPokeAliases.XmlPoke(this Cake.Core.ICakeContext, string, string, string)' is obsolete:
Please use XmlPokeString(string, string, string) instead.'
unknown.cake (1602,43): Cake.Common.Xml.XmlPokeAliases.XmlPoke(this Cake.Core.ICakeContext, string, string, string, Cake.Common.Xml.XmlPokeSettings)' is obsolete:
Please use XmlPokeString(string, string, string, XmlPokeSettings) instead.'
unknown.cake (1725,45): Cake.Core.Scripting.IScriptHost.Setup(System.Action)' is obsolete:
Please use Setup(Action) instead.'
unknown.cake (1726,47): Cake.Core.Scripting.IScriptHost.Teardown(System.Action)' is obsolete:
Please use Teardown(Action) instead.'
No warnings
Cake.0.11.0.
64 bit
Mac
No
Followed Hello World Example
https://gist.github.com/brock555/0477e86600222b751d84b5da2312a593
Line 222 in 0a34b48
Shouldn't this be changed because of the new version 1.0.0? from -target to --target
https://cakebuild.net/docs/getting-started/upgrade#cake-cli-updates
I need execute single test class from a test .dll. But I cannot find a way to define the test class.
Please, could you help me to define name of test class for nunit2.
I cannot find answer on the question on http://cakebuild.net/api/cake.common.tools.nunit/6a62c9e4
when build.sh is used under cygwin it tries to use mono which fails
Due to -target=$TARGET $DRYRUN "${SCRIPT_ARGUMENTS[@]}"
, the script seems to pass both "Default" and the actual target argument of the call which then returns the following error:
Multiple arguments with the same name (Target).
This happened while running in a docker container from pomma89/dotnet-mono:dotnet-3-mono-5-sdk
which runs some version of Debian I believe and the simple call
RUN ./build.sh -Target=Clean
.
Currently package.config uses 0.5.2.
When following the getting started guide
The new plan going forward is to always update this projects bootstrapper when changes are made to the bootstrapper in the resources repository. In order to keep compatibility with PowerShell 2.0, I think it makes a lot of sense to force our AppVeyor build to use version 2 of PowerShell. That way, if the build fails, we know we have broken something.
Thoughts @devlead
I'm experiencing a problem with Cake.Build 0.22.2 and using the Cake.Json addin.
If I'm trying to build the actual example repository after adding #addin Cake.Json
into the build.cake script, I get the following error:
Compiling build script...
Error: Error occurred when compiling build script: error CS0246: The type or namespace name 'Newtonsoft' could not be fo
und (are you missing a using directive or an assembly reference?)
(2431,8): error CS0246: The type or namespace name 'Newtonsoft' could not be found (are you missing a using directive or
an assembly reference?)
(2437,8): error CS0246: The type or namespace name 'Newtonsoft' could not be found (are you missing a using directive or
an assembly reference?)
(2433,12): error CS0012: The type 'JObject' is defined in an assembly that is not referenced. You must add a reference t
o assembly 'Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed'.
(2439,12): error CS0012: The type 'JObject' is defined in an assembly that is not referenced. You must add a reference t
o assembly 'Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed'.
The workaround I'm using is stick to version 0.21.1 and use #addin nuget:?package=Cake.Json&version=1.0.2.13
cake.build L:55 - "NoResults ) true" rather than "NoResults = true"
With .Net Core being available on Linux and macOS systems without the need for mono to be present, as well as various Docker containers being provided by Microsoft (and others) that are utilizing .Net Core on Alpine without mono, the build.sh script should take these into account and set the dotnet command accordingly. This will allow greater portability and usability of the default script.
Please, could you help me to understand: I defined default target "Report", but when I run the script (see below) Powershell shows error:
var target = Argument("Target", "Report");
Task("Start")
.Does(() =>
{
Information("Hello World!");
});
Task("Tests")
.IsDependentOn("Start")
.Does(()=>
{
Information("Tests!");
});
Task("Report")
.IsDependentOn("Tests")
.Does(()=>
{
Information("Report!");
});
RunTarget(target);
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.