Build failing without any change

Tzach Shabtay's Avatar

Tzach Shabtay

13 Mar, 2018 01:31 AM

It seems like something changed on the virtual machine causing the build to fail without any change to the codebase.

The failing build: https://ci.appveyor.com/project/tzachshabtay/monoags/build/job/0pow9i63jjtti1kg
A successful build just 3 days ago for the same codebase: https://ci.appveyor.com/project/tzachshabtay/monoags/build/1.0.621/job/lc3qubmgk3ksv83s

Note that the error seen in the failed build also happens in the successful build, so it wasn't failing the build then but it is now?.

This is the error:
C:\projects\monoags\Source\AGS.API\AGS.API.csproj(281,3): error MSB4019: The imported project "C:\Program Files\dotnet\sdk\2.1.100\Microsoft\Portable\v5.0\Microsoft.Portable.CSharp.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.

The only difference seems to be that the successful build is running against dotnet 2.1.4 and not 2.1.100.

  1. Support Staff 1 Posted by Ilya Finkelshte... on 13 Mar, 2018 01:49 AM

    Ilya Finkelshteyn's Avatar

    What happens if you rebuild your successful build? For that you can open it and press RE-BUILD COMMIT button.

  2. 2 Posted by Tzach Shabtay on 13 Mar, 2018 11:59 AM

    Tzach Shabtay's Avatar
  3. Support Staff 3 Posted by Owen McDonnell on 14 Mar, 2018 01:06 AM

    Owen McDonnell's Avatar

    As a workaround, you can add a global.json file to the project with the following in it to force specific dotnet sdk,

    {
      "sdk": {
        "version": "2.1.4"
      }
    }
    
  4. 4 Posted by Tzach Shabtay on 14 Mar, 2018 03:24 PM

    Tzach Shabtay's Avatar

    Thanks, the workaround works for now.

  5. Support Staff 5 Posted by Owen McDonnell on 14 Mar, 2018 06:23 PM

    Owen McDonnell's Avatar

    Sorry, i misspoke. Its not really a workaround but rather the established way to specify a version of .net core sdk.

  6. 6 Posted by Tzach Shabtay on 03 May, 2018 06:29 PM

    Tzach Shabtay's Avatar

    Hi, this workaround is causing problems for our users. We don't want to tie down the tooling to a specific dot net core version.

    I tried to remove it now, but I'm getting:
    C:\projects\monoags\Source\AGS.API\AGS.API.csproj(289,3): error MSB4019: The imported project "C:\Program Files\dotnet\sdk\2.1.103\Microsoft\Portable\v5.0\Microsoft.Portable.CSharp.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.

    From:
    https://ci.appveyor.com/project/tzachshabtay/monoags/build/1.0.756/job/24avq7ejyjvpdj5t

    Even though it works fine on multiple machines we tested on locally.

    How can we resolve this?

    Thanks.

  7. Support Staff 7 Posted by Owen McDonnell on 04 May, 2018 12:08 AM

    Owen McDonnell's Avatar

    Following advice given here i tried changing dotnet restore to msbuild /t:restore MonoAGS.sln and that seemed to work.

  8. 8 Posted by Tzach Shabtay on 04 May, 2018 04:34 PM

    Tzach Shabtay's Avatar

    Thanks, it works.

  9. Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 02:28 AM.

Comments are currently closed for this discussion. You can start a new one.

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