msbuild fatal error LNK1101 with Visual Studio Build Tools 2017 v.15.7.1 in declarative script

270 views
Skip to first unread message

David Aldrich

unread,
May 15, 2018, 10:57:50 AM5/15/18
to jenkins...@googlegroups.com

I have a msbuild job that runs within a Jenkins declarative script:

 

stage('build_myProj_VisualStudio') {

 

    agent { label "jenkinswin10" }

 

    environment {

        VSMSBUILDCMD_14_0='C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\Common7\\Tools\\VsMSBuildCmd.bat'

        VSMSBUILDCMD_14_1='C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\BuildTools\\Common7\\Tools\\VsMSBuildCmd.bat'

        _MSPDBSRV_ENDPOINT_ = "${env.BUILD_NUMBER}"

    }

 

    steps {

        bat '''

            SET PATH=""

            call "%VSMSBUILDCMD_14_1%"

            msbuild %WORKSPACE%\\MSVC\\myproj.sln /p:Configuration=Release /p:Platform="Win32" /flp:logfile=ZodiacOutput.log /verbosity:normal

        '''

 

when I run the job I get error:

 

(Link target) ->

  LINK : fatal error LNK1101: incorrect MSPDB140.DLL version; recheck installation of this product

 

However, if I run the commands from the command line or from a Freestyle Jenkins job the job succeeds.

 

The error occurs with Visual Studio Build Tools 2017 v.15.7.1 but the job succeeded with v.15.6.0.

 

Any ideas how to fix this please?

 

Best regards

 

David

 

Slide

unread,
May 15, 2018, 11:34:20 AM5/15/18
to jenkins...@googlegroups.com
Are you running it the exact same way in the freestyle job? Meaning, the environment variables are set exactly the same and you are using a bat step with the same exact commands?

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/1fe054c2d84a44b6ba14664b6de1220b%40EUX13SRV1.EU.NEC.COM.
For more options, visit https://groups.google.com/d/optout.

David Aldrich

unread,
May 15, 2018, 11:54:52 AM5/15/18
to jenkins...@googlegroups.com

Thanks Slide, good point.  The freestyle job did not have:

 

_MSPDBSRV_ENDPOINT_ = "${env.BUILD_NUMBER}"

 

without that the declarative script passes.

 


For more options, visit https://groups.google.com/d/optout.

Click here to report this email as spam.

Reply all
Reply to author
Forward
0 new messages