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 project compile error 'Unable to Resolve .NET SDK version as specified in the global.json...' #220

Closed
DavidWiseman opened this issue Jun 8, 2022 · 1 comment
Assignees
Labels
Completed DEV work completed. To be included in next release if issue is still open.

Comments

@DavidWiseman
Copy link
Collaborator

This occurs if you have a newer version of the SDK installed. global.json specifes version 6.0.101

{
  "sdk": {
    "version": "6.0.101",
    "rollForward": "disable"
  }
}

This file was added for issue #42

Recently this issue occurred following installing Windows updates where it appears that the SDK was upgraded to 6.0.203 (removing 6.0.101 in the process). To fix the issue you need to remove 6.0.203 to allow the installation of 6.0.101. This is painful and potentially frustrating for any new users that want to work on this project.

The only problem building with a newer version of the .NET framework is that it won't have compatibility with the older versions of the NET 6 runtime and will fail silently. This will be less of an issue as more people upgrade their .NET runtime versions.

Also, the github action that builds the project for public release specifies the version of the .NET SDK to use:

      - name: Setup .NET Core
        uses: actions/setup-dotnet@v2
        with:
          dotnet-version: 6.0.101
          include-prerelease: true

Removing the global.json file should improve the developer experience while the public build from the github action will still use version 6.0.101 for the widest compatibility.

@DavidWiseman DavidWiseman self-assigned this Jun 8, 2022
DavidWiseman added a commit to DavidWiseman/dba-dash that referenced this issue Jun 8, 2022
Fix project compile error 'Unable to Resolve .NET SDK version as specified in the global.json...' trimble-oss#220
DavidWiseman added a commit that referenced this issue Jun 8, 2022
Fix project compile error 'Unable to Resolve .NET SDK version as specified in the global.json...' #220
@DavidWiseman DavidWiseman added the Completed DEV work completed. To be included in next release if issue is still open. label Jun 8, 2022
@DavidWiseman
Copy link
Collaborator Author

Confirmed compatibility with 6.0.0 runtime is still maintained with the removal of global.json when project is built from github action.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Completed DEV work completed. To be included in next release if issue is still open.
Projects
None yet
Development

No branches or pull requests

1 participant