Skip to content

Test runner failing on release/5.0 because of new VB analyzer dependency #22177

Closed

Description

@ajcvickers

Main branch is working fine.

Error:

CSC : error AD0001: Analyzer 'Microsoft.EntityFrameworkCore.InternalUsageDiagnosticAnalyzer' threw an exception of type
'System.IO.FileNotFoundException' with message 
'Could not load file or assembly 'Microsoft.CodeAnalysis.VisualBasic, Version=3.7.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified.
[/home/ajcvickers/efcore/src/EFCore.Proxies/EFCore.Proxies.csproj]

for all the tests.

Activity

  1. ajcvickers commented on Aug 22, 2020

    @ajcvickers
    ContributorAuthor

    /cc @roji

  2. AndriySvyryd commented on Aug 22, 2020

    @AndriySvyryd
    Member

    @ajcvickers git clean -xdf helped on my repo

  3. ajcvickers commented on Aug 22, 2020

    @ajcvickers
    ContributorAuthor

    I swear I tried that!

  4. ajcvickers commented on Aug 23, 2020

    @ajcvickers
    ContributorAuthor

    I'm running into this again and cleaning doesn't always work.

  5. ajcvickers commented on Aug 23, 2020

    @ajcvickers
    ContributorAuthor

    This is hitting me a lot when switching branches. It may be related to dotnet processes running in the background.

  6. roji commented on Aug 24, 2020

    @roji
    Member

    Yeah, unless I'm mistaken, the compiler (probably including analyzers?) is kept running in the background, so if you're switching from an old analyzer version to a new one, something like this may happen. dotnet build-server shutdown may help on the cmdline.

    I'll play around with it a bit to try to understand.

  7. changed the title [-]Test runner failing on release/5.0[/-] [+]Test runner failing on release/5.0 because of new VB analyzer dependency[/+] on Aug 24, 2020
  8. roji commented on Aug 24, 2020

    @roji
    Member

    Yeah, what I wrote above checks out. To repro on the cmdline:

    • Check out out any commit before bc68329 (which is where I rewrote the analyzer and added the VB dependency)
    • Do dotnet build-server shutdown to start from a clean slate
    • Run any tests (e.g. EFCore.Tests)
    • Check out bc68329 with the new dependency
    • Run the tests again, you should get the failure (Could not load file or
      assembly 'Microsoft.CodeAnalysis.VisualBasic)
    • Do dotnet build-server shutdown again
    • Run the tests again, everything works fine

    @sebastienros are benchmark builds still failing because of this? If so, is there any chance we're mixing two versions of EF here?

  9. ajcvickers commented on Aug 24, 2020

    @ajcvickers
    ContributorAuthor

    @roji The thing I don't understand about this is that there should be no commits in the main branch that are not also in the release/5.0 branch, so I should not be building different versions of the analyzer code.

  10. sharwell commented on Aug 24, 2020

    @sharwell

    I'm very familiar with this particular error. Where can I find the implementation of the analyzer in question?

  11. 11 remaining items

  12. added this to the 5.0.0 milestone on Aug 24, 2020
  13. roji commented on Aug 24, 2020

    @roji
    Member

    Discussed this with the team in triage. Since we're very late in the 5.0 cycle, the decision is to remove the VB capabilities for now, and keep this as a C#-only analyzer (option 1 above).

    We'll keep PR #22195 - which does option 3 - open for now, and merge it later for 6.0.

    Thanks again for the input and the PR @sharwell - we'll definitely get this in.

  14. sharwell commented on Aug 24, 2020

    @sharwell

    @roji Would you like me to submit a parallel pull request with just the changes for option (1) or is it something that you're already familiar with?

  15. roji commented on Aug 24, 2020

    @roji
    Member

    @sharwell thanks for offering! I think I can take care of it. Basically remove the attribute from the analyzer, remove the reference to Microsoft.CodeAnalysis.VisualBasic and all the code that does VB syntax, right?

  16. sharwell commented on Aug 24, 2020

    @sharwell

    Yes that should cover it. Feel free to mention me in the code review.

  17. added a commit that references this issue on Aug 25, 2020
    82c8f0e
  18. added a commit that references this issue on Aug 25, 2020
    7cfa858
  19. modified the milestones: 5.0.0, on Aug 26, 2020
  20. modified the milestones: , 5.0.0 on Nov 7, 2020
  21. added theissue type on Jun 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions