Extension to Debug project with last successful build.

guess_me_if_u_can 126 Reputation points
2023-01-21T21:00:24.42+00:00

Hi Team,

I am trying to create a Visual studio extension to debug the application with the last successful build. i.e, new build won't happen, instead it would Run the last build and attach that process to the Visual studio. I'm not sure whether VS already have this command. Please Help.


        private void Execute(object sender, EventArgs e)
        {
            ThreadHelper.ThrowIfNotOnUIThread();

            DTE dte = Package.GetGlobalService(typeof(DTE)) as DTE;
            if (dte != null)
            {
                //dte.Solution.SolutionBuild.Build();    // This command start to build again with debug
                
                dte.Solution.SolutionBuild.Run();    // This command runs last build but debugger is not attached.

                // Need 
                
            }
        }
Visual Studio Extensions
Visual Studio Extensions
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Extensions: A program or program module that adds functionality to or extends the effectiveness of a program.
156 questions
{count} votes