Skip to content

IL2070 error when building in source-build #43253

@MichaelSimons

Description

@MichaelSimons

aspnetcore fails the bootstrap leg of source-build. Bootstrap is where you take the source-built product and rebuild the source tarball with it.

failure:

 /repos/tarball-boot/src/aspnetcore/artifacts/source-build/self/src/src/DataProtection/DataProtection/src/AuthenticatedEncryption/ManagedAuthenticatedEncryptorFactory.cs(116,61): error IL2070: 'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicParameterlessConstructor' in call to 'System.Type.MakeGenericType(params Type[])'. The parameter 'implementation' of method 'Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory.AlgorithmActivator.CreateFactory<T>(Type)' does not have matching annotations. The source value must declare at least the same requirements as those declared on the target location it is assigned to. [/repos/tarball-boot/src/aspnetcore/artifacts/source-build/self/src/src/DataProtection/DataProtection/src/Microsoft.AspNetCore.DataProtection.csproj::TargetFramework=net7.0]

In this configuration, the latest linker version is being used.

This is a blocker for source-build RC1. To workaround this temporarily for source-build, a nowarn was added.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-infrastructureIncludes: MSBuild projects/targets, build scripts, CI, Installers and shared framework

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions