-
Notifications
You must be signed in to change notification settings - Fork 128
Description
The DynamicallyAccessedMembersAnalyzer analyzer throws many errors when run on ASP.NET Core assemblies with trimming enabled.
PR that enables trimming analyzers - dotnet/aspnetcore#41021
Sample of errors:
43>CSC : warning AD0001: Analyzer 'ILLink.RoslynAnalyzer.DynamicallyAccessedMembersAnalyzer' threw an exception of type 'System.NotImplementedException' with message 'Microsoft.CodeAnalysis.Operations.FlowCaptureReferenceOperation'.
43>CSC : warning AD0001: Analyzer 'ILLink.RoslynAnalyzer.DynamicallyAccessedMembersAnalyzer' threw an exception of type 'System.NotImplementedException' with message 'Microsoft.CodeAnalysis.Operations.FlowCaptureReferenceOperation'.
43>CSC : warning AD0001: Analyzer 'ILLink.RoslynAnalyzer.DynamicallyAccessedMembersAnalyzer' threw an exception of type 'System.NotImplementedException' with message 'Microsoft.CodeAnalysis.Operations.FlowCaptureReferenceOperation'.
43>CSC : warning AD0001: Analyzer 'ILLink.RoslynAnalyzer.DynamicallyAccessedMembersAnalyzer' threw an exception of type 'System.NullReferenceException' with message 'Object reference not set to an instance of an object.'.
43>CSC : warning AD0001: Analyzer 'ILLink.RoslynAnalyzer.DynamicallyAccessedMembersAnalyzer' threw an exception of type 'System.NullReferenceException' with message 'Object reference not set to an instance of an object.'.
43>CSC : warning AD0001: Analyzer 'ILLink.RoslynAnalyzer.DynamicallyAccessedMembersAnalyzer' threw an exception of type 'System.NotImplementedException' with message 'Microsoft.CodeAnalysis.Operations.FlowCaptureReferenceOperation'.
43>CSC : warning AD0001: Analyzer 'ILLink.RoslynAnalyzer.DynamicallyAccessedMembersAnalyzer' threw an exception of type 'System.NotImplementedException' with message 'Microsoft.CodeAnalysis.Operations.FlowCaptureReferenceOperation'.
43>CSC : warning AD0001: Analyzer 'ILLink.RoslynAnalyzer.DynamicallyAccessedMembersAnalyzer' threw an exception of type 'System.NotImplementedException' with message 'Microsoft.CodeAnalysis.Operations.NoneOperation'.
43>CSC : warning AD0001: Analyzer 'ILLink.RoslynAnalyzer.DynamicallyAccessedMembersAnalyzer' threw an exception of type 'System.NotImplementedException' with message 'Microsoft.CodeAnalysis.Operations.FlowCaptureReferenceOperation'.
Also, in ASP.NET Core repo we have been using ILLink to provide warnings of trimming areas to fix. Enabling trim analyzers provides new warnings that weren't caught by ILLink. Is that expected?
e.g.
