i want to get the Visual studio version number using envdte on the build event .
I tried to get it through this code.../
Process[] p = Process.GetProcessesByName("devenv");
foreach (Process proc in p)
{
if (proc.ProcessName == "devenv")
{
MessageBox.Show(proc .MainModule .FileVersionInfo.FileVersion);
}
}
but the problem is for 2 different version of VS it shows both versions as 2 instances of devenv are opened in the Tsakmanager.
please provide solution asap.