diff --git a/src/tools/illink/src/ILLink.RoslynAnalyzer/Directory.Build.props b/src/tools/illink/src/ILLink.RoslynAnalyzer/Directory.Build.props
index 6aa8cd932f1103..ca4ac67cf2f699 100644
--- a/src/tools/illink/src/ILLink.RoslynAnalyzer/Directory.Build.props
+++ b/src/tools/illink/src/ILLink.RoslynAnalyzer/Directory.Build.props
@@ -5,15 +5,4 @@
-
-
-
- 4.5.0
-
diff --git a/src/tools/illink/src/ILLink.RoslynAnalyzer/ILLink.RoslynAnalyzer.csproj b/src/tools/illink/src/ILLink.RoslynAnalyzer/ILLink.RoslynAnalyzer.csproj
index f06bd994306028..e1bd1f536ed9e5 100644
--- a/src/tools/illink/src/ILLink.RoslynAnalyzer/ILLink.RoslynAnalyzer.csproj
+++ b/src/tools/illink/src/ILLink.RoslynAnalyzer/ILLink.RoslynAnalyzer.csproj
@@ -11,6 +11,10 @@
cs
+
+
+
+
diff --git a/src/tools/illink/src/ILLink.RoslynAnalyzer/RequiresAssemblyFilesAnalyzer.cs b/src/tools/illink/src/ILLink.RoslynAnalyzer/RequiresAssemblyFilesAnalyzer.cs
index 1b6a712f5d937f..863bd0f745a555 100644
--- a/src/tools/illink/src/ILLink.RoslynAnalyzer/RequiresAssemblyFilesAnalyzer.cs
+++ b/src/tools/illink/src/ILLink.RoslynAnalyzer/RequiresAssemblyFilesAnalyzer.cs
@@ -102,7 +102,7 @@ protected override bool ReportSpecialIncompatibleMembersDiagnostic (OperationAna
}
protected override bool VerifyAttributeArguments (AttributeData attribute) => attribute.ConstructorArguments.Length == 0 ||
- attribute.ConstructorArguments.Length >= 1 && attribute.ConstructorArguments[0] is { Type.SpecialType: SpecialType.System_String } ctorArg;
+ attribute.ConstructorArguments.Length >= 1 && attribute.ConstructorArguments is [ { Type.SpecialType: SpecialType.System_String }, ..];
protected override string GetMessageFromAttribute (AttributeData requiresAttribute)
{
diff --git a/src/tools/illink/src/ILLink.RoslynAnalyzer/RequiresDynamicCodeAnalyzer.cs b/src/tools/illink/src/ILLink.RoslynAnalyzer/RequiresDynamicCodeAnalyzer.cs
index 9629a813ff76d0..dcba6acfb17285 100644
--- a/src/tools/illink/src/ILLink.RoslynAnalyzer/RequiresDynamicCodeAnalyzer.cs
+++ b/src/tools/illink/src/ILLink.RoslynAnalyzer/RequiresDynamicCodeAnalyzer.cs
@@ -37,7 +37,7 @@ protected override bool IsAnalyzerEnabled (AnalyzerOptions options, Compilation
options.IsMSBuildPropertyValueTrue (MSBuildPropertyOptionNames.EnableAotAnalyzer, compilation);
protected override bool VerifyAttributeArguments (AttributeData attribute) =>
- attribute.ConstructorArguments.Length >= 1 && attribute.ConstructorArguments[0] is { Type.SpecialType: SpecialType.System_String } ctorArg;
+ attribute.ConstructorArguments.Length >= 1 && attribute.ConstructorArguments is [ { Type.SpecialType: SpecialType.System_String }, ..];
protected override string GetMessageFromAttribute (AttributeData? requiresAttribute)
{
diff --git a/src/tools/illink/src/ILLink.RoslynAnalyzer/RequiresUnreferencedCodeUtils.cs b/src/tools/illink/src/ILLink.RoslynAnalyzer/RequiresUnreferencedCodeUtils.cs
index fcba10c933d7a3..5cce7be0da8561 100644
--- a/src/tools/illink/src/ILLink.RoslynAnalyzer/RequiresUnreferencedCodeUtils.cs
+++ b/src/tools/illink/src/ILLink.RoslynAnalyzer/RequiresUnreferencedCodeUtils.cs
@@ -34,7 +34,7 @@ public static bool IsInRequiresUnreferencedCodeAttributeScope (this ISymbol memb
/// Attribute data to compare.
/// True if the validation was successfull; otherwise, returns false.
public static bool VerifyRequiresUnreferencedCodeAttributeArguments (AttributeData attribute)
- => attribute.ConstructorArguments.Length >= 1 && attribute.ConstructorArguments[0] is { Type.SpecialType: SpecialType.System_String } ctorArg;
+ => attribute.ConstructorArguments.Length >= 1 && attribute.ConstructorArguments is [ { Type.SpecialType: SpecialType.System_String }, ..];
public static string GetMessageFromAttribute (AttributeData? requiresAttribute)
{