Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
  • 13:43
    devlead commented #2687
  • 12:50
    Eldadc commented #2687
  • 12:39
    mrlindblom starred cake-build/cake
  • 08:53
    patriksvensson commented #2687
  • 05:55
    Eldadc commented #2687
  • Dec 13 14:41
    patriksvensson closed #2687
  • Dec 13 13:33
    tristankrass starred cake-build/cake
  • Dec 12 18:05
    patriksvensson labeled #2687
  • Dec 12 18:01
    patriksvensson commented #2687
  • Dec 12 18:00
    patriksvensson commented #2687
  • Dec 12 14:06
    Eldadc opened #2687
  • Dec 12 07:05
    gauravkanoongo starred cake-build/cake
  • Dec 12 04:18
    Build #484 passed
  • Dec 11 06:35
    andrei-zubkovich starred cake-build/cake
  • Dec 11 04:20
    Build #483 passed
  • Dec 10 23:50
    Marusyk commented #2658
  • Dec 10 04:21
    Build #482 passed
  • Dec 10 04:18
    Build #481 passed
  • Dec 09 12:24
    Build #5594 passed
  • Dec 09 12:18
    Build #782 passed
Is there any Cake API around devenv ? I am trying to automate certain things around opening and running Visual Studio itself.
Gary Ewan Park
@nawfalhasan no, not that I am aware of
Fran Hoey
Morning all. I need to upload a website via FTP, unless I'm missing something it looks like I need to use the Cake.Ftp package for this, however, it's quite limited. I started contributing to it, but then noticed the remark here https://docs.microsoft.com/en-us/dotnet/api/system.net.ftpwebrequest?view=netcore-2.2 that says MS don't recommend you use FtpWebRequest anymore
Am I missing a trick, is there a better way to use FTP, if not should I look at moving Cake.Ftp to use an third party library, if so, any recommendations, that are all new to me
Gary Ewan Park
@franhoey that might be best answered by @phillipsj
Mattias Karlsson
@franhoey Another option for upload would be to use Cake.Curl, curl supports uploading files based om url using one of these protocols: FILE, FTP, FTPS, HTTP, HTTPS, IMAP, IMAPS, SCP, SFTP, SMB, SMBS, SMTP, SMTPS and TFTP.
Fran Hoey
What I was really hoping for, was to be able to pass in a folder or globber string and have it upload via FTP
TBH, I don't think it would be a lot of work to add in
I was surprised not to find something similar, but I guess FTP is becoming old fashioned now
Happy to contribute to Cake.FTP, I've used cake for years now, its time I did something to contribute
Hi short question, how do i push nuget symbol packages ?
NuGetPush("C:\projects\Test.snupkg", new NuGetPushSettings { ApiKey = <some-api-key>, Source = "http://<some-pro-get-url"> }) doesnt work for me ?
Mattias Karlsson
@hienng which version of nuget.exe are you using? nuget.exe v4.9.0 or above is required.
In general nuget will push snupkg along with nupkg automatically. So you if you have both alongside each other, you just need to push nupkg.
Mattias Karlsson
Try executing cake with diagnostic verbosity so see how the tool is launched. Also doesn't work? In what way, script fails? Symbols not indexed?
henrik eriksson

Hi, executing MSBUILD() targeting ToolVersion VS2019. However, the msbuild version is not found.

