Skip to content

Can't build runtime with recent SDK due to IsTrimmable errors #91010

Closed

Description

@MihaZupan

Build fails with the IsTrimmable is not supported for the target framework. Consider multi-targeting to a supported framework to enable trimming, and set IsTrimmable only for the supported frameworks. error.

Build FAILED.

C:\Program Files\dotnet\sdk\8.0.100-rc.2.23422.11\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(90,5): error NETSDK1212: IsTrimmable is not supported for the target framework. Consider multi-targeting to a supported framework to enable trimming, and set IsTrimmable only for the supported frameworks. For example: [C:\MihaZupan\runtime\Build.proj]
C:\Program Files\dotnet\sdk\8.0.100-rc.2.23422.11\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(90,5): error NETSDK1212: <IsTrimmable Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net6.0'))">true</IsTrimmable> [C:\MihaZupan\runtime\Build.proj]
C:\Program Files\dotnet\sdk\8.0.100-rc.2.23422.11\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(90,5): error NETSDK1212: IsTrimmable is not supported for the target framework. Consider multi-targeting to a supported framework to enable trimming, and set IsTrimmable only for the supported frameworks. For example: [C:\MihaZupan\runtime\Build.proj]
C:\Program Files\dotnet\sdk\8.0.100-rc.2.23422.11\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(90,5): error NETSDK1212: <IsTrimmable Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net6.0'))">true</IsTrimmable> [C:\MihaZupan\runtime\Build.proj]
    0 Warning(s)
    2 Error(s)

cc: @sbomer @eerhardt

I see net6.0 mentioned in the message - will this problem potentially go away with #90880?

Activity

  1. ghost added
    untriagedNew issue has not been triaged by the area owner
    on Aug 23, 2023
  2. ViktorHofer commented on Aug 23, 2023

    @ViktorHofer
    Member
  3. jkoritzinsky commented on Aug 23, 2023

    @jkoritzinsky
    Member

    This is an issue with a new warning in the SDK. It should go away with #90880, but in the meantime, if you can get a binlog of the NuGet restore, you can figure out which project is having the failure. @sbomer would know more about how to easily trace this down without a binlog.

  4. sbomer commented on Aug 23, 2023

    @sbomer
    Member

    dotnet/docs#36775 has more details about the breaking change. I'm curious why source-build hasn't reported the break since it looks like they updated to the RC1 SDK in dotnet/dotnet@a61d7e3. We might still need to fix this in .NET 8 though.

  5. sbomer commented on Sep 1, 2023

    @sbomer
    Member

    I think we can close this as fixed by #90880. Pretty sure source-build is avoiding the issue because of source-build specific settings, such as having some analyzers disabled. Please re-open if this it's still a problem somewhere.

  6. ghost removed
    untriagedNew issue has not been triaged by the area owner
    on Sep 1, 2023
  7. ghost locked as resolved and limited conversation to collaborators on Oct 1, 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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions