Fugue is a defect detection tool for managed code that checks metadata (IL code) for problems with resource leaks, dangling resource references, and problems with method call ordering. Fugue captures as custom attributes many of the rules for using an interface or class and ensures that client code obeys those rules.

Fugue Protocol checking for .NET code

Have you ever wished you could specify properties in your code that go beyond the type system of the language you are using? You may for example wish to specify that some parameter should never be null, and have the type checker complain about any caller that does not guarantee that.

Well, so did we and the result is the Fugue checker.

Fugue is a protocol checking tool from Microsoft Research, which allows many of the rules for using a managed API to be recorded as custom attributes. Fugue checks both that client code obeys the rules and that the class's implementation is consistent with its rules. The checker works over compiled assemblies (.dll and .exe) and is appropriate for managed code in any .NET language (C#, VB, or MC++).

Fugue is no longer supported as a tool. However, check out our related project called CodeContracts