locked
VSIX make registry entries or call custom code RRS feed

  • Question

  • Hi There

    Is there any way to make registry entries in a VSIX package oder to execute custom routines in C#. I could also do the registry entries programmatically if any C# routines can be called.

    Kind regards,
    Tom

    Thursday, September 1, 2016 12:09 PM

Answers

  • Hi TomGo1971,

    You could write a method store a registry setting and call it on MenuItemCallback method.

    Best regards,

    Cole Wu


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Marked as answer by TomGo1971 Monday, January 28, 2019 1:48 PM
    Tuesday, October 11, 2016 6:38 AM

All replies

  • It would be better to use MSI instead of VSIX to execute custom code or create registry entries.

    Using VSIX you can't execute custom code on install/uninstall. To some extent I think you can create registry entries adding them to the .pkgdef file after it is created, but I have not tested this approach.

    You can try also to create the registry entries or execute custom code when the package is loaded for the first time, rather than when installed.


    My portal and blog about VSX: http://www.visualstudioextensibility.com
    Twitter: https://twitter.com/VSExtensibility
    MZ-Tools productivity extension for Visual Studio: http://www.mztools.com

    Friday, September 2, 2016 4:51 AM
  • Hi

    Thanks for your reply.

    How can I check if the package ist loaded for the first time?
    Or is the package loaded for the first time everytime when I start Visual Studio and open a project?

    Kind regards,
    Tom

    Friday, September 2, 2016 7:30 AM
  • You would need to store a registry setting to know if it is the first time or not.

    My portal and blog about VSX: http://www.visualstudioextensibility.com
    Twitter: https://twitter.com/VSExtensibility
    MZ-Tools productivity extension for Visual Studio: http://www.mztools.com

    Friday, September 2, 2016 8:30 AM
  • Hi

    Can you tell me, where is the entry point in code, where a VSIX vstemplate is jumped in on startup.

    Tom

    Friday, September 2, 2016 11:26 AM
  • Hi Tom,

    I am not sure is there is such a thing for a vstemplate, I thought you were talking about a package not a vstemplate.


    My portal and blog about VSX: http://www.visualstudioextensibility.com
    Twitter: https://twitter.com/VSExtensibility
    MZ-Tools productivity extension for Visual Studio: http://www.mztools.com

    Sunday, September 4, 2016 8:52 AM
  • Hi Carlos

    Oh yes, we use a vstemplate but have a package to generate the VSIX installer.

    Kind regards,

    Thomas

    Monday, September 5, 2016 6:44 AM
  • Hi TomGo1971,

    You could write a method store a registry setting and call it on MenuItemCallback method.

    Best regards,

    Cole Wu


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Marked as answer by TomGo1971 Monday, January 28, 2019 1:48 PM
    Tuesday, October 11, 2016 6:38 AM