{"id":112,"date":"2022-10-14T18:27:03","date_gmt":"2022-10-15T01:27:03","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/dotnet-ch\/?p=112"},"modified":"2022-10-17T02:08:22","modified_gmt":"2022-10-17T09:08:22","slug":"%e5%ae%98%e5%ae%a3-net-7-release-candidate-2","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/dotnet-ch\/%e5%ae%98%e5%ae%a3-net-7-release-candidate-2\/","title":{"rendered":"\u5b98\u5ba3 .NET 7 Release Candidate 2"},"content":{"rendered":"<p><span style=\"font-size: 10pt;\"><strong><em>\u672c\u6587\u7ffb\u8bd1\u4e8eJon Douglas\uff0cJeremy Likness \u548c Angelos Petropoulos\u7684\u8fd9\u7bc7\u82f1\u6587\u6587\u7ae0\uff1a<a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/announcing-dotnet-7-rc-2\/\">Announcing .NET 7 Release Candidate 2<\/a><\/em><\/strong><\/span><span style=\"font-size: 1rem;\">\u00a0\u3002<\/span><\/p>\n<p><span style=\"font-size: 1rem;\">\u4eca\u5929\uff0c\u6211\u4eec\u5ba3\u5e03\u63a8\u51fa .NET 7 Release Candidate 2\u3002\u8fd9\u662f .NET 7 \u7684\u6700\u7ec8\u5019\u9009\u7248\u672c \uff08RC\uff09\uff0c\u5e76\u5728\u751f\u4ea7\u73af\u5883\u4e2d\u5f97\u5230\u652f\u6301\u3002<\/span><\/p>\n<p>\u60a8\u53ef\u4ee5\u4e0b\u8f7d\u9002\u7528\u4e8e Windows\u3001macOS \u548c Linux \u7684 <a href=\"https:\/\/dotnet.microsoft.com\/en-us\/download\/dotnet\/7.0\">.NET 7 Release Candidate 2<\/a>\u3002<\/p>\n<ul>\n<li><a href=\"https:\/\/dotnet.microsoft.com\/download\/dotnet\/7.0\">\u5b89\u88c5\u7a0b\u5e8f\u548c\u4e8c\u8fdb\u5236\u6587\u4ef6<\/a><\/li>\n<li><a href=\"https:\/\/mcr.microsoft.com\/catalog?search=dotnet\/\">\u5bb9\u5668\u56fe\u50cf<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/dotnet\/core\/blob\/master\/release-notes\/7.0\/\">Linux \u8f6f\u4ef6\u5305<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/dotnet\/core\/tree\/master\/release-notes\/7.0\">\u53d1\u884c\u8bf4\u660e<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/dotnet\/core\/blob\/main\/release-notes\/7.0\/known-issues.md\">\u5df2\u77e5\u7684\u95ee\u9898<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/dotnet\/core\/issues\">GitHub \u95ee\u9898\u8ddf\u8e2a\u5668<\/a><\/li>\n<\/ul>\n<p>.NET 7 Release Candidate 2 \u5df2\u901a\u8fc7 Visual Studio 17.4 Preview 3\u6d4b\u8bd5\u3002\u5982\u679c\u60a8\u60f3\u5728 Visual Studio \u7cfb\u5217\u4ea7\u54c1\u4e2d\u8bd5\u7528 .NET 7\uff0c\u6211\u4eec\u5efa\u8bae\u60a8\u4f7f\u7528<a href=\"https:\/\/visualstudio.com\/preview\">\u9884\u89c8\u901a\u9053\u6784\u5efa<\/a>\u3002 \u5982\u679c\u60a8\u4f7f\u7528\u7684\u662f macOS\uff0c\u6211\u4eec\u5efa\u8bae\u4f7f\u7528\u6700\u65b0\u7684 <a href=\"https:\/\/visualstudio.microsoft.com\/vs\/mac\/preview\/\">Visual Studio 2022 for Mac \u9884\u89c8\u7248<\/a>\u3002<\/p>\n<p>\u4e0d\u8981\u5fd8\u8bb0\u00a0<a href=\"https:\/\/dotnetconf.net\/\">.NET Conf 2022<\/a>\u3002\u5728\u00a02022\u00a0\u5e74\u00a011\u00a0\u6708\u00a08\u00a0\u65e5\u81f3\u00a010\u00a0\u65e5\u4e0e\u6211\u4eec\u4e00\u8d77\u5e86\u795d\u00a0.NET 7\u00a0\u7684\u53d1\u5e03\uff01<\/p>\n<p>\u5728\u672c\u535a\u5ba2\u4e2d\uff0c\u6211\u4eec\u5c06\u91cd\u70b9\u4ecb\u7ecd\u00a0.NET 7\u00a0\u7684\u6838\u5fc3\u4e3b\u9898\uff0c\u5e76\u4e3a\u60a8\u63d0\u4f9b\u6df1\u5165\u4e86\u89e3\u7ec6\u8282\u7684\u8d44\u6e90\u3002<\/p>\n<p>\u6709\u5173.NET 7 Release Candidate 2\u00a0\u4e2d\u5305\u542b\u7684\u6240\u6709\u529f\u80fd\u548c\u6539\u8fdb\u7684\u8be6\u7ec6\u6982\u8ff0\uff0c\u8bf7\u67e5\u770b\u4e4b\u524d\u7684\u00a0.NET 7\u00a0\u9884\u89c8\u7248\u535a\u5ba2\u6587\u7ae0\uff1a<\/p>\n<ul>\n<li><a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/announcing-net-7-preview-1\/\">\u5ba3\u5e03\u53d1\u5e03.NET 7\u00a0\u9884\u89c8\u7248\u00a01<\/a><\/li>\n<li><a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/announcing-dotnet-7-preview-2\/\">\u5ba3\u5e03\u53d1\u5e03.NET 7\u00a0\u9884\u89c8\u7248\u00a02<\/a><\/li>\n<li><a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/announcing-dotnet-7-preview-3\/\">\u5ba3\u5e03\u53d1\u5e03.NET 7\u00a0\u9884\u89c8\u7248\u00a03<\/a><\/li>\n<li><a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/announcing-dotnet-7-preview-4\/\">\u5ba3\u5e03\u53d1\u5e03.NET 7\u00a0\u9884\u89c8\u7248\u00a04<\/a><\/li>\n<li><a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/announcing-dotnet-7-preview-5\/\">\u5ba3\u5e03\u53d1\u5e03.NET 7\u00a0\u9884\u89c8\u7248\u00a05<\/a><\/li>\n<li><a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/announcing-dotnet-7-preview-6\/\">\u5ba3\u5e03\u53d1\u5e03.NET 7\u00a0\u9884\u89c8\u7248\u00a06<\/a><\/li>\n<li><a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/announcing-dotnet-7-preview-7\/\">\u5ba3\u5e03\u53d1\u5e03.NET 7\u00a0\u9884\u89c8\u7248\u00a07<\/a><\/li>\n<li><a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/announcing-dotnet-7-rc-1\/\">\u5ba3\u5e03\u53d1\u5e03 .NET 7 \u5019\u9009\u7248\u672c 1<\/a><\/li>\n<\/ul>\n<p>\u6ce8\u610f\uff1a\u8bf7\u82b1\u4e00\u70b9\u65f6\u95f4\u91cd\u65b0\u8bbf\u95ee\u201c<a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/announcing-dotnet-7-rc-1\/\">\u5ba3\u5e03\u53d1\u5e03 .NET 7 Release Candidate 1<\/a>\u201d\u535a\u5ba2\uff0c\u56e0\u4e3a\u9057\u6f0f\u4e86\u4e00\u4e9b\u4ee4\u4eba\u5174\u594b\u7684\u529f\u80fd\u3002<\/p>\n<p><strong>C# 11<\/strong><\/p>\n<p>C# 11 \u662f C# \u7684\u6700\u65b0\u7248\u672c\uff0c\u73b0\u5728\u53ef\u5728 .NET 7 \u4e2d\u4f7f\u7528\u3002<\/p>\n<p>\u6211\u4eec\u6b63\u5728\u8bbe\u8ba1\u548c\u5f00\u53d1 C#\u4e2d\u3002 \u60a8\u53ef\u4ee5\u52a0\u5165\u6211\u4eec\u7684<a href=\"https:\/\/github.com\/dotnet\/csharplang\"> CSharpLang \u5b58\u50a8\u5e93<\/a>\u4ee5\u67e5\u770b\u6700\u65b0\u7684 C# \u529f\u80fd\u63d0\u6848\u548c\u4f1a\u8bae\u8bb0\u5f55\u3002 \u8ba1\u5212\u5de5\u4f5c\u540e\uff0c\u60a8\u53ef\u4ee5\u901a\u8fc7\u6211\u4eec\u7684<a href=\"https:\/\/github.com\/dotnet\/roslyn\/blob\/main\/docs\/Language%20Feature%20Status.md\">\u529f\u80fd\u72b6\u6001\u9875\u9762<\/a>\u76d1\u63a7\u8fdb\u5ea6\u3002 \u8981\u4e86\u89e3\u6709\u5173 C# 11 \u7684\u66f4\u591a\u4fe1\u606f\uff0c\u8bf7\u67e5\u770b\u4ee5\u4e0b\u5185\u5bb9\uff1a<\/p>\n<ul>\n<li><a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/early-peek-at-csharp-11-features\/\">C# 11 \u529f\u80fd\u7684\u65e9\u671f\u9884\u89c8<\/a><\/li>\n<li><a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/csharp-11-preview-updates\/\">C# 11 \u9884\u89c8\u66f4\u65b0 &#8211; \u539f\u59cb\u5b57\u7b26\u4e32\u6587\u5b57\u3001UTF-8 \u7b49\uff01<\/a><\/li>\n<li><a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/csharp-11-preview-august-update\/\">C# 11 \u9884\u89c8\uff1a\u901a\u7528\u6570\u5b66\u3001\u5fc5\u9700\u6210\u5458\u7b49<\/a><\/li>\n<li><a href=\"https:\/\/learn.microsoft.com\/dotnet\/csharp\/whats-new\/csharp-11\">C# 11 \u4e2d\u7684\u65b0\u529f\u80fd<\/a><\/li>\n<\/ul>\n<p>\u6ce8\u610f\uff1a\u82e5\u8981\u8bd5\u7528 C# 11 \u9884\u89c8\u7248\u529f\u80fd\uff0c\u8bf7\u521b\u5efa\u4e00\u4e2a C# \u9879\u76ee\u5e76<a href=\"https:\/\/learn.microsoft.com\/dotnet\/csharp\/language-reference\/compiler-options\/language#langversion\">\u5c06 LangVersion \u8bbe\u7f6e\u4e3aPreview<\/a>\u3002<\/p>\n<p><strong>\u5e93<\/strong><\/p>\n<p>.NET \u5e93\u5728\u4e0d\u65ad\u6539\u8fdb\u3002\u4f1a\u5b9a\u671f\u6dfb\u52a0\u5305\u542b\u5168\u65b0\u529f\u80fd\u7684\u65b0 API\u3002 \u73b0\u6709 API \u6b63\u5728\u8fdb\u884c\u6027\u80fd\u6539\u8fdb\uff0c\u53ea\u9700\u5347\u7ea7\u5373\u53ef\u4f7f\u60a8\u53d7\u76ca\u3002 \u6b63\u5728\u5efa\u9020\u5168\u65b0\u7684\u5e93\uff0c\u4ee5\u534f\u52a9\u60a8\u5b8c\u6210\u65e5\u5e38\u5de5\u4f5c\u3002 \u8fd9\u4e9b\u535a\u5ba2\u4e2d\u4ecb\u7ecd\u4e86\u8bb8\u591a .NET \u5e93\u589e\u5f3a\u529f\u80fd\uff0c\u4f46\u4e0d\u8981\u5fd8\u8bb0\u6df1\u5165\u7814\u7a76\u8fd9\u4e9b\u5e93\uff1a<\/p>\n<ul>\n<li><a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/preview-features-in-net-6-generic-math\/\">.NET 6 \u4e2d\u7684\u9884\u89c8\u529f\u80fd &#8211; \u901a\u7528\u6570\u5b66<\/a><\/li>\n<li><a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/dotnet-7-generic-math\/\">.NET 7 Preview 5 \u2013 \u901a\u7528\u6570\u5b66<\/a><\/li>\n<li><a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/regular-expression-improvements-in-dotnet-7\/\">.NET 7 \u4e2d\u7684\u6b63\u5219\u8868\u8fbe\u5f0f\u6539\u8fdb<\/a><\/li>\n<li><a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/announcing-rate-limiting-for-dotnet\/\">\u5ba3\u5e03\u63a8\u51fa .NET \u7684\u901f\u7387\u9650\u5236<\/a><\/li>\n<\/ul>\n<p><strong>\u00a0<\/strong><strong>SDK<\/strong><\/p>\n<p>\u6bcf\u4e2a .NET \u7248\u672c\u90fd\u5305\u542b\u5bf9 .NET SDK \u7684\u5927\u91cf\u6539\u8fdb\uff0c\u5305\u62ec\u7528\u4e8e\u521b\u5efa\u3001\u751f\u6210\u548c\u7ba1\u7406 .NET \u9879\u76ee\u7684\u6838\u5fc3\u529f\u80fd\u3002 \u8bb8\u591a\u589e\u5f3a\u529f\u80fd\u5df2\u5305\u542b\u5728\u60a8\u53ef\u4ee5\u9605\u8bfb\u7684\u4ee5\u524d\u7684\u9884\u89c8\u535a\u5ba2\u4e2d\u3002 \u8981\u4e86\u89e3\u6709\u5173\u65b0 SDK \u529f\u80fd\u7684\u66f4\u591a\u4fe1\u606f\uff0c\u8bf7\u53c2\u9605\u4ee5\u4e0b\u5185\u5bb9\uff1a<\/p>\n<ul>\n<li><a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/announcing-builtin-container-support-for-the-dotnet-sdk\/\">\u5ba3\u5e03\u63a8\u51fa\u5bf9 .NET SDK\u7684\u5185\u7f6e\u5bb9\u5668\u652f\u6301<\/a><\/li>\n<li><a href=\"https:\/\/devblogs.microsoft.com\/nuget\/introducing-central-package-management\/\">\u4e2d\u592e\u5305\u7ba1\u7406\u7b80\u4ecb<\/a><\/li>\n<\/ul>\n<p><strong>\u5982\u4f55\u4e3a<\/strong><strong> System.Text.Json \u6e90\u751f\u6210\u5668\u91cd\u65b0\u542f\u7528\u53cd\u5c04\u56de\u9000<\/strong><\/p>\n<p>.NET 7 \u5f15\u5165\u4e86\u4e00\u9879<a href=\"https:\/\/learn.microsoft.com\/dotnet\/core\/compatibility\/serialization\/7.0\/reflection-fallback\">\u6709\u610f\u4e49\u7684\u91cd\u5927\u66f4\u6539<\/a>\uff0c\u8be5\u66f4\u6539\u5220\u9664\u4e86 System.Text.Json \u6e90\u751f\u6210\u5668\u4e2d\u57fa\u4e8e\u53cd\u5c04\u7684\u5e8f\u5217\u5316\u7684\u9759\u9ed8\u56de\u9000\u3002 \u6839\u636e\u6211\u4eec\u4ece\u5ba2\u6237\u90a3\u91cc\u6536\u5230\u7684\u65e9\u671f\u53cd\u9988\uff0c\u4f3c\u4e4e\u6709\u4e0d\u5c11\u7528\u6237\uff08\u5927\u90e8\u5206\u662f\u5076\u7136\u7684\uff09\u4f9d\u8d56\u56de\u9000\u884c\u4e3a\u3002<\/p>\n<p>\u5373\u4f7f\u5df2\u7ecf\u8bb0\u5f55\u4e86\u91cd\u5927\u66f4\u6539\u7684\u89e3\u51b3\u65b9\u6cd5\uff0c\u5b83\u4ecd\u7136\u9700\u8981\u4ee3\u7801\u66f4\u6539\uff0c\u8fd9\u5728\u67d0\u4e9b\u60c5\u51b5\u4e0b\u662f\u4e0d\u53ef\u80fd\u7684\u3002 \u4ece .NET 7 RC 2 \u5f00\u59cb\uff0c\u60a8\u53ef\u4ee5\u4f7f\u7528\u63d0\u4f9b\u7684 AppContext \u517c\u5bb9\u6027\u5f00\u5173\u5728\u5168\u5c40\u8303\u56f4\u5185\u91cd\u65b0\u542f\u7528\u53cd\u5c04\u56de\u9000\u3002 \u5c06\u4ee5\u4e0b\u6761\u76ee\u6dfb\u52a0\u5230\u5e94\u7528\u7a0b\u5e8f\u7684\u9879\u76ee\u6587\u4ef6\u4e2d\uff0c\u4ee5\u91cd\u65b0\u542f\u7528\u5e94\u7528\u7a0b\u5e8f\u4e2d\u6240\u6709\u6e90\u6784\u5efa\u4e0a\u4e0b\u6587\u7684\u53cd\u5c04\u56de\u9000\uff1a<\/p>\n<pre class=\"prettyprint\">&lt;ItemGroup&gt;\r\n  &lt;RuntimeHostConfigurationOption Include=\"System.Text.Json.Serialization.EnableSourceGenReflectionFallback\" Value=\"true\" \/&gt;\r\n&lt;\/ItemGroup&gt;<\/pre>\n<p>\u6709\u5173\u4f7f\u7528 AppContext \u5f00\u5173\u7684\u8be6\u7ec6\u4fe1\u606f\uff0c\u8bf7\u53c2\u9605\u6709\u5173<a href=\"https:\/\/learn.microsoft.com\/dotnet\/core\/runtime-config\/\"> .NET \u8fd0\u884c\u65f6\u914d\u7f6e\u8bbe\u7f6e<\/a>\u7684\u6587\u7ae0\u3002<\/p>\n<p><strong>\u65b0\u5206\u6790\u5668\u7528\u4e8e\u5e2e\u52a9\u60a8\u4ee5\u6b63\u786e\u65b9\u5f0f\u4f7f\u7528<\/strong><strong> API<\/strong><\/p>\n<p><strong>\u6b63\u786e\u5b9e\u73b0\u901a\u7528\u6570\u5b66\u63a5\u53e3<\/strong><\/p>\n<p><a href=\"https:\/\/github.com\/dotnet\/runtime\/issues\/69775\">dotnet\/runtime #69775<\/a><\/p>\n<p>\u786e\u4fdd\u4f7f\u7528<a href=\"https:\/\/wikipedia.org\/wiki\/Curiously_recurring_template_pattern\">\u5947\u5f02\u9012\u5f52\u6a21\u677f\u6a21\u5f0f<\/a> (CRTP) \u7684 .NET \u901a\u7528\u6570\u5b66\u63a5\u53e3\u5728\u7528\u6237\u4ee3\u7801\u4e2d\u6b63\u786e\u5b9e\u73b0\u3002 \u7279\u522b\u662f\uff0c\u5982\u679c\u5b9e\u73b0 .NET \u901a\u7528\u6570\u5b66\u63a5\u53e3\uff08\u5b9e\u73b0 CRTP \u67b6\u6784\uff09\u7684\u7c7b\u578b\u672a\u4f7f\u7528\u7c7b\u578b\u672c\u8eab\u586b\u5145\u6cdb\u578b\u7c7b\u578b\u53c2\u6570\uff0c\u5b83\u5c06\u53d1\u51fa\u8b66\u544a\u3002<\/p>\n<p>\u4f8b\u5982\uff1a<\/p>\n<pre class=\"prettyprint\">public readonly struct DateOnly : IParsable&lt;DateOnly&gt; \/\/ correct implementation of IParsable&lt;TSelf&gt; interface\r\n{ ... }\r\npublic readonly struct MyDate : IParsable&lt;DateOnly&gt; \/\/ Warns: \"The 'IParsable&lt;TSelf&gt;' requires the 'TSelf' type parameter to be filled with the derived type 'MyDate' \" the type parameter TSelf\r\n{ ... }<\/pre>\n<p><strong>\u9632\u6b62\u5185\u7f6e\u8fd0\u7b97\u7b26\u4e2d\u7684\u884c\u4e3a\u66f4\u6539<\/strong><strong> IntPtr \u548c UIntPtr<\/strong><\/p>\n<p><a href=\"https:\/\/github.com\/dotnet\/runtime\/issues\/74022\">dotnet\/runtime #74022<\/a><\/p>\n<p>.NET 7 \u4e2d\u4e3a System.IntPtr \u548c System.UIntPtr \u6dfb\u52a0\u7684\u4e00\u4e9b\u5185\u7f6e\u8fd0\u7b97\u7b26\u7684\u884c\u4e3a\u4e0e .NET 6 \u53ca\u66f4\u4f4e\u7248\u672c\u4e2d\u7528\u6237\u5b9a\u4e49\u7684\u8fd0\u7b97\u7b26\u4e0d\u540c\u3002\u4e00\u4e9b\u8fc7\u53bb\u5728\u6ea2\u51fa\u65f6\u629b\u51fa\u672a\u7ecf\u68c0\u67e5\u7684\u4e0a\u4e0b\u6587\u7684\u8fd0\u7b97\u7b26\u73b0\u5728\u4e0d\u518d\u629b\u51fa\uff0c\u9664\u975e\u88ab\u5305\u88c5\u5728\u68c0\u67e5\u7684\u4e0a\u4e0b\u6587\u4e2d\uff0c\u800c\u4e00\u4e9b\u4ee5\u524d\u4e0d\u7528\u4e8e\u5728\u68c0\u67e5\u7684\u4e0a\u4e0b\u6587\u4e2d\u629b\u51fa\u7684\u8fd0\u7b97\u7b26\u73b0\u5728\u4f1a\u5728\u6ea2\u51fa\u65f6\u629b\u51fa\uff0c\u9664\u975e\u88ab\u5305\u88c5\u5728\u672a\u7ecf\u68c0\u67e5\u7684\u4e0a\u4e0b\u6587\u4e2d\u3002 \u5206\u6790\u5668\u68c0\u6d4b\u53ef\u80fd\u5bfc\u81f4\u8fd9\u4e9b\u884c\u4e3a\u53d8\u5316\u7684\u4ee3\u7801\u5e76\u901a\u77e5\u5b83\u3002<\/p>\n<p>\u4f8b\u5982\uff1a<\/p>\n<pre class=\"prettyprint\">checked\r\n{\r\n    intPtr2 = intPtr1 + 2; \/\/ Warns: \"Starting with .NET 7 the operator '+' will throw when overflowing in a checked context. Wrap the expression with an 'unchecked' statement to restore the .NET 6 behavior.\"\r\n\r\n    intPtr2 = intPtr1 - 2; \/\/ Warns: \"Starting with .NET 7 the operator '-' will throw when overflowing in a checked context. Wrap the expression with an 'unchecked' statement to restore the .NET 6 behavior.\"\r\n\r\n    void* ptr = (void*)intPtr1; \/\/ Warns: \"Starting with .NET 7 the explicit conversion '(void*)IntPtr' will throw when overflowing in a checked context. Wrap the expression with an 'unchecked' statement to restore the .NET 6 behavior.\"\r\n\r\n    intPtr2 = (IntPtr)ptr; \/\/ Warns: \"Starting with .NET 7 the explicit conversion '(IntPtr)void*' will throw when overflowing in a checked context. Wrap the expression with an 'unchecked' statement to restore the .NET 6 behavior.\"\r\n}\r\n\r\nintPtr1 = (IntPtr)longValue; \/\/ Warns: \"Starting with .NET 7 the explicit conversion '(IntPtr)Int64' will not throw when overflowing in an unchecked context. Wrap the expression with a 'checked' statement to restore the .NET 6 behavior.\"\r\n\r\nint a = (int)intPtr1; \/\/ Warns: \"Starting with .NET 7 the explicit conversion '(Int32)IntPtr' will not throw when overflowing in an unchecked context. Wrap the expression with a 'checked' statement to restore the .NET 6 behavior.\"<\/pre>\n<p><strong>\u8d21\u732e\u8005\u805a\u5149\u706f\uff1a<\/strong><strong>Alan Hayward<\/strong><\/p>\n<p>\u975e\u5e38\u611f\u8c22\u6211\u4eec\u6240\u6709\u7684\u793e\u533a\u6210\u5458\u3002 \u6211\u4eec\u975e\u5e38\u611f\u8c22\u60a8\u7684\u5468\u5230\u8d21\u732e\u3002 \u6211\u4eec\u8bf7\u8d21\u732e\u8005<a href=\"https:\/\/github.com\/a74nh\">@a74nh<\/a>\u5206\u4eab\u4ed6\u7684\u60f3\u6cd5\u3002<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/dotnet-ch\/wp-content\/uploads\/sites\/75\/2022\/10\/alanhayward-1-1.jpg\"><img decoding=\"async\" class=\"alignnone wp-image-118 size-full\" src=\"https:\/\/devblogs.microsoft.com\/dotnet-ch\/wp-content\/uploads\/sites\/75\/2022\/10\/alanhayward-1-1.jpg\" alt=\"Image alanhayward 1\" width=\"1193\" height=\"1588\" srcset=\"https:\/\/devblogs.microsoft.com\/dotnet-ch\/wp-content\/uploads\/sites\/75\/2022\/10\/alanhayward-1-1.jpg 1193w, https:\/\/devblogs.microsoft.com\/dotnet-ch\/wp-content\/uploads\/sites\/75\/2022\/10\/alanhayward-1-1-225x300.jpg 225w, https:\/\/devblogs.microsoft.com\/dotnet-ch\/wp-content\/uploads\/sites\/75\/2022\/10\/alanhayward-1-1-769x1024.jpg 769w, https:\/\/devblogs.microsoft.com\/dotnet-ch\/wp-content\/uploads\/sites\/75\/2022\/10\/alanhayward-1-1-768x1022.jpg 768w, https:\/\/devblogs.microsoft.com\/dotnet-ch\/wp-content\/uploads\/sites\/75\/2022\/10\/alanhayward-1-1-1154x1536.jpg 1154w\" sizes=\"(max-width: 1193px) 100vw, 1193px\" \/><\/a><\/p>\n<p>\u7528Alan\u81ea\u5df1\u7684\u8bdd\u8bf4\uff1a<\/p>\n<p>\u6211\u662fAlan Hayward\uff0c\u6211\u4f4f\u5728\u82f1\u56fd\u66fc\u5f7b\u65af\u7279\u90ca\u5916\u3002<\/p>\n<p>\u6211\u5bf9 .NET \u53ca\u5176\u751f\u6001\u7cfb\u7edf\u8fd8\u5f88\u964c\u751f\uff0c\u4f46\u6211\u5728\u505a\u7f16\u8bd1\u4e4b\u7c7b\u7684\u4e8b\u60c5\u65b9\u9762\u6709\u7740\u60a0\u4e45\u7684\u5386\u53f2\u3002 \u5728\u6211\u804c\u4e1a\u751f\u6daf\u7684\u65e9\u671f\uff0c\u6211\u66fe\u5728\u4e00\u5bb6\u751f\u4ea7\u540d\u4e3a QuickTransit \u7684 DBT \u7684\u521d\u521b\u516c\u53f8\u5de5\u4f5c\u2014\u2014\u66f4\u597d\u5730\u79f0\u4e3a Apple \u7684 Rosetta\uff08\u4ece\u4ed6\u4eec\u4ece PPC \u8fc1\u79fb\u5230 X86 \u65f6\u56de\u6765\uff09\u2014\u2014\u4f46\u6211\u66f4\u5173\u5fc3\u5b83\u5728\u67b6\u6784\u4e2d\u9c9c\u4e3a\u4eba\u77e5\u7684\u5e94\u7528\u7a0b\u5e8f\uff1aSPARC Solaris \u5230 X86\/Itanium\/PPC Linux \u548c X86 Linux \u5230 MIPS\/PPC\/SPARC\/Z Linux\uff0c\u53ef\u80fd\u8fd8\u6709\u66f4\u591a\u7684\u7ec4\u5408\u73b0\u5728\u5df2\u7ecf\u6d88\u5931\u5728\u65f6\u95f4\u7684\u8ff7\u96fe\u4e2d\u3002<\/p>\n<p>2014 \u5e74\uff0c\u6211\u52a0\u5165\u4e86 Arm \u7684\u65b0\u66fc\u5f7b\u65af\u7279\u82f1\u56fd\u529e\u4e8b\u5904\uff0c\u81f4\u529b\u4e8e\u4e3a GCC \u548c GDB \u6dfb\u52a0 SVE \u652f\u6301\uff0c\u7136\u540e\u6210\u4e3a GDB \u7684 Arm\/AArch64 \u7ef4\u62a4\u8005\u3002 \u4eca\u5929\u6211\u52a0\u5165\u4e86 Arm \u7684\u8fd0\u884c\u65f6\u56e2\u961f\uff0c\u7814\u7a76\u6d41\u884c\u7684\u4e91\u548c\u684c\u9762\u8fd0\u884c\u65f6\u7684\u6027\u80fd\u548c\u5b89\u5168\u6027\u3002 \u6709\u4e00\u6bb5\u65f6\u95f4\u6211\u4ece\u4e8b OpenJDK \u548c Graal \u5de5\u4f5c\uff0c\u5305\u62ec\u6dfb\u52a0\u5bf9 Arm \u7684\u6307\u9488\u8eab\u4efd\u9a8c\u8bc1 (PAC) \u5b89\u5168\u529f\u80fd\u7684\u652f\u6301\uff0c\u4ee5\u4fdd\u62a4 OpenJDK \u4e2d\u7684\u63a7\u5236\u6d41\u3002<\/p>\n<p>\u6211\u6700\u8fd1\u4e00\u76f4\u5728\u4e0e .Net \u4e0a\u7684\u4e00\u4e9b\u56e2\u961f\u5408\u4f5c\u2014\u2014\u8ba9\u6211\u4eec\u52a0\u5feb\u901f\u5ea6\uff0c\u4f7f\u7528\u5185\u5728\u51fd\u6570\u6539\u8fdb\u4e00\u4e9b\u5e93\u4f8b\u7a0b\uff0c\u5e76\u4e3a Ryujit \u6dfb\u52a0\u4e00\u4e2a If Conversion pass\u3002 \u6211\u5f88\u9ad8\u5174\u770b\u5230\u6211\u4eec\u53ef\u4ee5\u5bf9 Arm64 \u7aef\u53e3\u8fdb\u884c\u4e00\u4e9b\u6539\u8fdb\u3002<\/p>\n<p>\u6211\u559c\u6b22 .Net \u7684\u54ea\u4e9b\u65b9\u9762\uff1f \u6211\u559c\u6b22 C# \u7684\u7b80\u5355\u6027\u2014\u2014\u60a8\u53ef\u4ee5\u5feb\u901f\u8f7b\u677e\u5730\u5b8c\u6210\u5de5\u4f5c\uff08\u6bcf\u4e2a\u4f1a\u7f16\u7a0b\u7684\u4eba\u90fd\u53ef\u4ee5\u7528 C# \u7f16\u7a0b\uff09\u3002 \u540c\u6837\uff0cJit \u672c\u8eab\u5728\u5e94\u7528\u7f16\u8bd1\u5668\u6280\u672f\u7684\u65b9\u5f0f\u4e0a\u4e5f\u5f88\u76f4\u89c2\u3002 \u6700\u540e\uff0c\u5bf9 SuperPMI \u8868\u793a\u656c\u610f\u2014\u2014\u8fd9\u662f\u6211\u5e0c\u671b\u5728\u4ee5\u524d\u7684\u9879\u76ee\u4e2d\u62e5\u6709\u7684\u5de5\u5177\uff0c\u80fd\u591f\u5feb\u901f\u83b7\u5f97\u6d4b\u8bd5\u5957\u4ef6\u4e4b\u95f4\u7684\u5dee\u5f02\u771f\u662f\u592a\u68d2\u4e86\u3002<\/p>\n<p>\u5f53\u6211\u4e0d\u5de5\u4f5c\u65f6\uff0c\u7ecf\u5e38\u4f1a\u53d1\u73b0\u6211\u7528\u5c0f\u753b\u7b14\u8bd5\u56fe\u6539\u5584\u6211\u7684\u5fae\u578b\u753b\uff0c\u542c\u592a\u591a\u7684\u64ad\u5ba2\u548c\u6709\u58f0\u8bfb\u7269\u3002<\/p>\n<p>\u6211\u5f88\u9ad8\u5174\u80fd\u6210\u4e3a\u5176\u4e2d\u7684\u4e00\u5458\uff0c\u975e\u5e38\u611f\u8c22\u8fc4\u4eca\u4e3a\u6b62\u4e0e\u6211\u4e92\u52a8\u8fc7\u7684\u793e\u533a\u4e2d\u7684\u4eba\u4eec\uff0c\u5e76\u5e0c\u671b\u968f\u7740\u65f6\u95f4\u7684\u63a8\u79fb\u4e0e\u66f4\u591a\u4eba\u5408\u4f5c\u3002<\/p>\n<p><strong>\u652f\u6301<\/strong><\/p>\n<p>.NET 7\u53d1\u5e03\u65f6\u63d0\u4f9b<strong>\u6807\u51c6\u652f\u6301<\/strong>\u3002\u5c3d\u7ba1\u8fd9\u662f\u4ee5\u524d\u79f0\u4e3a\u201c<strong>\u5f53\u524d<\/strong>\u201d\u7684\u65b0\u540d\u79f0\uff0c\u4f46\u652f\u6301\u6301\u7eed\u65f6\u95f4\u6ca1\u6709\u6539\u53d8\u3002\u5947\u6570 .NET \u7248\u672c\u53d1\u5e03\u65f6\u63d0\u4f9b18 \u4e2a\u6708\u7684<strong>\u6807\u51c6\u652f\u6301<\/strong>\u3002<strong>\u957f\u671f\u652f\u6301\uff08<\/strong><strong>LTS<\/strong><strong>\uff09<\/strong>\u7684\u540d\u79f0\u6216\u671f\u9650\u6ca1\u6709\u53d8\u5316\uff0c\u4ecd\u6301\u7eed36\u4e2a\u6708\u3002\u6709\u5173\u66f4\u591a\u8be6\u7ec6\u4fe1\u606f\uff0c\u8bf7\u53c2\u9605\u6211\u4eec\u7684 <a href=\"https:\/\/dotnet.microsoft.com\/platform\/support\/policy\/dotnet-core\">.NET \u548c .NET Core \u652f\u6301\u751f\u547d\u5468\u671f<\/a>\u6587\u6863\u3002<\/p>\n<p><strong>\u8def\u7ebf\u56fe<\/strong><\/p>\n<p>.NET \u7248\u672c\u5305\u62ec\u4ee3\u8868 Microsoft \u5185\u90e8\u548c\u5916\u90e8\u591a\u4e2a\u56e2\u961f\u4e4b\u95f4\u534f\u4f5c\u7684\u4ea7\u54c1\u3001\u5e93\u3001\u8fd0\u884c\u65f6\u548c\u5de5\u5177\u3002 \u60a8\u53ef\u4ee5\u901a\u8fc7\u9605\u8bfb\u4ea7\u54c1\u8def\u7ebf\u56fe\u4e86\u89e3\u6709\u5173\u8fd9\u4e9b\u9886\u57df\u7684\u66f4\u591a\u4fe1\u606f\uff1a<\/p>\n<ul>\n<li><a href=\"https:\/\/github.com\/dotnet\/aspnetcore\/issues\/39504\">NET Core 7 and Blazor Roadmap<\/a><\/li>\n<li><a href=\"https:\/\/docs.microsoft.com\/ef\/core\/what-is-new\/ef-core-7.0\/plan\">EF 7 Roadmap<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/dotnet\/machinelearning\/blob\/main\/ROADMAP.md\">NET<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/dotnet\/maui\/wiki\/Roadmap\">.NET MAUI<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/dotnet\/winforms\/blob\/main\/docs\/roadmap.md\">WinForms<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/dotnet\/wpf\/blob\/main\/roadmap.md\">WPF<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/NuGet\/Home\/issues\/11571\">NuGet<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/dotnet\/roslyn\/blob\/main\/docs\/Language%20Feature%20Status.md\">Roslyn<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/dotnet\/core\/blob\/main\/roadmap.md\">Runtime<\/a><\/li>\n<\/ul>\n<p><strong>\u7ed3\u675f<\/strong><\/p>\n<p>\u6211\u4eec\u975e\u5e38<a href=\"https:\/\/dotnet.microsoft.com\/thanks\">\u611f\u8c22<\/a>\u60a8\u5bf9 .NET \u7684\u6240\u6709\u652f\u6301\u548c\u8d21\u732e\u3002 \u8bf7\u5c1d\u8bd5\u4f7f\u7528 <a href=\"https:\/\/dotnet.microsoft.com\/download\/dotnet\/7.0\">.NET 7 Release Candidate 2<\/a>\uff0c\u5e76\u544a\u8bc9\u6211\u4eec\u60a8\u7684\u60f3\u6cd5\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u672c\u6587\u7ffb\u8bd1\u4e8eJon Douglas\uff0cJeremy Likness \u548c Angelos Petropoulos\u7684\u8fd9\u7bc7\u82f1\u6587\u6587\u7ae0\uff1aAnnouncing .NET 7 Release Candidate 2\u00a0\u3002 \u4eca\u5929\uff0c\u6211\u4eec\u5ba3\u5e03\u63a8\u51fa .NET 7 Release Candidate 2\u3002\u8fd9\u662f .NET 7 \u7684\u6700\u7ec8\u5019\u9009\u7248\u672c \uff08RC\uff09\uff0c\u5e76\u5728\u751f\u4ea7\u73af\u5883\u4e2d\u5f97\u5230\u652f\u6301\u3002 \u60a8\u53ef\u4ee5\u4e0b\u8f7d\u9002\u7528\u4e8e Windows\u3001macOS \u548c Linux \u7684 .NET 7 Release Candidate 2\u3002 \u5b89\u88c5\u7a0b\u5e8f\u548c\u4e8c\u8fdb\u5236\u6587\u4ef6 \u5bb9\u5668\u56fe\u50cf Linux \u8f6f\u4ef6\u5305 \u53d1\u884c\u8bf4\u660e \u5df2\u77e5\u7684\u95ee\u9898 GitHub \u95ee\u9898\u8ddf\u8e2a\u5668 .NET 7 Release Candidate 2 \u5df2\u901a\u8fc7 Visual Studio 17.4 Preview 3\u6d4b\u8bd5\u3002\u5982\u679c\u60a8\u60f3\u5728 Visual Studio \u7cfb\u5217\u4ea7\u54c1\u4e2d\u8bd5\u7528 .NET 7\uff0c\u6211\u4eec\u5efa\u8bae\u60a8\u4f7f\u7528\u9884\u89c8\u901a\u9053\u6784\u5efa\u3002 [&hellip;]<\/p>\n","protected":false},"author":99475,"featured_media":92,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[2],"class_list":["post-112","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-dotnet-ch","tag-net"],"acf":[],"blog_post_summary":"<p>\u672c\u6587\u7ffb\u8bd1\u4e8eJon Douglas\uff0cJeremy Likness \u548c Angelos Petropoulos\u7684\u8fd9\u7bc7\u82f1\u6587\u6587\u7ae0\uff1aAnnouncing .NET 7 Release Candidate 2\u00a0\u3002 \u4eca\u5929\uff0c\u6211\u4eec\u5ba3\u5e03\u63a8\u51fa .NET 7 Release Candidate 2\u3002\u8fd9\u662f .NET 7 \u7684\u6700\u7ec8\u5019\u9009\u7248\u672c \uff08RC\uff09\uff0c\u5e76\u5728\u751f\u4ea7\u73af\u5883\u4e2d\u5f97\u5230\u652f\u6301\u3002 \u60a8\u53ef\u4ee5\u4e0b\u8f7d\u9002\u7528\u4e8e Windows\u3001macOS \u548c Linux \u7684 .NET 7 Release Candidate 2\u3002 \u5b89\u88c5\u7a0b\u5e8f\u548c\u4e8c\u8fdb\u5236\u6587\u4ef6 \u5bb9\u5668\u56fe\u50cf Linux \u8f6f\u4ef6\u5305 \u53d1\u884c\u8bf4\u660e \u5df2\u77e5\u7684\u95ee\u9898 GitHub \u95ee\u9898\u8ddf\u8e2a\u5668 .NET 7 Release Candidate 2 \u5df2\u901a\u8fc7 Visual Studio 17.4 Preview 3\u6d4b\u8bd5\u3002\u5982\u679c\u60a8\u60f3\u5728 Visual Studio \u7cfb\u5217\u4ea7\u54c1\u4e2d\u8bd5\u7528 .NET 7\uff0c\u6211\u4eec\u5efa\u8bae\u60a8\u4f7f\u7528\u9884\u89c8\u901a\u9053\u6784\u5efa\u3002 [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet-ch\/wp-json\/wp\/v2\/posts\/112","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet-ch\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet-ch\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet-ch\/wp-json\/wp\/v2\/users\/99475"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet-ch\/wp-json\/wp\/v2\/comments?post=112"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/dotnet-ch\/wp-json\/wp\/v2\/posts\/112\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet-ch\/wp-json\/wp\/v2\/media\/92"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet-ch\/wp-json\/wp\/v2\/media?parent=112"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet-ch\/wp-json\/wp\/v2\/categories?post=112"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet-ch\/wp-json\/wp\/v2\/tags?post=112"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}