diff options
author | Viktor Hofer <viktor.hofer@microsoft.com> | 2022-02-28 19:35:51 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-28 19:35:51 +0300 |
commit | 7667e4112d5dd093dab7643e1dfe25997c0921a4 (patch) | |
tree | 71d1ef124b613db8729d41a3435292fe2fa14c21 /eng/resolveContract.targets | |
parent | c41f452cc96a2f2e73c71610d423df3e9c133fef (diff) |
Update GenAPI usage and code clean-up (#65887)
* Update GenAPI usage and code clean-up
Diffstat (limited to 'eng/resolveContract.targets')
-rw-r--r-- | eng/resolveContract.targets | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/eng/resolveContract.targets b/eng/resolveContract.targets index 0e0cfc05c56..37ab1d299a6 100644 --- a/eng/resolveContract.targets +++ b/eng/resolveContract.targets @@ -7,6 +7,13 @@ <ContractDependencyPaths Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', '$(NetCoreAppCurrent)'))">$(ContractDependencyPaths);$(MicrosoftNetCoreAppRefPackRefDir)</ContractDependencyPaths> </PropertyGroup> + <PropertyGroup> + <GenAPIExcludeAttributesList>$(RepositoryEngineeringDir)DefaultGenApiDocIds.txt</GenAPIExcludeAttributesList> + <GenAPIHeaderFile>$(RepositoryEngineeringDir)LicenseHeader.txt</GenAPIHeaderFile> + <GenAPITargetPath>$([MSBuild]::NormalizePath('$(MSBuildProjectDirectory)', '..', 'ref', '$(AssemblyName).cs'))</GenAPITargetPath> + <GenAPILangVersion Condition="'$(LangVersion)' != ''">$(LangVersion)</GenAPILangVersion> + </PropertyGroup> + <PropertyGroup Condition="'$(IsSourceProject)' == 'true'"> <ContractProject Condition="'$(ContractProject)' == ''">$(LibrariesProjectRoot)$(MSBuildProjectName)\ref\$(MSBuildProjectName).csproj</ContractProject> <HasMatchingContract Condition="'$(HasMatchingContract)' == '' and Exists('$(ContractProject)')">true</HasMatchingContract> @@ -53,4 +60,13 @@ ReferenceAssembly="" /> </ItemGroup> </Target> + + <Target Name="SetGenAPIProperties" + BeforeTargets="GenerateReferenceAssemblySource"> + <PropertyGroup> + <GenAPIFollowTypeForwards Condition="'%(ProjectReference.Identity)' == '$(CoreLibProject)'">true</GenAPIFollowTypeForwards> + </PropertyGroup> + </Target> + + <Import Project="$(RepositoryEngineeringDir)outerBuild.targets" Condition="'$(IsCrossTargetingBuild)' == 'true'" /> </Project> |