ServiceControl Transport Adapter Template

Project Hosting
NuGet Package NServiceBus.Template.TransportAdapter.WindowsService (1-pre)
This page targets a pre-release version and is subject to change prior to the final release.

The Transport Adapter dotnet new template makes it easier to create a Windows Service host for the Transport Adapter.


Install using the following:

dotnet new --install NServiceBus.Template.TransportAdapter.WindowsService::1.0.1-alpha*


The template can then be used via the following.

dotnet new sc-adapter-service --name MyAdapter

This will create a new directory named MyAdapter containing a windows service .csproj also named MyAdapter.

To add to an existing solution:

dotnet new sc-adapter-service --name MyAdapter
dotnet sln add "MyAdapter/MyAdapter.csproj"

dotnet new information

dotnet new is still in preview. As such expect to suffer some friction due to bugs, lacking or incorrect documentation and the changing nature of the features and APIs.

Command execution

The dotnet command line operations can be executed from within any Console and the Visual Studio 2017 Developer Command Prompt.

Reference material

List installed templates

To list the currently installed templates run dotnet new with no parameters

Template install

Where [TemplatePackageName] is the name of the NuGet package that contains the template and [Version] is a NuGet version number.

dotnet new --install [TemplatePackageName]::[Version]

The wildcard * can be used to target the current released version.

dotnet new --install [TemplatePackageName]::*

This command is currently in preview and not documented.

Install Location

The downloaded NuGets are cached on on disk at:


With the list of installed templates listed in:


Template uninstall

There is currently no method for uninstalling a specific template. The current hack recommended by Microsoft is to use reset the installed templates to default list using:

dotnet new --debug:reinit

Related Articles

Last modified