Skip to content

Commit 10a02f6

Browse files
authored
Adding visualizer issue details to readme
1 parent ab0b95a commit 10a02f6

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,21 @@ The visualizer has both Light and Dark themes:
1919

2020
[![Visualizer options](/docs/Options.gif)]
2121

22+
## ASP.NET Core 5 Known Issue
23+
24+
.NET 5 has [a breaking change](https://github.com/dotnet/runtime/issues/29976), which disables `BinaryFormatter` serialization by default. This causes issues with the ReadableExpressions visualizers (and [elsewhere](https://github.com/nhibernate/nhibernate-core/issues/2603)) when debugging ASP.NET Core apps as the VS debugger [uses](https://wrightfully.com/writing-a-readonly-debugger-visualizer) `BinaryFormatter` to serialize objects before sending them to the visualizer.
25+
26+
[The solution](https://developercommunity2.visualstudio.com/t/visual-studio-debugger-visualizers-and-binaryforma/1278642?from=email&viewtype=all#T-N1314383) is to enable the `BinaryFormatter` in Debug only by adding the following to your ASP.NET Core csproj:
27+
28+
```xml
29+
<PropertyGroup>
30+
<TargetFramework>net5.0</TargetFramework>
31+
<EnableUnsafeBinaryFormatterSerialization Condition=" '$(Configuration)' == 'Debug' ">
32+
true
33+
</EnableUnsafeBinaryFormatterSerialization>
34+
</PropertyGroup>
35+
```
36+
2237
### NuGet Package
2338

2439
The extension method is available in [a NuGet package](https://www.nuget.org/packages/AgileObjects.ReadableExpressions)

0 commit comments

Comments
 (0)