.net core 是否支持代码契约?

And*_*hov 5 .net c# code-contracts .net-core

在 .net 框架中,有代码契约允许我在代码中指定前置/后置条件。.net core/.net 5 支持它们吗?

dar*_*ine 5

命名空间System.Diagnostics.Contracts可用,但项目被放弃

替代VS2019
https://softwarerecs.stackexchange.com/questions/47108/the-best-code-contracts-alternative-for-vs-2017-2019-and-net-core-projects

关于.Net Core的讨论

https://github.com/dotnet/runtime/issues/23869

代码契约仍然是 2020 年的推荐方式吗

https://github.com/dotnet/docs/issues/17640

  • 似乎这个从评论到堆栈交换问题的链接信息最丰富:https://github.com/dotnet/runtime/issues/23869#issuecomment-415670905 似乎项目负责人切换到了 Facebook,并且该项目被放弃了。 (2认同)