I recently converted a program to use NGEN at installation time. The program is a .NET 3.5 app. The confusing thing is that even after NGEN, I would get 9 JITted methods! I was looking at the app in Process Explorer. The JIT DLL (mscorjit.dll I think) was also loaded. So I had to figure out what was causing the app to enter JIT compilation.
I finally examined the function calls in CLRProfiler (free from Microsoft) and discovered that some calls to Regex.Compile were being made! I did have one Regex in the application, but it wasn't compiled and removing it didn't help. I knew that Regex.Compile can invoke the just-in-time compiler. Well, I had changed the program to use SQLiteConnectionStringBuilder to create a couple connection strings.
SQLiteConnectionStringBuilder was the culprit and it calls into Regex.Compile. Here's my issue/bug: this doesn't really seem necessary and by using Regex.Compile, this can cause 250 KB of extra RAM, and slow startup down a bit. I don't know if this is documented, but it seems like it should be, particularly as SQLite is famous for its speed, and this would cause performance problems.
I have to say that System.Data.SQLite (I am using the December build) is really a great component/library, and I continue to be impressed by it. Thank you for creating it (I believe it is authored by Robert Simpson). I have posted on it at http://dotnetperls.com/ (my blog), and I think I used the word "awesome."