FarNet.template
6.0.0
Prefix Reserved
dotnet new install FarNet.template::6.0.0
FarNet.template
FarNet module and script template for C# and F# projects
With .NET SDK 9.0 installed with Visual Studio or manually, the easiest way to
create module and script projects for FarNet is using FarNet.template
NuGet.
Projects created from the template can be used for development and debugging in Visual Studio and VSCode.
To install the FarNet template from NuGet, run:
dotnet new install FarNet.template
Take a look at all templates:
dotnet new list
The list should contain "FarNet module" and "FarNet script":
Template Name Short Name Language Tags
------------- ------------- -------- -------------
FarNet module farnet-module [C#],F# FarNet/Module
FarNet script farnet-script [C#],F# FarNet/Script
To create a C# (default) or F# module or script project, create a new folder with the new module or script name, change to it, and invoke one of these:
dotnet new farnet-module
dotnet new farnet-script
dotnet new farnet-module --language F#
dotnet new farnet-script --language F#
To uninstall the template, run:
dotnet new uninstall FarNet.template
Created FarNet project
Before opening created projects in Visual Studio or VSCode ensure you have the
environment variable FARHOME
set to the Far Manager home. If it is missing
then the development location C:\Bin\Far\x64
is used, see the project file
and change if needed.
If you build or start Visual Studio or VSCode from Far Manager then the FARHOME variable exists and set to this Far Manager directory.
Visual Studio
The project is ready to use in Visual Studio.
VSCode
Requirements:
- VSCode C# Dev Kit for C# projects and for debugging F# projects.
- VSCode F# extension for F# projects.
Project details
All projects include:
.vscode
launch.json
- VSCode debug settingstasks.json
- VSCode build task
Properties
launchSettings.json
- Visual Studio debug settings
README.md
- documentation filePROJECT_NAME.csproj/fsproj
- project file
Module projects include:
Host.cs/fs
- optional module host and its instanceTool1.cs/fs
- plugin menu item "Hello from PROJECT_NAME"Command1.cs/fs
- command invoked using "PROJECT_NAME:" prefix
Script projects include:
Program.cs/fs
- method invoked byfn: script=PROJECT_NAME; method=.Program.Run
All projects reference FarNet.dll
.
F# projects reference FSharp.Core.dll
and optional FarNet.FSharp.dll
. They
are installed together with the module FarNet.FSharpFar
(really must have if
you develop in F# for Far Manager).
Building
This command is used to build projects:
dotnet build
Alternatively, you may build from Visual Studio or VSCode.
When you build a module project the output goes to FarNet module folder. Ensure Far Manager is not running to avoid files in use.
When you build a script project the output goes to FarNet script folder.
If you test simple methods with unload=true
then you do not have to restart.
Debugging
Press [F5]
to starts debugging in Visual Studio or VSCode.
Debug modes:
- Start Far (Visual Studio, VSCode default mode)
- The build step is called at first and then debugging starts.
Far.exe
should be in the path or you should adjust settings.
- The build step is called at first and then debugging starts.
- Attach single Far (select in VSCode)
- Attach to the already running single
Far.exe
.
- Attach to the already running single
- Attach selected Far (select in VSCode)
- Choose one of the several running
Far.exe
.
- Choose one of the several running
This package has no dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
6.0.0 | 89 | 11/30/2024 |
5.0.0 | 3,220 | 11/19/2023 |
4.0.3 | 404 | 4/8/2023 |
4.0.2 | 465 | 1/2/2023 |
4.0.1 | 364 | 11/19/2022 |
4.0.0 | 322 | 11/19/2022 |
3.0.2 | 465 | 10/18/2022 |
3.0.1 | 457 | 10/13/2022 |
3.0.0 | 424 | 10/8/2022 |
2.2.0 | 494 | 8/25/2022 |
2.0.1 | 475 | 7/31/2022 |
2.0.0 | 457 | 7/19/2022 |
1.3.0 | 476 | 6/11/2022 |
1.2.1 | 435 | 6/10/2022 |
1.2.0 | 427 | 6/10/2022 |
1.1.0 | 444 | 6/3/2022 |
1.0.3 | 489 | 2/12/2022 |
1.0.2 | 2,478 | 12/26/2020 |
1.0.1 | 581 | 12/19/2019 |
1.0.0 | 582 | 12/15/2019 |
0.0.4 | 1,362 | 9/3/2018 |
0.0.2 | 1,215 | 3/23/2018 |
0.0.1 | 975 | 3/19/2018 |
.NET 9.0, FarNet 9.0.0