Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compatibility with Cake 0.18 #15

Closed
gillesmeyer opened this issue Mar 8, 2017 · 9 comments
Closed

Compatibility with Cake 0.18 #15

gillesmeyer opened this issue Mar 8, 2017 · 9 comments
Milestone

Comments

@gillesmeyer
Copy link

gillesmeyer commented Mar 8, 2017

Hello,

Since yesterday's update of Cake to 0.18 I get the following error when I reference Cake.Json add-in:

Error: The assembly 'Cake.Json, Version=1.0.6059.1381, Culture=neutral, PublicKeyToken=null' is referencing an older version of Cake.Core (0.7.0). This assembly need to reference at least Cake.Core version 0.16.0. Another option is to downgrade Cake to an earlier version.

A temporary workaround is to downgrade Cake's version to 0.17 in tools/packages.config.

Any idea of what the problem can be?

@jamesrcounts
Copy link

jamesrcounts commented Mar 9, 2017

I was able to do the temporary workaround by opening ${solutiondir}/tools/packages.config, and changing the version to 0.17. Saved, ran cake again and it seems to be building normally now.

@pascalberger
Copy link
Member

Latest version (1.0.2.13) is built against Cake 0.17 and this shouldn't be an issue anymore

@fleed
Copy link

fleed commented Sep 14, 2017

I'm experiencing the same problem with version 0.22.0.
Any plan to update the package?

@gillesmeyer
Copy link
Author

I confirm this is happening again with Cake version 0.22.0

@pascalberger
Copy link
Member

To avoid breaking build you should pin cake and also any addins to specific versions. See here. Cake 0.22.0 introduced known breaking changes which requires addins to be recompiled

@gillesmeyer
Copy link
Author

Thanks for the tip ! This is what I ended up doing.

@Aleksanderis
Copy link

Aleksanderis commented Sep 15, 2017

Actually issue became a little bit more complicated now. Some plugins (like Cake.Npm) are already updated with Cake 0.22.0 support, as the result - they stopped to work with older versions of Cake. Of course you can manipulate with versions and try to workaround it with using specific versions of Cake and its' plugins. However how it works by default - it just unexpectedly started to fail for me on our nightly CI builds.

I took some action and made a PR to update Cake.Json with Cake 0.22.0 support - #22 (actually had to convert Cake.Json to .NET Core/.NET Standard).
Would be good if author reviewed it and approved if everything is OK.

@pascalberger
Copy link
Member

@Aleksanderis Besides pinning Cake you should also pin your addin versions since otherwise they can break your build anytime, or any addin can introduce some incompatibilities with either core Cake or any other addin. If you do this you can wait until all addins you're using are updated to Cake 0.22 and then update Cake / Addins in a controlled way. This is the recommended way to avoid this situation.

If you further want to reduce the risk of having your build break unexpectedly, you should also avoid dependencies on any internet resources (like the Cake website or nuget.org) by eg using a company internal cache for providing the packages.

@Aleksanderis
Copy link

@pascalberger , I know, everything is fine. It wasn't that something critical was broken. I just mentioned how it might happen "by default".;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants