.NET Reference Source
repository·main·Indexed 25 days ago
https://github.com/microsoft/referencesourceA read-only subset of the .NET Framework source code provided as a reference for .NET Core development and a resource for the developer community.
What's inside .NET Reference Source
- .NET Reference Source is a read-only repository containing a subset of the .NET Framework source code. This subset provides functionality similar to the class libraries developed in .NET Core. It is intended for community leverage and as a reference for .NET Core development.
Submit issues and feature requests for .NET
mainThe
referencesourcerepository is read-only and does not accept feature requests or bug reports. To report issues or request features, use the appropriate channel for the specific runtime you are targeting:- For .NET Framework: Use the Visual Studio Developer Community.
- For .NET Core: Use the .NET Core GitHub repository.
Regenerate System.Web.RegularExpressions.ilpp
mainBecause the Razzle build window runtime is often outdated, you cannot reliably run
RegexPreCompiler.exefrom a Razzle window. To regenerate theSystem.Web.RegularExpressions.ilppfile, you must use a Suite window.Follow these steps:
- Modify
ndp\fx\src\xsp\regcomp\RegexPrecompiler.cs. - Build from
ndp\fx\src\xsp\regcompusing a Razzle window. - Open
regexes\System.Web.RegularExpressions.ilppfor editing (usingtf edit). - Open a Suite window.
- Navigate to
ndp\fx\src\xsp\regexes. - Run the batch file
RebuildRegExILFile.cmdto regenerate the.ilppfile. - Return to a Razzle window, navigate to
ndp\fx\src\xsp\regexes, and runbuild -cto buildSystem.Web.RegularExpressions.dll. - Check in the modified
System.Web.RegularExpressions.ilpp.
- Modify
Configure RegexPreCompiler to use a specific runtime version
mainWhen running
RegexPreCompilerfrom a Suite window, it defaults to the public runtime installed on the machine (typically a previously shipped RTM version). If you have modified the Regex engine inSystem.dllfor the current release, these changes will not be effective unless you force the compiler to use your current runtime build.Replace
v4.0.amd64chkin the examples below with your current runtime build install name (e.g.,v4.0.x86chk).Option 1: Configuration File Create a
RegexPreCompiler.exe.configfile with the following content:<configuration> <startup> <supportedRuntime version="v4.0.amd64chk" /> </startup> </configuration>Option 2: Environment Variables Set the following environment variables before running
RegexPreCompilerand unset them afterward:set COMPLUS_DEFAULTVERSION=v4.0.amd64chk set COMPLUS_VERSION=v4.0.amd64chk # ... run RegexPreCompiler ... set COMPLUS_DEFAULTVERSION= set COMPLUS_VERSION=Option 3: ClrEnv Window Instead of using a Suite window, run
RebuildRegExILFile.cmdfrom a ClrEnv window, which should have the correct environment configuration pre-set.License information for .NET Reference Source
mainFiles in this repository are licensed under the MIT license unless otherwise specified in the file header. If a file header only contains a copyright notice (e.g.,Copyright (c) Microsoft Corporation. All rights reserved.), it is assumed to be MIT-licensed.