Appveyor builds have stopped working due to Cake.Core version

Scott's Avatar

Scott

28 Feb, 2018 02:09 PM

We have recently got the issue of Appveyor builds suddenly stopping working. We have not changed our configuration.

Error: The assembly 'Cake.MsDeploy, Version=0.4.0.0, Culture=neutral, PublicKeyToken=null'
is referencing an older version of Cake.Core (0.22.0).
This assembly need to reference at least Cake.Core version 0.26.0.
Another option is to downgrade Cake to an earlier version.
It's not recommended, but you can explicitly opt-out of assembly verification
by configuring the Skip Verification setting to true
(i.e. command line parameter "--settings_skipverification=true",
environment variable "CAKE_SETTINGS_SKIPVERIFICATION=true",
read more about configuration at https://cakebuild.net/docs/fundamentals/configuration)

  1. Support Staff 1 Posted by Ilya Finkelshte... on 28 Feb, 2018 05:43 PM

    Ilya Finkelshteyn's Avatar

    Hi Scott,

    We need a little bit more information to help:

    • Link to first failed build
    • Link to last successful build
    • Build configuration in YAML format (use Export YAML if you use UI, and feel free to delete all confidential information from the file).

    Ilya.

  2. 2 Posted by Scott Vaughan on 05 Mar, 2018 05:30 PM

    Scott Vaughan's Avatar

    First failed build: https://ci.appveyor.com/project/agidea/footfall-data-validation-sys...
    Last successful build: https://ci.appveyor.com/project/agidea/footfall-data-validation-sys...
    Build configuration:

    # Notes:
    # Appveyor reference: https://www.appveyor.com/docs/appveyor-yml/
    
    #on_finish:
    #    - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
    
    #---------------------------------#
    #      general configuration      #
    #---------------------------------#
    
    # version format
    version: '1.0.{build}'
    
    # branches to build
    branches:
        # whitelist
        only:
            - master
    
    #---------------------------------#
    #    environment configuration    #
    #---------------------------------#
    
    # Build worker image (VM template)
    image: Visual Studio 2017
    
    init:
    # More info here: https://www.appveyor.com/docs/how-to/rdp-to-build-worker/
    #    - ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
    
    environment:
        # DO NOT put privileged information in this section, instead use the secure variables
        # as detailed here: https://www.appveyor.com/docs/build-configuration/#secure-variables
        # And use this tool to encrypt: https://ci.appveyor.com/tools/encrypt
        DVS_CONNECTION_STRING:
            secure: pBKyb7ba61gPYLF1CdCf1YjJThKmhxsHGQL4a+1ySDo8P6O4+PclYFYgJLFwTMLOjOJbP0IFduWCPqNacKWygy85PS29RHgShiCRLGEi5XHe02Q2vGqTMpn6XKp9d1JLV3vbsOUzB5bEKKG6d3978w==
        IDENTITY_CONNECTION_STRING:
            secure: pBKyb7ba61gPYLF1CdCf1dWa3jtjuRtLoOYypTwKP3llwOaCAe6NGpI0oj9fGwJPqPOY5iuZ3HzQmkGfk6ADVT2IcRgbSP+WPuNvQ/yCNXd4TGaklDyvkN+k473R90kGiFdKJz1ejoKtfkxsap4wQg==
        TST_CONNECTION_STRING:
            secure: pBKyb7ba61gPYLF1CdCf1SDzQfU+uX5tmev2qNv3h1XmtpktydImnFfB1OiM9+HH7tKBbqanoOL520mdkb9D19earpNz/ZjTc+APSfxsm9C48nVLPLC/qlnTLiD39nSULr/VGxSjgh29NsI5XGoXsA==
        APPVEYOR_RDP_PASSWORD: 2h0fPpGPJ7ca
        SMTP_USERNAME:
            secure: 36WqxXpJRtT+A9vNdR3DKw5pizwKUN+XeUQNkyUJE34=
        SMTP_PASSWORD:
            secure: QQHkbhu67I8Ig2B+Vo6CuhjyX6QgfcsCUs2rcblVYmk3oERhGeaVaDui2Acgfeov
    
    services:
        # For more services supported by AppVeyor: https://www.appveyor.com/docs/services-databases/
        - iis
    
    install:
      - WebpiCmd /Install /Products:UrlRewrite2 /AcceptEula /OptInMU /SuppressPostFinish
    
    # enable patching of AssemblyInfo.* files
    assembly_info:
      patch: true
      file: '**\AssemblyInfo.*'
      assembly_version: $(APPVEYOR_BUILD_VERSION)
      assembly_file_version: $(APPVEYOR_BUILD_VERSION)
    
    #---------------------------------#
    #       build configuration       #
    #---------------------------------#
    
    # build platform, i.e. x86, x64, Any CPU. This setting is optional.
    platform: Any CPU
    
    # build Configuration, i.e. Debug, Release, etc.
    configuration: Release
    
    build:
        verbosity: minimal
    
    # scripts to run before build
    before_build:
        - cmd:  c:\Windows\system32\inetsrv\appcmd set config /section:anonymousAuthentication /enabled:true
    
    # scripts to run *after* solution is built and *before* automatic packaging occurs (web apps, NuGet packages, Azure Cloud Services)
    before_package:
    
    # scripts to run after build
    after_build:
    
    # to run your custom scripts instead of automatic MSBuild
    build_script:
        - ps: . ./build.ps1 -Target build
    
    # to disable automatic builds
    #build: off
    
    #---------------------------------#
    #       tests configuration       #
    #---------------------------------#
    
    # scripts to run before tests
    before_test:
    
    # scripts to run after tests
    after_test:
        - ps: . ./build.ps1 -Target package
    
    # to run your custom scripts instead of automatic tests
    test_script:
        - ps: . ./build.ps1 -Target unit-tests
    
    # to disable automatic tests
    #test: off
    
    #---------------------------------#
    #      artifacts configuration    #
    #---------------------------------#
    
    artifacts:
        - path: .\src\Footfall\artifacts\_PublishedWebsites\Footfall_Package
          name: FootfallWebApp
    
    #---------------------------------#
    #     deployment configuration    #
    #---------------------------------#
    
    deploy:
    
    # Amazon S3 deployment provider settings
    - provider: S3
      access_key_id: AKIAILTZACHNJGBOVYKA
      secret_access_key:
        secure: D5y7EQepxwM3Fsf1PSAlGTE1mEeMylBzJuGU1MoON5OGfQwIVMCLBsu2h+7ECW3A
      region: eu-west-1
      bucket: springboard-dvs-deployment
      folder:
      artifact:
      max_error_retry: 1
      unzip: true
      reduced_redundancy: true
      on:
        branch:
            - master
    
    # scripts to run before deployment
    before_deploy:
        - ps: ./InstallSelfSignedCert.ps1
    
    # scripts to run after deployment
    after_deploy:
        - ps: . ./build.ps1 -Target deploy
        - ps: ./environment_variables.ps1
        - ps: . ./build.ps1 -Target integration-tests
    
    # to run your custom scripts instead of provider deployments
    deploy_script:
    
    # to disable deployment
    #deploy: off
    
    #---------------------------------#
    #        global handlers          #
    #---------------------------------#
    
    # on successful build
    on_success:
    
    # on build failure
    on_failure:
    
    # after build failure or success
    on_finish:
    
    #---------------------------------#
    #         notifications           #
    #---------------------------------#
    
    notifications:
    
    # Email
    - provider: Email
      to:
        - [email blocked]<***@***>
      subject: "Build {{status}}: {{projectName}} {{buildVersion}}"
      on_build_success: true
      on_build_failure: true
      on_build_status_changed: true
    

    Scott Vaughan

    Developer

    [Agidea LinkedIn page]https://www.linkedin.com/company/18210594/ [Agidea Twitter page] https://twitter.com/agidea_hq [Agidea Facebook page] https://www.facebook.com/agideahq/

    [Agidea logo]https://www.agidea.uk/

    E: [email blocked][email blocked]
    W: agidea.ukhttps://www.agidea.uk/
    T: 0161 875 2390tel:+44161%20875%202390
    A: Map - Warren Bruce Court, Manchester M17 1LBhttps://www.google.co.uk/maps/place/AGIDEA/@53.4675849,-2.3062294,17z/data=!3m1!4b1!4m5!3m4!1s0x487bae656e4cda71:0x2d1b361fddcad410!8m2!3d53.4675849!4d-2.3040407
    [Microsoft Partner Network logo]https://partner.microsoft.com/en-gb [Crown Commerical Service Supplier logo] [Scrum Alliance logo] https://www.scrumalliance.org/ [Investors in people logo]https://www.investorsinpeople.com/ [Cyber Essentials logo] https://www.cyberessentials.ncsc.gov.uk/ [Umbraco logo] https://umbraco.com/partners/umbraco-partnerships/partners-index/

    On 28 Feb 2018, at 17:43, Ilya Finkelshteyn > wrote:

  3. Support Staff 3 Posted by Ilya Finkelshte... on 06 Mar, 2018 12:42 AM

    Ilya Finkelshteyn's Avatar

    I see, don't you think that this is issue described here?

  4. 4 Posted by gep13 on 06 Mar, 2018 07:48 PM

    gep13's Avatar

    Hello Scott,

    I am a member of the Cake Team. The issue that you are describing happened due to two things. The first is that with the 0.26.0 release of Cake, we introduced a breaking change. You can find more information about this breaking change in the release notes here:

    https://github.com/cake-build/cake/releases/tag/v0.26.0

    Due to this breaking change, we added code to detect if the addin's being loaded into the Cake process are compiled against at least 0.26.0. If they aren't, we throw an error, and that is what you are seeing in the output.

    The second thing that happened is that it would appear that you are not pinning to a specific version of Cake. We always recommend that you do this, and this is documented in the getting started guide here:

    https://cakebuild.net/docs/tutorials/getting-started

    And also in this tutorial here:

    https://cakebuild.net/docs/tutorials/pinning-cake-version

    Since you haven't pinned to a specific version, each time you run the build on AppVeyor, the bootstrapper downloads the latest version of Cake, and as a result, you see the error above.

    For now, I would recommend that you pin to version 0.25.0 of Cake, and also pin all your addin/tool versions as well, that way, you will get the most repeatable, and reliant builds.

    Hope that helps!

    Gary

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions

17 Jun, 2018 04:04 PM
16 Jun, 2018 08:06 PM
16 Jun, 2018 07:30 PM
16 Jun, 2018 09:22 AM
15 Jun, 2018 09:31 PM

 

15 Jun, 2018 08:31 PM
15 Jun, 2018 04:29 PM
15 Jun, 2018 12:39 PM
15 Jun, 2018 12:37 PM
15 Jun, 2018 08:21 AM
14 Jun, 2018 12:44 AM