コード例 #1
0
        /// <summary>
        /// Create empty solution at the <paramref name="localPath"/>
        /// </summary>
        /// <param name="localPath">Create the solution at the path.</param>
        /// <param name="name">The solution name.</param>
        public static void CreateEmptySolution(string localPath, string name)
        {
            localPath.ThrowIfNullOrEmpty(nameof(localPath));
            var dte = Package.GetGlobalService(typeof(DTE)) as DTE2;

            try
            {
                dte.Solution.Create(localPath, name);
                dte.Solution.Close(false);
            }
            catch (Exception ex) when(!ErrorHandlerUtils.IsCriticalException(ex))
            {
            }
        }
コード例 #2
0
        /// <summary>
        /// Create empty solution at the <paramref name="localPath"/>
        /// </summary>
        /// <param name="localPath">Create the solution at the path.</param>
        /// <param name="name">The solution name.</param>
        public void CreateEmptySolution(string localPath, string name)
        {
            ThreadHelper.ThrowIfNotOnUIThread();
            localPath.ThrowIfNullOrEmpty(nameof(localPath));
            DTE2 dte = GoogleCloudExtensionPackage.Instance.Dte;

            try
            {
                dte.Solution.Create(localPath, name);
                dte.Solution.Close(false);
            }
            catch (Exception ex) when(!ErrorHandlerUtils.IsCriticalException(ex))
            {
            }
        }