"Method type parameter in position 0 is not valid" running Code Metrics in Visual Basic 2010
-
Wednesday, April 11, 2012 11:38 PM
Hello,
I tried to point the Code Metrics feature at our class library, written in Visual Basic. I am running Visual Studio Premium 10.0.40219.1 SP1Rel. I received this error message:
Project: <our project name>
Configuration: Debug
Scope: None
Assembly: <our assembly name>
Maintainability Index:
Cyclomatic Complexity:
Depth of Inheritance:
Class Coupling:
Lines of Code:
Message: An error occurred while calculating code metrics for target file <our DLL> in project <our project name>. The following error was encountered while reading module <our module name>: Method type parameter in position 0 is not valid.
Since the error message is not specific, it's a bit tricky to guess which VB function or subroutine might be the problem. (This is a large project.) Help? Tips?
-BGU
All Replies
-
Thursday, April 12, 2012 3:05 PM
Unfortunately, it's not possible to get more information from the Code Metrics run because of the way the exception is handled internally. To dig deeper, you could try attaching a debugger to the process to see which class is being read when the error occurs.- Marked As Answer by Jack Zhai - MSFTMicrosoft Contingent Staff, Moderator Wednesday, April 18, 2012 6:18 AM

