Fake not installed by nuget
I have the following build script:
@echo off
cls
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:
- before_build.cmd
build_script:
- 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.
Comments are currently closed for this discussion. You can start a new one.
Keyboard shortcuts
Generic
? | 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
Support Staff 1 Posted by Feodor Fitsner on 18 Dec, 2014 02:27 AM
What do you mean by "upgraded Fake" - updated it in your repo?
2 Posted by halcwb on 18 Dec, 2014 08:36 AM
Yes, using an updated version of Fake. Shouldn't make a difference. The build script wasn't touched.
Support Staff 3 Posted by Feodor Fitsner on 18 Dec, 2014 08:44 AM
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 Posted by halcwb on 18 Dec, 2014 11:45 AM
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.
Support Staff 5 Posted by Feodor Fitsner on 18 Dec, 2014 04:07 PM
It's in the PATH already.
-Feodor
Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 01:53 AM.