Properly detect availability of BinaryFormatter · pythonnet/pythonnet@ccca132

Skip to content

Navigation Menu

Sign in

Appearance settings

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

Commit ccca132

committed

Properly detect availability of BinaryFormatter

1 parent 117c66a commit ccca132

File tree

1 file changed

+

3

-

1

lines changed

1 file changed

+

3

-

1

lines changed

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)