Skip to content

Commit 46d085b

Browse files
authored
Add NServiceBus 10 version of the Templates snippets (#7756)
* Add NServiceBus 10 version of the Templates snippets * Tweak the wording around using a specific version * Remove the old version example and add a link to the dotnet new install documentation instead
1 parent c9d98dc commit 46d085b

File tree

8 files changed

+49
-9
lines changed

8 files changed

+49
-9
lines changed

Snippets/Templates/Templates.sln

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Templates_5", "Templates_5\
1414
EndProject
1515
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Templates_6", "Templates_6\Templates_6.csproj", "{62E80798-6D4F-4C19-9CDE-637C131179D1}"
1616
EndProject
17+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Templates_7", "Templates_7\Templates_7.csproj", "{88E6814B-FE78-495C-B307-281F365D84BB}"
18+
EndProject
1719
Global
1820
GlobalSection(SolutionConfigurationPlatforms) = preSolution
1921
Debug|Any CPU = Debug|Any CPU
@@ -44,6 +46,10 @@ Global
4446
{62E80798-6D4F-4C19-9CDE-637C131179D1}.Debug|Any CPU.Build.0 = Debug|Any CPU
4547
{62E80798-6D4F-4C19-9CDE-637C131179D1}.Release|Any CPU.ActiveCfg = Release|Any CPU
4648
{62E80798-6D4F-4C19-9CDE-637C131179D1}.Release|Any CPU.Build.0 = Release|Any CPU
49+
{88E6814B-FE78-495C-B307-281F365D84BB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
50+
{88E6814B-FE78-495C-B307-281F365D84BB}.Debug|Any CPU.Build.0 = Debug|Any CPU
51+
{88E6814B-FE78-495C-B307-281F365D84BB}.Release|Any CPU.ActiveCfg = Release|Any CPU
52+
{88E6814B-FE78-495C-B307-281F365D84BB}.Release|Any CPU.Build.0 = Release|Any CPU
4753
EndGlobalSection
4854
GlobalSection(SolutionProperties) = preSolution
4955
HideSolutionNode = FALSE

Snippets/Templates/Templates_4/usage.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
11
# startcode install
22
// install latest version
33
dotnet new install ParticularTemplates
4-
5-
// or when needing an older version
6-
dotnet new install ParticularTemplates::4.1.0
74
# endcode
85

9-
106
# startcode scadapterservice-usage
117
dotnet new scadapterwinservice --name MyAdapter
128
# endcode

Snippets/Templates/Templates_5/usage.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
# startcode install
22
// install latest version
33
dotnet new install ParticularTemplates
4-
// or when needing an older version
5-
dotnet new install ParticularTemplates::5.0.1
64
# endcode
75

86
# startcode endpointdefault

Snippets/Templates/Templates_6/usage.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
# startcode install
22
// install latest version
33
dotnet new install ParticularTemplates
4-
5-
// or when needing an older version
6-
dotnet new install ParticularTemplates::6.4.0
74
# endcode
85

96
# startcode endpointdefault
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
<PropertyGroup>
3+
<TargetFramework>net10.0</TargetFramework>
4+
</PropertyGroup>
5+
<ItemGroup>
6+
<PackageReference Include="ParticularTemplates" Version="7.0.0-alpha.1" />
7+
</ItemGroup>
8+
</Project>

Snippets/Templates/Templates_7/prerelease.txt

Whitespace-only changes.
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# startcode install
2+
// install latest version
3+
dotnet new install ParticularTemplates
4+
# endcode
5+
6+
# startcode endpointdefault
7+
dotnet new nsbendpoint --name MyEndpoint [options]
8+
dotnet sln add "MyEndpoint/MyEndpoint.csproj"
9+
# endcode
10+
11+
# startcode endpointhelp
12+
dotnet new nsbendpoint --help
13+
# endcode
14+
15+
# startcode handlerdefault
16+
dotnet new nsbhandler --name ClassName --messagetype MyMessage
17+
# endcode
18+
19+
# startcode handlerhelp
20+
dotnet new nsbhandler --help
21+
# endcode
22+
23+
# startcode sagadefault
24+
dotnet new nsbsaga --name ClassName --messagetype1 Message1 --messagetype2 Message2
25+
# endcode
26+
27+
# startcode sagahelp
28+
dotnet new nsbsaga --help
29+
# endcode
30+
31+
# startcode docker-build
32+
docker build -f Dockerfile -t MyEndpoint ./..
33+
#endcode

nservicebus/dotnet-templates/index.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ Install using the following command:
2121

2222
snippet: install
2323

24+
If a specific version is needed, follow the guidance in the [dotnet new install documentation](https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-new-install#examples).
25+
2426
partial: nsbendpoint
2527
partial: nsbhandler
2628
partial: nsbsaga

0 commit comments

Comments
 (0)