public int ReadSolutionProps(IVsHierarchy pHierarchy, string pszProjectName, string pszProjectMk, string pszKey, int fPreLoad, IPropertyBag pPropBag) { if (_strSolutionPersistanceKey.CompareTo(pszKey) == 0) { var defaultServer = "crm.dynamics.com"; var defaultSSL = false; var defaultPort = ""; var defaultOnline = true; // This is to convert the earlier settings var oldServerSetting = pPropBag.Read(_strCrmUrl, ""); if (!string.IsNullOrWhiteSpace(oldServerSetting)) { Uri oldServer = new Uri(oldServerSetting); defaultServer = oldServer.Host; defaultSSL = (oldServer.Scheme == "https"); defaultPort = oldServer.Port.ToString(); defaultOnline = (oldServer.Host.ToLower() == "crm.dynamics.com"); } settings.ServerName = pPropBag.Read(_strServerName, defaultServer); settings.UseSSL = pPropBag.Read(_strUseSSL, defaultSSL); settings.UseIFD = pPropBag.Read(_strUseIFD, false); settings.UseOnline = pPropBag.Read(_strUseOnline, defaultOnline); settings.UseOffice365 = pPropBag.Read(_strUseOffice365, defaultOnline); settings.ServerPort = pPropBag.Read(_strServerPort, defaultPort); settings.HomeRealm = pPropBag.Read(_strHomeRealm, ""); //settings.Username = pPropBag.Read(_strUsername, ""); //settings.Password = pPropBag.Read(_strPassword, ""); settings.Domain = pPropBag.Read(_strDomain, ""); settings.UseWindowsAuth = pPropBag.Read(_strUseWindowsAuth, false); settings.IsActive = pPropBag.HasSetting(_strOrganization); settings.CrmOrg = pPropBag.Read(_strOrganization, "DEV-CRM"); settings.EntitiesToIncludeString = pPropBag.Read(_strIncludeEntities, "account, contact, systemuser"); settings.IncludeNonStandard = pPropBag.Read(_strIncludeNonStandard, false); settings.Dirty = false; } return(VSConstants.S_OK); }