├── art
├── tool-window.png
└── context-menu.png
├── src
├── Resources
│ └── Icon.png
├── source.extension.ico
├── Properties
│ └── AssemblyInfo.cs
├── PackageManagerToolWindow.cs
├── source.extension.cs
├── VSCommandTable.vsct
├── PackageManagerToolWindowControl.xaml
├── VSCommandTable.cs
├── source.extension.vsixmanifest
├── PackageManagerToolWindowControl.xaml.cs
├── Commands
│ └── PackageManagerToolWindowCommand.cs
├── AutoLoadPackageManagerPackage.cs
├── packages.config
├── VsTheme.cs
├── source.extension.resx
├── AutoLoadPackageManager.cs
└── AutoLoadPackageManager.csproj
├── appveyor.yml
├── LICENSE
├── README.md
├── AutoLoadPackageManager.sln
├── .gitattributes
└── .gitignore
/art/tool-window.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/madskristensen/AutoLoadPackageManager/master/art/tool-window.png
--------------------------------------------------------------------------------
/art/context-menu.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/madskristensen/AutoLoadPackageManager/master/art/context-menu.png
--------------------------------------------------------------------------------
/src/Resources/Icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/madskristensen/AutoLoadPackageManager/master/src/Resources/Icon.png
--------------------------------------------------------------------------------
/src/source.extension.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/madskristensen/AutoLoadPackageManager/master/src/source.extension.ico
--------------------------------------------------------------------------------
/appveyor.yml:
--------------------------------------------------------------------------------
1 | image: Visual Studio 2017
2 |
3 | install:
4 | - ps: (new-object Net.WebClient).DownloadString("https://raw.github.com/madskristensen/ExtensionScripts/master/AppVeyor/vsix.ps1") | iex
5 |
6 | before_build:
7 | - ps: Vsix-IncrementVsixVersion | Vsix-UpdateBuildVersion
8 |
9 | build_script:
10 | - nuget restore -Verbosity quiet
11 | - msbuild /p:configuration=Release /p:DeployExtension=false /p:ZipPackageCompressionLevel=normal /v:m
12 |
13 | after_test:
14 | - ps: Vsix-PushArtifacts | Vsix-PublishToGallery
15 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright 2018 Mads Kristensen
2 |
3 | Licensed under the Apache License, Version 2.0 (the "License");
4 | you may not use this file except in compliance with the License.
5 | You may obtain a copy of the License at
6 |
7 | http://www.apache.org/licenses/LICENSE-2.0
8 |
9 | Unless required by applicable law or agreed to in writing, software
10 | distributed under the License is distributed on an "AS IS" BASIS,
11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | See the License for the specific language governing permissions and
13 | limitations under the License.
--------------------------------------------------------------------------------
/src/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.InteropServices;
3 | using AutoLoadPackageManager;
4 |
5 | [assembly: AssemblyTitle(Vsix.Name)]
6 | [assembly: AssemblyDescription(Vsix.Description)]
7 | [assembly: AssemblyConfiguration("")]
8 | [assembly: AssemblyCompany(Vsix.Author)]
9 | [assembly: AssemblyProduct(Vsix.Name)]
10 | [assembly: AssemblyCopyright(Vsix.Author)]
11 | [assembly: AssemblyTrademark("")]
12 | [assembly: AssemblyCulture("")]
13 |
14 | [assembly: ComVisible(false)]
15 |
16 | [assembly: AssemblyVersion(Vsix.Version)]
17 | [assembly: AssemblyFileVersion(Vsix.Version)]
18 |
--------------------------------------------------------------------------------
/src/PackageManagerToolWindow.cs:
--------------------------------------------------------------------------------
1 | namespace AutoLoadPackageManager
2 | {
3 | using System;
4 | using System.Runtime.InteropServices;
5 | using Microsoft.VisualStudio.Shell;
6 | using Microsoft.VisualStudio.Shell.Settings;
7 |
8 | [Guid(WindowGuid)]
9 | public class PackageManagerToolWindow : ToolWindowPane
10 | {
11 | public const string WindowGuid = "ddac3bc3-cd4d-4eb1-b726-af3a4402667f";
12 | public const string Title = "Package Load Explorer";
13 |
14 | public PackageManagerToolWindow(ShellSettingsManager settingsManager) : base(null)
15 | {
16 | Caption = Title;
17 | Content = new PackageManagerToolWindowControl(settingsManager);
18 | }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/src/source.extension.cs:
--------------------------------------------------------------------------------
1 | // ------------------------------------------------------------------------------
2 | //
3 | // This file was generated by Extensibility Tools v1.10.211
4 | //
5 | // ------------------------------------------------------------------------------
6 | namespace AutoLoadPackageManager
7 | {
8 | static class Vsix
9 | {
10 | public const string Id = "AutoLoadPackageManager.d28343a5-6123-475e-9f5d-63705c8e166e";
11 | public const string Name = "Package Load Explorer";
12 | public const string Description = @"Shows information about how VS packages are loaded in Visual Studio.";
13 | public const string Language = "en-US";
14 | public const string Version = "1.0.999";
15 | public const string Author = "Mads Kristensen";
16 | public const string Tags = "vsix, extensions";
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/src/VSCommandTable.vsct:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/src/PackageManagerToolWindowControl.xaml:
--------------------------------------------------------------------------------
1 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/src/VSCommandTable.cs:
--------------------------------------------------------------------------------
1 | // ------------------------------------------------------------------------------
2 | //
3 | // This file was generated by Extensibility Tools v1.10.211
4 | //
5 | // ------------------------------------------------------------------------------
6 | namespace AutoLoadPackageManager
7 | {
8 | using System;
9 |
10 | ///
11 | /// Helper class that exposes all GUIDs used across VS Package.
12 | ///
13 | internal sealed partial class PackageGuids
14 | {
15 | public const string guidAutoLoadPackageManagerString = "712bf5cc-618c-43fb-999e-570279df0728";
16 | public const string guidAutoLoadPackageManagerCmdSetString = "c8228f23-0c49-4b65-9e37-5e1f45a95799";
17 | public static Guid guidAutoLoadPackageManager = new Guid(guidAutoLoadPackageManagerString);
18 | public static Guid guidAutoLoadPackageManagerCmdSet = new Guid(guidAutoLoadPackageManagerCmdSetString);
19 | }
20 | ///
21 | /// Helper class that encapsulates all CommandIDs uses across VS Package.
22 | ///
23 | internal sealed partial class PackageIds
24 | {
25 | public const int PackageManagerToolWindowCommandId = 0x0100;
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # VS Package Load Explorer
2 |
3 | [](https://ci.appveyor.com/project/madskristensen/autoloadpackagemanager)
4 |
5 | **Requires Visual Studio 2017.6 or newer**
6 |
7 | This extension makes it easy to diagnose how packages are being loaded in Visual Studio. Both build-in as well as packages comming from external extensions are supported.
8 |
9 | Download from the [Visual Studio MarketPlace](https://marketplace.visualstudio.com/items?itemName=MadsKristensen.PackageLoadExplorer) or get the latest [CI build](http://vsixgallery.com/extension/AutoLoadPackageManager.d28343a5-6123-475e-9f5d-63705c8e166e/).
10 |
11 | ## The Package Load Explorer window
12 | Display it by going to **View -> Other Windows -> Package Load Explorer**.
13 |
14 | 
15 |
16 | Shows information about how the VS packages was loaded in the IDE.
17 |
18 | 
19 |
20 | The columns shown are:
21 |
22 | * PackageGuid
23 | * PackageName
24 | * ModuleName
25 | * AutoLoadContextGuid
26 | * AutoLoadContextName
27 | * IsRuleBasedUIContext
28 | * UIContextTerms
29 | * IsAsyncPackage
30 | * IsAsyncForUIContext
31 |
32 | ## License
33 | [Apache 2.0](LICENSE)
34 |
--------------------------------------------------------------------------------
/src/source.extension.vsixmanifest:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Package Load Explorer
6 | Shows information about how VS packages are loaded in Visual Studio.
7 | https://github.com/madskristensen/AutoLoadPackageManager
8 | Resources\LICENSE
9 | Resources\Icon.png
10 | Resources\Icon.png
11 | vsix, extensions
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/AutoLoadPackageManager.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 15
4 | VisualStudioVersion = 15.0.27027.1
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AutoLoadPackageManager", "src\AutoLoadPackageManager.csproj", "{647741D0-6C02-49F3-9666-6AB20AAC33E3}"
7 | EndProject
8 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{4EB58A43-7DF2-46A8-864D-D74124076737}"
9 | ProjectSection(SolutionItems) = preProject
10 | appveyor.yml = appveyor.yml
11 | README.md = README.md
12 | EndProjectSection
13 | EndProject
14 | Global
15 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
16 | Debug|Any CPU = Debug|Any CPU
17 | Release|Any CPU = Release|Any CPU
18 | EndGlobalSection
19 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
20 | {647741D0-6C02-49F3-9666-6AB20AAC33E3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
21 | {647741D0-6C02-49F3-9666-6AB20AAC33E3}.Debug|Any CPU.Build.0 = Debug|Any CPU
22 | {647741D0-6C02-49F3-9666-6AB20AAC33E3}.Release|Any CPU.ActiveCfg = Release|Any CPU
23 | {647741D0-6C02-49F3-9666-6AB20AAC33E3}.Release|Any CPU.Build.0 = Release|Any CPU
24 | EndGlobalSection
25 | GlobalSection(SolutionProperties) = preSolution
26 | HideSolutionNode = FALSE
27 | EndGlobalSection
28 | GlobalSection(ExtensibilityGlobals) = postSolution
29 | SolutionGuid = {000277DC-53D1-4240-ACFD-0C8299443B56}
30 | EndGlobalSection
31 | EndGlobal
32 |
--------------------------------------------------------------------------------
/src/PackageManagerToolWindowControl.xaml.cs:
--------------------------------------------------------------------------------
1 | namespace AutoLoadPackageManager
2 | {
3 | using System;
4 | using System.IO;
5 | using System.Linq;
6 | using System.Windows;
7 | using System.Windows.Controls;
8 | using Microsoft.VisualStudio.Settings;
9 | using Microsoft.VisualStudio.Shell.Settings;
10 |
11 | public partial class PackageManagerToolWindowControl : UserControl
12 | {
13 | private readonly ShellSettingsManager _settingsManager;
14 |
15 | public PackageManagerToolWindowControl(ShellSettingsManager settingsManager)
16 | {
17 | InitializeComponent();
18 | _settingsManager = settingsManager;
19 |
20 | Loaded += (s, e) => {
21 | if (gridOutput.ItemsSource == null)
22 | {
23 | Button1_Click(this, null);
24 | }
25 | };
26 | }
27 |
28 | private void Button1_Click(object sender, RoutedEventArgs e)
29 | {
30 | SettingsStore configurationStore = _settingsManager.GetReadOnlySettingsStore(SettingsScope.Configuration);
31 | var enumerator = new AutoLoadPackageEnumerator(configurationStore);
32 | var packageList = enumerator.GetAutoLoadPackages().ToList();
33 |
34 | gridOutput.ItemsSource = packageList;
35 | }
36 |
37 | private void WriteDataToDesktop(string text, string fileName)
38 | {
39 | string path = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Desktop), fileName);
40 | File.WriteAllText(path, text);
41 | }
42 |
43 | private void WriteDataToDesktop(string[] lines, string fileName)
44 | {
45 | string path = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Desktop), fileName);
46 | File.WriteAllLines(path, lines);
47 | }
48 | }
49 | }
--------------------------------------------------------------------------------
/src/Commands/PackageManagerToolWindowCommand.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.ComponentModel.Design;
3 | using Microsoft.VisualStudio.Shell;
4 | using Task = System.Threading.Tasks.Task;
5 |
6 | namespace AutoLoadPackageManager
7 | {
8 | internal sealed class PackageManagerToolWindowCommand
9 | {
10 | private readonly AsyncPackage _package;
11 |
12 | private PackageManagerToolWindowCommand(AsyncPackage package, OleMenuCommandService commandService)
13 | {
14 | _package = package ?? throw new ArgumentNullException(nameof(package));
15 |
16 | var menuCommandID = new CommandID(PackageGuids.guidAutoLoadPackageManagerCmdSet, PackageIds.PackageManagerToolWindowCommandId);
17 | var menuItem = new MenuCommand(ShowToolWindow, menuCommandID);
18 | commandService.AddCommand(menuItem);
19 | }
20 |
21 | public static PackageManagerToolWindowCommand Instance
22 | {
23 | get;
24 | private set;
25 | }
26 |
27 | private IServiceProvider ServiceProvider
28 | {
29 | get
30 | {
31 | return _package;
32 | }
33 | }
34 |
35 | public static async Task InitializeAsync(AsyncPackage package)
36 | {
37 | var commandService = await package.GetServiceAsync(typeof(IMenuCommandService)) as OleMenuCommandService;
38 | Instance = new PackageManagerToolWindowCommand(package, commandService);
39 | }
40 |
41 | private void ShowToolWindow(object sender, EventArgs e)
42 | {
43 | _package.JoinableTaskFactory.RunAsync(async () =>
44 | {
45 | ToolWindowPane window = await _package.ShowToolWindowAsync(
46 | toolWindowType: typeof(PackageManagerToolWindow),
47 | id: 0,
48 | create: true,
49 | cancellationToken: _package.DisposalToken);
50 | });
51 | }
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/src/AutoLoadPackageManagerPackage.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Runtime.InteropServices;
3 | using System.Threading;
4 | using System.Threading.Tasks;
5 | using Microsoft.VisualStudio.Shell;
6 | using Microsoft.VisualStudio.Shell.Interop;
7 | using Microsoft.VisualStudio.Shell.Settings;
8 | using Task = System.Threading.Tasks.Task;
9 |
10 | namespace AutoLoadPackageManager
11 | {
12 | [PackageRegistration(UseManagedResourcesOnly = true, AllowsBackgroundLoading = true)]
13 | [InstalledProductRegistration("#110", "#112", Vsix.Version, IconResourceID = 400)]
14 | [Guid(PackageGuids.guidAutoLoadPackageManagerString)]
15 | [ProvideMenuResource("Menus.ctmenu", 1)]
16 | [ProvideToolWindow(typeof(PackageManagerToolWindow), Style = VsDockStyle.Tabbed, Window = "DocumentWell", Orientation = ToolWindowOrientation.none)]
17 | public sealed class AutoLoadPackageManagerPackage : AsyncPackage
18 | {
19 | protected override async Task InitializeAsync(CancellationToken cancellationToken, IProgress progress)
20 | {
21 | await JoinableTaskFactory.SwitchToMainThreadAsync();
22 |
23 | await PackageManagerToolWindowCommand.InitializeAsync(this);
24 | }
25 |
26 | public override IVsAsyncToolWindowFactory GetAsyncToolWindowFactory(Guid toolWindowType)
27 | {
28 | return toolWindowType.Equals(new Guid(PackageManagerToolWindow.WindowGuid))
29 | ? (this)
30 | : null;
31 | }
32 |
33 | protected override string GetToolWindowTitle(Type toolWindowType, int id)
34 | {
35 | return toolWindowType == typeof(PackageManagerToolWindow)
36 | ? PackageManagerToolWindow.Title
37 | : base.GetToolWindowTitle(toolWindowType, id);
38 | }
39 |
40 | protected override async Task