-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- make it async (fix vs 2019 warning)
- Loading branch information
Showing
7 changed files
with
38 additions
and
358 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,4 @@ | ||
param ($pfx, $pw, $sha, $vsix) | ||
|
||
&packages\Microsoft.VSSDK.VsixSignTool.16.0.28727\tools\vssdk\vsixsigntool.exe sign /v ` | ||
/f $pfx ` | ||
/sha1 $sha ` | ||
/p $pw ` | ||
/fd sha256 ` | ||
/tr http://timestamp.digicert.com /td sha256 ` | ||
$vsix | ||
&nuget install Microsoft.VSSDK.VsixSignTool -ExcludeVersion -OutputDirectory Build | ||
$signtool = Get-ChildItem -Path "Build/Microsoft.VSSDK.Vsixsigntool" -Recurse -Include vsixsigntool.exe | ||
&$signtool sign /v /f "$pfx" /sha1 $sha /p $pw /fd sha256 /tr http://timestamp.digicert.com /td sha256 $vsix |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,75 +1,22 @@ | ||
using System; | ||
using System.ComponentModel.Design; | ||
using System.Diagnostics; | ||
using System.Diagnostics.CodeAnalysis; | ||
using System.Globalization; | ||
using System.Runtime.InteropServices; | ||
using System.Runtime.InteropServices; | ||
using System.Windows.Forms; | ||
using Microsoft.VisualStudio; | ||
using Microsoft.VisualStudio.OLE.Interop; | ||
using Microsoft.VisualStudio.Shell; | ||
using Microsoft.VisualStudio.Shell.Interop; | ||
using Microsoft.Win32; | ||
|
||
namespace ClosePrompt | ||
{ | ||
/// <summary> | ||
/// This is the class that implements the package exposed by this assembly. | ||
/// </summary> | ||
/// <remarks> | ||
/// <para> | ||
/// The minimum requirement for a class to be considered a valid package for Visual Studio | ||
/// is to implement the IVsPackage interface and register itself with the shell. | ||
/// This package uses the helper classes defined inside the Managed Package Framework (MPF) | ||
/// to do it: it derives from the Package class that provides the implementation of the | ||
/// IVsPackage interface and uses the registration attributes defined in the framework to | ||
/// register itself and its components with the shell. These attributes tell the pkgdef creation | ||
/// utility what data to put into .pkgdef file. | ||
/// </para > | ||
/// <para> | ||
/// To get loaded into VS, the package must be referred by <Asset Type="Microsoft.VisualStudio.VsPackage" ...> in .vsixmanifest file. | ||
/// </para> | ||
/// </remarks> | ||
[PackageRegistration(UseManagedResourcesOnly = true)] | ||
[InstalledProductRegistration("#110", "#112", "1.0", IconResourceID = 400)] // Info on this package for Help/About | ||
[Guid(ClosePromptPackage.PackageGuidString)] | ||
[ProvideAutoLoad(UIContextGuids80.NoSolution)] | ||
[SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1650:ElementDocumentationMustBeSpelledCorrectly", Justification = "pkgdef, VS and vsixmanifest are valid VS terms")] | ||
[PackageRegistration(UseManagedResourcesOnly = true, AllowsBackgroundLoading = true)] | ||
[InstalledProductRegistration("Close Prompt", "Shows confirmation prompt message to confirm exit", "ClosePrompt.14CE444A-AE6B-446C-93F4-91733D57E939")] | ||
[Guid(PackageGuidString)] | ||
[ProvideAutoLoad(UIContextGuids80.NoSolution, PackageAutoLoadFlags.BackgroundLoad)] | ||
public sealed class ClosePromptPackage : Package | ||
{ | ||
/// <summary> | ||
/// ClosePromptPackage GUID string. | ||
/// </summary> | ||
public const string PackageGuidString = "b79e2775-1c62-459d-b623-31b93818fe8d"; | ||
|
||
/// <summary> | ||
/// Initializes a new instance of the <see cref="ClosePromptPackage"/> class. | ||
/// </summary> | ||
public ClosePromptPackage() | ||
{ | ||
// Inside this method you can place any initialization code that does not require | ||
// any Visual Studio service because at this point the package object is created but | ||
// not sited yet inside Visual Studio environment. The place to do all the other | ||
// initialization is the Initialize method. | ||
} | ||
|
||
protected override int QueryClose(out bool canClose) | ||
{ | ||
canClose = MessageBox.Show("Do you want to close Visual Studio?", "Close Prompt Extension", MessageBoxButtons.OKCancel) == DialogResult.OK; | ||
return 0; | ||
} | ||
|
||
#region Package Members | ||
|
||
/// <summary> | ||
/// Initialization of the package; this method is called right after the package is sited, so this is the place | ||
/// where you can put all the initialization code that rely on services provided by VisualStudio. | ||
/// </summary> | ||
protected override void Initialize() | ||
{ | ||
base.Initialize(); | ||
} | ||
|
||
#endregion | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.