示例#1
0
        /// <include file='doc\ProjectConfig.uex' path='docs/doc[@for="BuildableProjectConfig.StartBuild"]/*' />
        public virtual int StartBuild(IVsOutputWindowPane pane, uint options)
        {
            const uint VS_BUILDABLEPROJECTCFGOPTS_REBUILD = 1;
            bool       rebuild = (options & VS_BUILDABLEPROJECTCFGOPTS_REBUILD) != 0;

            if (rebuild)
            {
                config.Clean();
            }
            config.PrepareBuild(rebuild);
            Debug.Assert(thread == null);
            this.options     = options;
            this.output      = pane;
            this.fCleanBuild = false;
            if (!this.BuildBegin())
            {
                return(0);
            }
            if (!rebuild && this.config.ProjectMgr.CheckUpToDate(this.config.Node))
            {
                pane.OutputString("The project is up-to-date.\n");
                this.BuildEnd(true);
                return(0);
            }
            thread = new Thread(new ThreadStart(BuildMain));
            thread.Start();
            return(0);
        }