/// <summary> /// Open a create solution dialog on the given path. /// </summary> /// <param name="path">The initial path in the create solution dialog.</param> public async Task LaunchCreateSolutionDialogAsync(string path) { path.ThrowIfNullOrEmpty(nameof(path)); DTE dte = await GoogleCloudExtensionPackage.Instance.GetServiceAsync <SDTE, DTE>(); await GoogleCloudExtensionPackage.Instance.JoinableTaskFactory.SwitchToMainThreadAsync(); // Set default project location // Refer to https://msdn.microsoft.com/en-us/library/ms165643.aspx Property locationItem = dte.Properties["Environment", "ProjectsAndSolution"].Item("ProjectsLocation"); if (locationItem != null) { locationItem.Value = path; } IVsSolution solution = await GoogleCloudExtensionPackage.Instance.GetServiceAsync <SVsSolution, IVsSolution>(); await GoogleCloudExtensionPackage.Instance.JoinableTaskFactory.SwitchToMainThreadAsync(); solution?.CreateNewProjectViaDlg(null, null, 0); }
public int CreateNewProjectViaDlg(string pszExpand, string pszSelect, uint dwReserved) { return(_solution.CreateNewProjectViaDlg(pszExpand, pszSelect, dwReserved)); }