Fake not installed by nuget

halcwb's Avatar


17 Dec, 2014 09:15 PM

I have the following build script:

@echo off
if not exist "%~dp0\src\packages\FAKE\tools\Fake.exe" "%~dp0\src\.nuget\NuGet.exe" "Install" "FAKE" "-OutputDirectory"       "%~dp0\src\packages" "-ExcludeVersion"
"%~dp0\src\packages\FAKE\tools\Fake.exe" %~dp0\src\build.fsx

and the following yml setup:

  - before_build.cmd

   - nuget restore src\GenPres.sln
  • build.cmd

This was working fine, until I upgraded Fake. Now what happens is that Fake gets installed by the yml directive nuget restore ... But then when I want to get Fake in the path without the version, nuget doesn't do this, because Fake has already been installed (in the path with the version extension). I don't get it why this happens now and not before? The whole packages dir was never in my repos.

  1. Support Staff 1 Posted by Feodor Fitsner on 18 Dec, 2014 02:27 AM

    Feodor Fitsner's Avatar

    What do you mean by "upgraded Fake" - updated it in your repo?

  2. 2 Posted by halcwb on 18 Dec, 2014 08:36 AM

    halcwb's Avatar

    Yes, using an updated version of Fake. Shouldn't make a difference. The build script wasn't touched.

  3. Support Staff 3 Posted by Feodor Fitsner on 18 Dec, 2014 08:44 AM

    Feodor Fitsner's Avatar

    The behaviour looks quite normal. Maybe you upgraded nuget.exe in your .nuget folder?...

    I'd remove FAKE from packages.config, so it's not installed with nuget restore in YAML.

  4. 4 Posted by halcwb on 18 Dec, 2014 11:45 AM

    halcwb's Avatar

    What I did was:
    1. Migrate to automatic restore in VS instead of the old enabled package restore option
    2. Indeed removed Fake from my installed packages, and only let Fake be restored by the command line script

    And now it all seems to be working again.

    One question, though, do I need to add nuget to my repository or do you have nuget in the PATH variable, it looks like it is because in yaml file you don't need to specify a path.

  5. Support Staff 5 Posted by Feodor Fitsner on 18 Dec, 2014 04:07 PM

    Feodor Fitsner's Avatar

    It's in the PATH already.


  6. Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 01:53 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac