Yet another SdkAssemblyResolver fix #2835
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
After this PR you can build Fake with a computer that has .NET 9 RC installed, without any global.json hacks:
Global.json is for the product itself, not for FAKE, so having to fix it to .NET 6 is bad idea.
SDKAssemblyResolver tries to match the SDK versions (
dotnet --version
) to runtime versions (dotnet --list-runtimes
).There is no product release for .NET9, so the search of runtime of SDK 9.0.100-rc.1.24452.12 never matched.
After this PR, it will say, ok SDK 9.0.100-rc.1.24452.12 not found, let's see what you have in your computer... And then respecting the FAKE_SDK_RESOLVER_CUSTOM_DOTNET_VERSION build with latest found runtime (they are in descending release-order by default). So by default FAKE 6 will build on .NET6 which should be totally fine because FAKE is just a wrapper over other tools like dotnet.exe, so hopefully it can still build .NET8 (and 9) software if you just have the latest dotnet.exe.