Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 24, 2025

.NET 10 builds from the VMR (dotnet/dotnet) instead of dotnet/runtime. Source maps generated during CI builds were pointing to the old repository, causing 404 errors when browser debuggers attempted to load TypeScript sources.

Changes

Updated sourcemapPathTransform in rollup configurations to generate VMR-relative URLs:

  • src/mono/browser/runtime/rollup.config.js
  • src/native/rollup.config.plugins.js
// Before
res = `https://raw.githubusercontent.com/dotnet/runtime/${gitHash}/${relativeSourcePath}`;

// After  
res = `https://raw.githubusercontent.com/dotnet/dotnet/${gitHash}/src/runtime/${relativeSourcePath}`;

Fixes #121672

Original prompt

This section details on the original issue you should resolve

<issue_title>Could not load content for githubusercontent</issue_title>
<issue_description>### Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

Since upgrading to Visual Studio 2026 and .NET 10 I have started to receive a number of "Could not load content..." errors in the browser.

For example:

Could not load content for https://raw.githubusercontent.com/dotnet/runtime/b0f34d51fccc69fd334253924abd8d6853fad7aa/src/mono/browser/runtime/debug.ts (HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE)

The Sources tab in the browser shows:

Image

I have tried cleareing the cache and done a hard refresh, updating the .NET workloads, and even installed the .NET 10.0 WebAssembly Build Tools but I still receive the errors.

Is it possible I have missed a step in the upgrade?

Expected Behavior

No response

Steps To Reproduce

No response

Exceptions (if any)

No response

.NET Version

No response

Anything else?

No response</issue_description>

Comments on the Issue (you are @copilot in this section)

@akoeplinger This is because we switched to building .NET inside of the VMR repo (https://github.com/dotnet/dotnet) in .NET 10 and so this URL for the source map needs to be updated: https://github.com/dotnet/runtime/blob/928eb5fd02d066bfeada8d58547cac48baebe78a/src/mono/browser/runtime/rollup.config.js#L134 @pavelsavara And this one too

res = `https://raw.githubusercontent.com/dotnet/runtime/${gitHash}/${relativeSourcePath}`;
</comment_new>


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@github-actions github-actions bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Nov 24, 2025
Co-authored-by: akoeplinger <1376924+akoeplinger@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix loading issue for githubusercontent in browser Fix source map URLs for .NET 10 VMR builds Nov 24, 2025
Copilot AI requested a review from akoeplinger November 24, 2025 15:21
@akoeplinger akoeplinger marked this pull request as ready for review November 24, 2025 15:21
Copilot AI review requested due to automatic review settings November 24, 2025 15:22
@akoeplinger akoeplinger added arch-wasm WebAssembly architecture area-Build-mono and removed needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners labels Nov 24, 2025
@dotnet-policy-service
Copy link
Contributor

Tagging subscribers to 'arch-wasm': @lewing, @pavelsavara
See info in area-owners.md if you want to be subscribed.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes source map URLs for .NET 10 builds to work with the new VMR (Virtual Monolithic Repository) structure. Since .NET 10 now builds from dotnet/dotnet instead of dotnet/runtime, the source map URLs need to be updated to point to the correct repository and include the src/runtime/ path prefix.

  • Updated source map URL generation in two rollup configuration files
  • Changed repository reference from dotnet/runtime to dotnet/dotnet with src/runtime/ path prefix

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/native/rollup.config.plugins.js Updated sourcemapPathTransform function to generate VMR-relative GitHub URLs with /src/runtime/ path prefix for CI builds
src/mono/browser/runtime/rollup.config.js Updated sourcemapPathTransform function to generate VMR-relative GitHub URLs with /src/runtime/ path prefix for CI builds

@akoeplinger
Copy link
Member

/backport to release/10.0

@github-actions

This comment was marked as outdated.

@github-actions

This comment was marked as outdated.

@akoeplinger akoeplinger enabled auto-merge (squash) November 24, 2025 21:32
@akoeplinger akoeplinger merged commit daced03 into main Nov 24, 2025
169 of 171 checks passed
@akoeplinger akoeplinger deleted the copilot/fix-githubusercontent-loading-issue branch November 24, 2025 21:38
lewing pushed a commit that referenced this pull request Nov 26, 2025
Backport of #121923

## Customer Impact

- [x] Customer reported: #121804
- [ ] Found internally

.NET 10 builds from the VMR (dotnet/dotnet) instead of dotnet/runtime.
Source maps generated during CI builds were pointing to the old
repository, causing 404 errors when browser debuggers attempted to load
TypeScript sources.

## Regression

- [X] Yes
- [ ] No

This regressed when the official runtime build moved to happen in the
VMR.

## Testing

Local testing to make sure the correct URL is produced.

## Risk

Low. This only affects debugging scenarios.
@github-actions github-actions bot locked and limited conversation to collaborators Dec 25, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

arch-wasm WebAssembly architecture area-Build-mono

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Could not load content for githubusercontent

3 participants