Okay, I have to live with it. It works for a while and then it does not. I have no way to control it.
Error NU1301: Unable to load the service index for source https://api.nuget.org/v3/index.json
I just created a new WINUI3 project and tried to build it. Got the following error:
Error NU1301 Unable to load the service index for source https://api.nuget.org/v3/index.json
When I try curl https://api.nuget.org/v3/index.json
, I get:
<head><title>Document Moved</title></head>
<body><h1>Object Moved</h1>This document may be found <a HREF="https://nuget.cdn.azure.cn/v3/index.json">here</a></body>
Then I try curl -L https://api.nuget.org/v3/index.json
, I get:
curl: (6) Could not resolve host: nuget.cdn.azure.cn
This is really awkward. I live in China, I always have problems with network connections with many foreign websites. Is there any workaround over this?
2 answers
Sort by: Most helpful
-
-
Shaun Chen 21 Reputation points
2023-04-19T06:42:44.4766667+00:00 What you can do is try to avoid using nuget mirror in China. You can try to resolve api.nuget.org here: https://boce.aliyun.com/detect/dns or https://www.gdnspc.com/ Then you can write the result to your machine's hosts fine.