Skip to content

Commit

Permalink
Add BuildTargetFramework option to GenerateReferenceSource docs
Browse files Browse the repository at this point in the history
  • Loading branch information
safern authored Nov 18, 2021
1 parent 9962c10 commit fc073f7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/coding-guidelines/updating-ref-source.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ This document provides the steps you need to take to update the reference assemb
## For most assemblies within libraries

1. Implement the API in the source assembly and [build it](../workflow/building/libraries/README.md#building-individual-libraries). Note that when adding new public types, this might fail with a `TypeMustExist` error. The deadlock can be worked around by disabling the `RunApiCompat` property: `dotnet build /p:RunApiCompat=false`.
2. Run the following command (from the src directory) `dotnet msbuild /t:GenerateReferenceAssemblySource` to update the reference assembly**.
2. Run the following command (from the src directory) `dotnet msbuild /t:GenerateReferenceAssemblySource` to update the reference assembly**. When a project cross builds for multiple target frameworks, usually you need to specify the target framework to generate the reference assembly source for; you can do that by specifying it via `/p:BuildTargetFramework` MSBuild parameter.
3. Navigate to the ref directory and build the reference assembly.
4. Add, build, and run tests.

Expand All @@ -26,4 +26,4 @@ dotnet msbuild /t:GenerateReferenceAssemblySource /p:GenAPIAdditionalParameters=

## For .NETFramework Facade Assemblies

Some assemblies define types in .NETStandard and .NETCore but require facades on .NETFramework to forward types to their existing location in .NETFramework. In these cases we need to add type forwards manually to the .NETFramework build of the reference assembly. TypeForwards must be added for every type in the compatible .NETStandard reference assembly that exists in the .NETFramework, types which are defined in the .NETFramework reference should be factored into a shared source file.
Some assemblies define types in .NETStandard and .NETCore but require facades on .NETFramework to forward types to their existing location in .NETFramework. In these cases we need to add type forwards manually to the .NETFramework build of the reference assembly. TypeForwards must be added for every type in the compatible .NETStandard reference assembly that exists in the .NETFramework, types which are defined in the .NETFramework reference should be factored into a shared source file.

0 comments on commit fc073f7

Please sign in to comment.