Skip to content

R2R test failure: failed to crossgen Microsoft.Extensions.Options.ConfigurationExtensions.dll #33760

Closed

Description

@BruceForstall

Activity

  1. added this to the 5.0 milestone on Mar 19, 2020
  2. BruceForstall commented on Mar 19, 2020

    @BruceForstall
    ContributorAuthor

    @sandreenko You saw this yesterday

    @dotnet/runtime-infrastructure

  3. safern commented on Mar 19, 2020

    @safern
    Member

    These are new assemblies. I wonder if they're missing something, or if they are somehow special. cc: @ericstj @maryamariyan

  4. ericstj commented on Mar 19, 2020

    @ericstj
    Member

    Why are these even being crossgen'ed they aren't part of the base shared framework.

    Here's the error:

    Precompiling /__w/1/s/artifacts/tests/coreclr/Linux.arm.Checked/Tests/Core_Root/Microsoft.Extensions.Options.DataAnnotations.dll
    Unable to precompile /__w/1/s/artifacts/tests/coreclr/Linux.arm.Checked/Tests/Core_Root/Microsoft.Extensions.Options.DataAnnotations.dll, exit code is 33.
    Command-line: /__w/1/s/artifacts/bin/coreclr/Linux.arm.Checked/x64/crossgen /Platform_Assemblies_Paths /__w/1/s/artifacts/tests/coreclr/Linux.arm.Checked/Tests/Core_Root /__w/1/s/artifacts/tests/coreclr/Linux.arm.Checked/Tests/Core_Root/Microsoft.Extensions.Options.DataAnnotations.dll
    Microsoft (R) CoreCLR Native Image Generator - Version 4.5.30319.0
    Copyright (c) Microsoft Corporation.  All rights reserved.
    
    Error: Could not load file or assembly 'Microsoft.Extensions.Options, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified.
     (0x80070002 (COR_E_FILENOTFOUND))
    

    Looks to me like CrossGen isn't being passed the path for all dependencies.

  5. ericstj commented on Mar 19, 2020

    @ericstj
    Member

    Ok, the reason for this failure is because Options isn't being built:

    <PortedExtensionsProject Include="$(MSBuildThisFileDirectory)Microsoft.Extensions.Options.*\**\*csproj" />

    I think that Options.* will not find Options\

  6. maryamariyan commented on Mar 19, 2020

    @maryamariyan
    Contributor

    Please refer to #33563 description.

    test (reason for later: #33563 (comment))
    
    Microsoft.Extensions.DependencyInjection
    Microsoft.Extensions.Options (Options tests needs ref to DI)
    

    Enabling DI.tests enables DI and in turn that enables Options, and that should unblock this issue.

    Here's my PR: #33816

  7. ericstj commented on Mar 19, 2020

    @ericstj
    Member

    Thanks for catching this @maryamariyan .

    @BruceForstall do you really want to be crossgen'ing these things that aren't part of the base product? Is it just to get some test coverage of additional NuGet packages?

  8. BruceForstall commented on Mar 19, 2020

    @BruceForstall
    ContributorAuthor

    Looks like build-test.cmd and build-test.sh blindly crossgen all the assemblies in CORE_ROOT with the pattern System.*.dll or Microsoft.*.dll, with a few hard-coded exceptions. This is part of test legs that also crossgen each individual test before running it.

    There are two goals: (1) make sure crossgen is successful (no asserts/crashes) across many assets, (2) make sure tests run successfully with everything crossgen'ed.

  9. janvorli commented on Mar 19, 2020

    @janvorli
    Member

    I've added the requirement of the crossgening of the assemblies in CORE_ROOT to succeed few months ago since we were silently failing to crossgen some of them when running coreclr crossgen tests due to bugs in crossgen / crossgen2 and we have never realized that.

  10. ericstj commented on Mar 20, 2020

    @ericstj
    Member

    I guess this will get better when we stop putting packages in the test shared framework.

  11. BruceForstall commented on Mar 20, 2020

    @BruceForstall
    ContributorAuthor

    We need a solution so this job succeeds. Do we need to add some assemblies to an exclusion list?

  12. trylek commented on Mar 20, 2020

    @trylek
    Member

    I believe that today the easiest way forward is to add manual exclusions for those assemblies that are known to crash compilation. I can prepare a PR fixing that.

  13. ericstj commented on Mar 20, 2020

    @ericstj
    Member

    We're already fixing this, no need to disable. I was continuing the discussion around this testing because I wasn't sure it was intentional that you want to run crossgen on every assembly that we build.

  14. maryamariyan commented on Mar 24, 2020

    @maryamariyan
    Contributor

    This issue should now be fixed as of #33816

  15. ericstj commented on Mar 24, 2020

    @ericstj
    Member
  16. ghost locked as resolved and limited conversation to collaborators on Dec 10, 2020
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

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions