How to build System.Private.CoreLib code

2021/02/10


Go back

When working in the Runtime repo, sometimes you need to make changes in code that lives in the System.Private.CoreLib folder.

The code that lives in System.Private.CoreLib is neither part of the libraries subset, or of the clr subset. Instead, it has its own subset: clr.corelib. Keep in mind that it will be built with the same configuration used for clr.

The unit tests for code that lives in System.Private.CoreLib are located in System.Runtime and System.Runtime.Extensions.

The solution is located in runtime\src\coreclr\System.Private.CoreLib\System.Private.CoreLib.sln.

The project is split in a special way in these files:

An example of a Type that lives in System.Private.CoreLib is System.IO.Path. This type has its elements located in the following places:

When you make changes to existing Path members, you must build: