Help!! How can I get current visual studio version in VC projectbuild event?

  • Thread starter Thread starter Ed
  • Start date Start date
E

Ed

Hi, guys,
One question block me. I want to know current Visual Studio version,
"vc80" or "vc90" in Build Event. Can I use some macro in Build Event
to get it?

Thanks a lot!
Ed.
 
Hi, guys,
One question block me.  I want to know current Visual Studio version,
"vc80" or "vc90" in Build Event. Can I use some macro in Build Event
to get it?

Thanks a lot!
Ed.

I used a poor method as following:

<code>

@echo "$(DevEnvDir)">DevEnv.log

findstr /C:"Visual Studio 8" DevEnv.log
if errorlevel 0 goto BuildEventVC80

findstr /C:"Visual Studio 9" DevEnv.log
if errorlevel 0 goto BuildEventVC90

:BuildEventVC80
echo "VC 80"

goto BuildEventEnd


:BuildEventVC90
echo "VC 90"

goto BuildEventEnd

:BuildEventEnd
@echo "Build Event End"

</code>
 
Back
Top