Lines of code may be missing if you compile a solution that has a complex project structure in Microsoft Visual Studio 2008. The solution may incorrectly compile to Microsoft intermediate language (MSIL) code that omits certain method calls in the compiled .dll file. This problem occurs when there are method calls to classes, and these classes participate in an inheritance hierarchy that uses generic constraints.Notes
- When this problem occurs, you do not receive an error message.
- You may experience this problem intermittently. For example, you may be able to temporarily resolve this problem by cleaning the solution. However, cleaning the solution is not a permanent resolution. The problem may reoccur if the file reference pattern that is mentioned in the "Cause" section is not modified.
- Because the method call is missing from the MSIL code, breakpoints that you set on this line in the source code may move to the next line during debugging.
This problem occurs when the Visual Studio 2008 solution has the following structure:
Note To view a diagram of this structure, see the "More Information" section.
Additionally, the Visual Studio 2008 solution must use generic constraints as follows:
- You have a class or an interface that is named AA and that is defined in Project A.
- You have a generic class that is named ClassB that is in Project B and that has an interface constraint on a type parameter T for AA.
- You have a class that is named ClassC in Project C and that inherits from ClassB.
The problem may occur at the point at which you define ClassC if the following conditions are true:
To resolve this problem, modify the reference to Project A that is in Project 2. To do this, make the reference a project reference instead of a file reference.Note
Because this bug applies only to a very specific scenario, it is unlikely that you will experience this problem.
This issue occurs when the Visual Studio 2008 solution has the structure that is mentioned in the "Cause" section and that is illustrated in the following diagram:
Collapse this imageExpand this image
Article ID: 945425 - Last Review: December 7, 2007 - Revision: 1.1
- Microsoft Visual Studio 2008 Standard Edition
- Microsoft Visual Studio 2008 Professional Edition
- Microsoft Visual Studio Team System 2008 Database Edition
- Microsoft Visual Studio Team System 2008 Architecture Edition
- Microsoft Visual Studio Team System 2008 Development Edition
- Microsoft Visual Studio Team System 2008 Test Edition
- Microsoft Visual Studio Team System 2008 Team Suite
- Microsoft Visual Basic 2008 Express Edition
|kbtshoot kbgraphxlink kbprb kbdevelopment KB945425|