MSBuild(coreSolution, new MSBuildSettings()
            .WithProperty("OutputPath", buildOutputPath)
            .AddFileLogger(new MSBuildFileLogger
                Verbosity = Verbosity.Normal,
                LogFile = coreMsbuildLogFile

Receive the error MSBuild: Could not locate executable.

The VS2019 tool box is installed on D:
There is another task calling NuGetRestore() which reports: MSBuild auto-detection: using msbuild version '' from 'D:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin'

However if I do remove the UseToolVersion, the version reported by MsBuild is Microsoft (R) Build Engine version 4.8.3761.0 together with [Microsoft .NET Framework, version 4.0.30319.42000]

Calling MsBuild from command line states Microsoft (R) Build Engine version 16.3.2+e481bbf88 for .NET Framework

Mattias Karlsson
@henrik_GJ_Esson_twitter when Visual Studio isn't installed in a known location I would recommend using VSWhere https://cakebuild.net/blog/2017/03/vswhere-and-visual-studio-2017-support
Joseph Musser
Does anyone know how to get the GitVersion alias working on Ubuntu? I see that the Cake project does this, but I'm not able to get it working for Shouldly.
I added #module nuget:?package=Cake.DotNetTool.Module&version=0.4.0 and switched from GitVersion.CommandLine to #tool nuget:?package=GitVersion.Tool&version=5.1.2.
I also moved the build.sh bootstrapper to the latest from https://github.com/cake-build/resources.
Still getting: GitVersion: Could not locate executable.
Joseph Musser
Am I missing a step in getting the module properly bootstrapped?
This GitVersion thing is holding up Joseph Woodward and I was hoping to get something going for him, but I'm out of time for now. Any input would be appreciated. Thanks!
Kim J. Nordmo
@jnm2 for .net core tools use the #tool dotnet: instead of #tool nuget:
Joseph Musser
@AdmiringWorm Thanks!
henrik eriksson
Thanks @devlead !
Hi! Are there any way to use cake.tool for .NET Framework project behind corporate proxy?
DotNetCoreBuild works if you have http_proxy env var, but MSBuild alias doesn't work.
An error occurred when executing task 'Restore-NuGet-Packages'.
Error: One or more errors occurred. (Could not locate nuget.exe.)
        Could not locate nuget.exe.
Mattias Karlsson
@SIkebe error message above is that it can't find nuget.exe have you tried installing it using tool directive i.e.
#tool "nuget:?package=nuget.commandline&version=5.3.0"
nuget.exe requires desktop framework or mono to be present though.
Joseph Musser
@SIkebe So long as you're not using the legacy packages.config, I'd recommend removing the restore target and setting Restore = true on the MSBuildSettings of the Build target.
(VS2017 and VS2019 support PackageReference in every kind of csproj including legacy csproj. Unless you're doing something quite specialized and dated, packages.config shouldn't be necessary.)
Mattias Karlsson
As long as you don't have any authenticated sources, implicit restore mostly just works as is with both MSBuild & Dotnet build. That said nuget.exe does support both sdk style, old style csproj/packages.config. Implicit can have perf gains i.e. doing dotnet publish can be faster than restore&build&publish, but it can be harder to troubleshoot in some scenarios.
@devlead Thanks as always. the tool directive worked!
@jnm2 Unfortunately, I have to maintain VS2013 projects...
Our bootstrap script was really simplified thanks to cake.tool :)
Sean Fausett
Hey guys. Where are the 0.36.0 prerelease NuGet packages?
Mattias Karlsson
@gitfool great that you found it, MyGet has limited their OSS offering, so we couldn't push new packages and had to find an alternative. Project readme up badge to date but don't think we've had time to update docs/blog about it.
Sean Fausett
Interesting. Have you looked at GitHub Packages yet?
Magnus Lindhe
Hi! Is it possible to read MSBuild properties from a .props file using Cake? Would be nice to share properties between Cake and MSBuild.
Gary Ewan Park
@gitfool I have enabled GitHub Packages for one of the projects that I am working on. There are some issues with it that make it a little challenging to use in certain places. I suspect we will enable it for the Cake Repository at some point, but I am still hoping that some of the issues are worked out.
Anyone else seeing issues w/ dynamics and the new (within the last 24h) Microsoft.CSharp 4.7?
Error: Could not load file or assembly 'Microsoft.CSharp, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
The work around is: #addin "nuget:?package=Microsoft.CSharp&version=4.6.0"
Mattias Karlsson
@DTTerastar is this with Cake.CoreCLR, Cake.Tool or Cake.exe? We've got integration tests passing on Mac, Linux and Windows using dynamic

@gep13 ,
Recently, my CI gets failed. when downloading nuget.exe from NuGet feed link. Is this a known issue?

15:10:36 Preparing to run build script...
15:10:36 -Message Trying to find nuget.exe in PATH...
15:10:36 -Message Downloading NuGet.exe...
15:10:37 Could not download NuGet.exe.
15:10:37 At E:\workspace\Trac\DTra\build\build.ps1:148 char:9
15:10:37 + Throw "Could not download NuGet.exe."
15:10:37 + ~~~~~~~~~
15:10:37 + CategoryInfo : OperationStopped: (Could not download NuGet.exe.:String) [], RuntimeException
15:10:37 + FullyQualifiedErrorId : Could not download NuGet.exe.

Mattias Karlsson
Does your build.ps1 look like this one? https://github.com/cake-build/resources/blob/develop/build.ps1
@devlead Yes.


Still getting the so many issues. Refer to the details below.

1st Issue
14:28:38 Running build script...
14:28:39 Analyzing build script...
14:28:39 Processing build script...
14:28:39 Installing tools...
14:29:02 Installing addins...
14:29:02 Downloading and installing Roslyn...
14:29:02 Installing packages (using https://packages.nuget.org/api/v2)...
14:29:02 Cake.exe : Error: The remote name could not be resolved: 'packages.nuget.org'
14:29:02 At line:1 char:1

2nd Issue
13:02:39 [13:02:38] Starting 'nuget-download'...
13:02:39 internal/streams/legacy.js:59
13:02:39 throw er; // Unhandled stream error in pipe.
13:02:39 ^
13:02:39 Error: getaddrinfo ENOTFOUND www.nuget.org www.nuget.org:443
13:02:39 at errnoException (dns.js:50:10)

3rd Issue
11:15:04 Preparing to run build script...
11:15:04 Could not download NuGet.exe.
11:15:04 At C:\ws\Content\build.ps1:147 char:9
11:15:04 + Throw "Could not download NuGet.exe."
11:15:04 + ~~~~~~~~~
11:15:04 + CategoryInfo : OperationStopped: (Could not download NuGet.exe.:String) [], RuntimeException
11:15:04 + FullyQualifiedErrorId : Could not download NuGet.exe.

Please tell me what is the usage of the highlighted lines..
Mattias Karlsson

@vadivel1234 Not being able to resolve 'packages.nuget.org' indicates that something in the environment is blocking not facilitating DNS correctly.

Don't know that internal/streams/legacy.js:59 is, there's no javascript in the default bootstrappers, nor Cake itself.