cake custom MsBuild path

3.2k Views Asked by At

Maybe simple question however I'm stuck. I try to configure cake script. I'm using the following script

Task("Build")
    .Description("Builds the Solution")
    .Does(() =>
    {
        MSBuild(SOLUTION_FILE, CreateSettings());
    });

MSBuildSettings CreateSettings()
{
    var settings = new MSBuildSettings { Verbosity = Verbosity.Minimal, Configuration = "Debug" };
    settings.WithProperty("DebugType", "pdbonly");
    settings.ToolVersion = MSBuildToolVersion.VS2017;
    return settings;
}

When I execute it. I have the following issue:

========================================
Build
========================================
An error occurred when executing task 'Build'.

I have added MsBuild path to PATH environment but still not working. How can i set custom MsBuild path ?

Thanks

0

There are 0 best solutions below