🌐 AI搜索 & 代理 主页
Skip to content

Commit 0258688

Browse files
authored
Properly detect availability of BinaryFormatter (#2639)
1 parent 117c66a commit 0258688

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/runtime/StateSerialization/RuntimeData.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ public static class RuntimeData
2020
{
2121
try
2222
{
23-
return new BinaryFormatter();
23+
var res = new BinaryFormatter();
24+
res.Serialize(new MemoryStream(), 1); // test if BinaryFormatter is usable
25+
return res;
2426
}
2527
catch
2628
{

0 commit comments

Comments
 (0)