Skip to content

Commit

Permalink
Only load package in ASP.NET/Web projects
Browse files Browse the repository at this point in the history
  • Loading branch information
madskristensen committed Sep 7, 2016
1 parent 14a206d commit 5c4848f
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/VSPackage.cs
Original file line number Diff line number Diff line change
@@ -1,29 +1,31 @@
using System;
using System.Runtime.InteropServices;
using Microsoft.VisualStudio.Shell;
using Microsoft.VisualStudio.Shell.Interop;

namespace BrowserReloadOnSave
{
[PackageRegistration(UseManagedResourcesOnly = true, AllowsBackgroundLoading = true)]
[InstalledProductRegistration("#110", "#112", Vsix.Version, IconResourceID = 400)]
[ProvideMenuResource("Menus.ctmenu", 1)]
[ProvideAutoLoad(UIContextGuids80.SolutionHasSingleProject, PackageAutoLoadFlags.BackgroundLoad)]
[ProvideAutoLoad(UIContextGuids80.SolutionHasMultipleProjects, PackageAutoLoadFlags.BackgroundLoad)]
[ProvideOptionPage(typeof(Options), "Web", Vsix.Name, 101, 102, true, new string[0], ProvidesLocalizedCategoryName = false)]
[ProvideAutoLoad("{349C5852-65DF-11dA-9384-00065B846F21}", PackageAutoLoadFlags.BackgroundLoad)] // WAP
[ProvideAutoLoad("{E24C65DC-7377-472b-9ABA-BC803B73C61A}", PackageAutoLoadFlags.BackgroundLoad)] // WebSite
[ProvideAutoLoad("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}", PackageAutoLoadFlags.BackgroundLoad)] // ProjectK
[Guid(PackageGuids.guidBrowserReloadPackageString)]
public sealed class VSPackage : Package
{
public static Options Options;
public static Options Options
{
get;
private set;
}

protected override void Initialize()
{
Options = (Options)GetDialogPage(typeof(Options));

Logger.Initialize(this, Vsix.Name);
EnableReloadCommand.Initialize(this);

base.Initialize();
}
}
}

0 comments on commit 5c4848f

Please sign in to comment.