.vsix extesion not working RRS feed

  • Question

  • Hi...

    I have developed one extension in VS 2017 prof. edition for my application which is used to open a form in VS 2017 through my application.

    Now using my application, it work fine and extension is executed properly.

    But when I directly open VS 2017 and try to execute extension, then it give me error as per below:

    "An error occurred creating the configuration section handler for myapp.Startexe: Could not load file or assembly or one of its dependencies. The system cannot find the file specified."

    can you please help me...?Is it possible to execute extension directly..?

    Friday, July 26, 2019 9:33 AM

All replies

  • Hi Rohit,

    Welcome to MSDN forum.

    >>Is it possible to execute extension directly..?

    First of all, it's possible for some scenario. But according to your description, this extension has functions related to your application, so when you directly open the VS and try to run the extension, it fails for not finding necessary assembly or .exe.

    You can have a look at the code about GetProjectProperties  , 

    It obviously works well when I open a project in VS IDE. But if I just open VS directly and run the extension, it will throw error message cause the extension needs some "context" to run. When run the extension with none projects open, it doesn't know to get property from what project. And it will throw error. That's a typical situation which works when a project open in VS, but not work at start page.

    I think you have a similar issue like this. Please share more details about "Now using my application, it work fine and extension is executed properly." to help locate the cause of the issue, which way in your code does the extension calls your application, do you use the DTE interface to launch your application?

    Look forward to your reply. 

    Best Regards


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact

    Monday, July 29, 2019 5:59 AM
  • No, I have not used DTE interface to launch my application. But I have used DTE to get some values and commands from my custom menu options.

    In my application, when I run it and try to open tool window from my application by lunching Visual studio, extensions are working for me as it pass context to extension from my running application and that's why I guess it works perfectly.

    Monday, July 29, 2019 10:12 AM
  • Rohit,

    Please provide some additional details here. What sort of extension have you developed? Editor extension, VSPackage command, custom toolwindow, etc. And as Lance mentioned, what do you mean by "execute extension"?

    Is there a specific line of code or an API that doesn't appear to be working as expected? Does your extension use the ConfigurationManager class? And if so, how? What does the callstack look like when your extension throws that exception?

    It's extremely difficult to guess what your extension does, or how it's implemented, without some specifics. Please provide explicit details, and we'll do our best to assist.


    Ed Dore

    Monday, July 29, 2019 10:17 PM