diff --git a/.gitignore b/.gitignore index 8e461ca..2934c18 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ - +.vs *.user *.suo /DependencyViewer.Common/bin/ diff --git a/DependencyViewer.Common/Graphing/QuickGraphProcessor.cs b/DependencyViewer.Common/Graphing/QuickGraphProcessor.cs index 3e77e03..3a377dc 100644 --- a/DependencyViewer.Common/Graphing/QuickGraphProcessor.cs +++ b/DependencyViewer.Common/Graphing/QuickGraphProcessor.cs @@ -63,7 +63,6 @@ private void CreateGraph() private string GenerateDot() { var graphviz = new GraphvizAlgorithm>(_graph); - graphviz.GraphFormat.Size = new Size(100, 100); graphviz.GraphFormat.Ratio = GraphvizRatioMode.Auto; graphviz.FormatVertex += graphviz_FormatVertex; graphviz.FormatEdge += graphviz_FormatEdge; diff --git a/DependencyViewer/GraphVizService.cs b/DependencyViewer/GraphVizService.cs index 33f85ad..09224b6 100644 --- a/DependencyViewer/GraphVizService.cs +++ b/DependencyViewer/GraphVizService.cs @@ -13,6 +13,7 @@ public void ExecGraphViz(string dotFile, string outputFilename) if(fi.Exists == false) throw new ArgumentException("dot file does not exist - " + dotFile); ProcessStartInfo psi = new ProcessStartInfo(Settings.Default.GraphVizPath); + psi.RedirectStandardError = true; psi.Arguments += "-Tpng"; psi.Arguments += " -o"+outputFilename; psi.Arguments += " \"" + dotFile + "\""; @@ -22,10 +23,13 @@ public void ExecGraphViz(string dotFile, string outputFilename) Process proc = Process.Start(psi); + string procError = proc.StandardError.ReadToEnd(); if (proc == null) throw new Exception("Could not run GraphViz"); proc.WaitForExit(); + if (procError != "") + throw new Exception(procError); } } }