Skip to content

Visualizer does not show expression for EF Core 5 on .NET 5  #125

Open
@bart-degreed

Description

@bart-degreed

I've used this visualizer a lot in the past on .NET Core 3.1 and EF Core 3.x. But today I found that when using .NET 5, binary serialization is disabled by default, which results in the next dialog when opening the visualizer from a debug session in VS 2019 v16.10.3:

image

I was able to work around that by adding this to my project file:

  <PropertyGroup>
    <EnableUnsafeBinaryFormatterSerialization>true</EnableUnsafeBinaryFormatterSerialization>
  </PropertyGroup>

Now the visualizer loads, but it only shows the following:

image

If needed I can provide detailed repro steps, but it happens in even the simplest cases:

public class AppDbContext : DbContext
{
    public DbSet<Person> People { get; set; }
}

void Test(AppDbContext dbContext)
{
    IQueryable<Person> dataSet = dbContext.Set<Person>();
    var expr = dataSet.Expression;  // break here
}

Observed in v1.7.114.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions