Esempio n. 1
0
        public static void Save(this ProjectNuPackConfig config)
        {
            var file = Path.Combine(AppDataDir, "\\" + config.Project.UniqueName + ProjectNuPackConfig.Ext);
            var xml  = XmlSerializerHelper.GetXmlStringFromObject(config);
            var doc  = new XmlDocument();

            doc.LoadXml(xml);
            var dir = Path.GetDirectoryName(file);

            if (!Directory.Exists(dir))
            {
                Directory.CreateDirectory(dir);
            }
            doc.Save(file);
        }
Esempio n. 2
0
        public DeployWizard()
        {
            InitializeComponent();

            _metadataControl               = new PackageMetadataControl();
            _metadataControl.Dock          = DockStyle.Fill;
            _metadataControl.ErrorProvider = errorProvider;
            panelPackageInfo.Controls.Add(_metadataControl);
            ActiveControl = _metadataControl;

            _deployControl      = new NuGetDeployControl();
            _deployControl.Dock = DockStyle.Fill;
            wizardPageDeploy.Controls.Add(_deployControl);

            _project    = Host.Instance.Dte2.GetActiveProejct();
            _dir        = _project.GetDirectory();
            _releaseDir = Path.Combine(_dir, "bin", "Release");


            _nuGetConfig   = ConfigHelper.ReadNuGetConfig();
            _projectConfig = _project.ReadNuPackConfig();

            BindTextBoxEvents();

            stepWizardControl.SelectedPageChanged += StepWizardControl_SelectedPageChanged;
            stepWizardControl.Finished            += StepWizardControl_Finished;
            wizardPageMetadata.Commit             += WizardPageCommit;
            wizardPageOptions.Commit += WizardPageCommit;
            chkSymbol.CheckedChanged += (sender, e) =>
            {
                if (_deployControl.ViewModel != null && string.IsNullOrWhiteSpace(_deployControl.ViewModel.SymbolServer))
                {
                    _deployControl.ViewModel.SymbolServer = Common.SymbolServer;
                }
            };
        }