Visual Studio extension does not load in experimental instance
Asked Answered
M

2

10

I'm developing a Visual Studio extension in VS2013 but I can get it to load in the experimental instance.

I can install it manually in my current instance (from the vsix file) and it works fine but I am unable to debug it.

There are no error messages nor anything in the ActivityLog. My extension just isn't loaded. (It is not just my extension. The same thing happens with a fresh extension from the project template)

I have tried to delete/reset the experimental instance without luck.

I also tried to debug my extension by creating the experimental instance from my current instance with my extension installed. The extension then showed up as "Disabled" in "Extensions and updates" in the experimental instance.

Tried to search for how the extension registration is performed in the experimental instance but could not find anything. Only found refrences to the setting "Deploy VSIX content to experimental instance for debugging" but not anything about what the setting does.

Currently my testing work liks this:

  1. Put in MessageBox and/or WriteLine and compile the code
  2. Remove the previous instance of the extension in "Extensions and updates"
  3. Close Visual Studio
  4. Install the extension from the vsix file
  5. Start Visual Studio
  6. Test the extension

which of course takes a long time.

Massengale answered 16/11, 2014 at 20:26 Comment(0)
T
3

This is probably a duplicate question. Just check the Debug options of your VSIX project. This answer might help: Cannot run VSPackage when developing on multiple machines

If the automatic registration of your extension works, you should find entries with your package-id in the registry under the following keys:

HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\12.0Exp\ExtensionManager\
    EnabledExtensions
    ExtensionTypes
Titty answered 17/11, 2014 at 9:2 Comment(4)
Thank you for your reply. My extension is added to both registry folders on build and the referenced folder contain the output. The experimental instance starts correctly on F5 and the extension is present in "extension and updates" but its menu is not added and the constructor or initialize methods are never called.Massengale
What attributes are applied to the package class? Is there any logic within the ctor, or any field initializers which can fail? Can you add some code to your question?Titty
Currently there is no code at all in the package class. Just empty methods.Massengale
Have you tried the ProvideAutoLoad attribute? msdn.microsoft.com/en-us/library/bb166762.aspxTitty
S
1

You need to enable the installed extension from Extension manager. It'd ask for a IDE restart, and it should be all set up

Stridulous answered 17/2, 2016 at 5:1 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.