-vs switch has to be specified with Visual Studio version problem

Options
fatmanur61
fatmanur61 Posts: 82 ✭

We prepare a .bat file and we call this bat file from jenkins. This bat file commands works in Visual Studio command prompt. When I execute these commands individually There have no problem but when I call bat file from normal command prompt We take the "-vs switch has to be specified with Visual Studio version " problem. When we take this problem command line does not continue compiling. Related images added to issue.

Comments

  • Bogdan Czwartkowski
    Bogdan Czwartkowski Posts: 164 admin
    edited May 2019
    Options

    Hi @fatmanur61 ,

    If you have multiple Visual Studio versions, C/C++test may need to know which version to work with when running from command line. Just add the following option to your cpptestcli commands. It tells C/C++test to work with Visual Studio 2012 (which I think you are using):

    -vs 2012

  • fatmanur61
    fatmanur61 Posts: 82 ✭
    Options

    Hi @Bogdan Czwartkowski thank you for your answer. I tried the command but I take several problems now. First I enter - vs 2012 then program said missing solution. Then I enter solution info. Then it Said another error. Related screen shot is added to question.