Today in my build I've started getting this error:
Error: The assembly 'Cake.Compression, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' is referencing an older version of Cake.Core (0.14.0). This assembly need to reference at least Cake.Core version 0.16.0. Another option is to downgrade Cake to an earlier version.
This was also the day Cake 0.18 was released so I am guessing this is the cause.
Which raises an interesting question: should the default bootstrappers for cake use "dynamic" versions of binaries? Currently the build.ps1 that I have (which I must have copied from the cake repo) goes and gets cake.exe from here http://cakebuild.net/download/bootstrapper/packages which appears to be a nuget feed with just the latest package version in it.
Seems to me that once happy cake users get their build scripts working, I expect the majority of them wouldn't want any breaking changes to come their way unless they opted in? Obviously some might, but seems a safe default would be more sensible to me.
Opinions?
Well the idea is that you commit packages.config to your repo and by doing so you pin the version of Cake being used.
See https://github.com/cake-build/example
Only thing committed in tools is packages.config
Build.ps1/build.sh will do a md5 check on packages.config and if it changes clear tools and update cake.
Is there a way to specify a different cake.exe version without using packages.config?
Yes, you could specify the version parameter to nuget install command.
You can see an example of that here
https://github.com/cake-build/cake/blob/develop/build.ps1#L105-L112
I'm going to close this issue as resolved now, please reopen if you have any further questions.
Most helpful comment
Well the idea is that you commit packages.config to your repo and by doing so you pin the version of Cake being used.