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 Addin Built With Wrong .NET Version #94

Closed
crash-dive opened this issue Apr 24, 2017 · 6 comments · Fixed by #95
Closed

Cake Addin Built With Wrong .NET Version #94

crash-dive opened this issue Apr 24, 2017 · 6 comments · Fixed by #95
Labels

Comments

@crash-dive
Copy link
Contributor

The Cake addin is using the wrong version of .NET. Cake currently only supports 4.5 and .NET Standard 1.6 (cake-build/cake#1015)

The current Cake addin is built on 4.5.2 which means Cake cannot load it and you get an error saying "Could not find any assemblies compatible with .NETFramework,Version=v4.5". This may have been caused by this bug cake-build/cake-vs#61 which means that the VS Extension creates addins on that version despite them not working with Cake.

I think the fix is just to downgrade the addin to 4.5. However the rest of the project targets 4.6 so I'm not really sure if that is viable. You could retarget to netstandard 1.6 which is sort of equivalent to 4.6.1, but that is not exactly trivial either.

Has anyone actually tested and run the Cake addin, because I am not sure how it could have ever worked or am I missing something?

@daveaglick
Copy link
Owner

You may be the very first person to use the Cake addin, congrats! 😄

Like most Cake addins, this one merely "shells out" to the Script exe so the .NET version it uses is independent of whatever Scripty itself is using. I suspect it got caught up in recent updates for Roslyn 2.0 which required the rest of Scripty to update. It shouldn't be a problem to switch it back to 4.5 while keeping the rest of Scripty on a more recent version.

@daveaglick daveaglick added the Bug label Apr 24, 2017
@crash-dive
Copy link
Contributor Author

Cool that makes sense. Would you like me to send a pull request to fix it?

@daveaglick
Copy link
Owner

Sure!

@daveaglick
Copy link
Owner

I'll merge the PR as soon as I can and get a new release out for you.

@crash-dive
Copy link
Contributor Author

@daveaglick Do you want me to bump the version info in SolutionInfo.cs and add a new line to the release notes describing the change in version for the cake addin?

I have updated the version on a dev version and if I manually add it to a Cake project everything works fine now. So it was definitely the version mismatch that was causing the issue.

I am also going to update the README to better describe how to use the Cake addin because it still says it is in development which is probably why no one has tried to use it yet!

@daveaglick
Copy link
Owner

Don't worry about the version bump/release notes - I'll take care of those prior to release. Any updates to the readme are greatly appreciated. Thanks again for handling this one!

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

Successfully merging a pull request may close this issue.

2 participants