Results 1 to 8 of 8

Thread: Seeing the intermediate code

  1. #1

    Thread Starter
    MS SQL Powerposter szlamany's Avatar
    Join Date
    Mar 2004
    Location
    Connecticut
    Posts
    18,263

    Seeing the intermediate code

    How does one go about seeing the intermediate code in .Net? What if I wanted to see what was under the cover of the SQLClient, for instance. How would I go about that?

    Thanks!

    *** Read the sticky in the DB forum about how to get your question answered quickly!! ***

    Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".

    Some Informative Links:
    [ SQL Rules to Live By ] [ Reserved SQL keywords ] [ When to use INDEX HINTS! ] [ Passing Multi-item Parameters to STORED PROCEDURES ]
    [ Solution to non-domain Windows Authentication ] [ Crazy things we do to shrink log files ] [ SQL 2005 Features ] [ Loading Pictures from DB ]

    MS MVP 2006, 2007, 2008

  2. #2
    Fanatic Member
    Join Date
    Jun 2019
    Posts
    579

    Re: Seeing the intermediate code

    You can check the repositories on GitHub: .NET Platform
    Most common libraries are inside this repo: .NET Core Runtime
    SqlClient has its own one: SqlClient

    There are some differences from the .NET Framework sources since .NET Core is frequently updated.

  3. #3
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,222

    Re: Seeing the intermediate code

    I would suggest that you go here:

    https://referencesource.microsoft.com/
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  4. #4
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,222

    Re: Seeing the intermediate code

    Actually, do you mean the original source or the CIL because "intermediate code" makes it sound like the latter?
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  5. #5
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    40,109

    Re: Seeing the intermediate code

    I was thinking that it sounded like CIL, but the message is pretty clearly not talking about that.
    My usual boring signature: Nothing

  6. #6

    Thread Starter
    MS SQL Powerposter szlamany's Avatar
    Join Date
    Mar 2004
    Location
    Connecticut
    Posts
    18,263

    Re: Seeing the intermediate code

    I did not know the source for .Net was available - I thought I had seen many, many years ago that you could see the IL code (that's just what I'm recalling it was referred to). Maybe while stepping into functions with a debugger... Long time ago anyway.

    Apparently the actual source code for .Net is on GitHub.

    If I'm not mistaken, I've got enough with what you all have posted to get into things.

    *** Read the sticky in the DB forum about how to get your question answered quickly!! ***

    Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".

    Some Informative Links:
    [ SQL Rules to Live By ] [ Reserved SQL keywords ] [ When to use INDEX HINTS! ] [ Passing Multi-item Parameters to STORED PROCEDURES ]
    [ Solution to non-domain Windows Authentication ] [ Crazy things we do to shrink log files ] [ SQL 2005 Features ] [ Loading Pictures from DB ]

    MS MVP 2006, 2007, 2008

  7. #7
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    40,109

    Re: Seeing the intermediate code

    You can see IL. I've never tried it when stepping into code, but would you really want to? I haven't seen it cover EVERY bit of code. I've mostly only looked at code I wrote, which occasionally called into libraries which I didn't see the IL for. I haven't tried hunting down the IL for that. Seems like it would be a total pain to read, though.
    My usual boring signature: Nothing

  8. #8
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,222

    Re: Seeing the intermediate code

    You can also configure VS to download .NET source code on demand and step through in the debugger. Maybe that's what you really want, as opposed to browsing the source code online. I guess it depends exactly what you're trying to achieve and maybe both would be useful at different times.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width