ISSUE #7014

    The property 'COMSVCSLib_AppServer_definst' could be being created from different 'UpgradeSupport' in a multiproject solution

    This in a NOTE EWI. That means the migration tool has performed some automated changes the code should compile but you might want to review the target code in case you want to refactor some code.

    In this situation you must have a VBUC multiproject solution. 

    Screenshot of solutions, project and support tab

    And at least one of your projects should have a reference to comsvcs.dll (COM+ Services Type Library) 

    Screenshot of reference lists

    When the migration tool performs the migration it will insert some helper code in yours projects.

    C# Target Code


    namespace Project1
    {
    internal class UpgradeSupport
    {
      //UPGRADE_NOTE: (7014) The property 'COMSVCSLib_AppServer_definst' could be being created from different 'UpgradeSupport' in a multiproject solution More Information: https://www.mobilize.net/vbtonet/ewis/ewi7014

      private static COMSVCSLib.AppServer _COMSVCSLib_AppServer_definst = null;
      public static COMSVCSLib.AppServer COMSVCSLib_AppServer_definst
      {
        get
        {
          if (_COMSVCSLib_AppServer_definst is null)
          {
            _COMSVCSLib_AppServer_definst = new COMSVCSLib.AppServer();
          }
          return _COMSVCSLib_AppServer_definst;
         }
      }
    }
    }

    This helper is used to create a singleton for the COMSVCSLib.AppServer object.

    However, if your are planning to use all those projects together that code snippet might be duplicated into several projects. For example one for namespace Project1 and one for namespace Project2.

    The recommendation is create a shared class library and refactor this code into that shared library, so all migrated projects use the same code.

    Also remember that the VBUC provides options for migrating to COMSVCSLib to COM Interop and to EnterpriseServices.

    Image of conversion options drop down


    Download VBUC Free Trial
    Download VBUC Now

    It's time to eradicate VB6
    ROI of eradicating VB6

    8 Proven Tips for
    Planning a Successful Migration

    8 Tips for migration