Skip to content

Avalonia 11.0 has bizarre reference assemblies, malformed Embedded PDB's which break source navigation in Visual Studio. #12431

Closed
@chuckries

Description

@chuckries

Describe the bug
Following up in this repo on behalf of this Visual Studio issue.

The symptom is that F12 Go To Definition is not working for Source Link or embedded files, while it did in the 0.10.21 release. It appears that the 11.0 release started shipping reference assemblies in the NuGet packages. The reference assemblies claim to have embedded PDB's, but the embedded PDB is malformed.

Here is a screenshot from ILSpy. The 11.0.2 net6.0 ref assembly for Avalonia.Controls claims to have an embedded pdb, but the embedded pdb contains no metadata (or the metadata is malformed).
image

The implementation assembly in the lib folder does not have an embedded PDB at all.

I'm not sure what the intent is, but something seems off about these. And, as mentioned, the malformed embedded PDB is breaking source navigation in Visual Studio.

To Reproduce
Steps to reproduce the behavior:

  1. In VS 2022, make a new C# Console App targeting net6.0 or above.
  2. Add a PackageReference to Avalonia 11.0.2
  <ItemGroup>
    <PackageReference Include="Avalonia" Version="11.0.2" />
  </ItemGroup>

  1. Add a code reference to Avalonia.Controls.Templates.IDataTemplate
Avalonia.Controls.Templates.IDataTemplate foo = null;
  1. Place caret on IDataTemplate
  2. F12

Expected behavior
IDataTemplate.cs is opened either from SourceLink or a decopmiled file.

##Actual behavior**
Nothing happens.

If I change my package reference to version 0.10.21, and try the repro again, it obtains the file correctly from Source Link

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions