FluentValidation 6.4.0-beta* Nuget Package restore failed, operation timed out

254 views Asked by At

I was trying to add FluentValidation to my asp.net core project. Originally i want to use Nuget FluentValidation.AspNetCore/6.4.0-beta9 and this pakage depends on Nuget FluentValidation/6.4.0-beta9. So I added the FluentValidation to project.json.

{
  "dependencies": {
    "Microsoft.NETCore.App": {
      "version": "1.0.1",
      "type": "platform"
    },
    "Microsoft.AspNetCore.Mvc": "1.0.1",
    "Microsoft.AspNetCore.Routing": "1.0.1",
    "Microsoft.AspNetCore.Server.IISIntegration": "1.0.0",
    "Microsoft.AspNetCore.Server.Kestrel": "1.0.1",
    "Microsoft.Extensions.Configuration.EnvironmentVariables": "1.0.0",
    "Microsoft.Extensions.Configuration.FileExtensions": "1.0.0",
    "Microsoft.Extensions.Configuration.Json": "1.0.0",
    "Microsoft.Extensions.Logging": "1.0.0",
    "Microsoft.Extensions.Logging.Console": "1.0.0",
    "Microsoft.Extensions.Logging.Debug": "1.0.0",
    "Microsoft.Extensions.Options.ConfigurationExtensions": "1.0.0",
    ...,
    "FluentValidation": "6.4.0-beta9"
  },
  ....
}

This results in a package restore failed Message with following Output.

log  : Restoring packages for C:\Users\asdf\devel\BTnetCorePoc\NcCqrsPoc\src\NcCqrsPos.Web.Commands\project.json...
log  : Retrying 'FindPackagesByIdAsyncCore' for source 'http://10.0.10.49/NugetServer/nuget_error/FindPackagesById()?id='FluentValidation''.
log  : An error occurred while sending the request.
log  :   The operation timed out
log  : Retrying 'FindPackagesByIdAsyncCore' for source 'http://10.0.10.49/NugetServer/nuget_error/FindPackagesById()?id='System.Text.RegularExpressions''.
log  : An error occurred while sending the request.
log  :   The operation timed out
....
error: Failed to retrieve information from remote source 'http://10.0.10.49/NugetServer/nuget_error/FindPackagesById()?id='FluentValidation''.
error: An error occurred while sending the request.
error: Failed to retrieve information from remote source 'http://10.0.10.49/NugetServer/nuget_error/FindPackagesById()?id='System.Text.RegularExpressions''.
error: An error occurred while sending the request.

So it results in any kind of TimeOut, i not really well understand how nuget package publishing works. Timeout seems to me there are a server not available or sth like that, but the nuget package page linked above worked well (but i think that is just an indices page). And that ip 10.0.10.49 seems to be wierd ip for restoring a package. Does I probably missconfigured any nuget source path in vs Studio? (that throws me in mind while writing this question, i will check that later)

To use FluentValidation.AspNetCore, I need at least the version of FluentValidation 6.4.0-beta1. So i tried the most versions for
FluentValidation 6.4.0-beta1 to FluentValidation 6.4.0-beta9 (which i targeted)
and every try failes with the same timeout error (becuz of timeout it takes some minutes, i dont know how to hard stop, the restoring process)

After that i was trying to restore earlier Versions of FluentValidation which i cant use (FluentValidation.AspNetCore needs at least FluentValiedation 6.4.0-beta1), i checked if nuget restore works with older and stable FluentValidation. I tried following versions:

FluentValidation 6.2.1 (latest stable) FluentValidation 6.2.1-beta1
FluentValidation 6.3.3-alpha
FluentValidation 6.3.4-alpha

Restoring these Versions works well so i think the error could not be any kind of missconfigured VS on my Machine. So where could be the Problem else? And what should be my next steps? I created an FluentValidation Github Repo Issue after this.

1

There are 1 answers

0
had On BEST ANSWER

Like JeremySkinner suggested in the FluentValidation Github Issue. I removed the additional configured Package Source, configured in VS2015 (Tools->Options->Nuget Packager Manager->Packager Sources: deactivate my addidional custom 10.0.10.49/NugetServer->OK)
Trying now to restore FluentValidation 6.4.0-beta9 works well.

So there is a strange behavior which i cant figure out why this issue happening when additional Package Sources is defined. I just keep that in mind. I dont need that additional Package Source, so just deactivate it, works for that issue.