diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index e998e960da1a..133b17bf3253 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -9,290 +9,290 @@ --> - + https://github.com/dotnet/efcore - 6e1ab0737681ec8dff3a6f63d255dbef0ca793cd + 596dcd6d7b7a67082fca25e6a832d252547ffa51 - + https://github.com/dotnet/efcore - 6e1ab0737681ec8dff3a6f63d255dbef0ca793cd + 596dcd6d7b7a67082fca25e6a832d252547ffa51 - + https://github.com/dotnet/efcore - 6e1ab0737681ec8dff3a6f63d255dbef0ca793cd + 596dcd6d7b7a67082fca25e6a832d252547ffa51 - + https://github.com/dotnet/efcore - 6e1ab0737681ec8dff3a6f63d255dbef0ca793cd + 596dcd6d7b7a67082fca25e6a832d252547ffa51 - + https://github.com/dotnet/efcore - 6e1ab0737681ec8dff3a6f63d255dbef0ca793cd + 596dcd6d7b7a67082fca25e6a832d252547ffa51 - + https://github.com/dotnet/efcore - 6e1ab0737681ec8dff3a6f63d255dbef0ca793cd + 596dcd6d7b7a67082fca25e6a832d252547ffa51 - + https://github.com/dotnet/efcore - 6e1ab0737681ec8dff3a6f63d255dbef0ca793cd + 596dcd6d7b7a67082fca25e6a832d252547ffa51 - + https://github.com/dotnet/efcore - 6e1ab0737681ec8dff3a6f63d255dbef0ca793cd + 596dcd6d7b7a67082fca25e6a832d252547ffa51 - + https://github.com/dotnet/runtime - 00dbf84e3df92c050cf256ef93dff09ff5aa2934 + 5117e1f78d2f4924181a9ed6d1fd525f27a9fc91 - + https://github.com/dotnet/runtime - 00dbf84e3df92c050cf256ef93dff09ff5aa2934 + 5117e1f78d2f4924181a9ed6d1fd525f27a9fc91 - + https://github.com/dotnet/runtime - 00dbf84e3df92c050cf256ef93dff09ff5aa2934 + 5117e1f78d2f4924181a9ed6d1fd525f27a9fc91 - + https://github.com/dotnet/runtime - 00dbf84e3df92c050cf256ef93dff09ff5aa2934 + 5117e1f78d2f4924181a9ed6d1fd525f27a9fc91 - + https://github.com/dotnet/runtime - 00dbf84e3df92c050cf256ef93dff09ff5aa2934 + 5117e1f78d2f4924181a9ed6d1fd525f27a9fc91 - + https://github.com/dotnet/runtime - 00dbf84e3df92c050cf256ef93dff09ff5aa2934 + 5117e1f78d2f4924181a9ed6d1fd525f27a9fc91 - + https://github.com/dotnet/runtime - 00dbf84e3df92c050cf256ef93dff09ff5aa2934 + 5117e1f78d2f4924181a9ed6d1fd525f27a9fc91 - + https://github.com/dotnet/runtime - 00dbf84e3df92c050cf256ef93dff09ff5aa2934 + 5117e1f78d2f4924181a9ed6d1fd525f27a9fc91 - + https://github.com/dotnet/runtime - 00dbf84e3df92c050cf256ef93dff09ff5aa2934 + 5117e1f78d2f4924181a9ed6d1fd525f27a9fc91 - + https://github.com/dotnet/runtime - 00dbf84e3df92c050cf256ef93dff09ff5aa2934 + 5117e1f78d2f4924181a9ed6d1fd525f27a9fc91 - + https://github.com/dotnet/runtime - 00dbf84e3df92c050cf256ef93dff09ff5aa2934 + 5117e1f78d2f4924181a9ed6d1fd525f27a9fc91 - + https://github.com/dotnet/runtime - 00dbf84e3df92c050cf256ef93dff09ff5aa2934 + 5117e1f78d2f4924181a9ed6d1fd525f27a9fc91 - + https://github.com/dotnet/runtime - 00dbf84e3df92c050cf256ef93dff09ff5aa2934 + 5117e1f78d2f4924181a9ed6d1fd525f27a9fc91 - + https://github.com/dotnet/runtime - 00dbf84e3df92c050cf256ef93dff09ff5aa2934 + 5117e1f78d2f4924181a9ed6d1fd525f27a9fc91 - + https://github.com/dotnet/runtime - 00dbf84e3df92c050cf256ef93dff09ff5aa2934 + 5117e1f78d2f4924181a9ed6d1fd525f27a9fc91 - + https://github.com/dotnet/runtime - 00dbf84e3df92c050cf256ef93dff09ff5aa2934 + 5117e1f78d2f4924181a9ed6d1fd525f27a9fc91 - + https://github.com/dotnet/runtime - 00dbf84e3df92c050cf256ef93dff09ff5aa2934 + 5117e1f78d2f4924181a9ed6d1fd525f27a9fc91 - + https://github.com/dotnet/runtime - 00dbf84e3df92c050cf256ef93dff09ff5aa2934 + 5117e1f78d2f4924181a9ed6d1fd525f27a9fc91 - + https://github.com/dotnet/runtime - 00dbf84e3df92c050cf256ef93dff09ff5aa2934 + 5117e1f78d2f4924181a9ed6d1fd525f27a9fc91 - + https://github.com/dotnet/runtime - 00dbf84e3df92c050cf256ef93dff09ff5aa2934 + 5117e1f78d2f4924181a9ed6d1fd525f27a9fc91 - + https://github.com/dotnet/runtime - 00dbf84e3df92c050cf256ef93dff09ff5aa2934 + 5117e1f78d2f4924181a9ed6d1fd525f27a9fc91 - + https://github.com/dotnet/runtime - 00dbf84e3df92c050cf256ef93dff09ff5aa2934 + 5117e1f78d2f4924181a9ed6d1fd525f27a9fc91 - + https://github.com/dotnet/runtime - 00dbf84e3df92c050cf256ef93dff09ff5aa2934 + 5117e1f78d2f4924181a9ed6d1fd525f27a9fc91 - + https://github.com/dotnet/runtime - 00dbf84e3df92c050cf256ef93dff09ff5aa2934 + 5117e1f78d2f4924181a9ed6d1fd525f27a9fc91 - + https://github.com/dotnet/runtime - 00dbf84e3df92c050cf256ef93dff09ff5aa2934 + 5117e1f78d2f4924181a9ed6d1fd525f27a9fc91 - + https://github.com/dotnet/runtime - 00dbf84e3df92c050cf256ef93dff09ff5aa2934 + 5117e1f78d2f4924181a9ed6d1fd525f27a9fc91 - + https://github.com/dotnet/runtime - 00dbf84e3df92c050cf256ef93dff09ff5aa2934 + 5117e1f78d2f4924181a9ed6d1fd525f27a9fc91 - + https://github.com/dotnet/runtime - 00dbf84e3df92c050cf256ef93dff09ff5aa2934 + 5117e1f78d2f4924181a9ed6d1fd525f27a9fc91 - + https://github.com/dotnet/runtime - 00dbf84e3df92c050cf256ef93dff09ff5aa2934 + 5117e1f78d2f4924181a9ed6d1fd525f27a9fc91 - + https://github.com/dotnet/runtime - 00dbf84e3df92c050cf256ef93dff09ff5aa2934 + 5117e1f78d2f4924181a9ed6d1fd525f27a9fc91 - + https://github.com/dotnet/runtime - 00dbf84e3df92c050cf256ef93dff09ff5aa2934 + 5117e1f78d2f4924181a9ed6d1fd525f27a9fc91 - + https://github.com/dotnet/runtime - 00dbf84e3df92c050cf256ef93dff09ff5aa2934 + 5117e1f78d2f4924181a9ed6d1fd525f27a9fc91 - + https://github.com/dotnet/runtime - 00dbf84e3df92c050cf256ef93dff09ff5aa2934 + 5117e1f78d2f4924181a9ed6d1fd525f27a9fc91 - + https://github.com/dotnet/runtime - 00dbf84e3df92c050cf256ef93dff09ff5aa2934 + 5117e1f78d2f4924181a9ed6d1fd525f27a9fc91 - + https://github.com/dotnet/runtime - 00dbf84e3df92c050cf256ef93dff09ff5aa2934 + 5117e1f78d2f4924181a9ed6d1fd525f27a9fc91 https://github.com/dotnet/source-build-externals 33edde07d61cf7606d76ada765335fb81f1cbb71 - + https://github.com/dotnet/runtime - 00dbf84e3df92c050cf256ef93dff09ff5aa2934 + 5117e1f78d2f4924181a9ed6d1fd525f27a9fc91 - + https://github.com/dotnet/runtime - 00dbf84e3df92c050cf256ef93dff09ff5aa2934 + 5117e1f78d2f4924181a9ed6d1fd525f27a9fc91 - + https://github.com/dotnet/runtime - 00dbf84e3df92c050cf256ef93dff09ff5aa2934 + 5117e1f78d2f4924181a9ed6d1fd525f27a9fc91 - + https://github.com/dotnet/runtime - 00dbf84e3df92c050cf256ef93dff09ff5aa2934 + 5117e1f78d2f4924181a9ed6d1fd525f27a9fc91 - + https://github.com/dotnet/runtime - 00dbf84e3df92c050cf256ef93dff09ff5aa2934 + 5117e1f78d2f4924181a9ed6d1fd525f27a9fc91 - + https://github.com/dotnet/runtime - 00dbf84e3df92c050cf256ef93dff09ff5aa2934 + 5117e1f78d2f4924181a9ed6d1fd525f27a9fc91 - + https://github.com/dotnet/runtime - 00dbf84e3df92c050cf256ef93dff09ff5aa2934 + 5117e1f78d2f4924181a9ed6d1fd525f27a9fc91 - + https://github.com/dotnet/runtime - 00dbf84e3df92c050cf256ef93dff09ff5aa2934 + 5117e1f78d2f4924181a9ed6d1fd525f27a9fc91 - + https://github.com/dotnet/runtime - 00dbf84e3df92c050cf256ef93dff09ff5aa2934 + 5117e1f78d2f4924181a9ed6d1fd525f27a9fc91 - + https://github.com/dotnet/runtime - 00dbf84e3df92c050cf256ef93dff09ff5aa2934 + 5117e1f78d2f4924181a9ed6d1fd525f27a9fc91 - + https://github.com/dotnet/runtime - 00dbf84e3df92c050cf256ef93dff09ff5aa2934 + 5117e1f78d2f4924181a9ed6d1fd525f27a9fc91 - + https://github.com/dotnet/runtime - 00dbf84e3df92c050cf256ef93dff09ff5aa2934 + 5117e1f78d2f4924181a9ed6d1fd525f27a9fc91 - + https://github.com/dotnet/runtime - 00dbf84e3df92c050cf256ef93dff09ff5aa2934 + 5117e1f78d2f4924181a9ed6d1fd525f27a9fc91 - + https://github.com/dotnet/runtime - 00dbf84e3df92c050cf256ef93dff09ff5aa2934 + 5117e1f78d2f4924181a9ed6d1fd525f27a9fc91 - + https://github.com/dotnet/runtime - 00dbf84e3df92c050cf256ef93dff09ff5aa2934 + 5117e1f78d2f4924181a9ed6d1fd525f27a9fc91 - + https://github.com/dotnet/runtime - 00dbf84e3df92c050cf256ef93dff09ff5aa2934 + 5117e1f78d2f4924181a9ed6d1fd525f27a9fc91 - + https://github.com/dotnet/runtime - 00dbf84e3df92c050cf256ef93dff09ff5aa2934 + 5117e1f78d2f4924181a9ed6d1fd525f27a9fc91 - + https://github.com/dotnet/runtime - 00dbf84e3df92c050cf256ef93dff09ff5aa2934 + 5117e1f78d2f4924181a9ed6d1fd525f27a9fc91 - + https://github.com/dotnet/runtime - 00dbf84e3df92c050cf256ef93dff09ff5aa2934 + 5117e1f78d2f4924181a9ed6d1fd525f27a9fc91 - + https://github.com/dotnet/runtime - 00dbf84e3df92c050cf256ef93dff09ff5aa2934 + 5117e1f78d2f4924181a9ed6d1fd525f27a9fc91 - + https://github.com/dotnet/runtime - 00dbf84e3df92c050cf256ef93dff09ff5aa2934 + 5117e1f78d2f4924181a9ed6d1fd525f27a9fc91 - + https://github.com/dotnet/runtime - 00dbf84e3df92c050cf256ef93dff09ff5aa2934 + 5117e1f78d2f4924181a9ed6d1fd525f27a9fc91 - + https://github.com/dotnet/runtime - 00dbf84e3df92c050cf256ef93dff09ff5aa2934 + 5117e1f78d2f4924181a9ed6d1fd525f27a9fc91 - + https://github.com/dotnet/runtime - 00dbf84e3df92c050cf256ef93dff09ff5aa2934 + 5117e1f78d2f4924181a9ed6d1fd525f27a9fc91 - + https://github.com/dotnet/runtime - 00dbf84e3df92c050cf256ef93dff09ff5aa2934 + 5117e1f78d2f4924181a9ed6d1fd525f27a9fc91 - + https://github.com/dotnet/runtime - 00dbf84e3df92c050cf256ef93dff09ff5aa2934 + 5117e1f78d2f4924181a9ed6d1fd525f27a9fc91 https://github.com/dotnet/xdt @@ -302,9 +302,9 @@ - + https://github.com/dotnet/runtime - 00dbf84e3df92c050cf256ef93dff09ff5aa2934 + 5117e1f78d2f4924181a9ed6d1fd525f27a9fc91 https://github.com/dotnet/arcade diff --git a/eng/Versions.props b/eng/Versions.props index 48bb2be27c4b..4b9ca00e4c06 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -63,78 +63,78 @@ --> - 8.0.0-preview.4.23210.3 - 8.0.0-preview.4.23210.3 - 8.0.0-preview.4.23210.3 - 8.0.0-preview.4.23210.3 - 8.0.0-preview.4.23210.3 - 8.0.0-preview.4.23210.3 - 8.0.0-preview.4.23210.3 - 8.0.0-preview.4.23210.3 - 8.0.0-preview.4.23210.3 - 8.0.0-preview.4.23210.3 - 8.0.0-preview.4.23210.3 - 8.0.0-preview.4.23210.3 - 8.0.0-preview.4.23210.3 - 8.0.0-preview.4.23210.3 - 8.0.0-preview.4.23210.3 - 8.0.0-preview.4.23210.3 - 8.0.0-preview.4.23210.3 - 8.0.0-preview.4.23210.3 - 8.0.0-preview.4.23210.3 - 8.0.0-preview.4.23210.3 - 8.0.0-preview.4.23210.3 - 8.0.0-preview.4.23210.3 - 8.0.0-preview.4.23210.3 - 8.0.0-preview.4.23210.3 - 8.0.0-preview.4.23210.3 - 8.0.0-preview.4.23210.3 - 8.0.0-preview.4.23210.3 - 8.0.0-preview.4.23210.3 - 8.0.0-preview.4.23210.3 - 8.0.0-preview.4.23210.3 - 8.0.0-preview.4.23210.3 - 8.0.0-preview.4.23210.3 - 8.0.0-preview.4.23210.3 - 8.0.0-preview.4.23210.3 - 8.0.0-preview.4.23210.3 - 8.0.0-preview.4.23210.3 - 8.0.0-preview.4.23210.3 - 8.0.0-preview.4.23210.3 - 8.0.0-preview.4.23210.3 - 8.0.0-preview.4.23210.3 - 8.0.0-preview.4.23210.3 - 8.0.0-preview.4.23210.3 - 8.0.0-preview.4.23210.3 - 8.0.0-preview.4.23210.3 - 8.0.0-preview.4.23210.3 - 8.0.0-preview.4.23210.3 - 8.0.0-preview.4.23210.3 - 8.0.0-preview.4.23210.3 - 8.0.0-preview.4.23210.3 - 8.0.0-preview.4.23210.3 - 8.0.0-preview.4.23210.3 - 8.0.0-preview.4.23210.3 - 8.0.0-preview.4.23210.3 - 8.0.0-preview.4.23210.3 - 8.0.0-preview.4.23210.3 - 8.0.0-preview.4.23210.3 - 8.0.0-preview.4.23210.3 - 8.0.0-preview.4.23210.3 - 8.0.0-preview.4.23210.3 - 8.0.0-preview.4.23210.3 + 8.0.0-preview.4.23212.4 + 8.0.0-preview.4.23212.4 + 8.0.0-preview.4.23212.4 + 8.0.0-preview.4.23212.4 + 8.0.0-preview.4.23212.4 + 8.0.0-preview.4.23212.4 + 8.0.0-preview.4.23212.4 + 8.0.0-preview.4.23212.4 + 8.0.0-preview.4.23212.4 + 8.0.0-preview.4.23212.4 + 8.0.0-preview.4.23212.4 + 8.0.0-preview.4.23212.4 + 8.0.0-preview.4.23212.4 + 8.0.0-preview.4.23212.4 + 8.0.0-preview.4.23212.4 + 8.0.0-preview.4.23212.4 + 8.0.0-preview.4.23212.4 + 8.0.0-preview.4.23212.4 + 8.0.0-preview.4.23212.4 + 8.0.0-preview.4.23212.4 + 8.0.0-preview.4.23212.4 + 8.0.0-preview.4.23212.4 + 8.0.0-preview.4.23212.4 + 8.0.0-preview.4.23212.4 + 8.0.0-preview.4.23212.4 + 8.0.0-preview.4.23212.4 + 8.0.0-preview.4.23212.4 + 8.0.0-preview.4.23212.4 + 8.0.0-preview.4.23212.4 + 8.0.0-preview.4.23212.4 + 8.0.0-preview.4.23212.4 + 8.0.0-preview.4.23212.4 + 8.0.0-preview.4.23212.4 + 8.0.0-preview.4.23212.4 + 8.0.0-preview.4.23212.4 + 8.0.0-preview.4.23212.4 + 8.0.0-preview.4.23212.4 + 8.0.0-preview.4.23212.4 + 8.0.0-preview.4.23212.4 + 8.0.0-preview.4.23212.4 + 8.0.0-preview.4.23212.4 + 8.0.0-preview.4.23212.4 + 8.0.0-preview.4.23212.4 + 8.0.0-preview.4.23212.4 + 8.0.0-preview.4.23212.4 + 8.0.0-preview.4.23212.4 + 8.0.0-preview.4.23212.4 + 8.0.0-preview.4.23212.4 + 8.0.0-preview.4.23212.4 + 8.0.0-preview.4.23212.4 + 8.0.0-preview.4.23212.4 + 8.0.0-preview.4.23212.4 + 8.0.0-preview.4.23212.4 + 8.0.0-preview.4.23212.4 + 8.0.0-preview.4.23212.4 + 8.0.0-preview.4.23212.4 + 8.0.0-preview.4.23212.4 + 8.0.0-preview.4.23212.4 + 8.0.0-preview.4.23212.4 + 8.0.0-preview.4.23212.4 - 8.0.0-preview.4.23210.3 - 8.0.0-preview.4.23210.3 + 8.0.0-preview.4.23212.4 + 8.0.0-preview.4.23212.4 - 8.0.0-preview.4.23210.7 - 8.0.0-preview.4.23210.7 - 8.0.0-preview.4.23210.7 - 8.0.0-preview.4.23210.7 - 8.0.0-preview.4.23210.7 - 8.0.0-preview.4.23210.7 - 8.0.0-preview.4.23210.7 - 8.0.0-preview.4.23210.7 + 8.0.0-preview.4.23212.3 + 8.0.0-preview.4.23212.3 + 8.0.0-preview.4.23212.3 + 8.0.0-preview.4.23212.3 + 8.0.0-preview.4.23212.3 + 8.0.0-preview.4.23212.3 + 8.0.0-preview.4.23212.3 + 8.0.0-preview.4.23212.3 8.0.0-beta.23207.2 8.0.0-beta.23207.2 diff --git a/src/DataProtection/DataProtection/src/XmlEncryption/CertificateXmlEncryptor.cs b/src/DataProtection/DataProtection/src/XmlEncryption/CertificateXmlEncryptor.cs index 91f72d35306d..5f6e9f7ce550 100644 --- a/src/DataProtection/DataProtection/src/XmlEncryption/CertificateXmlEncryptor.cs +++ b/src/DataProtection/DataProtection/src/XmlEncryption/CertificateXmlEncryptor.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; +using System.Diagnostics.CodeAnalysis; using System.Security.Cryptography.X509Certificates; using System.Security.Cryptography.Xml; using System.Xml; @@ -75,6 +76,8 @@ public EncryptedXmlInfo Encrypt(XElement plaintextElement) return new EncryptedXmlInfo(encryptedElement, typeof(EncryptedXmlDecryptor)); } + [UnconditionalSuppressMessage("AOT", "IL3050:RequiresDynamicCode", + Justification = "Only XSLTs require dynamic code. The usage of EncryptedXml doesn't use XSLTs.")] private XElement EncryptElement(XElement plaintextElement) { // EncryptedXml works with XmlDocument, not XLinq. When we perform the conversion diff --git a/src/DataProtection/DataProtection/src/XmlEncryption/EncryptedXmlDecryptor.cs b/src/DataProtection/DataProtection/src/XmlEncryption/EncryptedXmlDecryptor.cs index 1598241cac3e..f6d1c8b65e54 100644 --- a/src/DataProtection/DataProtection/src/XmlEncryption/EncryptedXmlDecryptor.cs +++ b/src/DataProtection/DataProtection/src/XmlEncryption/EncryptedXmlDecryptor.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; +using System.Diagnostics.CodeAnalysis; using System.Security.Cryptography.X509Certificates; using System.Security.Cryptography.Xml; using System.Xml; @@ -43,6 +44,8 @@ public EncryptedXmlDecryptor(IServiceProvider? services) /// /// An encrypted XML element. /// The decrypted form of . + [UnconditionalSuppressMessage("AOT", "IL3050:RequiresDynamicCode", + Justification = "Only XSLTs require dynamic code. The usage of EncryptedXml doesn't use XSLTs.")] public XElement Decrypt(XElement encryptedElement) { ArgumentNullThrowHelper.ThrowIfNull(encryptedElement); @@ -79,6 +82,7 @@ private sealed class EncryptedXmlWithCertificateKeys : EncryptedXml { private readonly XmlKeyDecryptionOptions? _options; + [RequiresDynamicCode("XmlDsigXsltTransform uses XslCompiledTransform which requires dynamic code.")] public EncryptedXmlWithCertificateKeys(XmlKeyDecryptionOptions? options, XmlDocument document) : base(document) { diff --git a/src/Hosting/Hosting/test/WebHostBuilderTests.cs b/src/Hosting/Hosting/test/WebHostBuilderTests.cs index 0d39d77b70a2..0bd72551ec1e 100644 --- a/src/Hosting/Hosting/test/WebHostBuilderTests.cs +++ b/src/Hosting/Hosting/test/WebHostBuilderTests.cs @@ -1353,9 +1353,12 @@ public async Task ThrowingFromHostedServiceFailsStartAsync(IWebHostBuilder build { var startEx = await Assert.ThrowsAsync(() => host.StartAsync()); Assert.Equal("Hosted Service throws in StartAsync", startEx.Message); - var stopEx = await Assert.ThrowsAsync(() => host.StopAsync()); - Assert.Single(stopEx.InnerExceptions); - Assert.Equal("Hosted Service throws in StopAsync", stopEx.InnerExceptions[0].Message); + var stopEx = await Assert.ThrowsAnyAsync(() => host.StopAsync()); + if (stopEx is AggregateException aggregateException) + { + stopEx = Assert.Single(aggregateException.InnerExceptions); + } + Assert.Equal("Hosted Service throws in StopAsync", stopEx.Message); } } @@ -1376,9 +1379,12 @@ public async Task ThrowingFromHostedServiceStopsOtherHostedServicesFromRunningSt var startEx = await Assert.ThrowsAsync(() => host.StartAsync()); Assert.Equal("Hosted Service throws in StartAsync", startEx.Message); - var stopEx = await Assert.ThrowsAsync(() => host.StopAsync()); - Assert.Single(stopEx.InnerExceptions); - Assert.Equal("Hosted Service throws in StopAsync", stopEx.InnerExceptions[0].Message); + var stopEx = await Assert.ThrowsAnyAsync(() => host.StopAsync()); + if (stopEx is AggregateException aggregateException) + { + stopEx = Assert.Single(aggregateException.InnerExceptions); + } + Assert.Equal("Hosted Service throws in StopAsync", stopEx.Message); // This service is never constructed Assert.False(service.StartCalled); diff --git a/src/Http/Routing/src/Matching/AmbiguousMatchException.cs b/src/Http/Routing/src/Matching/AmbiguousMatchException.cs index 17031455a0ad..37df8ef49ef4 100644 --- a/src/Http/Routing/src/Matching/AmbiguousMatchException.cs +++ b/src/Http/Routing/src/Matching/AmbiguousMatchException.cs @@ -16,6 +16,7 @@ public AmbiguousMatchException(string message) { } + [Obsolete] internal AmbiguousMatchException(SerializationInfo info, StreamingContext context) : base(info, context) { diff --git a/src/Http/Routing/src/Patterns/RoutePatternException.cs b/src/Http/Routing/src/Patterns/RoutePatternException.cs index 59db1d2710c6..444b5f31366e 100644 --- a/src/Http/Routing/src/Patterns/RoutePatternException.cs +++ b/src/Http/Routing/src/Patterns/RoutePatternException.cs @@ -12,6 +12,7 @@ namespace Microsoft.AspNetCore.Routing.Patterns; [Serializable] public sealed class RoutePatternException : Exception { + [Obsolete] private RoutePatternException(SerializationInfo info, StreamingContext context) : base(info, context) { @@ -42,6 +43,7 @@ public RoutePatternException([StringSyntax("Route")] string pattern, string mess /// /// The to populate with data. /// The destination () for this serialization. + [Obsolete("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] public override void GetObjectData(SerializationInfo info, StreamingContext context) { info.AddValue(nameof(Pattern), Pattern); diff --git a/src/Mvc/Mvc.Core/src/Infrastructure/AmbiguousActionException.cs b/src/Mvc/Mvc.Core/src/Infrastructure/AmbiguousActionException.cs index ecfb2769b6ee..793013063b9c 100644 --- a/src/Mvc/Mvc.Core/src/Infrastructure/AmbiguousActionException.cs +++ b/src/Mvc/Mvc.Core/src/Infrastructure/AmbiguousActionException.cs @@ -27,6 +27,7 @@ public AmbiguousActionException(string? message) /// /// /// + [Obsolete("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] protected AmbiguousActionException(SerializationInfo info, StreamingContext context) : base(info, context) { diff --git a/src/Servers/HttpSys/test/FunctionalTests/Microsoft.AspNetCore.Server.HttpSys.FunctionalTests.csproj b/src/Servers/HttpSys/test/FunctionalTests/Microsoft.AspNetCore.Server.HttpSys.FunctionalTests.csproj index e7e3e2f81563..27d3add58dd3 100644 --- a/src/Servers/HttpSys/test/FunctionalTests/Microsoft.AspNetCore.Server.HttpSys.FunctionalTests.csproj +++ b/src/Servers/HttpSys/test/FunctionalTests/Microsoft.AspNetCore.Server.HttpSys.FunctionalTests.csproj @@ -13,6 +13,7 @@ + diff --git a/src/Servers/IIS/IIS/test/IIS.FunctionalTests/IIS.FunctionalTests.csproj b/src/Servers/IIS/IIS/test/IIS.FunctionalTests/IIS.FunctionalTests.csproj index fe4ad4ddcc9b..159eb0359e21 100644 --- a/src/Servers/IIS/IIS/test/IIS.FunctionalTests/IIS.FunctionalTests.csproj +++ b/src/Servers/IIS/IIS/test/IIS.FunctionalTests/IIS.FunctionalTests.csproj @@ -29,6 +29,7 @@ + diff --git a/src/Servers/IIS/IIS/test/IIS.LongTests/IIS.LongTests.csproj b/src/Servers/IIS/IIS/test/IIS.LongTests/IIS.LongTests.csproj index 5f6ccde7ed1b..5ab3cdd0b60b 100644 --- a/src/Servers/IIS/IIS/test/IIS.LongTests/IIS.LongTests.csproj +++ b/src/Servers/IIS/IIS/test/IIS.LongTests/IIS.LongTests.csproj @@ -25,6 +25,7 @@ + diff --git a/src/Servers/IIS/IIS/test/IIS.NewHandler.FunctionalTests/IIS.NewHandler.FunctionalTests.csproj b/src/Servers/IIS/IIS/test/IIS.NewHandler.FunctionalTests/IIS.NewHandler.FunctionalTests.csproj index acf593717ff9..ecca2b77471c 100644 --- a/src/Servers/IIS/IIS/test/IIS.NewHandler.FunctionalTests/IIS.NewHandler.FunctionalTests.csproj +++ b/src/Servers/IIS/IIS/test/IIS.NewHandler.FunctionalTests/IIS.NewHandler.FunctionalTests.csproj @@ -18,6 +18,7 @@ + diff --git a/src/Servers/IIS/IIS/test/IIS.NewShim.FunctionalTests/IIS.NewShim.FunctionalTests.csproj b/src/Servers/IIS/IIS/test/IIS.NewShim.FunctionalTests/IIS.NewShim.FunctionalTests.csproj index d9faa225cb92..cf87933172da 100644 --- a/src/Servers/IIS/IIS/test/IIS.NewShim.FunctionalTests/IIS.NewShim.FunctionalTests.csproj +++ b/src/Servers/IIS/IIS/test/IIS.NewShim.FunctionalTests/IIS.NewShim.FunctionalTests.csproj @@ -28,6 +28,7 @@ + diff --git a/src/Servers/IIS/IIS/test/IISExpress.FunctionalTests/IISExpress.FunctionalTests.csproj b/src/Servers/IIS/IIS/test/IISExpress.FunctionalTests/IISExpress.FunctionalTests.csproj index ff8b63d4fd16..91a683979153 100644 --- a/src/Servers/IIS/IIS/test/IISExpress.FunctionalTests/IISExpress.FunctionalTests.csproj +++ b/src/Servers/IIS/IIS/test/IISExpress.FunctionalTests/IISExpress.FunctionalTests.csproj @@ -30,6 +30,7 @@ + diff --git a/src/Servers/Kestrel/samples/http2cat/http2cat.csproj b/src/Servers/Kestrel/samples/http2cat/http2cat.csproj index 6947c48b1a2f..2b7b045beebd 100644 --- a/src/Servers/Kestrel/samples/http2cat/http2cat.csproj +++ b/src/Servers/Kestrel/samples/http2cat/http2cat.csproj @@ -1,4 +1,4 @@ - + Exe @@ -9,6 +9,7 @@ + diff --git a/src/Shared/TrimmingAttributes.cs b/src/Shared/TrimmingAttributes.cs index 30b6805a9f54..508d39dae9a7 100644 --- a/src/Shared/TrimmingAttributes.cs +++ b/src/Shared/TrimmingAttributes.cs @@ -40,6 +40,40 @@ public RequiresUnreferencedCodeAttribute(string message) public string? Url { get; set; } } +/// +/// Indicates that the specified method requires the ability to generate new code at runtime, +/// for example through . +/// +/// +/// This allows tools to understand which methods are unsafe to call when compiling ahead of time. +/// +[AttributeUsage(AttributeTargets.Method | AttributeTargets.Constructor | AttributeTargets.Class, Inherited = false)] +internal sealed class RequiresDynamicCodeAttribute : Attribute +{ + /// + /// Initializes a new instance of the class + /// with the specified message. + /// + /// + /// A message that contains information about the usage of dynamic code. + /// + public RequiresDynamicCodeAttribute(string message) + { + Message = message; + } + + /// + /// Gets a message that contains information about the usage of dynamic code. + /// + public string Message { get; } + + /// + /// Gets or sets an optional URL that contains more information about the method, + /// why it requires dynamic code, and what options a consumer has to deal with it. + /// + public string? Url { get; set; } +} + /// /// Suppresses reporting of a specific rule violation, allowing multiple suppressions on a /// single code artifact. diff --git a/src/Shared/runtime/Http2/Hpack/HPackDecodingException.cs b/src/Shared/runtime/Http2/Hpack/HPackDecodingException.cs index b0225bb6f9a1..ed2859df5744 100644 --- a/src/Shared/runtime/Http2/Hpack/HPackDecodingException.cs +++ b/src/Shared/runtime/Http2/Hpack/HPackDecodingException.cs @@ -1,6 +1,7 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.ComponentModel; using System.Runtime.Serialization; namespace System.Net.Http.HPack @@ -21,6 +22,8 @@ public HPackDecodingException(string message, Exception innerException) : base(m { } + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] public HPackDecodingException(SerializationInfo info, StreamingContext context) : base(info, context) { } diff --git a/src/Shared/runtime/Http2/Hpack/HuffmanDecodingException.cs b/src/Shared/runtime/Http2/Hpack/HuffmanDecodingException.cs index 287497b7ee11..b83ca6502e8c 100644 --- a/src/Shared/runtime/Http2/Hpack/HuffmanDecodingException.cs +++ b/src/Shared/runtime/Http2/Hpack/HuffmanDecodingException.cs @@ -1,6 +1,7 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.ComponentModel; using System.Runtime.Serialization; namespace System.Net.Http.HPack @@ -18,16 +19,26 @@ public HuffmanDecodingException(string message) { } +#if NET8_0_OR_GREATER + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] +#endif private HuffmanDecodingException(SerializationInfo info, StreamingContext context) : base(info, context) { } +#if NET8_0_OR_GREATER + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] +#endif void ISerializable.GetObjectData(SerializationInfo serializationInfo, StreamingContext streamingContext) { base.GetObjectData(serializationInfo, streamingContext); } +#if NET8_0_OR_GREATER + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] + [EditorBrowsable(EditorBrowsableState.Never)] +#endif public override void GetObjectData(SerializationInfo serializationInfo, StreamingContext streamingContext) { base.GetObjectData(serializationInfo, streamingContext); diff --git a/src/Shared/runtime/Http3/QPack/QPackDecodingException.cs b/src/Shared/runtime/Http3/QPack/QPackDecodingException.cs index 760403267f45..5de0efff935d 100644 --- a/src/Shared/runtime/Http3/QPack/QPackDecodingException.cs +++ b/src/Shared/runtime/Http3/QPack/QPackDecodingException.cs @@ -1,6 +1,7 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.ComponentModel; using System.Runtime.Serialization; namespace System.Net.Http.QPack @@ -20,6 +21,9 @@ public QPackDecodingException(string message, Exception innerException) : base(m { } +#if NET8_0_OR_GREATER + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] +#endif private QPackDecodingException(SerializationInfo info, StreamingContext context) : base(info, context) { } diff --git a/src/Shared/runtime/Http3/QPack/QPackEncodingException.cs b/src/Shared/runtime/Http3/QPack/QPackEncodingException.cs index 6b5647e18e2e..7e6eb6f1b792 100644 --- a/src/Shared/runtime/Http3/QPack/QPackEncodingException.cs +++ b/src/Shared/runtime/Http3/QPack/QPackEncodingException.cs @@ -1,6 +1,7 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.ComponentModel; using System.Runtime.Serialization; namespace System.Net.Http.QPack @@ -17,6 +18,9 @@ public QPackEncodingException(string message, Exception innerException) { } +#if NET8_0_OR_GREATER + [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] +#endif private QPackEncodingException(SerializationInfo info, StreamingContext context) : base(info, context) { } diff --git a/src/Shared/runtime/Obsoletions.cs b/src/Shared/runtime/Obsoletions.cs new file mode 100644 index 000000000000..d51213ccd6e3 --- /dev/null +++ b/src/Shared/runtime/Obsoletions.cs @@ -0,0 +1,13 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +namespace System +{ + internal static class Obsoletions + { + internal const string SharedUrlFormat = "https://aka.ms/dotnet-warnings/{0}"; + + internal const string LegacyFormatterImplMessage = "This API supports obsolete formatter-based serialization. It should not be called or extended by application code."; + internal const string LegacyFormatterImplDiagId = "SYSLIB0051"; + } +} diff --git a/src/SignalR/common/SignalR.Common/src/HubException.cs b/src/SignalR/common/SignalR.Common/src/HubException.cs index 184adb1dfd8b..0ac6ffa395ff 100644 --- a/src/SignalR/common/SignalR.Common/src/HubException.cs +++ b/src/SignalR/common/SignalR.Common/src/HubException.cs @@ -49,6 +49,11 @@ public HubException(string? message, Exception? innerException) : base(message, /// The that contains contextual information about the source or destination. /// The parameter is null. /// The class name is null or is zero (0). +#if NET8_0_OR_GREATER + [Obsolete("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")] +#else + [Obsolete("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.")] +#endif public HubException(SerializationInfo info, StreamingContext context) : base(info, context) { } diff --git a/src/submodules/MessagePack-CSharp b/src/submodules/MessagePack-CSharp index fe9fa0834d18..ecc4e18ad7a0 160000 --- a/src/submodules/MessagePack-CSharp +++ b/src/submodules/MessagePack-CSharp @@ -1 +1 @@ -Subproject commit fe9fa0834d18492eb229ff2923024af2c87553f8 +Subproject commit ecc4e18ad7a0c7db51cd7e3d2997a291ed01444d