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

Fix tool when using under .NET 6 for real this time. #28210

Closed
wants to merge 1 commit into from

Conversation

AraHaan
Copy link
Member

@AraHaan AraHaan commented Jun 12, 2022

After trying the current preview tool as I must use the preview EFCore builds with .NET 6 due to reasons I cannot control. I still had the tool be broken even with the roll forward. As such I have discovered the reason for this is because of the fact that for some reason even roll forward did not properly tell it how to run as if the tool were compiled for .NET 6. As such the tool had to be patched to change .NET Core 2.0 to .NET 6 in order to get it to work.

Fixes #27660 (comment).

  • I've read the guidelines for contributing and seen the walkthrough
  • I've posted a comment on an issue with a detailed description of how I am planning to contribute and got approval from a member of the team
  • The code builds and tests pass locally (also verified by our automated build checks)
  • Commit messages follow this format:
        Summary of the changes
        - Detail 1
        - Detail 2

        Fixes #bugnumber
  • Tests for the changes have been added (for bug fixes / features) No need, this just fixes the tool to run with only the .NET 6 SDK and runtime installed. For some reason my previous PR that only changed RollForward was not enough.
  • Code follows the same patterns and style as existing code in this repo

After trying the current preview tool as I must use the preview EFCore builds with .NET 6 due to reasons I cannot control. I still had the tool be broken even with the roll forward. As such I have discovered the reason for this is because of the fact that for some reason even roll forward did not properly tell it how to run as if the tool were compiled for .NET 6. As such the tool had to be patched to change .NET Core 2.0 to .NET 6 in order to get it to work.

Fixes dotnet#27660 (comment).
@ajcvickers
Copy link
Member

@AraHaan Dropping netcoreapp2.0 is not something we can currently do.

@AraHaan
Copy link
Member Author

AraHaan commented Jun 20, 2022

I guess an option could be to check the .NET SDK's version to see if it's 6.0.xxx and if so, use the .NET 6 target of the tool, else use netcoreapp2.0 (if not .NET Framework). However it would require an additional dependency.

@ajcvickers
Copy link
Member

Closing as this isn't something we plan to do at this time.

@ajcvickers ajcvickers closed this Jun 24, 2022
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 this pull request may close these issues.

FileLoadException: System.Runtime v6.0.0 when using scaffolder with latest dotnet-7 feed dotnet-ef tool.
2 participants