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) {
206206 HostIdentifier : {
207207 type : 'bind' ,
208208 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'
209215 }
210216 } ,
211217 tags : { language : 'C#' , type : 'project' } ,
212218 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+ } ,
213226 /*
214227 // Currently it doesn't appear to be possible to run `npm install` from a
215228 // postAction, due to https://github.com/dotnet/templating/issues/849
@@ -245,7 +258,11 @@ function buildDotNetNewNuGetPackage(packageId: string) {
245258 } ,
246259 Framework : {
247260 longName : 'framework'
248- }
261+ } ,
262+ skipRestore : {
263+ longName : 'no-restore' ,
264+ shortName : ''
265+ } ,
249266 }
250267 } , null , 2 ) ) ;
251268
You can’t perform that action at this time.
0 commit comments