Can't build asp.net solution !

Andre's Avatar

Andre

06 Aug, 2015 07:22 PM

Hi guys,

Although I've heard of lots of good things about AppVeyor, I am afraid I can't share that feeling :(
I've signed up for a paid plan today and have been trying to set up my project and have had no luck so far ! Many different errors which some are obviously my fault, however, I've got 3 or 4 fails on nuget not being able to restore its packages ! That's bad :(

On a side note, my yaml file is attached and I'd like to know whether I am correctly calling bower to restore my UI packages.

Thanks in advance.
Andre

  1. Support Staff 1 Posted by Feodor Fitsner on 06 Aug, 2015 07:39 PM

    Feodor Fitsner's Avatar

    Sorry to hear that. We've been seeing nuget restore issues across all data centres.

    What nuget packages do you have problems restoring with?

    To reduce dependency on nuget.org availability you can setup build cache for nuget packages: http://www.appveyor.com/docs/nuget#dealing-with-intermittent-nuget-org-issues

    - Feodor

  2. 2 Posted by Andre Gallo on 07 Aug, 2015 01:59 AM

    Andre Gallo's Avatar

    There are many packages that can't be restored. Examples below:

    Unable to find version '5.2.3' of package 'Microsoft.AspNet.Cors'.

    Unable to find version '5.2.3' of package 'Microsoft.AspNet.Cors'.
    Unable to find version '3.5.2' of package 'Autofac'.
    Unable to find version '5.2.3' of package 'Microsoft.AspNet.WebApi.Client'.
    Unable to find version '2.0.7' of package 'Serilog.Sinks.MSSqlServer'.
    Unable to find version '6.1.0' of package 'Sendgrid'.
    Unable to find version '0.15.0-build32981' of package 'Microsoft.ApplicationInsights.JavaScript'.
    Unable to find version '3.0.1' of package 'Microsoft.Owin.Security.OAuth'.

    I've enabled package cache as you suggested but still no luck. What I don't understand is that I can't reproduce these issues even when my nuget package is empty on my local environment.

    Thanks
    Andre

    ---- On Thu, 06 Aug 2015 16:39:01 -0300 Feodor Fitsner <[email blocked]> wrote ----

  3. Support Staff 3 Posted by Feodor Fitsner on 07 Aug, 2015 02:10 AM

    Feodor Fitsner's Avatar

    AppVeyor build cache works when all packages are restored and build is successful.

    I understand your frustration, but I'm afraid it's a problem on nuget.org side: https://twitter.com/nuget/status/629274570701340673

    Look at these test build results, for example, with nuget restore verbosity set to detailed. There is no "Unable to connect" message, but the response "Unable to find ..." comes from nuget.org API: https://ci.appveyor.com/project/FeodorFitsner/appveyor-bot-test-2r9... It's like if you were requested a package with non-existing version.

    Locally it usually works because there is nuget cache in %localappdata%\NuGet\Cache folder which is never/rarely cleaned.

    Just to further assure you that this is nuget.org issue I've just removed %localappdata%\NuGet\Cache folder and did nuget restore for this project. Result attached - this is my local dev machine.

  4. Support Staff 4 Posted by Feodor Fitsner on 07 Aug, 2015 02:12 AM

    Feodor Fitsner's Avatar

    I've figured out the solution though - you could retry nuget restore few times until exit code is 0.

    There is a simple batch for that: https://gist.github.com/FeodorFitsner/508b71250295590e6408

    Place it into the root of your repo and use as (if .sln in the root):

    nuget-restore
    

    or

    nuget-restore <solution.sln>
    

    Hope that helps!

  5. 5 Posted by Andre Gallo on 07 Aug, 2015 01:13 PM

    Andre Gallo's Avatar

    Hi Feodor,

    That did the trick ;) Thanks a lot!

    Just a quick question though: Do I always have to install bower in my 'install scripts' or does it come with pre-installed ?

    Cheers
    Andre

    ---- On Thu, 06 Aug 2015 23:12:51 -0300 Feodor Fitsner &lt;[email blocked]&gt; wrote ----

  6. Support Staff 6 Posted by Feodor Fitsner on 07 Aug, 2015 03:13 PM

    Feodor Fitsner's Avatar

    That's great it worked! :)

    Yes, bower should be installed all the time.

  7. 7 Posted by Andre Gallo on 24 Aug, 2015 04:55 PM

    Andre Gallo's Avatar

    Hi Feodor,

    Unfortunately I'll have to bother you again with this. This nuget restore problem is killing me! Although you have provided me with a good workaround, nuget has been failing to restore packages saying "unable to find version X of package Y." This is a new error. What's worse, it doesn't fail the build, it continues with the pipeline and fails at the end as it cannot put a package together.

    For every commit I make I have to run the same build a number of times to get it pass this issue!

    Can you make AppVeyor a little more robust when restoring nuget packages? I understand that this might be outside of your control however AppVeyor is really dependent on nuget and am sure this is impacting a loft of your customers.

    Thanks
    Andre

    ---- On Fri, 07 Aug 2015 10:13:04 -0300 Andre Gallo &lt;[email blocked]&gt; wrote ----

    Hi Feodor,

    That did the trick ;) Thanks a lot!

    Just a quick question though: Do I always have to install bower in my 'install scripts' or does it come with pre-installed ?

    Cheers
    Andre

    ---- On Thu, 06 Aug 2015 23:12:51 -0300 Feodor Fitsner &lt;[email blocked]&gt; wrote ----

  8. Support Staff 8 Posted by Feodor Fitsner on 24 Aug, 2015 05:31 PM

    Feodor Fitsner's Avatar

    "Unable to find version X of package Y" is server-side nuget.org error (meaning AppVeyor was able to connect but got error response from nuget.org server) and I'm afraid there is nothing we can do with that.

    How do you call nuget restore command? If you call it in "CMD" mode (or no ps: prefix in appveyor.yml) then it should fail immediately if exit code is non-zero.

    Instead of bare nuget restore command use this batch with retries: http://www.appveyor.com/docs/nuget#restore-with-retries - works like a charm in 99% of cases.

    Consider setting up build cache for packages folder: http://www.appveyor.com/docs/nuget#use-build-cache-for-nuget-packages

    Hope that helps.

  9. 9 Posted by Andre Gallo on 24 Aug, 2015 09:31 PM

    Andre Gallo's Avatar

    I was already using your nuget-restore.cmd script. It's pretty good.

    Will enable package cache, thanks for the tip. And will also let you know if there is anything problems with that.

    Regards
    Andre

  10. Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 01:59 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