BUG: You receive a System.ExecutionEngineException error message when you try to run an application with an indirect module dependency (327415)



The information in this article applies to:

  • Microsoft Visual Studio .NET (2002), Professional Edition

This article was previously published under Q327415

SYMPTOMS

When you try to run an application with an indirect module dependency, and the application is built with release options, you receive a System.ExecutionEngineException error message in the Microsoft .NET common language runtime.

RESOLUTION

Make sure that you do not have any indirect module dependencies.

STATUS

Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.

MORE INFORMATION

An indirect module dependency is illustrated in the following example:

Class First is defined in First.cs and creates an instance of class Second in its constructor. First.cs is compiled to First.mod and adds Second.mod with the /addmodule compiler option. Note that you are not compiling to a DLL.

Class Second is defined in second.cs and is compiled to second.mod.

Finally, a client application named Test creates an instance of class First. When you build Test, use the following compiler commands:
  • csc /t:module /out:second.mod second.cs
  • csc /t:module /out:first.mod /addmodule:second.mod first.cs
  • al /t:library /out:combined.dll first.mod
  • csc /t:exe /out:Test.exe /r:combined.dll test.cs
Notice that when you create Combined.dll, you omit Second.mod. Second.mod is an indirect module dependency.

Modification Type:MajorLast Reviewed:8/31/2005
Keywords:kbvs2002sp1sweep kbbug KB327415