You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Alternatively if you're creating multiple projects we recommend installing the **x** dotnet tool which can create every project template:
9
-
10
-
:::sh
11
-
dotnet tool install --global x
12
-
:::
13
-
14
8
### Empty Projects
15
9
16
10
There are a few different ways you can create empty ServiceStack projects ordered by their level of emptiness.
17
11
18
12
To write a minimal .NET 8 Web App to your current directory, [mix](/mix-tool) in the **[init](https://gist.github.com/gistlyn/8026c4c2a7202b99885539109145e12b)** gist files to your current directory:
19
13
20
14
:::sh
21
-
x mix init
15
+
npx add-in init
22
16
:::
23
17
24
18
To create an empty Single Project Template solution use the [empty](https://github.com/NetCoreTemplates/empty) template:
25
19
26
20
:::sh
27
-
x new empty ProjectName
21
+
npx create-net empty ProjectName
28
22
:::
29
23
30
24
To create an empty 4 Project solution that adopts ServiceStack's [recommended project structure](/physical-project-structure), use the [web](https://github.com/NetCoreTemplates/web) template:
31
25
32
26
:::sh
33
-
x new web ProjectName
27
+
npx create-net web ProjectName
34
28
:::
35
29
36
30
:::info
@@ -42,13 +36,13 @@ You can omit the **ProjectName** in all above examples to use the **Directory**
42
36
Like C# **init** there's also **[init-fsharp](https://gist.github.com/gistlyn/3008acbe218fbcfb8278853825cc7ea3)** gist to create an empty F# Web App:
43
37
44
38
:::sh
45
-
x mix init-fsharp
39
+
npx add-in init-fsharp
46
40
:::
47
41
48
42
### Empty VB .NET Template
49
43
50
44
And **[init-vb](https://gist.github.com/gistlyn/6e0677825059822fbaffec123403bf38)** to create an empty VB .NET Web App:
Copy file name to clipboardExpand all lines: MyApp/_pages/web-new.md
+9-19Lines changed: 9 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -83,7 +83,7 @@ protected Pages and Services and auth redirect flow to Sign In and Forbidden pag
83
83
84
84

85
85
86
-
$ x new angular-spa ProjectName # .NET Core
86
+
$ x new angular-spa ProjectName # .NET 10
87
87
$ x new angular-spa-netfx ProjectName # Classic ASP.NET on .NET Framework
88
88
89
89
#### mvcauth
@@ -92,16 +92,15 @@ protected Pages and Services and auth redirect flow to Sign In and Forbidden pag
92
92
93
93

94
94
95
-
$ x new mvcauth ProjectName # .NET Core
95
+
$ x new mvcauth ProjectName # .NET 10
96
96
97
97
#### razor
98
98
99
99
> ServiceStack.Razor Bootstrap Website
100
100
101
101

102
102
103
-
$ x new razor ProjectName # .NET Core
104
-
$ x new razor-corefx ProjectName # ASP.NET Core on .NET Framework
103
+
$ x new razor ProjectName # .NET 10
105
104
$ x new razor-netfx ProjectName # Classic ASP.NET on .NET Framework
106
105
107
106
#### react-spa
@@ -110,7 +109,7 @@ protected Pages and Services and auth redirect flow to Sign In and Forbidden pag
110
109
111
110

112
111
113
-
$ x new react-spa ProjectName # .NET Core
112
+
$ x new react-spa ProjectName # .NET 10
114
113
$ x new react-spa-netfx ProjectName # Classic ASP.NET on .NET Framew
115
114
116
115
#### script
@@ -119,8 +118,7 @@ protected Pages and Services and auth redirect flow to Sign In and Forbidden pag
119
118
120
119

121
120
122
-
$ x new script ProjectName # .NET Core
123
-
$ x new script-corefx ProjectName # ASP.NET Core on .NET Framework
121
+
$ x new script ProjectName # .NET 10
124
122
$ x new script-netfx ProjectName # Classic ASP.NET on .NET Framework
125
123
126
124
#### vue-spa
@@ -129,7 +127,7 @@ protected Pages and Services and auth redirect flow to Sign In and Forbidden pag
129
127
130
128

131
129
132
-
$ x new vue-spa ProjectName # .NET Core
130
+
$ x new vue-spa ProjectName # .NET 10
133
131
$ x new vue-spa-netfx ProjectName # Classic ASP.NET on .NET Framework
134
132
135
133
### Create Customized Projects with mix
@@ -139,18 +137,10 @@ All new projects can be further customized with [mix](/mix-tool) dotnet tool to
139
137
140
138
## Why a new project template system?
141
139
142
-
It's not often that a tool causes enough friction that it ends up requiring less effort to develop a replacement than
143
-
it is to continue using the tool. But this has been our experience with maintaining our VS.NET Templates in the
144
-
[ServiceStackVS](https://github.com/ServiceStack/ServiceStackVS) VS.NET Extension which has been the biggest time sink of all our
145
-
3rd Party Integrations where the iteration time to check in a change, wait for CI build, uninstall/re-install the VS.NET extension
146
-
and create and test new projects is measured in hours not minutes. To top off the poor development experience we've now appeared to have
147
-
reached the limits of the number of Project Templates we can bundle in our 5MB **ServiceStackVS.vsix** VS.NET Extension as a
148
-
number of Customers have reported seeing VS.NET warning messages that ServiceStackVS is taking too long to load.
140
+
It's not often that a tool causes enough friction that it ends up requiring less effort to develop a replacement than it is to continue using the tool. But this has been our experience with maintaining our VS.NET Templates in the [ServiceStackVS](https://github.com/ServiceStack/ServiceStackVS) VS.NET Extension which has been the biggest time sink of all our 3rd Party Integrations where the iteration time to check in a change, wait for CI build, uninstall/re-install the VS.NET extension and create and test new projects is measured in hours not minutes. To top off the poor development experience we've now appeared to have reached the limits of the number of Project Templates we can bundle in our 5MB **ServiceStackVS.vsix** VS.NET Extension as a number of Customers have reported seeing VS.NET warning messages that ServiceStackVS is taking too long to load.
149
141
150
142
Given all the scenarios ServiceStack can be used in, we needed a quicker way to create, update and test our growing **47 starting project templates**.
151
-
In the age of simple command-line dev tools like git and .NET Core's light weight text/human friendly projects, maintaining and creating
152
-
new .NET project templates still feels archaic & legacy requiring packaging projects as binary blobs in NuGet packages which become stale
153
-
the moment they're created.
143
+
In the age of simple command-line dev tools like git and .NET Core's light weight text/human friendly projects, maintaining and creating new .NET project templates still feels archaic & legacy requiring packaging projects as binary blobs in NuGet packages which become stale the moment they're created.
154
144
155
145
## How it works
156
146
@@ -185,7 +175,7 @@ Best of all creating and testing projects are now much easier since project temp
185
175
that when a new project is created with:
186
176
187
177
```shell
188
-
$ x new <template> ProjectName
178
+
$ x new <template> ProjectName
189
179
```
190
180
191
181
Replaces all occurrences in all text files, file and directory names, where:
0 commit comments