-
Notifications
You must be signed in to change notification settings - Fork 587
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
Update assembly-resolver to not hardcode .NET 6.0 #2777
Update assembly-resolver to not hardcode .NET 6.0 #2777
Conversation
17acb92
to
efe34c8
Compare
@Thorium formatting required |
Thanks, done... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to add FAKE_SDK_RESOLVER_CUSTOM_DOTNET_VERSION
to the documentation somewhere?
yes, and probably to the error message! Edit: Added to error message. But there is no documentation for the other environment variables either. |
And update release notes, please |
ef83e75
to
3ea4ae2
Compare
Co-authored-by: Andrii Chebukin <[email protected]>
This should be good now. |
Description
Some workarounds to issue [mentioned in https://github.com//issues/2713]:(#2713 (comment))
The .NET version was for no reason hard-coded to 6.0 and not coming from an environment variable that can be overwritten by the user. There is no reason why Fake needs to be updated every time .NET version updates.
This commit adds new
FAKE_SDK_RESOLVER_CUSTOM_DOTNET_VERSION
which can be used to change the default "6.0" to whatever other version. So you set it to .NET "18.5" if you want.Also, this changes assembly-resolver to use lists instead of single strings:
SdkVersionRaws
SdkVersions
andPaketFrameworkIdentifiers
. The default is still list of single item ["6.0"] to not break any backward-compatibility. However, in many cases the user has multiple NET versions installed in the computer and is just interested of whatever defined in wherever "globals.json" and not what Fake is compiled with. Currently the system just throws build errors, meanwhile user would just want to old VB style on-error-resume-next: "come on, build it now!", e.g. user tries to builds .NET 8 software. So you can define "6.0" and "8.0" and then the assembly-resolver will check what it can find. There are still backward compatible versions kept,SdkVersionRaw
SdkVersion
andPaketFrameworkIdentifier
which just take the first from the list.