BizHawk
BizHawk copied to clipboard
Compilation on Win7 is broken
since https://github.com/TASEmulators/BizHawk/commit/d142555ec3ab643361fff9973da63d28b652fa7b
I tried absolutely everything I could find on google, including https://devblogs.microsoft.com/nuget/deprecating-tls-1-0-and-1-1-on-nuget-org/ and installing ALL OS updates. I tried grabbing microsoft.bcl.hashcode.1.1.1.nupkg
from Yoshi and extracting it to E:\Program Files (x86)\Microsoft SDKs\NuGetPackages\microsoft.bcl.hashcode\1.1.1
and E:\Users\feos\.nuget\packages\microsoft.bcl.hashcode\1.1.1
. I tried running nuget.exe install Microsoft.Bcl.HashCode -Source C:\the\dir\containing\the\file
on it. Nothing helps. I get the same errors in VS2022 (and 2019)
Rebuild started...
1>------ Rebuild All started: Project: BizHawk.Version, Configuration: Debug Any CPU ------
NuGet package restore failed. Please see Error List window for detailed warnings and errors.
Error occurred while restoring NuGet packages: Unable to load the service index for source https://api.nuget.org/v3/index.json.
1>E:\Program Files\dotnet\sdk\6.0.201\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResolution.targets(267,5): error NETSDK1004: Assets file 'H:\SVN\bizhawk\src\BizHawk.Version\obj\project.assets.json' not found. Run a NuGet package restore to generate this file.
1>Done building project "BizHawk.Version.csproj" -- FAILED.
etc.
Running Restore nuget packages
gives
NuGet package restore failed. Please see Error List window for detailed warnings and errors.
Error occurred while restoring NuGet packages: NuGet.Protocol.Core.Types.FatalProtocolException: Unable to load the service index for source https://api.nuget.org/v3/index.json. ---> System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a send. ---> System.IO.IOException: Unable to read data from the transport connection: Удаленный хост принудительно разорвал существующее подключение. ---> System.Net.Sockets.SocketException: Удаленный хост принудительно разорвал существующее подключение
at System.Net.Sockets.Socket.EndReceive(IAsyncResult asyncResult)
at System.Net.Sockets.NetworkStream.EndRead(IAsyncResult asyncResult)
--- End of inner exception stack trace ---
at System.Net.TlsStream.EndWrite(IAsyncResult asyncResult)
at System.Net.ConnectStream.WriteHeadersCallback(IAsyncResult ar)
--- End of inner exception stack trace ---
at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
at System.Net.Http.HttpClientHandler.GetResponseCallback(IAsyncResult ar)
--- End of inner exception stack trace ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at NuGet.Protocol.ServerWarningLogHandler.<SendAsync>d__1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
etc. Even tho I can open https://api.nuget.org/v3/index.json in all my browsers (FF, Opera, Chrome).
If dropping dev support for Win7 is an explicit consensus decision, I want the discussion to have happened.
To be clear, are you able to build if you revert that single commit?
When figuring that out I've ran into another issue. Before 6b4e526a4459d8a4372b67f3d2b28ddee5e61d57, artifacts created during compilation would make reverting d142555ec3ab643361fff9973da63d28b652fa7b fix the build. But if you git-cleanup, that commit prevents creation of those artifacts and therefore reverting d142555ec3ab643361fff9973da63d28b652fa7b stops helping. Reverting them both fixes the build tho.
For what it's worth I'm able to build just fine in my windows 7 vm, so this must be something specific with your system (or my vm setup).
Maybe it's because VM still accesses the web through the host?
I'm not entirely sure, but I'd think the guest VM would still need to support the correct TLS version regardless of whether it's piping the connection through a host system or not. I ran a openssl s_client -showcerts -servername api.nuget.org -connect api.nuget.org:443
command from the commandline to check the connection and it seems to be using TLSv1.2 just fine.
I get
verify error:num=20:unable to get local issuer certificate
[...]
read:errno=10054
It sounds closer to a your machine isn't configured for TLSv1.2 correctly and thus cannot access NuGet packages. And this "broke" for you when a new NuGet package was added in.
A new one anyways, not necessarily that specific one. Meaning if you were to delete all your currently downloaded NuGet packages, you probably wouldn't be able to build at all even after reverting those commits. If we were to add more NuGet packages, it would "break" further.
Can you try using Tor as an HTTP proxy? It might be a new region block from MS.
Using HTTPTunnelPort 9080
H:\SVN\bizhawk>dotnet restore Определение проектов для восстановления... E:\Program Files\dotnet\sdk\6.0.201\NuGet.targets(130,5): error : Не удалось загрузить индекс служб для источника https://api.nuget.org/v3/index.json. [H:\SVN\bizhawk\BizHawk.sln] E:\Program Files\dotnet\sdk\6.0.201\NuGet.targets(130,5): error : The SSL connection could not be established, see inner exception. [H:\SVN\bizhawk\BizHawk.sln] E:\Program Files\dotnet\sdk\6.0.201\NuGet.targets(130,5): error : Received an unexpected EOF or 0 bytes from the transport stream. [H:\SVN\bizhawk\BizHawk.sln]
Recent question with no answers https://stackoverflow.com/questions/73279611/visual-studio-cannot-connect-to-nuget-org-on-windows-7
Solved by switching to Win7 Ultimate (from Home Premium). Nothing else helped.