Closed OnurGumus closed 1 year ago
Welcome to the FAKE community! Thank you so much for creating your first issue and therefore improving the project!
Here you go .NET 7 support is added to the FAKE runner through the update to Paket in 6.0.0-alpha003 release
@yazeedobaid , while it works against .NET 7, it still requires .NET 6 SDK to exist
So I don't think this problem is fixed.
@OnurGumus we are not planning to support .NET 7 in the runner. Currently, it is using .NET 6 since it is the current LTS release. Before this, we supported .NET 6 and NETSTANDARD reference assemblies and we had a lot of issues that we needed to do a workaround to fix them, which led us to drop support for NETSTANDARD in FAKE v6.
If you would like to use .NET 7 reference assemblies for any reason, you can check the alternative ways to use FAKE beside runner in Different ways to run FAKE. An increasingly popular approach to using FAKE is to Run FAKE using a dedicated build project.
I understand but, In either case, doesn't this necessitate both .NET 6 and .NET 7 SDK's to exist in CI/CD or build images? This doesn't sound ideal.
No, other approaches utilize .NET and FSI, so it will use the currently installed .NET SDK you have. The other two approaches use .NET and FSI to resolve the dependencies in the script file, instead of the FAKE runner. Which will parse the Paket section, determine the dependencies, and add the .NET SDK reference assemblies.
Hello @yazeedobaid when I tried the last approach I end up with Unhandled exception. System.Exception: Cannot retrieve 'Fake.Core.Target.ArgResults' as we have no fake context Any ideas?
Second way also won't work failing with /.fake/build.fsx/intellisense_lazy.fsx' doesn't exist and it doesn't/
@OnurGumus for the last approach, you need to create a FAKE execution context in the build script. Like this:
Context.FakeExecutionContext.Create false "build.fsx" []
|> Context.RuntimeContext.Fake
|> Context.setExecutionContext
You can check samples in the docs for that method. For example, in MiniScaffold, these lines
For the second way you also don't need the lazy file, it was for runner and that method doesn't use it, so u can remove that statement.
Same still here: Could not find a suitable .NET 6 runtime version matching SDK version: 8.0.205
@Thorium you can use the second way. That works fine by me. .fsx scripts won't work
Description
Title says all.