Search code examples
c#winforms.net-3.5jit

Why does C# compiler kick in the second time?


I have a WinForm app. I compile it, double-click on it. Predictably, csc.exe kicks in, then goes away, and the application comes up.

I am assuming that at this point the application has been jitted, so no reason for csc.exe to kick in ever again.

I then quit the app and start it again. I see csc.exe kick in again.

What's going on?


Solution

  • Are you using serialization at all? I believe that will build a temporary assembly in some cases. Anything similar in your app?

    Note that the JIT compiler is unrelated to csc, so that shouldn't be anything to do with it.