QuikGraph icon indicating copy to clipboard operation
QuikGraph copied to clipboard

[BUG] Microsoft.Msagl.GraphViewerGDI and QuikGraph.MSAGL throw compilation error when included in the same project

Open AceOubahaTLI opened this issue 4 weeks ago • 0 comments

Describe the bug With the latest version of both (Quikgraph.MSAGL 2.5.0 and Microsoft.Msagl.GraphViewerGDI 1.1.7), I am running into the following issue:

The type 'SvgGraphWriter' exists in both 'AutomaticGraphLayout.Drawing, Version=0.0.0.0, Culture=neutral, PublicKeyToken=6baa2c1345e83b6e' and 'Microsoft.Msagl.Drawing, Version=0.0.0.0, Culture=neutral, PublicKeyToken=6baa2c1345e83b6e'

It looks like QuikGraph is using the AutomaticGraphLayout name, whereas MSAGL is using the Microsoft.Msagl name.

To Reproduce Steps to reproduce the behavior:

  1. Create a new C# project
  2. Install Quikgraph.MSAGL 2.5.0
  3. Install Microsoft.MSAGL.GraphViewerGDI 1.1.7
  4. Create a new C# file containing the following:
using Microsoft.Msagl.Drawing;

public class TestClass
{
    public TestClass()
    {
        SvgGraphWriter.Write(null, @"C:\tmp\example.svg", null, null, 0);
    }
}

Expected behavior Using QuikGraph.MSAGL and MSAGL together results in successful compilation.

AceOubahaTLI avatar Jan 30 '25 21:01 AceOubahaTLI