This repository was archived by the owner on Apr 8, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +18
-1
lines changed
templates/package-builder/src/build Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -206,10 +206,23 @@ function buildDotNetNewNuGetPackage(packageId: string) {
206
206
HostIdentifier : {
207
207
type : 'bind' ,
208
208
binding : 'HostIdentifier'
209
+ } ,
210
+ skipRestore : {
211
+ type : 'parameter' ,
212
+ datatype : 'bool' ,
213
+ description : 'If specified, skips the automatic restore of the project on create.' ,
214
+ defaultValue : 'false'
209
215
}
210
216
} ,
211
217
tags : { language : 'C#' , type : 'project' } ,
212
218
postActions : [
219
+ {
220
+ condition : '(!skipRestore)' ,
221
+ description : 'Restore NuGet packages required by this project.' ,
222
+ manualInstructions : [ { text : 'Run \'dotnet restore\'' } ] ,
223
+ actionId : '210D431B-A78B-4D2F-B762-4ED3E3EA9025' ,
224
+ continueOnError : true
225
+ } ,
213
226
/*
214
227
// Currently it doesn't appear to be possible to run `npm install` from a
215
228
// postAction, due to https://github.com/dotnet/templating/issues/849
@@ -245,7 +258,11 @@ function buildDotNetNewNuGetPackage(packageId: string) {
245
258
} ,
246
259
Framework : {
247
260
longName : 'framework'
248
- }
261
+ } ,
262
+ skipRestore : {
263
+ longName : 'no-restore' ,
264
+ shortName : ''
265
+ } ,
249
266
}
250
267
} , null , 2 ) ) ;
251
268
You can’t perform that action at this time.
0 commit comments