Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 16:16
    kvdrrrrr starred cake-build/cake
  • 14:11
    nmbro commented #2613
  • 12:55
    mholo65 commented #2606
  • 11:12
    kjjuno commented #2613
  • 11:09
    pritchums commented #2606
  • 10:23
    nmbro opened #2613
  • 01:27
    Build #5422 passed
  • 01:22
    kcamp opened #2612
  • Aug 21 18:22
    kcamp commented #2610
  • Aug 21 18:18
    devlead commented #2610
  • Aug 21 18:18
    devlead labeled #2610
  • Aug 21 18:18
    devlead milestoned #2610
  • Aug 21 18:18
    devlead assigned #2610
  • Aug 21 17:55
    kcamp commented #2610
  • Aug 21 17:26
    Kirya522 opened #2611
  • Aug 21 15:42
    lukoerfer opened #2610
  • Aug 21 13:57
    Build #1896 passed
  • Aug 21 13:13
    Build #1895 passed
  • Aug 21 07:27
    xt0rted edited #2609
  • Aug 21 06:48
    devlead commented #2609
Gary Ewan Park
@gep13
@devlead a link to your blog post about some of this would be good as well.
I was half way though writing my message when I saw yours but thought I would send it anyway 😄
John Crim
@johncrim
Fantastic, thank you both.
Mattias Karlsson
@devlead
Modules are easiest bootstrapped through the module directive, https://cakebuild.net/docs/fundamentals/preprocessor-directives#usage-7
Mattias Karlsson
@devlead
mythgarr
@mythgarr
Is there any way to write code that executes only in the context of cake? Something like #if (CAKE_BUILD) ... #endif?
mythgarr
@mythgarr
Conversely, are the standard NETSTANDARD, NETFRAMEWORK and NETCOREAPP symbols omitted? I'd like to be able to use the same file within a test C# project and from a cake script if possible.
Mattias Karlsson
@devlead
Don't think there's a standard define, but you could create one in your build.cake and it'll be available in any script loaded. You define variables using #define directive: https://cakebuild.net/docs/fundamentals/preprocessor-directives#usage-8
Mattias Karlsson
@devlead
Stefan Ossendorf
@StefanOssendorf
Does anyone know why the DotNetCoreBuild command generates a MSB3823 error with .Net Core 3.0 Preview 7 but not with Preview 6? And the "dotnet build <Solution>" cli command works fine.
Gary Ewan Park
@gep13
@StefanOssendorf I don’t think the aliases have been tested with the preview. Would be good to confirm what the complete command being executed by Cake is, to see if there is something that needs to be changed for the preview. You can see the complete command by enabling diagnostic verbosity for Cake.
Stefan Ossendorf
@StefanOssendorf
I'll try that, thanks.
Mattias Karlsson
@devlead
Do you have a global.json pinning your .NET Core SDK version?
Stefan Ossendorf
@StefanOssendorf
No
The global.json file allows you to define which .NET Core SDK version is used
Stefan Ossendorf
@StefanOssendorf
Yeah, but I would like to use the Preview 7 since Preview 6 isn't available (the updates are replacements and not side by side).
@gep13 It's a bit weird. I got the cake diagnostics and I can execute the used dotnet call without problems from a powershell session
Stefan Ossendorf
@StefanOssendorf
Uhm okay. Never mind, I guess? Dunno what I have done but now the "dotnet build <Solution>" commond does not work as well.
Stefan Ossendorf
@StefanOssendorf
I fixed it with adding <GenerateResourceUsePreserializedResources>true</GenerateResourceUsePreserializedResources> to my project.
norgie
@norgie
Hi. We’re experiencing a problem with Cake and NUnit3. Cake version: 0.26.0. NUnit version 3.8 (also tried 3.10). In our NUnit3Settings we have new NUnit3Result { FileName = MakeAbsolute(testResultsFile), Format = "nunit2" }. According to the NUnit documentation “nunit2” is a valid value. However, when we run our tests we get the following error: Unknown result format: nunit2. Removing Format = “nunit2” makes the error disappear, but then we lose the required formatting. Any ideas, pointers, etc?
norgie
@norgie
Downgrading to NUnit 3.6.1 seems to do the trick, but then we get another error probably not related to Cake.
norgie
@norgie
So back to NUnit 3.10.0. Had to install the NUnitV2ResultWriter extension to get NUnit to recognise “nunit2” as a valid format. Jeebuz!
Martin Pritchard
@pritchums
Hello cakers. I've just submitted a couple of PRs to resolve some dotnet core issues I've observed referencing some packages.
I have to apologise for not reading the contributing guide properly, and might have skipped the 'get buy in' step...
henrik eriksson
@henrik_GJ_Esson_twitter
The bootstrapper build.ps1 specify the $Script=build.cake. If I run >build.ps1 -script anotherBuild.cake, the build.ps1 file executes happily the anotherBuild.cake. When I execute through bamboo, I get the error message "Running build script...
More than one build script specified.
For usage, use parameter --help"
Seems like I'm missing something very basic here
Any hints?
Kim J. Nordmo
@AdmiringWorm
@henrik_GJ_Esson_twitter when you are running it through bamboo, how are you calling the build.ps1 script?
Almost sounds like you are using double dashes --script instead of a single (this have usually been the problem for me when I gets those errors).
Joel Ahlgren
@squid-box

