Skip to content

Newly added intellisense msbuild conditions cause overbuild  #82191

@carlossanlop

Description

@carlossanlop

@ViktorHofer wrote the following after my PR was merged. I'm creating an issue to track it: #79134 (comment)

Just realized that the '$(TargetFramework)' == '$(NetCoreAppCurrent)' condition results in a behavior difference and will force us to overbuild. When building the repo, by default only the nearest NetCoreAppCurrent tfm will be built. In the case of building on Windows, this means net8.0-windows or net8.0 if projects don't have a corresponding windows platform TFM.

We should remove that artificial limitation and restore the previous behavior. I could see the following cases to apply:

A project doesn't multi-target => use NetCoreAppCurrent condition (status quo).
A project multi-targets and all inner builds are built (no tfm filtering) => run this target in the NetCoreAppCurrent inner build (status quo).
A project multi-targets but an inner build runs stand-alone (tfm filtering) => Don't condition on a TFM.
I don't know if it's possible to determine the third case in an msbuild environment, but that's the default build behavior in dotnet/runtime and will be utilized in the VMR with RID builds. Therefore we should try to make that work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions