1

Closed

exception when generating files for SvcUtil.exe

description

I am trying to write out to files source code for SvcUtil.exe.
Choose svcutil.exe, go to Tools menu, choose "Generate Files"
A few files get written out, and then the Reflector crashes with the unhandled exception.
The exception also happens if file generation is called by right-click-Menu->Export, but in this case it's handled and does not cause the Reflector to crash.
Stack trace below.
 
System.InvalidOperationException was unhandled
Message="Block statement count of zero during condition expression translation."
Source="Reflector.Application"
StackTrace:
   at ឺ.ᜆ(Int32 A_0)
   at ឺ.ᜋ(Int32 A_0)
   at ឺ.ᜂ(Int32 A_0, Int32 A_1)
   at ឺ.ᜆ(Int32 A_0)
   at ឺ.ᜋ(Int32 A_0)
   at ឺ.ᜂ(Int32 A_0, Int32 A_1)
   at ឺ.ᜀ(IMethodDeclaration A_0, IMethodBody A_1)
   at ឤ.ᜀ(IMethodDeclaration A_0)
   at ᜭ.ᜁ(IMethodDeclarationCollection A_0)
   at ឤ.ᜀ(ITypeDeclaration A_0)
   at ឥ.ᜀ(ITypeDeclaration A_0, Boolean A_1, Boolean A_2)
   at FileGenerator.AddIn.Generators.TypeFileGenerator.GetFormatter()
   at FileGenerator.AddIn.Generators.TypeFileGenerator.Generate()
   at FileGenerator.AddIn.Generators.NamespaceFileGenerator.Generate()
   at FileGenerator.AddIn.UI.FileGeneratorControl.GenerateFiles(Object data)
   at System.Threading._ThreadPoolWaitCallback.WaitCallback_Context(Object state)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading._ThreadPoolWaitCallback.PerformWaitCallbackInternal(_ThreadPoolWaitCallback tpWaitCallBack)
   at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback(Object state)
InnerException:

file attachments

Closed Mar 2, 2009 at 9:17 PM by jasonrbock
Bug with Reflector (probably)

comments

jprusakova wrote Feb 16, 2009 at 4:59 PM

The error is thrown when generating Options.cs. The source is not generated, although the file is created (attached).

jasonrbock wrote Mar 2, 2009 at 9:16 PM

I would suggest sending this to RedGate - seems like it's an issue with Reflector not being able to handle something with the Options type in Microsoft.Tools.ServiceModel.SvcUtil.

Regards,
Jason