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

Cake.GitVersioning v3.6+ doesn't support Cake v2.x anymore #934

Closed
kapsiR opened this issue May 2, 2023 · 7 comments · Fixed by #938
Closed

Cake.GitVersioning v3.6+ doesn't support Cake v2.x anymore #934

kapsiR opened this issue May 2, 2023 · 7 comments · Fixed by #938
Milestone

Comments

@kapsiR
Copy link
Contributor

kapsiR commented May 2, 2023

Could not load <...>\Addins\Cake.GitVersioning.3.6.128\lib\net6.0\Cake.GitVersioning.dll (missing Cake.Core, Version=3.0.0.0, Culture=neutral, PublicKeyToken=null))

Is this an intended change in v3.6 (3.6.99-alpha+56b1dacf89)? I couldn't find anything regarding it in the release notes...

@Sam13
Copy link

Sam13 commented May 2, 2023

Similar issue here:

Nerdbank.GitVersioning.Inner.targets(17, 5): [MSB4062] The "Nerdbank.GitVersioning.Tasks.GetBuildVersion" task could not be loaded from the assembly C:\Users\USER\.nuget\packages\nerdbank.gitversioning\3.6.128\build\MSBuildCore/Nerdbank.GitVersioning.Tasks.dll. Could not load file or assembly 'System.Runtime.Loader, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified. Confirm that the <UsingTask> declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask.

Seems to work when SDK in globals.json is .NET 6 or above but e.g. not with .NET Core 3.1

@KalleOlaviNiemitalo
Copy link

The .NET Core 3.1 target framework was removed from Nerdbank.GitVersioning.Tasks in 49ff64c. According to .NET and .NET Core Support Policy, Microsoft stopped supporting .NET Core 3.1 on December 13, 2022.

I don't know how the Cake dependency change was decided. According to Security Policy, Cake 2.x.x is still supported.

@kapsiR
Copy link
Contributor Author

kapsiR commented May 2, 2023

To clarify, for me it's more of a documentation issue rather than an issue of the addin itself.
Pinning the version of an addin is recommended and avoids issues with updated packages in CI.

If such changes are reflected in the release notes or with a major version upgrade, this should be ok I think.

@AArnott
Copy link
Collaborator

AArnott commented May 2, 2023

Thank you for the feedback. I've updated the release notes.

I'm not a Cake user myself, so my acceptance of the Dependabot PR to upgrade the reference assembly was made somewhat ignorantly of how it would likely impact users. Would Cake v3 users be able to use NB.GV if it were compiled against Cake v2?

@kapsiR
Copy link
Contributor Author

kapsiR commented May 2, 2023

Would Cake v3 users be able to use NB.GV if it were compiled against Cake v2?

Maybe I find some time tonight to check this...

@AArnott
Copy link
Collaborator

AArnott commented May 10, 2023

I'm about to release a servicing fix for 3.6 and would like to close this issue as part of that. @kapsiR how is that testing coming? Should I downgrade to referencing Cake v2 again?

@AArnott AArnott added this to the v3.6 milestone May 10, 2023
@kapsiR
Copy link
Contributor Author

kapsiR commented May 10, 2023

Sorry for the delay, my time in the evening is very limited at the moment...

As of my tests, it seems to work with a warning (Cake v3.0.0 and Cake.GitVersioning built with Cake.Core v2.3.0):

The assembly 'Cake.GitVersioning, Version=3.7.6.38638, Culture=neutral, PublicKeyToken=null'
is referencing an older version of Cake.Core (2.3.0).
For best compatibility it should target Cake.Core version 3.0.0.

kapsiR added a commit to kapsiR/Nerdbank.GitVersioning that referenced this issue May 10, 2023
This fixes a regression of 3.6.99-alpha+56b1dacf89, Cake v2.x wasn't supported anymore

Fixes dotnet#934
AArnott pushed a commit to kapsiR/Nerdbank.GitVersioning that referenced this issue May 11, 2023
This fixes a regression of 3.6.99-alpha+56b1dacf89, Cake v2.x wasn't supported anymore

Fixes dotnet#934
@AArnott AArnott closed this as completed May 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants