| Severity | Warning |
| Reported by | PostSharp |
| Message | Hole in local variable ordinals in method "<Method>": no variable assigned to slot <Slot>. |
Cause
In the compiled code of a method, each local variable has an ordinal, the slot that it occupies in the frame of the method. When PostSharp writes the code of a method in text form, a diagnostic build of the PostSharp compiler checks that the slots of <Method> are consecutive, and reports PS0123 with <Slot>, the first free slot that a variable follows.
The check exists only in the Debug builds of the PostSharp compiler. The packages of PostSharp that you install do not contain it, so they never report PS0123. A gap in the slots does not by itself make the code invalid.
This message is an internal check of PostSharp, so no example can show it.
Resolution
When you see PS0123, the build runs a Debug build of the PostSharp compiler, for example one compiled from the sources of PostSharp. Use the released PostSharp package instead, unless you are diagnosing PostSharp itself. If the build also fails or produces an assembly that does not run, report it as a bug of PostSharp, with the method named in the message and, if possible, a project that reproduces the problem.
See Also
Other Resources