コード例 #1
0
        /// <summary>
        /// Builds the MSI package to the specified filename.
        /// </summary>
        /// <param name="filename">The filename of the MSI package.</param>
        /// <exception cref="ArgumentException">The <paramref name="filename"/> parameter is null or empty.</exception>
        /// <exception cref="PackageException">A validation error or other platform error occurred</exception>
        public void Build(string filename)
        {
            if (string.IsNullOrEmpty(filename))
                throw new ArgumentException(Resources.Argument_NullOrEmpty, nameof(filename));

            var validator = new PackageValidator(this);
            validator.Validate();

            try
            {
                using (var writer = new PackageWriter(this, filename))
                    writer.Write();
            }
            catch (Exception ex)
            {
                throw new PackageException(Resources.Package_PlatformError, ex);
            }
        }
コード例 #2
0
ファイル: PackageBuilder.cs プロジェクト: showconcept/Deploy
        /// <summary>
        /// Builds the MSI package to the specified filename.
        /// </summary>
        /// <param name="filename">The filename of the MSI package.</param>
        /// <exception cref="ArgumentException">The <paramref name="filename"/> parameter is null or empty.</exception>
        /// <exception cref="PackageException">A validation error or other platform error occurred</exception>
        public void Build(string filename)
        {
            if (string.IsNullOrEmpty(filename))
            {
                throw new ArgumentException(Resources.Argument_NullOrEmpty, nameof(filename));
            }

            var validator = new PackageValidator(this);

            validator.Validate();

            try
            {
                using (var writer = new PackageWriter(this, filename))
                    writer.Write();
            }
            catch (Exception ex)
            {
                throw new PackageException(Resources.Package_PlatformError, ex);
            }
        }