tag:help.appveyor.com,2012-11-13:/discussions/problems/28686-nuget-restore-not-working-properly-on-one-projectAppVeyor: Discussion 2020-12-08T00:30:40Ztag:help.appveyor.com,2012-11-13:Comment/488859552020-12-07T19:15:46Z2020-12-07T19:15:48Znuget restore not working properly on one project<div><p>I have made sure this project has no visible differences than the other project we have that are working and at this point wondering if it might be a server issue. This repository has been building on AppVeyor for several years and we have not had this problem before.</p>
<p>Here is the console output when the error happens.</p>
<p>MSBuild auto-detection: using msbuild version '16.8.1.52902' from 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin'.<br>
Restoring packages for C:\projects\Submodules\agg-sharp\examples\lion_outline\lion_outline.csproj...<br>
Restoring packages for C:\projects\Submodules\agg-sharp\examples\lion\lion.csproj...<br>
Unable to load the service index for source <a href="https://api.nuget.org/v3/index.json">https://api.nuget.org/v3/index.json</a>.<br>
An error occurred while sending the request. The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel. The remote certificate is invalid according to the validation procedure.</p></div>larsbrubakertag:help.appveyor.com,2012-11-13:Comment/488859552020-12-07T20:41:06Z2020-12-07T20:41:06Znuget restore not working properly on one project<div><p>Hi Lars,</p>
<p>Last year there was a fix for failing NuGet. You might still have it in your build configuration, something like:</p>
<pre>
<code>[System.IO.File]::AppendAllText("C:\Windows\System32\drivers\etc\hosts", "`n93.184.221.200`tapi.nuget.org")</code>
</pre>
<p>This fix is not needed anymore.</p></div>Feodor Fitsnertag:help.appveyor.com,2012-11-13:Comment/488859552020-12-07T22:04:50Z2020-12-07T22:04:50Znuget restore not working properly on one project<div><p>Yes that was in the install script, but I removed it (to match the other building projects) and it did not resolve the issue.</p>
<p>The current content of the Install Script is:</p>
<p>git submodule update --init --recursive<br>
nuget restore agg-sharp.sln</p>
<p>Thanks for looking at this.</p></div>larsbrubakertag:help.appveyor.com,2012-11-13:Comment/488859552020-12-07T22:34:28Z2020-12-07T22:34:28Znuget restore not working properly on one project<div><p>Could you drop a link to a build please?</p></div>Feodor Fitsnertag:help.appveyor.com,2012-11-13:Comment/488859552020-12-07T22:47:53Z2020-12-07T22:48:13Znuget restore not working properly on one project<div><p>Thank you for looking into this.</p>
<p>Is this the link you need?<br>
<a href="https://ci.appveyor.com/project/larsbrubaker/agg-sharp/builds/36708591">https://ci.appveyor.com/project/larsbrubaker/agg-sharp/builds/36708591</a></p>
<p>I just pushed this and it failed in the same way.</p></div>larsbrubakertag:help.appveyor.com,2012-11-13:Comment/488859552020-12-07T23:57:54Z2020-12-07T23:57:54Znuget restore not working properly on one project<div><p>Alright, you have <code>api.nuget.org</code> defined in HOSTS on Environment tab of project settings.</p></div>Feodor Fitsnertag:help.appveyor.com,2012-11-13:Comment/488859552020-12-08T00:29:47Z2020-12-08T00:29:47Znuget restore not working properly on one project<div><p>Removing that seems to have fixed the problem. Thank you.</p></div>larsbrubaker