C# templates for easily creating new actionETL
applications, as well as adding the library to an existing application.
The templates support .NET Framework, .NET Standard, .NET Core, and .NET 5, as well as both Windows and Linux.
Install .NET Core SDK
If a .NET Core SDK (v2.1 or later) is not already installed on your development computer,
please Install the .NET Core SDK.
This provides the
dotnet new command line tool, which is used to manipulate
the templates (including for .NET Framework).
Install actionETL Templates
The actionETL templates reside in the actionETL.templates.dotnet NuGet package on nuget.org, and must be installed (once) by each developer, before the templates can be applied. You can also use the same command to update the template to the most recent version:
dotnet new --install actionETL.templates.dotnet
You can list the locally installed templates, which should now include two actionETL templates:
dotnet new --list
Templates Short Name Language Tags --------- ---------- -------- ---- Console Application console [C#], F#, VB Common/Console (...) actionETL C# console project actionetl.console [C#] actionETL/Console/ETL actionETL C# add to project actionetl.addtoproject [C#] actionETL/ETL (...)
Use actionETL Templates
You can now use the installed templates described below.
Apart from the below command line approach, you can also use the actionETL templates in Visual Studio 2019 v16.9 or later by following these instructions.
Use this template to create a new .NET Core 3.1 project actionETL console project from scratch, taking its name from the output directory:
dotnet new actionetl.console --output my-etl
To build and run the project:
cd my-etl dotnet run
The generated code is the same as the
a simple worker system with a single worker. Use it as a starting point for
your own actionETL development.
To list target framework options (and general help text):
dotnet new actionetl.console --help
Usage: new [options] Options: -h, --help Displays help for this command. -l, --list Lists templates containing the specified name. If no name is specified, lists all templates. -n, --name The name for the output being created. If no name is specified, the name of the current directory is used. -o, --output Location to place the generated output. -i, --install Installs a source or a template pack. -u, --uninstall Uninstalls a source or a template pack. --nuget-source Specifies a NuGet source to use during install. --type Filters templates based on available types. Predefined values are "project", "item" or "other". --dry-run Displays a summary of what would happen if the given command line were run if it would result in a template creation. --force Forces content to be generated even if it would change existing files. -lang, --language Filters templates based on language and specifies the language of the template to create. --update-check Check the currently installed template packs for updates. --update-apply Check the currently installed template packs for update, and install the updates. actionETL console project (C#) Author: Envobi Ltd Options: -f|--framework The target framework for the project. net461 - Target .NET Framework 4.6.1 net462 - Target .NET Framework 4.6.2 net47 - Target .NET Framework 4.7 net471 - Target .NET Framework 4.7.1 net472 - Target .NET Framework 4.7.2 net48 - Target .NET Framework 4.8 netcoreapp2.1 - Target .NET Core 2.1 netcoreapp2.2 - Target .NET Core 2.2 netcoreapp3.0 - Target .NET Core 3.0 netcoreapp3.1 - Target .NET Core 3.1 net5.0 - Target .NET 5.0 Default: netcoreapp3.1
To instead create a .NET Framework 4.6.1 project:
dotnet new actionetl.console --output my-etl --framework net461
This template uses the new SDK project file format. To instead get a (.NET Framework) non-SDK style project file, use the Microsoft "console" template to create a new project, and then apply the below actionetl.addtoproject template to that project.
Use this template to add actionETL to an existing (non-actionETL) project:
dotnet new actionetl.addtoproject --output my-project
The created code is similar to the
but is wrapped in an
Etl static class that runs the worker system.
For this template, you must also perform these manual steps:
In Visual Studio, set the properties of the files "actionetl.aconfig.json", "actionetl.license.json" "nlog.config" to be 'Content' and 'Copy If Newer'.
Alternatively, edit the "*.csproj" file directly and add:
<ItemGroup> <Content Include="actionetl.aconfig.json"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="actionetl.license.json"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="nlog.config"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> </ItemGroup>
Also see the "Etl.cs" file which includes the worker system code and an example of how to call it from the rest of your application.
Furthermore, as an optional step if this is a batch application without low-latency requirements, you can improve dataflow performance by configuring memory settings, please see the instructions at .NET Run-time Settings.