Skip to content

Commit

Permalink
Obsolete thumbtacked AssemblyName properties
Browse files Browse the repository at this point in the history
  • Loading branch information
i3arnon committed Sep 23, 2021
1 parent bfaa457 commit 52cf265
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
3 changes: 3 additions & 0 deletions docs/project/list-of-diagnostics.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@ The PR that reveals the implementation of the `<IncludeInternalObsoleteAttribute
| __`SYSLIB0033`__ | Rfc2898DeriveBytes.CryptDeriveKey is obsolete and is not supported. Use PasswordDeriveBytes.CryptDeriveKey instead. |
| __`SYSLIB0034`__ | CmsSigner(CspParameters) is obsolete and is not supported. Use an alternative constructor instead. |
| __`SYSLIB0035`__ | ComputeCounterSignature without specifying a CmsSigner is obsolete and is not supported. Use the overload that accepts a CmsSigner. |
| __`SYSLIB0036`__ | AssemblyName.HashAlgorithm has been deprecated and is not supported. |
| __`SYSLIB0037`__ | AssemblyName.ProcessorArchitecture has been deprecated and is not supported. |
| __`SYSLIB0038`__ | AssemblyName.VersionCompatibility has been deprecated and is not supported. |

## Analyzer Warnings

Expand Down
9 changes: 9 additions & 0 deletions src/libraries/Common/src/System/Obsoletions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -116,5 +116,14 @@ internal static class Obsoletions

internal const string SignerInfoCounterSigMessage = "ComputeCounterSignature without specifying a CmsSigner is obsolete and is not supported. Use the overload that accepts a CmsSigner.";
internal const string SignerInfoCounterSigDiagId = "SYSLIB0035";

internal const string AssemblyHashAlgorithmMessage = "AssemblyName.HashAlgorithm has been deprecated and is not supported.";
internal const string AssemblyHashAlgorithmDiagId = "SYSLIB0036";

internal const string ProcessorArchitectureMessage = "AssemblyName.ProcessorArchitecture has been deprecated and is not supported.";
internal const string ProcessorArchitectureDiagId = "SYSLIB0037";

internal const string AssemblyVersionCompatibilityMessage = "AssemblyName.VersionCompatibility has been deprecated and is not supported.";
internal const string AssemblyVersionCompatibilityDiagId = "SYSLIB0038";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ public string? EscapedCodeBase
}
}

[Obsolete(Obsoletions.ProcessorArchitectureMessage, DiagnosticId = Obsoletions.ProcessorArchitectureDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
public ProcessorArchitecture ProcessorArchitecture
{
get
Expand Down Expand Up @@ -189,12 +190,14 @@ public AssemblyNameFlags Flags
}
}

[Obsolete(Obsoletions.AssemblyHashAlgorithmMessage, DiagnosticId = Obsoletions.AssemblyHashAlgorithmDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
public AssemblyHashAlgorithm HashAlgorithm
{
get => _hashAlgorithm;
set => _hashAlgorithm = value;
}

[Obsolete(Obsoletions.AssemblyVersionCompatibilityMessage, DiagnosticId = Obsoletions.AssemblyVersionCompatibilityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
public AssemblyVersionCompatibility VersionCompatibility
{
get => _versionCompatibility;
Expand Down

0 comments on commit 52cf265

Please sign in to comment.