2010-09-28 14 views

Respuesta

1

Estoy totalmente de acuerdo. No puedo creer que no lo fijan en VS 2010.

Pero como digo:

Ésta se cierra Microsoft Connect.

Ésta parece ser todavía activo y tiene una solución (que no vale la pena el tiempo para mí): Microsoft Active

supongo que esto le indica la seriedad con Microsoft toma esto: problema sigue pendiente de Hace 5 años: 283618

3

Encontré esto también muy irritante, así que busqué una solución yo mismo. Y se acercó con una pequeña aplicación de consola que escribí, con el siguiente código:

using System; 
using System.Collections.Generic; 
using System.Linq; 
using System.Runtime.InteropServices; 
using System.Text; 
using System.Threading; 
using System.Windows.Forms; 


internal class Program 
{ 
    // For Windows Mobile, replace user32.dll with coredll.dll 
    [DllImport("user32.dll", SetLastError = true)] 
    static extern IntPtr FindWindow(string lpClassName, string lpWindowName); 

    // Find window by Caption only. Note you must pass IntPtr.Zero as the first parameter. 
    [DllImport("user32.dll", EntryPoint = "FindWindow", SetLastError = true)] 
    static extern IntPtr FindWindowByCaption(IntPtr ZeroOnly, string lpWindowName); 

    [DllImport("user32.dll")] 
    //  static extern bool ShowWindow(IntPtr hWnd, ShowWindowCommands nCmdShow); 
    static extern bool ShowWindow(IntPtr hWnd, int nCmdShow); 

    internal static void Main(string[] args) 
    { 
    do 
    { 
     Console.Title = "Waiting..."; 
     Console.WriteLine("Waiting..."); 
     IntPtr hwnd = FindWindowByCaption(IntPtr.Zero, "File Modification Detected"); 
     while ((int)hwnd == 0) 
     { 
      Thread.Sleep(500); 
      hwnd = FindWindowByCaption(IntPtr.Zero, "File Modification Detected"); 
     } 

     Console.Title = "Found one, kill it..."; 
     Console.WriteLine("Found one, kill it..."); 
     // ShowNormal = 1 
     // Show = 5 
     ShowWindow(hwnd, 5); 
     SendKeys.SendWait("{ENTER}"); 
     Thread.Sleep(500); 
     hwnd = IntPtr.Zero; 
    } while (true); 

    } 
} 

Si inicia este programa, se espera a que esas ventanas emergentes, y hace clic en Actualizar automáticamente.

6

Trate VSCommands 2010 Lite, que permite volver a cargar todos los proyectos:

enter image description here

+1

Gracias! ¡Justo lo que necesitaba! –

Cuestiones relacionadas