cake-build / bakery

Cake server for code generation and script analysis
https://cakebuild.net/
MIT License
29 stars 14 forks source link

duplicated .cake file #77

Open Meir017 opened 7 years ago

Meir017 commented 7 years ago

Using VsCode 1.17 with C# 1.13.0-beta4

I added the line

#load nuget:https://www.myget.org/F/cake-contrib/api/v2?package=Cake.Recipe&prerelease

in a .cake file.

Running it the first time worked.

After that, I continued to edit the file. When I hit Ctrl+Space to get intellisense I noticed another directory of Cake.Recipe was downloaded.

Before: image

After: image

The complete cake script:

#load nuget:https://www.myget.org/F/cake-contrib/api/v2?package=Cake.Recipe&prerelease

Environment.SetVariableNames();

BuildParameters.SetParameters(context: Context,
                            buildSystem: BuildSystem,
                            sourceDirectoryPath: "./src",
                            title: "Cake.Openshift",
                            repositoryOwner: "cake-contrib",
                            repositoryName: "Cake.Openshift",
                            appVeyorAccountName: "cakecontrib");

BuildParameters.PrintParameters(Context);

ToolSettings.SetToolSettings(context: Context);

Build.RunDotNetCore();

It downloaded another copy of Cake.Recipe only when my cursor was in the method BuildParameters.SetParameters to get more details about more arguments for the method

Then I get the following error: image

bjorkstromm commented 7 years ago

@Meir017 What version of Cake are you running? I'd expect that you are running something earlier than v0.22.0 by looking at how addins/tools are installed.

Bakery uses Cake.NuGet 0.23 to install addins/tools and therefore uses the same conventions as Cake > 0.22.0.

Meir017 commented 7 years ago

package.config:

<?xml version="1.0" encoding="utf-8"?>
<packages>
  <package id="Cake" version="0.19.4" />
</packages>

I tried to install the Cake.Recipe using the latest cake version but it failed because some of the addins require a lower version, the error message said something about a breaking change so I just downgraded the cake version

gep13 commented 7 years ago

@Meir017 we are working on that issue for Cake.Recipe. For now, you can use the skip parameter that is mentioned in the error message.