Skip to content

Add DotNetSdkSupportsVSHostObjectRemoting property#53100

Merged
YuliiaKovalova merged 4 commits intorelease/10.0.3xxfrom
dev/ykovalova/add-com-remoting-property
Feb 24, 2026
Merged

Add DotNetSdkSupportsVSHostObjectRemoting property#53100
YuliiaKovalova merged 4 commits intorelease/10.0.3xxfrom
dev/ykovalova/add-com-remoting-property

Conversation

@YuliiaKovalova
Copy link
Member

@YuliiaKovalova YuliiaKovalova commented Feb 20, 2026

Summary

Set \DotNetSdkSupportsVSHostObjectRemoting=true\ near the \UsingTask\ declarations for tasks that use \VSHostObject\ COM remoting.

This allows VS tooling (WebTools) to detect COM remoting support via a well-known property instead of fragile SDK version comparisons.

Context

Connected to #53028 — after consolidating the VSHostObject implementations, the VS side needs a reliable way to know when the SDK supports the new remotable host object protocol.

Changes

  • Microsoft.NET.Build.Containers.props: Added \DotNetSdkSupportsVSHostObjectRemoting\ property near the \CreateNewImage\ UsingTask
  • Microsoft.NET.Sdk.Publish.targets: Added \DotNetSdkSupportsVSHostObjectRemoting\ property near the publish task imports (\ZipDeploy, \OneDeploy, \MSDeploy)
  • MSBuildSdkResolver.cs: Removed resolver-based property emission (moved to SDK import files per review feedback)
  • GivenAnMSBuildSdkResolver.cs: Reverted property count assertions and removed resolver-specific property checks

Emit DotNetSdkSupportsComRemoting=true as an MSBuild property via the SDK
resolver's propertiesToAdd, following the pattern used for
SdkResolverMSBuildTaskHostRuntimeVersion. This allows VS tooling to check
for COM remoting support via a property rather than version comparison.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings February 20, 2026 14:35
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 adds a new MSBuild property DotNetSdkSupportsComRemoting to signal COM remoting support in the SDK resolver, following the established pattern from PR #45364. This enables Visual Studio tooling (WebTools) to reliably detect the consolidated VSHostObject implementation from PR #53028 without fragile SDK version comparisons.

Changes:

  • Added DotNetSdkSupportsComRemoting constant and unconditionally emits it as "true" in SDK resolver's propertiesToAdd
  • Updated three test methods to verify the new property is correctly added and increment property count assertions

Reviewed changes

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

File Description
src/Resolvers/Microsoft.DotNet.MSBuildSdkResolver/MSBuildSdkResolver.cs Added constant definition and property emission logic following the established pattern
test/Microsoft.DotNet.MSBuildSdkResolver.Tests/GivenAnMSBuildSdkResolver.cs Updated test constant, count assertions, and added property value verification in 3 test methods

@YuliiaKovalova YuliiaKovalova changed the title Add DotNetSdkSupportsComRemoting property to MSBuildSdkResolver Add DotNetSdkSupportsComRemoting property to Sdk.props Feb 20, 2026
@YuliiaKovalova YuliiaKovalova force-pushed the dev/ykovalova/add-com-remoting-property branch 2 times, most recently from 602bb50 to 9550d22 Compare February 20, 2026 14:56
@YuliiaKovalova YuliiaKovalova changed the title Add DotNetSdkSupportsComRemoting property to Sdk.props Add DotNetSdkSupportsComRemoting property to Microsoft.NET.Sdk.props Feb 20, 2026
…e VSHostObject

Set DotNetSdkSupportsVSHostObjectRemoting=true in Microsoft.NET.Build.Containers.props
(near CreateNewImage UsingTask) and Microsoft.NET.Sdk.Publish.targets (parent of
ZipDeploy, OneDeploy, MSDeploy UsingTasks), so VS tooling can detect COM remoting
support without fragile SDK version comparisons.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@YuliiaKovalova YuliiaKovalova force-pushed the dev/ykovalova/add-com-remoting-property branch from 9550d22 to 329ba66 Compare February 20, 2026 15:19
@YuliiaKovalova YuliiaKovalova changed the title Add DotNetSdkSupportsComRemoting property to Microsoft.NET.Sdk.props Add DotNetSdkSupportsVSHostObjectRemoting property Feb 20, 2026
@YuliiaKovalova YuliiaKovalova merged commit ba6ab4a into release/10.0.3xx Feb 24, 2026
28 checks passed
@YuliiaKovalova YuliiaKovalova deleted the dev/ykovalova/add-com-remoting-property branch February 24, 2026 18:22
tmat added a commit to tmat/dotnet that referenced this pull request Mar 12, 2026
commit 3d009596d1c130ded9be7576d45a4e3cc8a31d41
Author: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Date:   Thu Mar 12 08:10:03 2026 -0700

    [sdk] Source update 6e514f6 → 8cbac4a
    Diff: https://github.com/dotnet/sdk/compare/6e514f6189902a6422a6ab91324804c37035315b..8cbac4a5cdf27c2bb606a282cc47e60a7c4ced45

    From: dotnet/sdk@6e514f6
    To: dotnet/sdk@8cbac4a

    [[ commit created by automation ]]

```
C:\sdk>darc vmr forwardflow --build 303236 --vmr C:\dotnet
info: Flowing build 20260224.4 (303236) of commit 8cbac4a...
info: Making sure commit '8cbac4a5cdf27c2bb606a282cc47e60a7c4ced45' is present in repository 'C:\sdk'...
info: Flowing sdk's commit 8cbac4a to VMR at C:\dotnet...
info: Last flow was back flow: d346a57 -> f284d9f49aec157d49233ab5785cbcf78ed1ea58
info: Current flow is in the opposite direction
info: Creating a working branch darc/forward/8cbac4a-d346a57
info: Synchronizing sdk from 6e514f6189902a6422a6ab91324804c37035315b to https://github.com/dotnet/sdk / 8cbac4a5cdf27c2bb606a282cc47e60a7c4ced45
info: Updating VMR sdk from 6e514f6 to 8cbac4a..
info: Rebasing darc/forward/8cbac4a-d346a57 onto UpdateSdk1...
info: Auto-resolving expected conflicts...
info: Successfully auto-resolved 1 expected conflicts
info: Resolving dependency updates in source 6e514f6189902a6422a6ab91324804c37035315b..HEAD and target d346a57..UpdateSdk1
info: Changes staged in C:\dotnet
info: PRs from original repository included in this codeflow update:
      - dotnet/sdk#53090
      - dotnet/sdk#52347
      - dotnet/sdk#53100
      - dotnet/sdk#53056
```
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.

3 participants