Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix policheck error (#9311)
Browse files Browse the repository at this point in the history
Fixes policheck:Error

Changes Made

Skip the non en-us locale resource files.
Skip the file that contains the specified entity names in the deprecated folder
Change country to country/region based on https://policheck.microsoft.com/Pages/TermInfo.aspx?LCID=9&TermID=79570

Testing
Test with MSBuild pipeline build https://devdiv.visualstudio.com/DevDiv/_build/results?buildId=8509007&view=logs&j=7d9eef18-6720-5c1f-4d30-89d7b76728e9&t=c5a86041-9185-53e8-42a2-1cadc4486f0d&l=5251. There are no active results now.
JaynieBai authored and MichalPavlik committed Oct 17, 2023
1 parent 3ee6aef commit 87b844b
Showing 3 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion eng/policheck_exclusions.xml
Original file line number Diff line number Diff line change
@@ -10,4 +10,8 @@
<!--<Exclusion Type="FileName">ABC.TXT|XYZ.CS</Exclusion>-->

<Exclusion Type="FolderPathFull">.DOTNET</Exclusion>
</PoliCheckExclusions>
<!-- This file contains entity names that were written out by the XML writer in the VS.NET 2002/2003 project system. Leave them unchanged and skip the file -->
<Exclusion Type="FileName">OLDVSPROJECTFILEREADER.CS</Exclusion>
<!-- Since only support the locale en-us in our repo, skip the translated files currently. https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1889125 -->
<Exclusion Type="FileType">.XLF</Exclusion>
</PoliCheckExclusions>
2 changes: 1 addition & 1 deletion src/Tasks/AssemblyDependency/GenerateBindingRedirects.cs
Original file line number Diff line number Diff line change
@@ -171,7 +171,7 @@ private static bool IsMatch(AssemblyName suggestedRedirect, string name, string
var cultureString = suggestedRedirect.CultureName;
if (String.IsNullOrEmpty(cultureString))
{
// We use "neutral" for "Invariant Language (Invariant Country)" in assembly names.
// We use "neutral" for "Invariant Language (Invariant Country/Region)" in assembly names.
cultureString = "neutral";
}

2 changes: 1 addition & 1 deletion src/Tasks/AssemblyDependency/ResolveAssemblyReference.cs
Original file line number Diff line number Diff line change
@@ -1207,7 +1207,7 @@ quiet at the engine level.

assemblyIdentityAttributes.Add(new XAttribute("name", idealRemappingPartialAssemblyName.Name));

// We use "neutral" for "Invariant Language (Invariant Country)" in assembly names.
// We use "neutral" for "Invariant Language (Invariant Country/Region)" in assembly names.
var cultureString = idealRemappingPartialAssemblyName.CultureName;
assemblyIdentityAttributes.Add(new XAttribute("culture", String.IsNullOrEmpty(idealRemappingPartialAssemblyName.CultureName) ? "neutral" : idealRemappingPartialAssemblyName.CultureName));

0 comments on commit 87b844b

Please sign in to comment.