@@ -20,17 +20,15 @@ public sealed class Args
2020 public IVSExtensions Extensions { get ; }
2121 public IDialogService DialogService { get ; }
2222 public IManifestService ManifestService { get ; }
23- public IVSSolutions Solutions { get ; }
2423
25- public Args ( IThisVsixInfo vsixInfo , IVSDocuments documents , IVSMessageBox messageBox , IVSExtensions extensions , IDialogService dialogService , IManifestService manifestService , IVSSolutions solutions )
24+ public Args ( IThisVsixInfo vsixInfo , IVSDocuments documents , IVSMessageBox messageBox , IVSExtensions extensions , IDialogService dialogService , IManifestService manifestService )
2625 {
2726 VsixInfo = vsixInfo ;
2827 Documents = documents ;
2928 MessageBox = messageBox ;
3029 Extensions = extensions ;
3130 DialogService = dialogService ;
3231 ManifestService = manifestService ;
33- Solutions = solutions ;
3432 }
3533 }
3634
@@ -42,7 +40,6 @@ public Args(IThisVsixInfo vsixInfo, IVSDocuments documents, IVSMessageBox messag
4240 protected IVSExtensions Extensions => _args . Extensions ;
4341 protected IDialogService DialogService => _args . DialogService ;
4442 protected IManifestService ManifestService => _args . ManifestService ;
45- protected IVSSolutions Solutions => _args . Solutions ;
4643
4744 protected ExportFeatureBase ( Args args )
4845 {
@@ -51,31 +48,15 @@ protected ExportFeatureBase(Args args)
5148
5249 public async Task ExecuteAsync ( )
5350 {
54- IManifest manifest ;
55-
56- var vsextFile = await Solutions . GetCurrentSolutionExtensionsManifestFilePathAsync ( MessageBox ) . ConfigureAwait ( false ) ;
57-
58- if ( vsextFile != null && ! string . IsNullOrEmpty ( vsextFile ) )
59- {
60- // Attempt to read manifest from the found .vsext file
61- manifest = await ManifestService . ReadAsync ( vsextFile ) . ConfigureAwait ( false ) ;
62- }
63- else
64- {
65- // No .vsext found: create new manifest
66- manifest = ManifestService . CreateNew ( ) ;
67- }
68-
51+ var manifest = ManifestService . CreateNew ( ) ;
6952 var installedExtensions = await Extensions . GetInstalledExtensionsAsync ( ) . ConfigureAwait ( false ) ;
7053
7154 var installedExtensionsList = installedExtensions as List < IVSExtension >
7255 ?? installedExtensions . ToList ( ) ;
7356
7457 installedExtensionsList . RemoveAll ( vsix => vsix . Id == VsixInfo . Id ) ;
7558
76- var selectedExtensions = manifest . Extensions ;
77-
78- await ShowExportDialogAsync ( manifest , this , installedExtensions , new ReadOnlyCollection < IVSExtension > ( selectedExtensions ) ) ;
59+ await ShowExportDialogAsync ( manifest , this , installedExtensions ) ;
7960 }
8061
8162 async Task IExportWorker . ExportAsync ( IManifest manifest , IProgress < ProgressStep < ExportStep > > progress , CancellationToken cancellationToken )
@@ -93,7 +74,6 @@ async Task IExportWorker.ExportAsync(IManifest manifest, IProgress<ProgressStep<
9374 }
9475
9576 protected abstract Task < string ? > GetFilePathAsync ( ) ;
96- protected abstract Task ShowExportDialogAsync ( IManifest manifest , IExportWorker worker , IReadOnlyCollection < IVSExtension > installedExtensions , IReadOnlyCollection < IVSExtension > selectedExtensions ) ;
77+ protected abstract Task ShowExportDialogAsync ( IManifest manifest , IExportWorker worker , IReadOnlyCollection < IVSExtension > installedExtensions ) ;
9778 protected abstract Task OnManifestWrittenAsync ( string filePath ) ;
9879}
99-
0 commit comments