Skip to content

Upgrade projects to target .NET 10 (System.Security)#12794

Draft
gewarren wants to merge 3 commits into
dotnet:mainfrom
gewarren:upgrade-csharp-set11
Draft

Upgrade projects to target .NET 10 (System.Security)#12794
gewarren wants to merge 3 commits into
dotnet:mainfrom
gewarren:upgrade-csharp-set11

Conversation

@gewarren

Copy link
Copy Markdown
Collaborator

Contributes to #12513.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the snippet project files under snippets/csharp/ for System.Security-related APIs so they build against .NET 10, aligning snippet compilation with the repo’s ongoing modernization work for #12513.

Changes:

  • Upgraded many snippet projects from net472, net6.0, or net8.0 to net10.0.
  • Upgraded Windows desktop / UI-dependent snippet projects to net10.0-windows.

Reviewed changes

Copilot reviewed 160 out of 160 changed files in this pull request and generated no comments.

Show a summary per file
File Description
snippets/csharp/System.Security/SecurityException/Overview/Project.csproj Update TargetFramework to net10.0-windows.
snippets/csharp/System.Security/SecurityException/.ctor/Project.csproj Update TargetFramework to net10.0-windows.
snippets/csharp/System.Security/SecurityElement/SearchForTextOfTag/Project.csproj Update TargetFramework to net10.0.
snippets/csharp/System.Security/SecurityElement/Overview/Project.csproj Update TargetFramework to net10.0.
snippets/csharp/System.Security/SecureString/AppendChar/Project.csproj Update TargetFramework to net10.0.
snippets/csharp/System.Security/IPermission/Overview/Project.csproj Update TargetFramework to net10.0-windows.
snippets/csharp/System.Security/HostSecurityManager/Overview/Project.csproj Update TargetFramework to net10.0-windows.
snippets/csharp/System.Security.RightsManagement/UnsignedPublishLicense/.ctor/UnsignedPubLicense.csproj Update TargetFramework to net10.0-windows.
snippets/csharp/System.Security.RightsManagement/CryptoProvider/BoundGrants/RmContentViewer.csproj Update TargetFramework to net10.0-windows.
snippets/csharp/System.Security.RightsManagement/CryptoProvider/BlockSize/RmContentPublish.csproj Update TargetFramework to net10.0-windows.
snippets/csharp/System.Security.Principal/WindowsPrincipal/Identity/Project.csproj Update TargetFramework to net10.0-windows.
snippets/csharp/System.Security.Principal/WindowsPrincipal/.ctor/Project.csproj Update TargetFramework to net10.0-windows.
snippets/csharp/System.Security.Principal/WindowsBuiltInRole/Overview/Project.csproj Update TargetFramework to net10.0.
snippets/csharp/System.Security.Principal/WindowsAccountType/Overview/Project.csproj Update TargetFramework to net10.0-windows.
snippets/csharp/System.Security.Principal/GenericPrincipal/Overview/Project.csproj Update TargetFramework to net10.0.
snippets/csharp/System.Security.Principal/GenericIdentity/Overview/Project.csproj Update TargetFramework to net10.0.
snippets/csharp/System.Security.Policy/Hash/SHA1/Project.csproj Update TargetFramework to net10.0-windows.
snippets/csharp/System.Security.Policy/GacInstalled/Equals/Project.csproj Update TargetFramework to net10.0-windows.
snippets/csharp/System.Security.Policy/CodeConnectAccess/Overview/Project.csproj Update TargetFramework to net10.0-windows.
snippets/csharp/System.Security.Cryptography/TripleDES/Create/project.csproj Update TargetFramework to net10.0.
snippets/csharp/System.Security.Cryptography/ToBase64Transform/Overview/Project.csproj Update TargetFramework to net10.0.
snippets/csharp/System.Security.Cryptography/SymmetricAlgorithm/Overview/Project.csproj Update TargetFramework to net10.0.
snippets/csharp/System.Security.Cryptography/SymmetricAlgorithm/LegalBlockSizes/Project.csproj Update TargetFramework to net10.0.
snippets/csharp/System.Security.Cryptography/SymmetricAlgorithm/CreateEncryptor/Project.csproj Update TargetFramework to net10.0.
snippets/csharp/System.Security.Cryptography/SHA512/Overview/Project.csproj Update TargetFramework to net10.0.
snippets/csharp/System.Security.Cryptography/SHA384/Overview/Project.csproj Update TargetFramework to net10.0.
snippets/csharp/System.Security.Cryptography/RSAPKCS1SignatureFormatter/Overview/Project.csproj Update TargetFramework to net10.0.
snippets/csharp/System.Security.Cryptography/RSAPKCS1SignatureDeformatter/Overview/Project.csproj Update TargetFramework to net10.0.
snippets/csharp/System.Security.Cryptography/RSAOAEPKeyExchangeFormatter/CreateKeyExchange/Project.csproj Update TargetFramework to net10.0.
snippets/csharp/System.Security.Cryptography/RSAOAEPKeyExchangeDeformatter/Parameters/Project.csproj Update TargetFramework to net10.0.
snippets/csharp/System.Security.Cryptography/RSAOAEPKeyExchangeDeformatter/Overview/Project.csproj Update TargetFramework to net10.0.
snippets/csharp/System.Security.Cryptography/RSACryptoServiceProvider/UseMachineKeyStore/Project.csproj Update TargetFramework to net10.0.
snippets/csharp/System.Security.Cryptography/RSACryptoServiceProvider/SignHash/Project.csproj Update TargetFramework to net10.0.
snippets/csharp/System.Security.Cryptography/RSACryptoServiceProvider/PersistKeyInCsp/Project.csproj Update TargetFramework to net10.0.
snippets/csharp/System.Security.Cryptography/RSACryptoServiceProvider/ImportParameters/Project.csproj Update TargetFramework to net10.0.
snippets/csharp/System.Security.Cryptography/RSACryptoServiceProvider/Encrypt/Project.csproj Update TargetFramework to net10.0.
snippets/csharp/System.Security.Cryptography/RSACryptoServiceProvider/Decrypt/Project.csproj Update TargetFramework to net10.0.
snippets/csharp/System.Security.Cryptography/RNGCryptoServiceProvider/Overview/Project.csproj Update TargetFramework to net10.0.
snippets/csharp/System.Security.Cryptography/RijndaelManaged/Overview/Project.csproj Update TargetFramework to net10.0.
snippets/csharp/System.Security.Cryptography/Rfc2898DeriveBytes/Overview/Project.csproj Update TargetFramework to net10.0.
snippets/csharp/System.Security.Cryptography/RC2CryptoServiceProvider/UseSalt/Project.csproj Update TargetFramework to net10.0.
snippets/csharp/System.Security.Cryptography/RC2CryptoServiceProvider/Overview/Project.csproj Update TargetFramework to net10.0.
snippets/csharp/System.Security.Cryptography/RC2/Create/project.csproj Update TargetFramework to net10.0.
snippets/csharp/System.Security.Cryptography/RandomNumberGenerator/GetNonZeroBytes/Project.csproj Update TargetFramework to net10.0-windows.
snippets/csharp/System.Security.Cryptography/RandomNumberGenerator/GetBytes/Project.csproj Update TargetFramework to net10.0-windows.
snippets/csharp/System.Security.Cryptography/PasswordDeriveBytes/Overview/Project.csproj Update TargetFramework to net10.0.
snippets/csharp/System.Security.Cryptography/Oid/Overview/Project.csproj Update TargetFramework to net10.0.
snippets/csharp/System.Security.Cryptography/MaskGenerationMethod/Overview/Project.csproj Update TargetFramework to net10.0.
snippets/csharp/System.Security.Cryptography/KeySizes/Overview/Project.csproj Update TargetFramework to net10.0.
snippets/csharp/System.Security.Cryptography/KeyedHashAlgorithm/Overview/Project.csproj Update TargetFramework to net10.0.
snippets/csharp/System.Security.Cryptography/KeyedHashAlgorithm/Key/Project.csproj Update TargetFramework to net10.0.
snippets/csharp/System.Security.Cryptography/HMACSHA512/Overview/Project.csproj Update TargetFramework to net10.0.
snippets/csharp/System.Security.Cryptography/HMACSHA384/Overview/Project.csproj Update TargetFramework to net10.0.
snippets/csharp/System.Security.Cryptography/HMACSHA256/Overview/Project.csproj Update TargetFramework to net10.0.
snippets/csharp/System.Security.Cryptography/HashAlgorithm/TransformBlock/Project.csproj Update TargetFramework to net10.0.
snippets/csharp/System.Security.Cryptography/HashAlgorithm/Overview/Project.csproj Update TargetFramework to net10.0-windows.
snippets/csharp/System.Security.Cryptography/HashAlgorithm/ComputeHash/Project.csproj Update TargetFramework to net10.0.
snippets/csharp/System.Security.Cryptography/FromBase64Transform/Overview/Project.csproj Update TargetFramework to net10.0.
snippets/csharp/System.Security.Cryptography/ECDsaCng/Overview/Project.csproj Update TargetFramework to net10.0.
snippets/csharp/System.Security.Cryptography/ECDiffieHellmanCng/Overview/Project.csproj Update TargetFramework to net10.0.
snippets/csharp/System.Security.Cryptography/DSASignatureFormatter/Overview/Project.csproj Update TargetFramework to net10.0.
snippets/csharp/System.Security.Cryptography/DSASignatureDeformatter/Overview/Project.csproj Update TargetFramework to net10.0.
snippets/csharp/System.Security.Cryptography/DESCryptoServiceProvider/Overview/Project.csproj Update TargetFramework to net10.0-windows.
snippets/csharp/System.Security.Cryptography/DES/Create/project.csproj Update TargetFramework to net10.0.
snippets/csharp/System.Security.Cryptography/DataProtectionScope/Overview/Project.csproj Update TargetFramework to net10.0-windows.
snippets/csharp/System.Security.Cryptography/CspParameters/Overview/Project.csproj Update TargetFramework to net10.0.
snippets/csharp/System.Security.Cryptography/CspParameters/KeyNumber/Project.csproj Update TargetFramework to net10.0.
snippets/csharp/System.Security.Cryptography/CspKeyContainerInfo/Overview/Project.csproj Update TargetFramework to net10.0.
snippets/csharp/System.Security.Cryptography/CryptoStream/Overview/Project.csproj Update TargetFramework to net10.0.
snippets/csharp/System.Security.Cryptography/CryptographicUnexpectedOperationException/Overview/Project.csproj Update TargetFramework to net10.0.
snippets/csharp/System.Security.Cryptography/CryptographicException/Overview/Project.csproj Update TargetFramework to net10.0.
snippets/csharp/System.Security.Cryptography/CryptoConfig/Overview/Project.csproj Update TargetFramework to net10.0.
snippets/csharp/System.Security.Cryptography/AsymmetricKeyExchangeDeformatter/Overview/Project.csproj Update TargetFramework to net10.0.
snippets/csharp/System.Security.Cryptography/AsnEncodedData/Overview/Project.csproj Update TargetFramework to net10.0-windows.
snippets/csharp/System.Security.Cryptography/AesManaged/Overview/Project.csproj Update TargetFramework to net10.0.
snippets/csharp/System.Security.Cryptography/AesCryptoServiceProvider/Overview/Project.csproj Update TargetFramework to net10.0.
snippets/csharp/System.Security.Cryptography/Aes/Overview/Project.csproj Update TargetFramework to net10.0.
snippets/csharp/System.Security.Cryptography.Xml/XmlDsigXsltTransform/Overview/Project.csproj Update TargetFramework to net10.0-windows.
snippets/csharp/System.Security.Cryptography.Xml/XmlDsigXPathTransform/Overview/Project.csproj Update TargetFramework to net10.0-windows.
snippets/csharp/System.Security.Cryptography.Xml/XmlDsigC14NWithCommentsTransform/Overview/Project.csproj Update TargetFramework to net10.0-windows.
snippets/csharp/System.Security.Cryptography.Xml/SignedXml/XmlDsigXsltTransformUrl/Project.csproj Update TargetFramework to net10.0-windows.
snippets/csharp/System.Security.Cryptography.Xml/SignedXml/XmlDsigXPathTransformUrl/Project.csproj Update TargetFramework to net10.0-windows.
snippets/csharp/System.Security.Cryptography.Xml/SignedXml/XmlDsigExcC14NWithCommentsTransformUrl/Project.csproj Update TargetFramework to net10.0-windows.
snippets/csharp/System.Security.Cryptography.Xml/SignedXml/XmlDsigExcC14NTransformUrl/Project.csproj Update TargetFramework to net10.0-windows.
snippets/csharp/System.Security.Cryptography.Xml/SignedXml/XmlDsigEnvelopedSignatureTransformUrl/Project.csproj Update TargetFramework to net10.0-windows.
snippets/csharp/System.Security.Cryptography.Xml/SignedXml/XmlDsigC14NTransformUrl/Project.csproj Update TargetFramework to net10.0-windows.
snippets/csharp/System.Security.Cryptography.Xml/SignedXml/XmlDsigBase64TransformUrl/Project.csproj Update TargetFramework to net10.0-windows.
snippets/csharp/System.Security.Cryptography.Xml/SignedXml/CheckSignatureReturningKey/Project.csproj Update TargetFramework to net10.0-windows.
snippets/csharp/System.Security.Cryptography.Xml/SignedXml/AddObject/Project.csproj Update TargetFramework to net10.0-windows.
snippets/csharp/System.Security.Cryptography.Xml/Signature/Overview/Project.csproj Update TargetFramework to net10.0-windows.
snippets/csharp/System.Security.Cryptography.Xml/Reference/.ctor/Project.csproj Update TargetFramework to net10.0-windows.
snippets/csharp/System.Security.Cryptography.Xml/KeyReference/Overview/Project.csproj Update TargetFramework to net10.0-windows.
snippets/csharp/System.Security.Cryptography.Xml/KeyInfoX509Data/Overview/Project.csproj Update TargetFramework to net10.0-windows.
snippets/csharp/System.Security.Cryptography.Xml/KeyInfoX509Data/.ctor/Project.csproj Update TargetFramework to net10.0-windows.
snippets/csharp/System.Security.Cryptography.Xml/KeyInfo/Overview/Project.csproj Update TargetFramework to net10.0-windows.
snippets/csharp/System.Security.Cryptography.Xml/IRelDecryptor/Overview/Project.csproj Update TargetFramework to net10.0-windows.
snippets/csharp/System.Security.Cryptography.Xml/EncryptionProperty/Overview/Project.csproj Update TargetFramework to net10.0-windows.
snippets/csharp/System.Security.Cryptography.Xml/EncryptedXml/DecryptDocument/Project.csproj Update TargetFramework to net10.0.
snippets/csharp/System.Security.Cryptography.Xml/EncryptedXml/AddKeyNameMapping/Project.csproj Update TargetFramework to net10.0-windows.
snippets/csharp/System.Security.Cryptography.Xml/EncryptedType/Overview/Project.csproj Update TargetFramework to net10.0-windows.
snippets/csharp/System.Security.Cryptography.Xml/EncryptedKey/Overview/Project.csproj Update TargetFramework to net10.0-windows.
snippets/csharp/System.Security.Cryptography.Xml/EncryptedData/Overview/Project.csproj Update TargetFramework to net10.0-windows.
snippets/csharp/System.Security.Cryptography.Xml/DSAKeyValue/Overview/Project.csproj Update TargetFramework to net10.0-windows.
snippets/csharp/System.Security.Cryptography.Xml/DataReference/Overview/Project.csproj Update TargetFramework to net10.0-windows.
snippets/csharp/System.Security.Cryptography.Xml/DataObject/Overview/Project.csproj Update TargetFramework to net10.0-windows.
snippets/csharp/System.Security.Cryptography.Xml/CipherReference/GetXml/Project.csproj Update TargetFramework to net10.0-windows.
snippets/csharp/System.Security.Cryptography.Xml/CipherData/Overview/Project.csproj Update TargetFramework to net10.0-windows.
snippets/csharp/System.Security.Cryptography.Xml/CipherData/.ctor/Project.csproj Update TargetFramework to net10.0-windows.
snippets/csharp/System.Security.Cryptography.X509Certificates/X509Chain/Overview/Project.csproj Update TargetFramework to net10.0-windows.
snippets/csharp/System.Security.Cryptography.X509Certificates/X509Certificate/Overview/Project.csproj Update TargetFramework to net10.0.
snippets/csharp/System.Security.Cryptography.X509Certificates/X509Certificate/GetSerialNumberString/Project.csproj Update TargetFramework to net10.0.
snippets/csharp/System.Security.Cryptography.X509Certificates/X509Certificate/GetSerialNumber/Project.csproj Update TargetFramework to net10.0.
snippets/csharp/System.Security.Cryptography.X509Certificates/X509Certificate/GetRawCertDataString/Project.csproj Update TargetFramework to net10.0.
snippets/csharp/System.Security.Cryptography.X509Certificates/X509Certificate/GetRawCertData/Project.csproj Update TargetFramework to net10.0.
snippets/csharp/System.Security.Cryptography.X509Certificates/X509Certificate/GetPublicKeyString/Project.csproj Update TargetFramework to net10.0.
snippets/csharp/System.Security.Cryptography.X509Certificates/X509Certificate/GetPublicKey/Project.csproj Update TargetFramework to net10.0.
snippets/csharp/System.Security.Cryptography.X509Certificates/X509Certificate/GetKeyAlgorithmParametersString/Project.csproj Update TargetFramework to net10.0.
snippets/csharp/System.Security.Cryptography.X509Certificates/X509Certificate/GetKeyAlgorithmParameters/Project.csproj Update TargetFramework to net10.0.
snippets/csharp/System.Security.Cryptography.X509Certificates/X509Certificate/GetKeyAlgorithm/Project.csproj Update TargetFramework to net10.0.
snippets/csharp/System.Security.Cryptography.X509Certificates/X509Certificate/GetHashCode/Project.csproj Update TargetFramework to net10.0.
snippets/csharp/System.Security.Cryptography.X509Certificates/X509Certificate/GetFormat/Project.csproj Update TargetFramework to net10.0.
snippets/csharp/System.Security.Cryptography.X509Certificates/X509Certificate/GetExpirationDateString/Project.csproj Update TargetFramework to net10.0.
snippets/csharp/System.Security.Cryptography.X509Certificates/X509Certificate/GetEffectiveDateString/Project.csproj Update TargetFramework to net10.0.
snippets/csharp/System.Security.Cryptography.X509Certificates/X509Certificate/GetCertHashString/Project.csproj Update TargetFramework to net10.0.
snippets/csharp/System.Security.Cryptography.X509Certificates/X509Certificate/GetCertHash/Project.csproj Update TargetFramework to net10.0.
snippets/csharp/System.Security.Cryptography.X509Certificates/X509Certificate/Equals/Project.csproj Update TargetFramework to net10.0.
snippets/csharp/System.Security.Cryptography.X509Certificates/X509Certificate/CreateFromCertFile/Project.csproj Update TargetFramework to net10.0.
snippets/csharp/System.Security.Cryptography.X509Certificates/X509Certificate/.ctor/Project.csproj Update TargetFramework to net10.0.
snippets/csharp/System.Security.Cryptography.X509Certificates/X509BasicConstraintsExtension/Overview/Project.csproj Update TargetFramework to net10.0.
snippets/csharp/System.Security.Cryptography.X509Certificates/X500DistinguishedName/Overview/Project.csproj Update TargetFramework to net10.0-windows.
snippets/csharp/System.Security.Cryptography.X509Certificates/StoreName/Overview/Project.csproj Update TargetFramework to net10.0.
snippets/csharp/System.Security.Cryptography.X509Certificates/PublicKey/Overview/Project.csproj Update TargetFramework to net10.0.
snippets/csharp/System.Security.Cryptography.X509Certificates/PublicKey/Key/Project.csproj Update TargetFramework to net10.0-windows.
snippets/csharp/System.Security.Cryptography.X509Certificates/OpenFlags/Overview/Project.csproj Update TargetFramework to net10.0.
snippets/csharp/System.Security.AccessControl/SemaphoreSecurity/SetAccessRule/Project.csproj Update TargetFramework to net10.0-windows.
snippets/csharp/System.Security.AccessControl/SemaphoreSecurity/ResetAccessRule/Project.csproj Update TargetFramework to net10.0-windows.
snippets/csharp/System.Security.AccessControl/SemaphoreSecurity/RemoveAccessRuleSpecific/Project.csproj Update TargetFramework to net10.0-windows.
snippets/csharp/System.Security.AccessControl/SemaphoreSecurity/RemoveAccessRuleAll/Project.csproj Update TargetFramework to net10.0-windows.
snippets/csharp/System.Security.AccessControl/SemaphoreSecurity/RemoveAccessRule/Project.csproj Update TargetFramework to net10.0-windows.
snippets/csharp/System.Security.AccessControl/SemaphoreAccessRule/Overview/Project.csproj Update TargetFramework to net10.0-windows.
snippets/csharp/System.Security.AccessControl/RegistrySecurity/SetAccessRule/Project.csproj Update TargetFramework to net10.0.
snippets/csharp/System.Security.AccessControl/RegistrySecurity/ResetAccessRule/Project.csproj Update TargetFramework to net10.0.
snippets/csharp/System.Security.AccessControl/RegistrySecurity/RemoveAccessRuleSpecific/Project.csproj Update TargetFramework to net10.0.
snippets/csharp/System.Security.AccessControl/RegistrySecurity/RemoveAccessRuleAll/Project.csproj Update TargetFramework to net10.0.
snippets/csharp/System.Security.AccessControl/RegistrySecurity/Overview/Project.csproj Update TargetFramework to net10.0.
snippets/csharp/System.Security.AccessControl/RegistryAccessRule/Overview/Project.csproj Update TargetFramework to net10.0.
snippets/csharp/System.Security.AccessControl/RegistryAccessRule/.ctor/Project.csproj Update TargetFramework to net10.0.
snippets/csharp/System.Security.AccessControl/MutexSecurity/SetAccessRule/Project.csproj Update TargetFramework to net10.0-windows.
snippets/csharp/System.Security.AccessControl/MutexSecurity/ResetAccessRule/Project.csproj Update TargetFramework to net10.0-windows.
snippets/csharp/System.Security.AccessControl/MutexSecurity/RemoveAccessRuleSpecific/Project.csproj Update TargetFramework to net10.0-windows.
snippets/csharp/System.Security.AccessControl/MutexSecurity/RemoveAccessRuleAll/Project.csproj Update TargetFramework to net10.0-windows.
snippets/csharp/System.Security.AccessControl/MutexSecurity/RemoveAccessRule/Project.csproj Update TargetFramework to net10.0-windows.
snippets/csharp/System.Security.AccessControl/MutexAccessRule/Overview/Project.csproj Update TargetFramework to net10.0-windows.
snippets/csharp/System.Security.AccessControl/FileSystemAuditRule/Overview/Project.csproj Update TargetFramework to net10.0-windows.
snippets/csharp/System.Security.AccessControl/EventWaitHandleSecurity/SetAccessRule/Project.csproj Update TargetFramework to net10.0-windows.
snippets/csharp/System.Security.AccessControl/EventWaitHandleSecurity/ResetAccessRule/Project.csproj Update TargetFramework to net10.0-windows.
snippets/csharp/System.Security.AccessControl/EventWaitHandleSecurity/RemoveAccessRuleSpecific/Project.csproj Update TargetFramework to net10.0-windows.
snippets/csharp/System.Security.AccessControl/EventWaitHandleSecurity/RemoveAccessRuleAll/Project.csproj Update TargetFramework to net10.0-windows.
snippets/csharp/System.Security.AccessControl/EventWaitHandleSecurity/RemoveAccessRule/Project.csproj Update TargetFramework to net10.0-windows.
snippets/csharp/System.Security.AccessControl/EventWaitHandleAccessRule/Overview/Project.csproj Update TargetFramework to net10.0-windows.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants