New Visual Studio 2017 image breaks build

Levi's Avatar

Levi

18 Apr, 2019 04:05 PM

The latest VS image has caused some errors in our project that was previously building no problem. On https://www.appveyor.com/updates/2019/04/14/ one of the items is .NET Core SDK 2.2.203 (Runtime 2.2.4). I was going to install this on my local machine but noticed on the download page that Microsoft says: "This release is not compatible with Visual Studio 2017. If you are using Visual Studio 2017, you should use .NET Core SDK 2.2.106.". This makes me think the latest VS image was broken by installing a bad sdk. This is the error we were receiving:

System.AggregateException : One or more errors occurred. (Could not load file or assembly 'Microsoft.AspNetCore.Mvc.Core, Version=2.2.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. The system cannot find the file specified.) (The following constructor parameters did not have matching fixture data: TestServerFixture fixture)
---- System.IO.FileNotFoundException : Could not load file or assembly 'Microsoft.AspNetCore.Mvc.Core, Version=2.2.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. The system cannot find the file specified.
By switching to use the Previous Visual Studio 2017 build in our appveyor.yml this error went away.
  1. Support Staff 1 Posted by Ilya Finkelshte... on 18 Apr, 2019 07:24 PM

    Ilya Finkelshteyn's Avatar

    Please check this discussion. In general it is right thing to pin to specific .NET Core SDK.

    Please let us know if this helps to use the current Visual Studio 2017 image.

  2. 2 Posted by Levi on 18 Apr, 2019 08:07 PM

    Levi's Avatar

    I checked that discussion. That isn't what i'm talking about. We don't need to pin our project to a specific .NET Core SDK as it works on different versions just fine. I was trying to point out that the update notes seem to be indicating that .NET Core SDK 2.2.203 was installed, but that is only supposed to be used in Visual Studio 2019. The equivalent SDK for Visual Studio 2017 is 2.2.106 (see https://dotnet.microsoft.com/download/thank-you/dotnet-sdk-2.2.106-...).

    Since our project builds fine on our machines using the newest version of the SDK meant for Visual Studio 2017 (2.2.106) it leads me to believe that 2.2.203 was incorrectly installed as part of your latest update, leading to our project failing to build.

  3. Support Staff 3 Posted by Ilya Finkelshte... on 18 Apr, 2019 09:32 PM

    Ilya Finkelshteyn's Avatar

    I see. Sorry, I should have to look at your initial message closer.

    Indeed we install software with a scripts, therefoer we missed that message you can see in the browser.

    Is there any way you can provide some simplified repro in the public repository? Or at least provide us with a steps to reproduce it?

  4. Support Staff 4 Posted by Ilya Finkelshte... on 18 Apr, 2019 09:52 PM

    Ilya Finkelshteyn's Avatar

    What puzzles me is that our own production and test .NET Core projects which use SDK 2.2.203 are being built fine. Also we have no other complains. So this maybe some special case we need to investigate. So repro would be great.

  5. 5 Posted by Renato on 18 Apr, 2019 09:54 PM

    Renato's Avatar

    If you need a repro, this open source repository is affected by the same issue

    https://ci.appveyor.com/project/Kralizek/nybus/builds/23954388

    The symptom is that it fails after executing a couple of dotnet tool install

  6. Support Staff 6 Posted by Ilya Finkelshte... on 19 Apr, 2019 02:08 AM

    Ilya Finkelshteyn's Avatar

    @Renato: i don't think it is the same issue at all. I forked your repo and was able to make it work by changing Cake.Tool version to the latest 0.33.0

    @Levi: we still need a repro

  7. 7 Posted by Levi Tiessen on 19 Apr, 2019 03:27 AM

    Levi Tiessen's Avatar

    I will see if I can get something together after the weekend.

  8. 8 Posted by Renato on 19 Apr, 2019 06:47 PM

    Renato's Avatar

    Thanks @ilya. I wonder what happened because my CI pipeline has been working without any issue until few days ago.

  9. Support Staff 9 Posted by Ilya Finkelshte... on 19 Apr, 2019 07:28 PM

    Ilya Finkelshteyn's Avatar

    @Renato I did not look deep. It is just my first instinct to update the the failing components to the last version when other components has been updated recently. If you want to investigate, you can set Cake.Tool version back to the old one and increase it's verbosity to the highest level.

  10. 10 Posted by Levi on 24 Apr, 2019 01:33 PM

    Levi's Avatar

    In my efforts to make a simple reproducible case I realized that I hadn't been clear. What started failing is some tests that run as part of our build.

    Before the weekend I had updated my local SDK from version 2.2.103 to 2.2.106 when our Appveyor build (tests) started to break. I re-ran the build and the tests and everything passed. I then looked at what had changed and saw what I believed (and still believe) to be the wrong version (2.2.203) of the SDK for vs 2017.

    Yesterday while trying to make a simple repro, using version 2.2.106 I started to have the same errors locally when running the tests after a build. This would seem to indicate that some behaviour changed between version 2.2.103 which I had previously and the new 2.2.106. Since the issue is now reproducible locally, this doesn't seem to be an issue with the Visual Studio image that Appveyor has.

  11. Support Staff 11 Posted by Ilya Finkelshte... on 25 Apr, 2019 10:59 PM

    Ilya Finkelshteyn's Avatar

    Thanks for the update. I filed https://github.com/appveyor/ci/issues/2925 to investigate before next image update. However my feeling that this is mostly related to VS and unrelated to msbuild which is version 15 for both VS2017 and VS2019.

    I think we still have to install the latest SDK + ensure the latest for specific VS version (in this case 2.2.106) is installed too.

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