Skip to content

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

@MihaZupan

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?

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