How to detect VS 2013 or VS 2015
Hi,
I am using fake and dont want to execute a target if the image is a VS2013.
I tried looking for VisualStudioVersion but it is not set.
I can look for devenv.exe under vs 12.0\common7\ide, but I am not sure if both VS2013 and VS2015 will be on the image.
Is there a way to do it?
Thanks!
Comments are currently closed for this discussion. You can start a new one.
Keyboard shortcuts
Generic
| ? | Show this help |
|---|---|
| ESC | Blurs the current field |
Comment Form
| r | Focus the comment reply box |
|---|---|
| ^ + ↩ | Submit the comment |
You can use Command ⌘ instead of Control ^ on Mac

Support Staff 1 Posted by Feodor Fitsner on 12 Aug, 2016 05:48 PM
Just check if
C:\Program Files (x86)\MSBuild\14.0\Binfolder exists. If it does then it's an image with VS 2015 installed.2 Posted by parthopdas on 13 Aug, 2016 07:06 AM
Thanks Feodor, this worked, issue resolved!
Although the reverse doesn't seem to be true. i.e. on a vs2015 machine we have both 2013 and 2015.
3 Posted by parthopdas on 13 Aug, 2016 08:44 AM
Actually, I take that back. Sometimes it appears both VS2013 and VS2015 are installed on the box.
Is there a way to ensure on VS2013 is installed on "VS2013" image?
Thanks!
Support Staff 4 Posted by Feodor Fitsner on 13 Aug, 2016 03:43 PM
VS 2013 is always installed, so it's either VS 2013 and VS 2015 on "VS 2015" image or just VS 2013 on "VS 2013" image.
5 Posted by parthopdas on 14 Aug, 2016 12:38 AM
That is indeed the case. Thank you for the super prompt response!
6 Posted by parthopdas on 14 Aug, 2016 12:49 AM
Apologies for going back and forth on this one...
Now I am pretty sure this is an inconsistent behavior with AppVeyor
Earlier when I reported, I gained access to the VS2013 box and verified that there was no VS2015.
So I unblocked the build and it failed at a step which should not have been executed if VS2015 isnt there
Here is the vs2013 job that failed. Here is the logic for ignoring VS2013
Please help.
Support Staff 7 Posted by Feodor Fitsner on 15 Aug, 2016 03:34 AM
Could you please clarify what do you mean by "inconsistent behavior"?
8 Posted by parthopdas on 16 Aug, 2016 01:42 AM
Hi Feodor, as I explained below:
Earlier when I reported, I gained access to the VS2013 box and verified that there was no VS2015.So I unblocked the build and it failed at a step which should not have been executed if VS2015 isnt thereHere is the vs2013 job that failed. Here is the logic for ignoring VS2013
Meaning the above is an example where "OS: Visual Studio 2013" was run on a box with both 2013 and 2015.However in the previous run, I logged into the VS2013 box, and there was no VS2015.
Let me know if you need additional information.
Partho
Support Staff 9 Posted by Feodor Fitsner on 16 Aug, 2016 02:06 AM
You mean when build is being run with "os: Visual Studio 2013" there is VS 2015 on build worker?
10 Posted by Partho on 16 Aug, 2016 09:34 PM
Aplogies for the confusion, Feodor. When I replied from email, it looks as if a new thread got created. Copy pasting the contents here:
Also note that I had already provided the links to the vs2015 detection mechanism and the build that failed in my "Aug 14, 2016 @ 10:49 AM" post
Here is the vs2013 job that failed. Here is the logic for ignoring VS2013
Support Staff 11 Posted by Feodor Fitsner on 16 Aug, 2016 11:29 PM
Sorry, I've lost a little bit. You are saying that logic for ignoring VS2013 doesn't work on
Visual Studio 2013image?12 Posted by Partho on 16 Aug, 2016 11:46 PM
Yes that is correct.
The logic sometimes succeeds on an OS:2013 Image and sometimes it fails.
I have given a link to the OS:2013 job that failed.
Support Staff 13 Posted by Feodor Fitsner on 17 Aug, 2016 02:08 AM
Can you please do the simplest repro, like a minimalistic fake build with just one target running that logic? I'm not sure I can reproduce the case on my tests with PowerShell.
14 Posted by Partho on 17 Aug, 2016 10:49 AM
I am really sorry about this. AppVeyor had been right all along!
The problem was with my build script and it was rather silly. I'll spare you details :P
Thanks for building AppVeyor and for providing super quick support on the forums.
Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 02:08 AM.