// Use this for IDE support. Not required by FAKE 5. Change "build.fsx" to the name of your script.#load".fake/build.fsx/intellisense.fsx"openFake.CoreTarget.Create"MyBuild"(fun_->printfn"message from MyBuild target")Target.RunOrDefault"MyBuild"

and execute fake run build.fsx. This works for all FAKE 5 modules, just add other nuget Fake.Other.Module prerelease files to the paket.dependencies file.

Please read introduction about Paket for more information about the paket.dependencies file.

Note: This works because by default FAKE 5 searches for a group annotated with the // [ FAKE GROUP ] comment.

This header will reference the paket.dependencies file and the netcorebuild group within.

The last line #load is not required by FAKE 5, however
this way the file can still be edited in editors (after restoring packages initially).
Fake will write an intellisense.fsx file for you importing all required references.

Note that in this scenario the // [ FAKE GROUP ] comment mentioned above is not required.

This has the advantage that your build-script is now "standalone" and no separate paket.dependencies is required.
Fake will generate a build.fsx.lock file with the "locked" dependencies to have reproducable script runs.
If you need to update your dependencies just delete the build.fsx.lock file and run fake again.