Skip to content

Tool resolving in Frosting tasks #3038

@pascalberger

Description

@pascalberger

What You Are Seeing?

I can restore a .NET Tool using the Cake.DotNet.Module and then call it in the build context constructor. But when calling the same tool in the Setup or a task an error is thrown:

Error: GitVersion: Could not locate executable.

What is Expected?

It should be possible to call .NET Tools also from setup or tasks.

What version of Cake are you using?

1.0.0-rc0002

Are you running on a 32 or 64 bit system?

64-Bit

What environment are you running on? Windows? Linux? Mac?

Windows

Are you running on a CI Server? If so, which one?

No

How Did You Get This To Happen? (Steps to Reproduce)

  1. Create a new Froasting project and setup the host like this:

    return new CakeHost()
        .UseContext<BuildContext>()
        .UseModule<DotNetToolModule>()
        .UseTool(new Uri("dotnet:?package=GitVersion.Tool&version=5.6.3"))
        .Run(args);
    
  2. Call context.GitVersion(); in the constructor of the BuildContext class

  3. Call context.GitVersion(); in a task

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions