I've converted the C# example to
VB to the best of my knowledge. The custom rule assembly compiles fine and I've added it to the 'rules' folder.
Anyone know what I need to do to correct this?
When I then try and build the sample code analysis project, I receive the following errors:
Error 1 CA0054 : Error loading rule 'AvoidExposingPublicConstants': Exception has been thrown by the target of an invocation.
Error 2 CA0001 : Error loading rule 'BaseStaticAnalysisRule': No parameterless constructor defined for this object.
The BaseStaticAnalysisRule.
vb class is written like this...
Code:
Imports System
Imports Microsoft.FxCop.Sdk
Namespace CustomCodeAnalysisRules
Public Class BaseStaticAnalysisRule
Inherits BaseIntrospectionRule
Sub New(ByVal name As String)
MyBase.New(name, "CustomCodeAnalysisRules.Rules", GetType(BaseStaticAnalysisRule).Assembly)
End Sub
End Class
End Namespace