Add the localized resource files for the Core, Rules, and RuleSelection projects to the NuGet package. This is complicated a bit by the fact that the localized files get created only in the SignedRelease job of the build pipeline, but we want to make sure that we can still build the NuGet package locally for validation testing. We want to avoid having 2 versions of the nuspec file, so this PR takes a tiered approach:
It updates the nuspec file to use glob patterns to include all Axe.Windows DLL's (including any subfolders) under the CI project's build into the NuGet package. It also omits the PDB files, which are no longer generated and should have been removed back in #727
It adds CopyLocalizedFiles.ps1 to ./tools/scripts. This script is responsible for picking up the MicroBuild-generated localized files for a single project and placing them into the directory structure expected by .NET
It adds a CopyLocalizedFiles target to CI.csproj. This target is enabled only when building in the SignedRelease job of the signed pipeline, and runs CopyLocalizedFiles.ps1 for each of the Core, Rules, and RuleSelection projects. This target runs after the build but before the Pack target
The net result is that when building within the SignedRelease job of the signed build pipeline, the signed localized files get included within the signed NuGet package. When building anywhere else, the unsigned NuGet package contains unsigned English files--which is all we need for validation.
The validation build published a NuGet package that contains the correctly signed resource files. The localization file structure of this package matches what exists in the Microsoft.VisualStudio.Services.Client package.
Details
Add the localized resource files for the
Core
,Rules
, andRuleSelection
projects to the NuGet package. This is complicated a bit by the fact that the localized files get created only in theSignedRelease
job of the build pipeline, but we want to make sure that we can still build the NuGet package locally for validation testing. We want to avoid having 2 versions of thenuspec
file, so this PR takes a tiered approach:nuspec
file to use glob patterns to include all Axe.Windows DLL's (including any subfolders) under theCI
project's build into the NuGet package. It also omits the PDB files, which are no longer generated and should have been removed back in #727CopyLocalizedFiles.ps1
to./tools/scripts
. This script is responsible for picking up the MicroBuild-generated localized files for a single project and placing them into the directory structure expected by .NETCopyLocalizedFiles
target toCI.csproj
. This target is enabled only when building in theSignedRelease
job of the signed pipeline, and runsCopyLocalizedFiles.ps1
for each of theCore
,Rules
, andRuleSelection
projects. This target runs after the build but before thePack
targetThe net result is that when building within the
SignedRelease
job of the signed build pipeline, the signed localized files get included within the signed NuGet package. When building anywhere else, the unsigned NuGet package contains unsigned English files--which is all we need for validation.The validation build published a NuGet package that contains the correctly signed resource files. The localization file structure of this package matches what exists in the Microsoft.VisualStudio.Services.Client package.
Motivation
Part of the localization feature
Context
Pull request checklist