Skip to content

Comments

Add "BuildingInsideVisualStudioCode" option#24776

Open
noiseonwires wants to merge 2 commits intodotnet:mainfrom
noiseonwires:building-in-vscode-msbuild-option
Open

Add "BuildingInsideVisualStudioCode" option#24776
noiseonwires wants to merge 2 commits intodotnet:mainfrom
noiseonwires:building-in-vscode-msbuild-option

Conversation

@noiseonwires
Copy link

This PR makes a change to improve the Hot Reload experience for .NET MAUI iOS device builds in VS Code:

Accept BuildingInsideVisualStudioCode for .mobile.props import: The VS Code project system sets BuildingInsideVisualStudioCode=true, that should include the .mobile.props file that carries the IDE-selected RuntimeIdentifier so that design-time builds resolve the correct platform assemblies.

In VS Code, design-time builds did not receive the correct RuntimeIdentifier for iOS device targets — they defaulted to iossimulator-x64. This caused Roslyn to resolve the wrong baseline assemblies, that broke Hot Reload. The .mobile.props mechanism (already used by VS on Windows) solves this.

@rolfbjarne rolfbjarne self-assigned this Feb 25, 2026
@rolfbjarne
Copy link
Member

@noiseonwires can you recreate this PR from origin, and not your fork (and use a dev/noiseonwires/* prefix for the branch name)? Our CI can't handle PRs from forks unfortunately

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.

2 participants