@@ -120,6 +120,23 @@ NUnit 3 Test Item (nunit-test) VB
120
120
121
121
* We don't want to construct this path so we'll rely on dotnet new --uninstall --help to construct the uninstall command.
122
122
*/
123
+ // Workaround for https://github.com/dotnet/sdk/issues/16906
124
+ // await UninstallExistingTemplatesAsync(output);
125
+
126
+ foreach ( var packagePath in builtPackages )
127
+ {
128
+ output . WriteLine ( $ "Installing templates package { packagePath } ...") ;
129
+ var result = await RunDotNetNew ( output , $ "--install \" { packagePath } \" ") ;
130
+ Assert . True ( result . ExitCode == 0 , result . GetFormattedOutput ( ) ) ;
131
+ }
132
+
133
+ await VerifyCanFindTemplate ( output , "webapp" ) ;
134
+ await VerifyCanFindTemplate ( output , "web" ) ;
135
+ await VerifyCanFindTemplate ( output , "react" ) ;
136
+ }
137
+
138
+ private static async Task UninstallExistingTemplatesAsync ( ITestOutputHelper output )
139
+ {
123
140
var proc = await RunDotNetNew ( output , "--uninstall --help" ) ;
124
141
var lines = proc . Output . Split ( Environment . NewLine ) ;
125
142
@@ -145,17 +162,6 @@ NUnit 3 Test Item (nunit-test) VB
145
162
await VerifyCannotFindTemplateAsync ( output , "react" ) ;
146
163
await VerifyCannotFindTemplateAsync ( output , "reactredux" ) ;
147
164
await VerifyCannotFindTemplateAsync ( output , "angular" ) ;
148
-
149
- foreach ( var packagePath in builtPackages )
150
- {
151
- output . WriteLine ( $ "Installing templates package { packagePath } ...") ;
152
- var result = await RunDotNetNew ( output , $ "--install \" { packagePath } \" ") ;
153
- Assert . True ( result . ExitCode == 0 , result . GetFormattedOutput ( ) ) ;
154
- }
155
-
156
- await VerifyCanFindTemplate ( output , "webapp" ) ;
157
- await VerifyCanFindTemplate ( output , "web" ) ;
158
- await VerifyCanFindTemplate ( output , "react" ) ;
159
165
}
160
166
161
167
private static async Task VerifyCanFindTemplate ( ITestOutputHelper output , string templateName )
0 commit comments