2

I'm getting this message when trying to build my project (Visual Studio 2010):

    Error   120 error MSB3073: The command "call "C:\project\clientdll\dependencies\gitrev.bat"
:VCEnd" exited with code 255.

Yes, the file does exist, I used this command in Pre build event, it looks like this:

call "$(SolutionDir)dependencies\gitrev.bat"

Any ideas?

Omer D
  • 41
  • 2
  • 7
  • Note the ":VCEnd" in the error message, that doesn't belong there. You are missing an end-of-line in your build event command. Put the caret at the end and Press Enter. – Hans Passant Jan 06 '15 at 14:16
  • It still show up for some reason: 'Error 89 error MSB3073: The command "call "C:\project\clientdll\dependencies\gitrev.bat" :VCEnd" exited with code 255. ' – Omer D Jan 06 '15 at 14:24
  • Hmya, that's going to take a while. Start at the top of the error list, not the bottom. – Hans Passant Jan 06 '15 at 14:33
  • That's the only error I get, haha. – Omer D Jan 06 '15 at 14:35

2 Answers2

1

Your Visual Studio is probably not openend with sufficient privileges. Open as admin and try again.

1) right click on Visual Studio Icon

2) choose run as administrator

3) In Start page choose your application.

4) Clean solution

5) Verify if outputs are removed and that the bat file is present in location

6) Rebuild solution

7) Check for errors again.

1

I had the same error when forgot to add the "call" prefix before the label:

(
  ...
  :MYLABEL blablabla
  ...
)

The "(:" sequence basically will output the "Continue?" in the opened console window. Seems the Visual Studio does some track of what kind of cmd.exe behaviour and immediately stops the cmd.exe process with the 255 error.

I've had another error like:

error MSB3073: :VCEnd" exited with code -1.

Where the reason of this was the script output of another sequence (only in Visual Studio 2010 and higher):

... error ... :

Well, the Visual Studio tries to guess there the script behaves badly and stops it with these kind of errors.

Andry
  • 2,273
  • 29
  • 28
  • I had a similar issue, the command would work in command prompt but not in during the build process. I added a GOTO and label on the same scripts and it started to work. – Vin Sep 05 '17 at 22:27