Open imranypatel opened 3 years ago
Welcome to the FAKE community! Thank you so much for creating your first issue and therefore improving the project!
I think this is the same issue as I have.
Using the pre-release 5.20.4-alpha.1642 works for me for now.
Unfortunately not for me. And it's a pity that none of the maintainers are responding to these issues.
@halcwb Sorry, I kind of lost motivation for various reasons. Nobody volunteered yet to take over. And to be honest some people prefer the "the build as a project && dotnet run" approach which doesn't have issues like these and might be a way out of this as I guess you are not volunteering to take over.
@matthid. I am sorry to hear this. I do sympathise with your predicament. This is something that happens more often in other really wonderful F# open source projects. It's the burden of maintenance. Unfortunately, I am not really qualified to help you, I am a full time pediatric intensive care doctor who can only work on software projects in spare time.
Doesn't Microsoft or other companies invest any resources to help you? It would be a shame if Fake would just wither away like this.
P.S. I did try to upgrade to the latest Paket in a cloned Fake. But got the same error message, maybe because the bootstrapping of FAKE used the old FAKE version?
P.P.S. Isn't this pull request the solution? https://github.com/fsharp/FAKE/pull/2556.
I get this error without targeting .net50
Paket version 5.257.0
My paket.dependencies says frameworks: net461, netcoreapp3.1, netstandard2.0
...but Paket has itself put net50 to paket.lock in some reference components.
@halcwb Sorry, I kind of lost motivation for various reasons. Nobody volunteered yet to take over. And to be honest some people prefer the "the build as a project && dotnet run" approach which doesn't have issues like these and might be a way out of this as I guess you are not volunteering to take over.
@matthid I have 'upgraded' your issue to the F# forum. Hope you agree, but I think this is quite relevant in general.
If I manually replace from paket.lock
(< net50)
- restriction: >= net50
(>= net50)
...with empty string, then I'm able to run the build.
There has not been any activity in this issue for the last 3 months so it will be closed in 14 days if there is no activity.
How is non-merged PR-fix not any action?
This issue has not been resolved and should be reopened.
@yazeedobaid Note there are many issues which were automatically closed by the auto-closing agent bot which was set up in this repo (I don't know why...)
@yazeedobaid Note there are many issues which were automatically closed by the auto-closing agent bot which was set up in this repo (I don't know why...)
@dsyme Thanks for the note. I have disabled the stable bot in the .NET 6 support PR, in this commit Thanks
I encountered this as well today, here's a twitter convo with @forki indicating Paket supports it but the Paket in FAKE is probably outdated: https://twitter.com/sforkmann/status/1458104833723060226
We do need an update to FAKE fairly soon that either takes out the Paket support, or makes it optional (is there a way to do this?), or brings it up-to-date. FAKE is currently unusable as soon as Paket is used with anything net60.
What about pushing this to nuget? https://github.com/fsprojects/FAKE/blob/release/next/RELEASE_NOTES.md#5205-alpha---2021-11-07
Yes I think we should be pushing it to nuget ASAP - even if it's marked pre-release. @yazeedobaid is looking at the release pipeline I think
We do need an update to FAKE fairly soon that either takes out the Paket support, or makes it optional (is there a way to do this?), or brings it up-to-date. FAKE is currently unusable as soon as Paket is used with anything net60.
I guess it was introduced to be able to reference NuGet packages in the build.fsx files, but now that this has native support, maybe FAKE cli doesn't have to rely on Paket anymore? You won't get the lock file for the script file anymore though, but maybe that's Ok.
Replacing
#I __SOURCE_DIRECTORY__
#r "paket: groupref Build //"
#load @".fake/build.fsx/intellisense.fsx"
#if !FAKE
#r "netstandard"
#endif
with the following
#r "nuget:Fake.Core.Process"
#r "nuget:Fake.Core.Environment"
#r "nuget:Fake.Core.SemVer"
#r "nuget:Fake.Core.Target"
#r "nuget:Fake.DotNet.Cli"
#r "nuget:Fake.DotNet.MSBuild"
#r "nuget:System.Reactive"
#r "nuget:MSBuild.StructuredLogger,2.1.507" // Workaround for issue https://github.com/fsprojects/FAKE/issues/2595
let execContext = Fake.Core.Context.FakeExecutionContext.Create true "" []
Fake.Core.Context.setExecutionContext (Fake.Core.Context.RuntimeContext.Fake execContext)
and running with
dotnet fsi build.fsx
might be a workaround. Just have to figure out how to pass any target arguments into the script.
if https://github.com/fsharp/fslang-suggestions/issues/1144 were implemented using fsi might be a viable solution rather than just a workaround. If you need args for your fsx you can use https://stackoverflow.com/questions/27342987/run-f-script-with-parameters/55719236#55719236
This will probably hit after every new .NET major version release. I almost miss the FSharpTargetsPath. :-D
Paket dependency has been updated, helps this. For future issues: Paket dependency has to be kept up-to-date.
Description
Error while targetting net5.0 framework.
Repro steps
Expected behavior
Build and run project successfully on net5.0
Actual behavior
Producing error:
Known workarounds
Still searching...
Related information
Operating system Windows 10
Version of .Net Core
Version of Paket (5.257.0)
Version of FAKE-CLI (5.20.3)
Version of SATURN.CLI (0.12.1)
Version of F#