microsoft / RoslynClrHeapAllocationAnalyzer

Roslyn based C# heap allocation diagnostic analyzer that can detect explicit and many implicit allocations like boxing, display classes a.k.a closures, implicit delegate creations, etc.
Apache License 2.0
646 stars 61 forks source link

does not work, there are no analyze information #54

Open cbries opened 6 years ago

cbries commented 6 years ago

VS 2017 15.8.1

I have installed the extension but within my projects there is no analyze output to see. I copied the example code for testing the extension: static void ParamsMethod(params string[] a) { ParamsMethod("Hello world!"); ParamsMethod(new[] { "blubb" }); } static void SoManyObjects() { var words = new[] { "foo", "bar", "baz", "beer" }; var actions = new List<Action>(); foreach (string word in words) { actions.Add(() => Trace.WriteLine(word)); } }

But within the editor or during the build the expected "warning" are not shown.

example of clr heap does not work extension installed

All I get are the default warnings of Resharper.

Additonal information: In a simple "Hello world"-console app the warnings are showing up. Within my legacy solution with several c# projects no warnings show up. Does it only work with specific .net framework and c# language versions?

edespong commented 6 years ago

It seems like you are using version 1.0. Before investigating further, have you tried 2.0?

cpozos commented 3 years ago

I have created a WPF app using .NET Framework 4.7.2 with VS2019 Community V.16.8.5 and it is not displaying anything:

image

image