Is it somehow possible to see unit tests which covers microsoft/referencesource code?

Here I will write only about

Unit tests is not only cover the code, but also serves as great documentation.

I have noticed that all the projects does not have solution file, and probably serves as project library, please correct me in case I am wrong here.

Also, side question here – is there any purpose not to make your unit tests public, in order to make it harder finding some vulnerabilities in your code? If yes, it probably should be really worthful, because without unit tests it is really harder to understand some part of code and also does make developers life a bit painful.


Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.

Method 1

Copied from the comment with expansion to show the history of .NET Framework Reference Source.

The Closed Source Start

.NET Framework was a closed source project from its very beginning, and Microsoft only shared its code base with certain partners so that they can use the code to develop some products for interoperation.

Example, Grasshopper by Mainsoft

The Reference Source Release

Many Microsoft partners don’t have the luxury to see the code, so they have to rely on decompilers (.NET Reflector for instance) to peek into the assemblies and use reflections to work around nasty bugs.

In 2007 Microsoft finally decided to publish some of .NET Framework source files under a special license called Microsoft Reference License (MS-RL).

See Scott Guthrie’s historical blog post in 2007 for more details.

The actual code was made publicly available in 2008.

Since the goal is to help the developers debug into part of .NET Framework, the source files included are far from complete. Resource files/project files and so on are intentionally missing, so that you wouldn’t be able to rebuild the assemblies from the code base.

Notice that due to the license covered such code, open source projects like Mono cannot make use of it to improve compatibility.

Open Source Embraced

When Microsoft finally decided to open source .NET source code and create .NET Core in 2014, they expected Mono to integrate with .NET Core code base directly.

However, the challenges were too many, so Mono guys started to integrate first with .NET Framework reference code, and Microsoft changed the license covered the reference source to be MIT (what you see today) to assist.

You might read this for more details.

Throughout the recent years, Microsoft released more files there for Mono, but the goal again is to improve compatibility, not to help developers recreate .NET Framework assemblies.

Today with .NET 5/6

.NET 5 was just released, which merged Mono and .NET Core finally, so both Mono and .NET Framework Reference Source have accomplished their core missions.

Mono and .NET Framework Reference Source might be there for a little longer, but your precious time should now be spent on .NET 5/6.

.NET 6 is going to deliver the next few important milestones (Xamarin and Unity on .NET 6).

All methods was sourced from or, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

0 0 votes
Article Rating
Notify of

Inline Feedbacks
View all comments
Would love your thoughts, please comment.x