You can use Code Contracts for standard .NET projects (I have); however, there is no support for VS ID ID 2017 for the inclusion of code contracts in any project, not to mention the netstandard project.
(ccrewrite) , PDB. , netstandard PDB ( PDB, ).
. netstandard, /Windows PDB . / Windows PDB netstandard- , , , .
VS Code , , Code Contracts VS 2017 builds. , PDB. csproj msbuild :
<PropertyGroup Condition=" '$(Configuration)' != 'Release' ">
<DebugType>full</DebugType>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<CodeContractsRuntimeCheckingLevel>ReleaseRequires</CodeContractsRuntimeCheckingLevel>
<DebugType>pdbonly</DebugType>
</PropertyGroup>