microsoft / microsoft/vscode-dotnettools

TargetFramework parsing with condition

Open
#2,941 0 comments 0 reactions 1 assignee View on GitHub

@mauroa is already working on this.

Since Apr 8, 2026.

area-maui bug
Dominant language
No language data
Stars
321
Forks
54
Avg merge
2d 19h
Merged PRs (30d)
2

Description

Describe the Issue

I use the following lines in the csproj file to define the target framework for a .NET for iOS/MacCatalyst app:

<TargetFramework Condition="'$(Platform)'=='AnyCPU'">net9.0-maccatalyst</TargetFramework>
<TargetFramework Condition="'$(Platform)'!='AnyCPU'">net9.0-ios</TargetFramework>

As soon as a target framework is defined via conditions, the app cannot be selected as start project via { }, it is not listed.

I cannot use multi-targeting for the app, because defined runtime identifiers for specific platforms for iOS cannot be mapped for Mac Catalyst.

In Visual Studio, there is no issue with conditional target framework.

Steps To Reproduce

No response

Expected Behavior

No response

Environment Information

No response

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.