locked
Expired license in Visual Studio 2013 Community Edition RRS feed

  • Question

  • Some of the initialization code in our package is called from OnShellPropertyChange handler (from IVsShellPropertyEvents interface).

    This initialization code is called on a condition:

    // when zombie state changes to false, finish package initialization
    if ((int)__VSSPROPID.VSSPROPID_Zombie == propid)
        {
            if ((bool)var == false)
                {
    ...
    i.e. we proceed with initialization, when IDE is out of the 'zombie' state.

    Now, a part of the initialization is retrieving the events object for Project Items Events via Events.GetObject("VCProjectEngineEventsObject").

    The issue is that on a Visual Studio 2013 Community Edition, when its' license expires (with a message 'The license has expired'), the GetObject method throws a 'System.Exception' exception. So this exception is thrown, and only after that the 'license expired' dialog is shown by the IDE.

    What would be a correct way to handle such a situation, i.e. which interface\handler should we use to check whether the license is valid?

    Thanks!



    Friday, July 24, 2015 11:57 AM

All replies

  • Hi Paul,

    This object should be prevented from accessing by the DTE object when the license is expired. The expired date can be found manually by Help>Register Product, but if you want to programmatically check if the license is expired, you may need to check the product key from the registry, e.g.

    HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\12.0\Registration\2000.0x0000


    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.

    Monday, August 3, 2015 6:09 AM
  • But how can I determine whether the trial 30 days period had expired or not? A clean installation creates only '1000.0x0010' sub-node in the 'Registration' node, but not the '2000.0x0000' one. I also have the '3000.0x0000' (and the likes starting from 3000.0) subnodes on the system with an activated 'Professional' edition.

    Thanks!


    Monday, August 3, 2015 12:05 PM