A question on tool nuget directives: I need to reference a tool from either a custom NuGet source or a local NuGet file.

The custom source is added by the Cake script, so Cake fails to start due to not being able to resolve the package. Is there some way around this?

On local files: Can I specify a relative path to a file? I've tried but seem unable to figure out where I'm starting out.

Kim J. Nordmo
@AdmiringWorm

the available formats for restoring tools are available here:
https://cakebuild.net/docs/fundamentals/preprocessor-directives#tool-directive

The custom source is added by the Cake script, so Cake fails to start due to not being able to resolve the package. Is there some way around this?

Are you specifiying the url to where the tool is hosted (ie #tool nuget:https://my.custom/api/url/?package=packageName&version=packageVersion)?

On local files: Can I specify a relative path to a file? I've tried but seem unable to figure out where I'm starting out.

I know absolute paths work (like #tool 'nuget:file://C:/path/to/nuget/packages/directory/?package=packageName&version=packageVersion), never tested with relative urls though. But that could work with the same format.

you can also control what nuget sources are using as well: https://cakebuild.net/docs/fundamentals/configuration
Joel Ahlgren
@squid-box

The problem with the NuGet source is that it requires authentication, and our script is run on build servers where we can't really control the globally configured sources (unless we start modifying a lot of our pipelines) - unless I missed something it doesn't seem possible to provide authentication in the #tool directive?

Yes, absolute path works, but is not really useful for my team / build environment to be able to use this tool. I'll keep probing the relative path to see if I can figure out where I am

Kim J. Nordmo
@AdmiringWorm
I see, I am afraid I do not know of a way to use cake nuget sources with authentication required.
Maybe @devlead or @gep13 knows.
henrik eriksson
@henrik_GJ_Esson_twitter
@AdmiringWorm it was how the parameter was called from bamboo. In bambo it was specified in the same manner as target. Which was -target="value", but the script parameter should be called without the equal sign. Using space only.
Kim J. Nordmo
@AdmiringWorm
:+1: glad you got it worked out
Joel Ahlgren
@squid-box
thanks for the help @AdmiringWorm , I ended up just downloading this particular tool manually (in script) and pointing the ToolPath to my custom files instead.
fergushenderson
@fergushenderson
Patrik Svensson
@patriksvensson
Ah! We better rename the project then! Thanks!
Gary Ewan Park
@gep13
We should probably tell the FAKE team as well...
image.png
Stas Ostrovskyi
@stasostrovskyi
@squid-box Did you try to add a NuGet.Config to your repo and specify credentials for the private nuget feed?
ThomasDC
@thomasdc
Hi! I noticed that TFBuildProvider.IsHostedAgent isn't working as expected when you have more than the default build agent (which is named 'Hosted Agent'), we have a second agent named 'Azure Pipelines 2'. When a build is scheduled on that agent, the build script malfunctions.
Brandon Zeeb (Northwoods)
@brandon-zeeb-nw
greetings everyone!
got a cake tool/addin we've published to a private jfrog repository, but when we attempt to use it anywhere Cake complains the Nuget.Resolver couldn't find it. When we take a look at the API URLs it queries, the responses clearly show the Resolver found it
Michael Wolfenden
@michael-wolfenden
So you can use globbing to include multiple files i.e. GetFiles("./src/**/*.{Database,Web}.csproj"). Is there a way to exclude files using the same mechanism i.e. GetFiles("./src/**/*.{!Tests}.csproj") to get all the csproj files except ones ending in Test. If not is there an easy way to do this?
Martin Björkström
@mholo65
@brandon-zeeb-nw is it a Tool or a Addin? How are you installing it? Using #addin or #tool? There are some conventions on locating files inside a addin or tool. Can you see that your addin/tool is installed to the ./tools folder (./tools/Addins/ for addins)?
Martin Björkström
@mholo65

@michael-wolfenden you can use the - operator to remove results. Something like this:
GetFiles(”./src/**/*.csproj”) - GetFiles(”./src/**/*.Tests.csproj”);

(Disclaimer! Typing on phone and might not be 100% accurate)

Michael Wolfenden
@michael-wolfenden
@mholo65 👍
Brandon Zeeb (Northwoods)
@brandon-zeeb-nw
@mholo65 It turns out our JFrog was set to not allow anonymous access, we enabled that temporarily and now we see another issue. The Nuget.Resolver says "Existing packages must be restored before performing an install or update." and we do not see the package in question in tools or tools/Addins. We thought perhaps our repository layout was to blame, but that doesn't seem to be the case. The resolver does log out 3 URLs which when queried in Postman does find our artifact.
where are the internal addin dll conventions documented?