зеркало из https://github.com/CryptoPro/runtime.git
1.5 KiB
1.5 KiB
This document provides the steps you need to take to update the reference assembly when adding new public APIs to an implementation assembly (post API Review).
For most assemblies within libraries
- Implement the API in the source assembly and build it. Note that when adding new public types, this might fail with a
TypeMustExist
error. The deadlock can be worked around by disabling theRunApiCompat
property:dotnet build /p:RunApiCompat=false
. - Run the following command (from the src directory)
msbuild /t:GenerateReferenceAssemblySource
to update the reference assembly**. - Navigate to the ref directory and build the reference assembly.
- Add, build, and run tests.
** Note: If you already added the new API to the reference source, re-generating it (after building the source assembly) will update it to be fully qualified and placed in the correct order. This can be done by running the GenerateReferenceAssemblySource
command from the ref directory.
For System.Runtime
These steps can also be applied to some unique assemblies which depend on changes in System.Private.Corelib. (partial facades like System.Memory, for example).
- Run
dotnet build --no-incremental /t:GenerateReferenceSource
from the System.Runtime/src directory. - Filter out all unrelated changes and extract the changes you care about (ignore certain attributes being removed). Generally, this step is not required for other reference assemblies.