Are code contracts supported in .net core?

1.8k views Asked by At

In the .net framework there were Code Contracts which allowed me to specify pre/post conditons in my code. Are they supported in .net core/.net 5?

1

There are 1 answers

1
daremachine On BEST ANSWER

Namespace System.Diagnostics.Contracts is available but project is abandoned.

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

Discussion about .Net Core

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

Is Code Contracts still the recommended way to go in 2020

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