Skip to content

ExtensionMetaData.DotnetTargetVersions and DotnetTarget.Custom() do not work as described - unable to use .NET10 and C#14 with VisualStudio.Extensibility projects #544

@domtriestocode

Description

@domtriestocode

VS Version: VS2026 Community December 2025 update

Issue: Using .NET10.0 and C#14 with VisualStudio.Extensibility projects does not work.
When the DotnetTarget.Custom method is used to define other Target Versions for the ExtensionMetaData.DotnetTargetVersions, the Extension command does not run

None of the following values of ExtensionMetaData.DotnetTargetVersions work with the TargetFramework defined as below

<TargetFramework>net10.0-windows10.0.22621.0</TargetFramework>

DotnetTargetVersions = [DotnetTarget.Custom("net10.0")]
DotnetTargetVersions = [DotnetTarget.Custom("net10.0-windows10.0.22621.0")]
DotnetTargetVersions = ["net8.0, DotnetTarget.Custom("net10.0")]
DotnetTargetVersions = ["net8.0, DotnetTarget.Custom("net10.0-windows10.0.22621.0")]

As soon as the target framework is changed to a variation of ".net8.0-windows__" the extension works properly, even if the ExtensionMetaData.DotnetTargetVersions property does not define .net8.0 as one of the values. For example, the command works with the following combination

<TargetFramework>net8.0-windows10.0.22621.0</TargetFramework>
DotnetTargetVersions = [DotnetTarget.Custom("net10.0")]

https://learn.microsoft.com/en-us/dotnet/api/microsoft.visualstudio.extensibility.extensionmetadata.dotnettargetversions?view=vs-extensibility#microsoft-visualstudio-extensibility-extensionmetadata-dotnettargetversions

https://learn.microsoft.com/en-us/dotnet/api/microsoft.visualstudio.extensibility.dotnettarget.custom?view=vs-extensibility#microsoft-visualstudio-extensibility-dotnettarget-custom(system-string)

https://learn.microsoft.com/en-us/dotnet/api/microsoft.visualstudio.extensibility.dotnettarget.custom?view=vs-extensibility#microsoft-visualstudio-extensibility-dotnettarget-custom(system-string)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions