Skip to content

Newly added intellisense msbuild conditions cause overbuild  #82191

Closed

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.

Activity

  1. ghost added
    untriagedNew issue has not been triaged by the area owner
    on Feb 15, 2023
  2. ViktorHofer commented on Jun 28, 2023

    @ViktorHofer
    Member

    Fixed by #87603

  3. ghost removed
    untriagedNew issue has not been triaged by the area owner
    on Jun 28, 2023
  4. ghost locked as resolved and limited conversation to collaborators on Jul 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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