You can use any NuGet packages which are compatible with
netcoreapp20, for example all packages targeting
netstandard20 or lower.
Create a new file
paket.dependencies and add the following content
1: 2: 3: 4: 5:
Now you can directly use
open Fake.Core and use the Target module.
For example create a new file
1: 2: 3: 4: 5: 6: 7: 8: 9: 10:
fake run build.fsx. This works for all FAKE 5 modules, just add other
nuget Fake.Other.Module prerelease files to the
Please read introduction about Paket for more information about the
NOTEThis works because by default FAKE 5 searches for a group annotated with the
// [ FAKE GROUP ]comment.
To be more independent from paket infrastructure (stand-alone-scripts and similar situations) there is a way to specify dependencies from within the script itself.
INFOWe use the new syntax specified in FST-1027. However, to be fully compatible with existing tooling and infrastructure make sure to add `//` at the end of the `#r` string. See for details.
To reference a FAKE group explicitely you can put the following at the top of your build script
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.
INFONote that in this scenario the
// [ FAKE GROUP ]comment mentioned above is not required.
To write your build dependencies in-line you can put the following at the top of your
1: 2: 3:
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.
You use the modules as documented in their corresponding help section.
But usually it's:
open Fake.<Namespace>for example
- Using the features