1
Answer

Get Vs version number

Photo of Nikahat Khan

Nikahat Khan

13y
1.6k
1
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.

Answers (1)

Next Recommended Forum