Skip to content

Allow using a layout (visual studio cache/mirror) to download packages - #191

Open
roblabla wants to merge 3 commits into
Jake-Shadle:mainfrom
roblabla:roblabla/layout-url
Open

roblabla wants to merge 3 commits into
Jake-Shadle:mainfrom
roblabla:roblabla/layout-url

Conversation

@roblabla

Copy link
Copy Markdown

At $WORK, we try to avoid hitting external services whenever we can, preferring to mirror as much as possible the content we use locally, so that outages don't affect us as much.

We use xwin to generate a cross-compilation toolchain from linux to windows. Unfortunately, this generation step is currently tied to microsoft's servers, and we have had CI failures related to microsoft's servers either being down or refusing to serve certain files from the CDN in the past. To remediate this, we'd like to be able to mirror the parts of the CDN we use locally.

To achieve this, this patch series does two things:

  1. It adds a new flag --package-manifest which allows passing the "package manifest" (aka VSMan, aka Catalog) to xwin. xwin already has a --manifest flag, but unfortunately that takes a channel manifest instead of a package manifest, so it still requires "dereferencing" said channel manifest to grab the package manifest.
  2. It adds support for a --layout-url flag, which should contain a Visual Studio layout - the official way to create a VS mirror. Those layouts should be created using the visual studio installer's --layout flag, ergo vs_community.exe --layout layout\. The layout can then be uploaded to an HTTP server and passed to other invocations to avoid hitting the MS servers.

FWIW, there are some open questions here:

  1. Instead of adding a new --package-manifest, perhaps the existing --manifest could detect whether the file being passed is a channel or package manifest, and automatically adapt?
  2. Instead of using a layout, we may want to use a different mirroring mechanism? I went with layout because that's what VS uses internally, but if a different mirroring solution would be prefered, that's totally OK for me!

@roblabla
roblabla requested a review from Jake-Shadle as a code owner October 16, 2026 09:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant