Visual Studio 2019 更新用ダウンロードサイトの情報について

常山 剛 20 評価のポイント
2025-02-27T00:50:32.9066667+00:00

クローズド・ネットワーク上にあるPCに、開発環境(Visual Studio 2019)を置いております。

このネットワーク下で、Visual Studio 2019の更新を行なうため

firewallに、Visual Studio 2019 更新用ダウンロードサイトへの接続許可設定

を行いたいと考えております。

Visual Studio 2019 更新用ダウンロードサイトについて、情報をいただけないでしょうか。

Visual Studio
Visual Studio
Windows、Web、モバイル デバイス用のアプリケーションを構築するための統合開発ツールの Microsoft スイートのファミリ。
120 件の質問
{count} 件の投票

承認済みの回答
  1. gekka 11,216 評価のポイント MVP
    2025-02-27T03:53:39.9133333+00:00
    1. %LOCALAPPDATA%\Microsoft\VisualStudio\Packages\_ChannelFeeds 以下にある .updateUrichannel.jsonを探す
    2. .updateUriに記載されているurlからchannels.jsonをダウンロード
    3. channels.json内でchannelIdがVisualStudio.16.ReleaseのchannelUriを調べる(プレビューなどの場合はそれに応じて)
    4. channelUriから*.chmanをダウンロード
    5. *.chman内でfileNameの拡張子が*.vsmanになっているurlを調べる
    6. urlから*.vsmanをダウンロード
    7. *.vsmanに記載されているuriを全て調べる

    202502028追記

    *.vsman内のアドレスだけでなく、リダイレクト先も調べないとダメですね。

    using System;
    using System.Collections.Generic;
    using System.Linq;
    
    namespace CSConsoleCore
    {
        class Program
        {   
            static async System.Threading.Tasks.Task Main(string[] args)
            {
                string pathVSMAN = "VisualStudio.vsman";
    
                HashSet<string> urls = GetUrlsFromJson(pathVSMAN);
    
                string[] skipList = new[] { "download.visualstudio.microsoft.com" };//判定除外のホスト
    
                Dictionary<string, int> dlhosts = new Dictionary<string, int>();
                Dictionary<string, HashSet<string>> redirects = new Dictionary<string, HashSet<string>>();
                int counter = 0;
                int skip = 0;
    
    
                System.Net.Http.HttpClient client = new System.Net.Http.HttpClient();
    
                foreach (var url in urls)
                {
                    counter++;
                    var uri = new Uri(url);
                    if (skipList.Contains(uri.Host))
                    {
                        skip++;
                    }
                    else
                    {
                        try
                        {
                            var result = await client.SendAsync(new System.Net.Http.HttpRequestMessage(System.Net.Http.HttpMethod.Head, uri));
                            var target = result?.RequestMessage?.RequestUri;
                            if (target != null)
                            {
                                dlhosts.TryGetValue(target.Host, out var targetCount);
                                dlhosts[target.Host] = targetCount + 1;
    
                                if (uri.Host != target.Host)
                                {
                                    if (!redirects.TryGetValue(uri.Host, out var list))
                                    {
                                        list = new HashSet<string>();
                                        redirects.Add(uri.Host, list);
                                    }
                                    if (list.Add(target.Host))
                                    {
                                        Console.WriteLine($"リダイレクト {uri.Host} -> {target.Host}");
                                    }
                                }
                            }
                        }
                        catch (System.Net.Http.HttpRequestException ex)
                        {
                            Console.Error.WriteLine(ex.Message);
                        }
                    }
                    Console.Write($"{counter} / {urls.Count}  ({skip})");
                    Console.CursorLeft = 0;
                }
    
                Console.WriteLine();
                Console.WriteLine();
                Console.WriteLine("*** リダイレクト先 ***");
                foreach (var redirect in redirects)
                {
                    Console.WriteLine(redirect.Key);
                    foreach (var target in redirect.Value)
                    {
                        Console.WriteLine("\t" + target);
                    }
                }
            }
        }
    }    
    
    リダイレクト go.microsoft.com -> dl.google.com
    リダイレクト aka.ms -> dl.google.com
    リダイレクト go.microsoft.com -> archive.apache.org
    リダイレクト go.microsoft.com -> cocos2d-x.org
    リダイレクト go.microsoft.com -> www.python.org
    リダイレクト www.incredibuild.com -> ib-downloads-official.s3.amazonaws.com
    リダイレクト aka.ms -> armkeil.blob.core.windows.net
    リダイレクト go.microsoft.com -> objects.githubusercontent.com
    リダイレクト go.microsoft.com -> download.visualstudio.microsoft.com
    リダイレクト go.microsoft.com -> public-cdn.cloud.unity3d.com
    リダイレクト go.microsoft.com -> download.unity3d.com
    リダイレクト go.microsoft.com -> epicgames-download1.akamaized.net
    13364 / 13364  (13312)
    *** リダイレクト先 ***
    go.microsoft.com
            dl.google.com
            archive.apache.org
            cocos2d-x.org
            www.python.org
            objects.githubusercontent.com
            download.visualstudio.microsoft.com
            public-cdn.cloud.unity3d.com
            download.unity3d.com
            epicgames-download1.akamaized.net
    aka.ms
            dl.google.com
            armkeil.blob.core.windows.net
    www.incredibuild.com
            ib-downloads-official.s3.amazonaws.com
    
    1 人がこの回答が役に立ったと思いました。

0 件の追加の回答

並べ替え方法: 最も役に立つ

お客様の回答

回答は、質問作成者が [承諾された回答] としてマークできます。これは、ユーザーが回答が作成者の問題を解決したことを知るのに役立ちます。