Ishan Malik
Ishan Malik

Reputation: 139

The command exited with code 2 visual studio 2017

While I'm trying to build my windows application, I'm getting following error.

The command

"C:\repos\CommunityLive\CL_GateApp\signing\StrongNameUnsignedAssemblies.bat C:\repos\CommunityLive\CL_GateApp\signing" exited with code 2.

Following is my Pre-Build event command line

$(ProjectDir)signing\StrongNameUnsignedAssemblies.bat $(ProjectDir)signing\

Here is the Macros details

Macros

Upvotes: 3

Views: 11041

Answers (1)

Missy
Missy

Reputation: 1370

Xcopy command without /y can cause this:

This post-build event exited with Code 2:

xcopy $(TargetDir)*.*  $(SolutionDir)shared\ /s /i 

This worked as hoped:

xcopy $(TargetDir)*.*  $(SolutionDir)shared\ /s /i /y

Upvotes: 0

Related Questions