0

I have one C# solution with a few projects in it, in visual studio 2013's post build event of each project, I set up script to sign each dll as following:

call "$(DevEnvDir)..\Tools\vsvars32.bat" 
signtool sign /f "$(SolutionDir)mycompany.pfx" /p pwd4Pfx "$(TargetPath)"

Now I configure auto build for the solution in Jenkins using msbuild.exe

I got the following error:

(PostBuildEvent target) ->

C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Common.targets(4291,5): error MSB3073: The command "call "Undefined..\Tools\vsvars32.bat" [C:\Program Files (x86)\Jenkins\workspace\Myproject\Project1.csproj] C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Common.targets(4291,5): error MSB3073: signtool sign /f "C:\Program Files (x86)\Jenkins\workspace\Myproject\mycompany.pfx" /p pwd4pfx "C:\Program Files (x86)\Jenkins\workspace\myproject\project1\bin\Debug\project1.dll" [C:\Program Files (x86)\Jenkins\workspace\myproject\project1\project1.csproj]

How to fix the error in Jenkins? There must be some setting I did wrong. Thanks

magicandre1981
  • 27,895
  • 5
  • 86
  • 127
toosensitive
  • 2,335
  • 7
  • 46
  • 88
  • I heck the envvars and call the cmd this way: http://stackoverflow.com/a/31568416/1466046 – magicandre1981 Jan 23 '16 at 06:08
  • 1
    It is not that likely that you have the $(DevEnvDir) macro set when you don't have VS installed on the machine. Trying to do this without VS is never not a mistake. – Hans Passant Jan 23 '16 at 08:28

0 Answers0