Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix docs file names and add validation #107334

Merged
merged 1 commit into from
Sep 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion eng/intellisense.targets
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<IntellisensePackageXmlFilePath Condition="'$(IntellisensePackageXmlFilePath)' == '' and Exists($(IntellisensePackageXmlFilePathFromNetFolder))">$(IntellisensePackageXmlFilePathFromNetFolder)</IntellisensePackageXmlFilePath>
<IntellisensePackageXmlFilePath Condition="'$(IntellisensePackageXmlFilePath)' == '' and Exists($(IntellisensePackageXmlFilePathFromDotNetPlatExtFolder))">$(IntellisensePackageXmlFilePathFromDotNetPlatExtFolder)</IntellisensePackageXmlFilePath>

<IntermediateDocFileItemFromIntellisensePackage>$(IntermediateOutputPath)$(TargetName).intellisense-package.xml</IntermediateDocFileItemFromIntellisensePackage>
<IntermediateDocFileItemFromIntellisensePackage>$([MSBuild]::NormalizePath('$(IntermediateOutputPath)', 'intellisense-package', '$(TargetName).xml'))</IntermediateDocFileItemFromIntellisensePackage>

<!-- Suppress "CS1591 - Missing XML comment for publicly visible type or member" compiler errors when the intellisense package xml file is used. -->
<NoWarn Condition="'$(SkipIntellisenseNoWarnCS1591)' != 'true'">$(NoWarn);CS1591</NoWarn>
Expand Down
21 changes: 21 additions & 0 deletions src/libraries/sfx.proj
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,27 @@
UseHardlinksIfPossible="true" />
</Target>

<Target Name="ValidateSharedFramework"
AfterTargets="Build">
<ItemGroup>
<!-- exclude private assemblies from ref-->
<_expectedRef Include="@(NetCoreAppLibrary)" Condition="!$([System.String]::new('%(Identity)').StartsWith('System.Private'))" />
<_expectedSharedFrameworkFile Include="@(_expectedRefs->'$(MicrosoftNetCoreAppRefPackRefDir)%(Identity).dll')" />

<!-- exclude the full facades from expected docs since they have no types -->
<_expectedDoc Include="@(_expectedRefs)" Exclude="netstandard;@(NetFxReference)" />
<_expectedSharedFrameworkFile Include="@(_expectedDoc->'$(MicrosoftNetCoreAppRefPackRefDir)%(Identity).xml')" />

<!-- exclude CoreLib from expected libs, since it's placed in native -->
<_expectedLib Include="@(NetCoreAppLibrary)" Exclude="System.Private.CoreLib" />
<_expectedSharedFrameworkFile Include="@(_expectedLib->'$(MicrosoftNetCoreAppRuntimePackRidLibTfmDir)%(Identity).dll')" />

<_missingSharedFrameworkFile Include="@(_expectedSharedFrameworkFile)" Exclude="@(_expectedSharedFrameworkFile->Exists())" />
</ItemGroup>

<Error Text="The shared framework files '@(_missingSharedFrameworkFile)' were missing." Condition="'@(_missingSharedFrameworkFile)' != ''" />
</Target>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am a big fan of the addition of tests for infra stuff, thank you.

Question: Do you know why the re are some _missingSharedFrameworkFile items with the name ''?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question: Do you know why the re are some _missingSharedFrameworkFile items with the name ''?

The condition '@(_missingSharedFrameworkFile)' != '' means _the item named missingSharedFrameworkFile is not empty. It's used to ensure we don't raise the error when no files are missing.


<Target Name="GetTrimSharedFrameworkAssembliesInputs"
DependsOnTargets="ResolveProjectReferences">
<PropertyGroup>
Expand Down
Loading