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

.NET 5 shouldn't be identified as Full Framework or Mono #2859

Closed
devlead opened this issue Sep 20, 2020 · 2 comments
Closed

.NET 5 shouldn't be identified as Full Framework or Mono #2859

devlead opened this issue Sep 20, 2020 · 2 comments
Assignees
Labels
Milestone

Comments

@devlead
Copy link
Member

devlead commented Sep 20, 2020

Currently on a pure .NET 5 environment this code

Information("IsCoreClr: {0}", Context.Environment.Runtime.IsCoreClr);

Will return

IsCoreClr: False

This results in quite a few errors i.e. mono binaries won't execute correctly, and a few other wrong assumptions are made.

Code to be corrected:

if (_isCoreClr == null)
{
_isCoreClr = RuntimeInformation.FrameworkDescription.StartsWith(".NET Core");
}

@devlead devlead added the Bug label Sep 20, 2020
@devlead devlead added this to the v0.38.5 milestone Sep 20, 2020
@devlead devlead self-assigned this Sep 20, 2020
devlead added a commit to devlead/cake that referenced this issue Sep 20, 2020
@devlead
Copy link
Member Author

devlead commented Sep 20, 2020

fixed by #2860

@devlead devlead closed this as completed Sep 20, 2020
@devlead devlead changed the title .NET 5 shouldn't be identfied as Full Framework or Mono .NET 5 shouldn't be identified as Full Framework or Mono Sep 20, 2020
@cake-build-bot
Copy link

🎉 This issue has been resolved in version v0.38.5 🎉

The release is available on:

Your GitReleaseManager bot 📦🚀

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

No branches or pull requests

2 participants