-
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
SdkAssemblyResolver fails to pick up .NET 6.0 #2618
Comments
Correct, the runtime version <> the sdk version. What you should probably do is take the most up-to-date folder there that matches the same major and minor as the runtime version, though. If you want to be 100% accurate, you would have to parse and use the releases.json manifests and map the runtime version you have to the SDKs that shipped that runtime version. MS has a library to do this here |
As @baronfel pointed out, the runtime version is not the same as SDK version. This is why we have used @baronfel Do you have a link or a sample for that package? I cannot find any documentation for it |
it's public but not entirely documented, the library is essentially a typed wrapper around the contents of the releases.json file, one of which is generated for each major revision of the .NET SDK/Runtime. Also the Releases Index, which points to tons of these. |
|
I'm also seeing the same error after updating to fake-cli 5.21.0-alpha003. Here's my
And here's the framework description I'm getting:
There is discussion around this issue in dotnet/runtime#61394. They say it won't be fixed until 6.0.1. |
Same on windows:
dotnet info:
|
Same problem |
I tried to play with Please let me know if you have any feedback or comments about the approach. Thanks |
@yazeedobaid Just to be sure, does |
@Arshia001 yes it fetches the releases index and releases JSONs.
|
Nice progress @yazeedobaid 👍🏻 |
@yazeedobaid there are a few points to consider here, I'll try go over them one by one:
All in all, I believe this change will likely ruin someone's day. Isn't there anything we could do to use Directory.GetDirectiories(dotnet6ReferenceAssembliesPath </> "packs" </> "Microsoft.NETCore.App.Ref"
|> Seq.filter (fun dir -> RuntimeInformation.FrameworkDescription.Contains(Path.GetFileName(dir)) I don't know how beta versions of DotNet are named, so I don't know if it'll work. |
Thanks, @Arshia001 for raising these points.
Using Currently, I have these two approaches - if anyone has other ideas, please let us know:
If anyone has any other options/suggestions please let us know. |
Any progress on getting this released so people's builds work again? :) |
Any news of this being resolved any time soon? |
A potential resolution to the question of runtime resolution that might strike a good-enough balance is to download and cache the runtime lists as a build task in this repo, so that there's a fallback for situations where network connectivity cannot be guaranteed. This local copy would need to be updated on a periodic basis, but FAKE has a good release pipeline, and that should be a low-overhead activity. Say something on the order of a monthly or every-other-month release cadence would be good enough to ensure decent coverage of updates to this file. |
@dsyme any chance to get this moving somehow? it's hard to convince people to keep on using FAKE if it doesn't support .NET 6, some of the projects are moving away from it so they can continue working |
@CumpsD others, like us, are stuck on .NET 5. |
For those who are stuck on upgrades, consider using a standalone console application with the FAKE library APIs instead of the runner. An example of this can be seen here: https://github.com/TheAngryByrd/MiniScaffold/tree/master/Content/Library/build |
Or you can just run your fake scripts with fsi. Example: |
Thanks, I went with this solution and can build again :) |
@yazeedobaid What's status on this please, thank you |
@dsyme I didn't get the chance to continue working on it in the last couple of weeks Thanks |
I have merged the PR and published a new alpha release Thanks |
I have opened a new PR that addresses the possibility that accessing the network is not an option to resolve the runtime version for the selected SDK. The PR implements a fallback method to use a cached file that is created as a step in FAKE's build script. feedback is highly appreciated on the PR Thanks |
The fix for this issue is included in release 5.21.0 Thanks |
@yazeedobaid It's been a while, but I'm getting an error that seems related to this issue. I have .NET SDK versions 6.0.201 and 6.0.203 installed on a computer. This corresponds to runtime versions 6.0.3 and 6.0.5 respectively as per https://dotnet.microsoft.com/en-us/download/dotnet/6.0. However, the FAKE runner tries to access reference assemblies for version 6.0.2, which it cannot find and fails. Here's some output:
|
A new alpha release of the FAKE runner has been published now. Please test with that since we had a PR that fix the SDK runtime resolution logic. |
Description
Testing out
5.21.0-alpha001
I get this error withfake-cli
It seems https://github.com/fsprojects/FAKE/blob/release/next/src/app/Fake.Runtime/SdkAssemblyResolver.fs#L41-L42 isn't a reliable way to determine the version, at least on macOS.
For reference this is what is in my folder:
Repro steps
Wanted to report this first. Not sure if this is wider spread or just on macOS as of yet.
Expected behavior
Picks up 6.0.0 sdk
Actual behavior
Picks up
6.0.0-rtm.21522.10
sdkKnown workarounds
unknown
Related information
The text was updated successfully, but these errors were encountered: