diff --git a/CHANGELOG.md b/CHANGELOG.md
index 3fd1ee7..60084c7 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -3,6 +3,13 @@ All notable changes to this project will be documented in this file.
## [Unreleased]
+### Added
+- Contract assemblies are now added to BuiltProjectOutputGroupOutput collection
+ and therefore packaged with the Pack command.
+### Changed
+- Build uses single set of target files for all MSBuild versions 4.0 and above,
+ so that the output is consistent regardless of the way MSBuild is invoked.
+
## [1.11-alpha] - 2017-12-12
### Added
- Added change log
diff --git a/Contracts/MsBuild/v12.0/Microsoft.CodeContractAnalysis.targets b/Contracts/MsBuild/v12.0/Microsoft.CodeContractAnalysis.targets
deleted file mode 100644
index 385b072..0000000
--- a/Contracts/MsBuild/v12.0/Microsoft.CodeContractAnalysis.targets
+++ /dev/null
@@ -1,254 +0,0 @@
-
-
-
-
-
-
- $(PrepareForRunDependsOn);CodeContractsRunCodeAnalysisOnTarget;CodeContractsPerformCodeAnalysis
- $(IntermediateOutputPath)CodeContractAnalysisRun.log
-
-
-
-
-
- $(CodeContractsInstallDir)Bin\cccheck.exe
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- $([System.Environment]::GetEnvironmentVariable(`CodeContractsTargetMember`))
- $([System.Environment]::GetEnvironmentVariable(`CodeContractsTargetType`))
- $([System.Environment]::GetEnvironmentVariable(`CodeContractsTargetNamespace`))
- $([System.Environment]::GetEnvironmentVariable(`CodeContractsTargetProjectGuid`))
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- low
-
-
-
-
- low
-
-
-
-
- mediumlow
-
-
-
-
- medium
-
-
-
-
- full
-
-
-
-
- low
-
-
-
-
-
-
-
-
-
- noObl
-
-
-
-
-
-
-
-
-
-
-
-
-
- @(ContractDeclarativeAssembly->'%(RootDir)')@(ContractDeclarativeAssembly->'%(Directory)')
- @(ContractDeclarativeAssembly->'%(FullPath)')
- -platform "$(CodeContractsPlatformPath)"
- $(CodeContractCodeAnalysisOptions) -cclib "$(CodeContractsClassLibrary)"
- $(CodeContractCodeAnalysisOptions) -assemblyMode=standard
- $(CodeContractCodeAnalysisOptions) -maxwarnings 1200
- $(CodeContractCodeAnalysisOptions) -nonnull:noObl
- $(CodeContractCodeAnalysisOptions) -nonnull
- $(CodeContractCodeAnalysisOptions) -bounds:$(CodeContractsBounds) -arrays -wp=true -bounds:type=subpolyhedra,reduction=simplex,diseq=false
- $(CodeContractCodeAnalysisOptions) -buffers:type=subpolyhedra,fastcheck=false
- $(CodeContractCodeAnalysisOptions) -arrays -adaptive
- $(CodeContractCodeAnalysisOptions) -arithmetic
- $(CodeContractCodeAnalysisOptions) -enum
- $(CodeContractCodeAnalysisOptions) -check assumptions
- $(CodeContractCodeAnalysisOptions) -suggest asserttocontracts
- $(CodeContractCodeAnalysisOptions) -check conditionsvalidity
- $(CodeContractCodeAnalysisOptions) -missingPublicRequiresAreErrors
- $(CodeContractCodeAnalysisOptions) -missingPublicEnsuresAreErrors
- $(CodeContractCodeAnalysisOptions) -suggest calleeassumes
- $(CodeContractCodeAnalysisOptions) -suggest assumes
- $(CodeContractCodeAnalysisOptions) -suggest requires
- $(CodeContractCodeAnalysisOptions) -suggest methodensures -suggest propertyensures
- $(CodeContractCodeAnalysisOptions) -suggest necessaryensures
- $(CodeContractCodeAnalysisOptions) -suggest objectinvariants
- $(CodeContractCodeAnalysisOptions) -suggest readonlyfields
- $(CodeContractCodeAnalysisOptions) -infer requires
- $(CodeContractCodeAnalysisOptions) -infer methodensures
- $(CodeContractCodeAnalysisOptions) -infer autopropertiesensures
- $(CodeContractCodeAnalysisOptions) -infer objectinvariants
- $(CodeContractCodeAnalysisOptions) -cache
- $(CodeContractCodeAnalysisOptions) -forcecacheserver=true
- $(CodeContractCodeAnalysisOptions) -failOnWarnings
- $(CodeContractCodeAnalysisOptions) -cacheFileDirectory "$(CodeContractsCacheDirectory)"
- $(CodeContractCodeAnalysisOptions) -cacheVersion "$(CodeContractsCacheVersion)"
- $(CodeContractCodeAnalysisOptions) -cacheMaxSize "$(CodeContractsCacheMaxSize)"
- $(CodeContractCodeAnalysisOptions) -memberNameSelect:$(CodeContractsTargetMember)
- $(CodeContractCodeAnalysisOptions) -typeNameSelect:$(CodeContractsTargetType)
- $(CodeContractCodeAnalysisOptions) -lowScoreForExternal=false
- $(CodeContractCodeAnalysisOptions) -namespaceSelect:$(CodeContractsTargetNamespace)
- $(CodeContractCodeAnalysisOptions) -baseline "$(CodeContractsBaseLineFile)"
- $(CodeContractCodeAnalysisOptions) -cacheserver:$(CodeContractsSQLServerOption)
- $(CodeContractCodeAnalysisOptions) $(CodeContractsExtraAnalysisOptions)
- false
- true
- true
- false
-
-
-
- <_CodeContractsCCCheckArguments>-nobox -nologo -nopex -remote -suggest=!! -premode combined -suggest codefixes -framework:$(TargetFrameworkVersion) -warninglevel $(CodeContractsAnalysisWarning) $(CodeContractCodeAnalysisOptions) "-resolvedPaths:@(ReferencePath)" "-libPaths:@(CodeContractsAllLibPaths) " "$(DeclarativeAssemblyPath)"
-
-
-
- <_CodeContractsCCCheckArgumentLines
- Include="$(_CodeContractsCCCheckArguments)"
- />
-
-
-
-
-
-
-
-
-
diff --git a/Contracts/MsBuild/v12.0/Microsoft.CodeContracts.targets b/Contracts/MsBuild/v12.0/Microsoft.CodeContracts.targets
deleted file mode 100644
index 637c1ba..0000000
--- a/Contracts/MsBuild/v12.0/Microsoft.CodeContracts.targets
+++ /dev/null
@@ -1,646 +0,0 @@
-
-
-
- True
-
-
-
-
-
- $(OutDir)CodeContractsDeclarative\
- CodeContracts\
- $(CodeContractsInstallDir)Bin\ccrefgen.exe
-
-
-
-
-
-
-
- $(CodeContractsInstallDir)Contracts\Silverlight\v5.0
-
-
-
-
-
-
- $(CodeContractsInstallDir)Contracts\Silverlight\v4.0\Profile\WindowsPhone
-
-
-
-
- $(CodeContractsInstallDir)Contracts\Silverlight\v4.0
-
-
-
-
-
-
- $(CodeContractsInstallDir)Contracts\Silverlight\v3.0
-
-
-
-
-
-
-
-
- $(CodeContractsInstallDir)Contracts\.NETFramework\v4.0
-
-
-
-
- $(CodeContractsInstallDir)Contracts\.NETFramework\v4.5
-
-
-
-
- $(CodeContractsInstallDir)Contracts\.NETFramework\v4.6
-
-
-
-
- $(CodeContractsInstallDir)Contracts\v3.5
-
-
-
-
-
-
-
-
-
- CodeContractsSlipInDefineSymbolDynamically;$(CompileDependsOn);CodeContractReferenceAssembly
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 4
-
-
-
-
-
- 4
-
-
-
-
- 3
-
-
-
-
- 2
-
-
-
-
-
- 1
-
-
-
-
- 1
-
-
-
-
- 0
-
-
-
-
-
-
-
-
- $(CompileDependsOn); CodeContractInstrument
-
-
-
-
- $(CompileDependsOn);ContractXmlDocumentation
-
-
-
-
-
- $(CodeContractRewriteOptions) "/framework:$(TargetFrameworkVersion)"
- $(CodeContractRewriteOptions) "/targetplatform:$(CodeContractsPlatformPath)"
- $(CodeContractRewriteOptions) "/contractLibrary:$(CodeContractsClassLibrary)"
- $(CodeContractRewriteOptions) "/assemblyMode=standard"
- $(CodeContractRewriteOptions) /publicsurface
- $(CodeContractRewriteOptions) /throwonfailure
- $(CodeContractRewriteOptions) /callsiterequires
- $(CodeContractRewriteOptions) /skipQuantifiers
- $(CodeContractRewriteOptions) "/rewriterMethods:$(CodeContractsCustomRewriterAssembly),$(CodeContractsCustomRewriterClass)"
- $(CodeContractRewriteOptions) $(CodeContractsExtraRewriteOptions)
- /level:$(CodeContractsRuntimeLevel) /nologo /rewrite $(CodeContractRewriteOptions) "/resolvedPaths:@(ReferencePath,';')" "/libpaths:@(CodeContractsAllLibPaths) " "$(TargetName)$(TargetExt)"
- $(CodeContractsInstallDir)Bin\ccrewrite.exe
-
- $(IntermediateOutputPath)$(TargetName).rewritten
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- <_CodeContractsCCRewriteArguments>$(CodeContractRewriteOptions)
-
-
-
- <_CodeContractsCCRewriteArgumentLines
- Include="$(_CodeContractsCCRewriteArguments)"
- />
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- $(TargetFrameworkSDKToolsDirectory)sn.exe
- $(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools\sn.exe
-
-
-
-
-
-
-
-
-
-
- <_CodeContractOutputDirectory Include="$(OutDir)$(CodeContractsContractSubDir)"/>
- <_ContractDummyReferenceAssembly Include="$(OutDir)$(CodeContractsContractSubDir)$(TargetName).noReferenceAssembly"/>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- <_CodeContractsCCRefGenArguments>"/resolvedPaths:@(ReferencePath,';')" "/libPaths:@(CodeContractsAllLibPaths) " /pdb "/out:@(ContractReferenceAssembly)" "@(ContractDeclarativeAssembly)"
-
-
-
- <_CodeContractsCCRefGenArgumentLines
- Include="$(_CodeContractsCCRefGenArguments)"
- />
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- <_CodeContractsBuildReferences
- Include="@(ReferencePath->'%(RootDir)%(Directory)')"/>
- <_CodeContractsBuildReferences
- Include="@(ReferencePath->'%(RootDir)%(Directory)CodeContracts')"/>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- $(CodeContractsInstallDir)Bin\ccdocgen.exe
-
-
-
-
-
- <_CodeContractsCCDocGenArguments>-assembly "@(ContractReferenceAssembly)" -xmlFile "@(DocFileItem)" "-resolvedPaths:@(ReferencePath)" -libpaths "@(CodeContractsAllLibPaths) "
-
-
-
- <_CodeContractsCCDocGenArgumentLines
- Include="$(_CodeContractsCCDocGenArguments)"
- />
-
-
-
-
-
-
-
-
-
- $(CodeContractsInstallDir)MsBuild\v12.0\Microsoft.CodeContractAnalysis.targets
-
-
-
-
-
diff --git a/Contracts/MsBuild/v14.0/Microsoft.CodeContractAnalysis.targets b/Contracts/MsBuild/v14.0/Microsoft.CodeContractAnalysis.targets
deleted file mode 100644
index a87efed..0000000
--- a/Contracts/MsBuild/v14.0/Microsoft.CodeContractAnalysis.targets
+++ /dev/null
@@ -1,254 +0,0 @@
-
-
-
-
-
-
- $(PrepareForRunDependsOn);CodeContractsRunCodeAnalysisOnTarget;CodeContractsPerformCodeAnalysis
- $(IntermediateOutputPath)CodeContractAnalysisRun.log
-
-
-
-
-
- $(CodeContractsInstallDir)Bin\cccheck.exe
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- $([System.Environment]::GetEnvironmentVariable(`CodeContractsTargetMember`))
- $([System.Environment]::GetEnvironmentVariable(`CodeContractsTargetType`))
- $([System.Environment]::GetEnvironmentVariable(`CodeContractsTargetNamespace`))
- $([System.Environment]::GetEnvironmentVariable(`CodeContractsTargetProjectGuid`))
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- low
-
-
-
-
- low
-
-
-
-
- mediumlow
-
-
-
-
- medium
-
-
-
-
- full
-
-
-
-
- low
-
-
-
-
-
-
-
-
-
- noObl
-
-
-
-
-
-
-
-
-
-
-
-
-
- @(ContractDeclarativeAssembly->'%(RootDir)')@(ContractDeclarativeAssembly->'%(Directory)')
- @(ContractDeclarativeAssembly->'%(FullPath)')
- -platform "$(CodeContractsPlatformPath)"
- $(CodeContractCodeAnalysisOptions) -cclib "$(CodeContractsClassLibrary)"
- $(CodeContractCodeAnalysisOptions) -assemblyMode=standard
- $(CodeContractCodeAnalysisOptions) -maxwarnings 1200
- $(CodeContractCodeAnalysisOptions) -nonnull:noObl
- $(CodeContractCodeAnalysisOptions) -nonnull
- $(CodeContractCodeAnalysisOptions) -bounds:$(CodeContractsBounds) -arrays -wp=true -bounds:type=subpolyhedra,reduction=simplex,diseq=false
- $(CodeContractCodeAnalysisOptions) -buffers:type=subpolyhedra,fastcheck=false
- $(CodeContractCodeAnalysisOptions) -arrays -adaptive
- $(CodeContractCodeAnalysisOptions) -arithmetic
- $(CodeContractCodeAnalysisOptions) -enum
- $(CodeContractCodeAnalysisOptions) -check assumptions
- $(CodeContractCodeAnalysisOptions) -suggest asserttocontracts
- $(CodeContractCodeAnalysisOptions) -check conditionsvalidity
- $(CodeContractCodeAnalysisOptions) -missingPublicRequiresAreErrors
- $(CodeContractCodeAnalysisOptions) -missingPublicEnsuresAreErrors
- $(CodeContractCodeAnalysisOptions) -suggest calleeassumes
- $(CodeContractCodeAnalysisOptions) -suggest assumes
- $(CodeContractCodeAnalysisOptions) -suggest requires
- $(CodeContractCodeAnalysisOptions) -suggest methodensures -suggest propertyensures
- $(CodeContractCodeAnalysisOptions) -suggest necessaryensures
- $(CodeContractCodeAnalysisOptions) -suggest objectinvariants
- $(CodeContractCodeAnalysisOptions) -suggest readonlyfields
- $(CodeContractCodeAnalysisOptions) -infer requires
- $(CodeContractCodeAnalysisOptions) -infer methodensures
- $(CodeContractCodeAnalysisOptions) -infer autopropertiesensures
- $(CodeContractCodeAnalysisOptions) -infer objectinvariants
- $(CodeContractCodeAnalysisOptions) -cache
- $(CodeContractCodeAnalysisOptions) -forcecacheserver=true
- $(CodeContractCodeAnalysisOptions) -failOnWarnings
- $(CodeContractCodeAnalysisOptions) -cacheFileDirectory "$(CodeContractsCacheDirectory)"
- $(CodeContractCodeAnalysisOptions) -cacheVersion "$(CodeContractsCacheVersion)"
- $(CodeContractCodeAnalysisOptions) -cacheMaxSize "$(CodeContractsCacheMaxSize)"
- $(CodeContractCodeAnalysisOptions) -memberNameSelect:$(CodeContractsTargetMember)
- $(CodeContractCodeAnalysisOptions) -typeNameSelect:$(CodeContractsTargetType)
- $(CodeContractCodeAnalysisOptions) -lowScoreForExternal=false
- $(CodeContractCodeAnalysisOptions) -namespaceSelect:$(CodeContractsTargetNamespace)
- $(CodeContractCodeAnalysisOptions) -baseline "$(CodeContractsBaseLineFile)"
- $(CodeContractCodeAnalysisOptions) -cacheserver:$(CodeContractsSQLServerOption)
- $(CodeContractCodeAnalysisOptions) $(CodeContractsExtraAnalysisOptions)
- false
- true
- true
- false
-
-
-
- <_CodeContractsCCCheckArguments>-nobox -nologo -nopex -remote -suggest=!! -premode combined -suggest codefixes -framework:$(TargetFrameworkVersion) -warninglevel $(CodeContractsAnalysisWarning) $(CodeContractCodeAnalysisOptions) "-resolvedPaths:@(ReferencePath)" "-libPaths:@(CodeContractsAllLibPaths)" "$(DeclarativeAssemblyPath)"
-
-
-
- <_CodeContractsCCCheckArgumentLines
- Include="$(_CodeContractsCCCheckArguments)"
- />
-
-
-
-
-
-
-
-
-
diff --git a/Contracts/MsBuild/v14.0/Microsoft.CodeContracts.targets b/Contracts/MsBuild/v14.0/Microsoft.CodeContracts.targets
deleted file mode 100644
index f163ff5..0000000
--- a/Contracts/MsBuild/v14.0/Microsoft.CodeContracts.targets
+++ /dev/null
@@ -1,646 +0,0 @@
-
-
-
- True
-
-
-
-
-
- $(OutDir)CodeContractsDeclarative\
- CodeContracts\
- $(CodeContractsInstallDir)Bin\ccrefgen.exe
-
-
-
-
-
-
-
- $(CodeContractsInstallDir)Contracts\Silverlight\v5.0
-
-
-
-
-
-
- $(CodeContractsInstallDir)Contracts\Silverlight\v4.0\Profile\WindowsPhone
-
-
-
-
- $(CodeContractsInstallDir)Contracts\Silverlight\v4.0
-
-
-
-
-
-
- $(CodeContractsInstallDir)Contracts\Silverlight\v3.0
-
-
-
-
-
-
-
-
- $(CodeContractsInstallDir)Contracts\.NETFramework\v4.0
-
-
-
-
- $(CodeContractsInstallDir)Contracts\.NETFramework\v4.5
-
-
-
-
- $(CodeContractsInstallDir)Contracts\.NETFramework\v4.6
-
-
-
-
- $(CodeContractsInstallDir)Contracts\v3.5
-
-
-
-
-
-
-
-
-
- CodeContractsSlipInDefineSymbolDynamically;$(CompileDependsOn);CodeContractReferenceAssembly
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 4
-
-
-
-
-
- 4
-
-
-
-
- 3
-
-
-
-
- 2
-
-
-
-
-
- 1
-
-
-
-
- 1
-
-
-
-
- 0
-
-
-
-
-
-
-
-
- $(CompileDependsOn); CodeContractInstrument
-
-
-
-
- $(CompileDependsOn);ContractXmlDocumentation
-
-
-
-
-
- $(CodeContractRewriteOptions) "/framework:$(TargetFrameworkVersion)"
- $(CodeContractRewriteOptions) "/targetplatform:$(CodeContractsPlatformPath)"
- $(CodeContractRewriteOptions) "/contractLibrary:$(CodeContractsClassLibrary)"
- $(CodeContractRewriteOptions) "/assemblyMode=standard"
- $(CodeContractRewriteOptions) /publicsurface
- $(CodeContractRewriteOptions) /throwonfailure
- $(CodeContractRewriteOptions) /callsiterequires
- $(CodeContractRewriteOptions) /skipQuantifiers
- $(CodeContractRewriteOptions) "/rewriterMethods:$(CodeContractsCustomRewriterAssembly),$(CodeContractsCustomRewriterClass)"
- $(CodeContractRewriteOptions) $(CodeContractsExtraRewriteOptions)
- /level:$(CodeContractsRuntimeLevel) /nologo /rewrite $(CodeContractRewriteOptions) "/resolvedPaths:@(ReferencePath,';')" "/libpaths:@(CodeContractsAllLibPaths) " "$(TargetName)$(TargetExt)"
- $(CodeContractsInstallDir)Bin\ccrewrite.exe
-
- $(IntermediateOutputPath)$(TargetName).rewritten
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- <_CodeContractsCCRewriteArguments>$(CodeContractRewriteOptions)
-
-
-
- <_CodeContractsCCRewriteArgumentLines
- Include="$(_CodeContractsCCRewriteArguments)"
- />
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- $(TargetFrameworkSDKToolsDirectory)sn.exe
- $(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6 Tools\sn.exe
-
-
-
-
-
-
-
-
-
-
- <_CodeContractOutputDirectory Include="$(OutDir)$(CodeContractsContractSubDir)"/>
- <_ContractDummyReferenceAssembly Include="$(OutDir)$(CodeContractsContractSubDir)$(TargetName).noReferenceAssembly"/>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- <_CodeContractsCCRefGenArguments>"/resolvedPaths:@(ReferencePath,';')" "/libPaths:@(CodeContractsAllLibPaths) " /pdb "/out:@(ContractReferenceAssembly)" "@(ContractDeclarativeAssembly)"
-
-
-
- <_CodeContractsCCRefGenArgumentLines
- Include="$(_CodeContractsCCRefGenArguments)"
- />
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- <_CodeContractsBuildReferences
- Include="@(ReferencePath->'%(RootDir)%(Directory)')"/>
- <_CodeContractsBuildReferences
- Include="@(ReferencePath->'%(RootDir)%(Directory)CodeContracts')"/>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- $(CodeContractsInstallDir)Bin\ccdocgen.exe
-
-
-
-
-
- <_CodeContractsCCDocGenArguments>-assembly "@(ContractReferenceAssembly)" -xmlFile "@(DocFileItem)" "-resolvedPaths:@(ReferencePath)" -libpaths "@(CodeContractsAllLibPaths) "
-
-
-
- <_CodeContractsCCDocGenArgumentLines
- Include="$(_CodeContractsCCDocGenArguments)"
- />
-
-
-
-
-
-
-
-
-
- $(CodeContractsInstallDir)MsBuild\v14.0\Microsoft.CodeContractAnalysis.targets
-
-
-
-
-
diff --git a/Contracts/MsBuild/v15.0/Microsoft.CodeContractAnalysis.targets b/Contracts/MsBuild/v15.0/Microsoft.CodeContractAnalysis.targets
deleted file mode 100644
index 385b072..0000000
--- a/Contracts/MsBuild/v15.0/Microsoft.CodeContractAnalysis.targets
+++ /dev/null
@@ -1,254 +0,0 @@
-
-
-
-
-
-
- $(PrepareForRunDependsOn);CodeContractsRunCodeAnalysisOnTarget;CodeContractsPerformCodeAnalysis
- $(IntermediateOutputPath)CodeContractAnalysisRun.log
-
-
-
-
-
- $(CodeContractsInstallDir)Bin\cccheck.exe
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- $([System.Environment]::GetEnvironmentVariable(`CodeContractsTargetMember`))
- $([System.Environment]::GetEnvironmentVariable(`CodeContractsTargetType`))
- $([System.Environment]::GetEnvironmentVariable(`CodeContractsTargetNamespace`))
- $([System.Environment]::GetEnvironmentVariable(`CodeContractsTargetProjectGuid`))
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- low
-
-
-
-
- low
-
-
-
-
- mediumlow
-
-
-
-
- medium
-
-
-
-
- full
-
-
-
-
- low
-
-
-
-
-
-
-
-
-
- noObl
-
-
-
-
-
-
-
-
-
-
-
-
-
- @(ContractDeclarativeAssembly->'%(RootDir)')@(ContractDeclarativeAssembly->'%(Directory)')
- @(ContractDeclarativeAssembly->'%(FullPath)')
- -platform "$(CodeContractsPlatformPath)"
- $(CodeContractCodeAnalysisOptions) -cclib "$(CodeContractsClassLibrary)"
- $(CodeContractCodeAnalysisOptions) -assemblyMode=standard
- $(CodeContractCodeAnalysisOptions) -maxwarnings 1200
- $(CodeContractCodeAnalysisOptions) -nonnull:noObl
- $(CodeContractCodeAnalysisOptions) -nonnull
- $(CodeContractCodeAnalysisOptions) -bounds:$(CodeContractsBounds) -arrays -wp=true -bounds:type=subpolyhedra,reduction=simplex,diseq=false
- $(CodeContractCodeAnalysisOptions) -buffers:type=subpolyhedra,fastcheck=false
- $(CodeContractCodeAnalysisOptions) -arrays -adaptive
- $(CodeContractCodeAnalysisOptions) -arithmetic
- $(CodeContractCodeAnalysisOptions) -enum
- $(CodeContractCodeAnalysisOptions) -check assumptions
- $(CodeContractCodeAnalysisOptions) -suggest asserttocontracts
- $(CodeContractCodeAnalysisOptions) -check conditionsvalidity
- $(CodeContractCodeAnalysisOptions) -missingPublicRequiresAreErrors
- $(CodeContractCodeAnalysisOptions) -missingPublicEnsuresAreErrors
- $(CodeContractCodeAnalysisOptions) -suggest calleeassumes
- $(CodeContractCodeAnalysisOptions) -suggest assumes
- $(CodeContractCodeAnalysisOptions) -suggest requires
- $(CodeContractCodeAnalysisOptions) -suggest methodensures -suggest propertyensures
- $(CodeContractCodeAnalysisOptions) -suggest necessaryensures
- $(CodeContractCodeAnalysisOptions) -suggest objectinvariants
- $(CodeContractCodeAnalysisOptions) -suggest readonlyfields
- $(CodeContractCodeAnalysisOptions) -infer requires
- $(CodeContractCodeAnalysisOptions) -infer methodensures
- $(CodeContractCodeAnalysisOptions) -infer autopropertiesensures
- $(CodeContractCodeAnalysisOptions) -infer objectinvariants
- $(CodeContractCodeAnalysisOptions) -cache
- $(CodeContractCodeAnalysisOptions) -forcecacheserver=true
- $(CodeContractCodeAnalysisOptions) -failOnWarnings
- $(CodeContractCodeAnalysisOptions) -cacheFileDirectory "$(CodeContractsCacheDirectory)"
- $(CodeContractCodeAnalysisOptions) -cacheVersion "$(CodeContractsCacheVersion)"
- $(CodeContractCodeAnalysisOptions) -cacheMaxSize "$(CodeContractsCacheMaxSize)"
- $(CodeContractCodeAnalysisOptions) -memberNameSelect:$(CodeContractsTargetMember)
- $(CodeContractCodeAnalysisOptions) -typeNameSelect:$(CodeContractsTargetType)
- $(CodeContractCodeAnalysisOptions) -lowScoreForExternal=false
- $(CodeContractCodeAnalysisOptions) -namespaceSelect:$(CodeContractsTargetNamespace)
- $(CodeContractCodeAnalysisOptions) -baseline "$(CodeContractsBaseLineFile)"
- $(CodeContractCodeAnalysisOptions) -cacheserver:$(CodeContractsSQLServerOption)
- $(CodeContractCodeAnalysisOptions) $(CodeContractsExtraAnalysisOptions)
- false
- true
- true
- false
-
-
-
- <_CodeContractsCCCheckArguments>-nobox -nologo -nopex -remote -suggest=!! -premode combined -suggest codefixes -framework:$(TargetFrameworkVersion) -warninglevel $(CodeContractsAnalysisWarning) $(CodeContractCodeAnalysisOptions) "-resolvedPaths:@(ReferencePath)" "-libPaths:@(CodeContractsAllLibPaths) " "$(DeclarativeAssemblyPath)"
-
-
-
- <_CodeContractsCCCheckArgumentLines
- Include="$(_CodeContractsCCCheckArguments)"
- />
-
-
-
-
-
-
-
-
-
diff --git a/Contracts/MsBuild/v15.0/Microsoft.CodeContracts.targets b/Contracts/MsBuild/v15.0/Microsoft.CodeContracts.targets
deleted file mode 100644
index e1f3bdd..0000000
--- a/Contracts/MsBuild/v15.0/Microsoft.CodeContracts.targets
+++ /dev/null
@@ -1,646 +0,0 @@
-
-
-
- True
-
-
-
-
-
- $(IntermediateOutputPath)Decl\
- CodeContracts\
- $(CodeContractsInstallDir)Bin\ccrefgen.exe
-
-
-
-
-
-
-
- $(CodeContractsInstallDir)Contracts\Silverlight\v5.0
-
-
-
-
-
-
- $(CodeContractsInstallDir)Contracts\Silverlight\v4.0\Profile\WindowsPhone
-
-
-
-
- $(CodeContractsInstallDir)Contracts\Silverlight\v4.0
-
-
-
-
-
-
- $(CodeContractsInstallDir)Contracts\Silverlight\v3.0
-
-
-
-
-
-
-
-
- $(CodeContractsInstallDir)Contracts\.NETFramework\v4.0
-
-
-
-
- $(CodeContractsInstallDir)Contracts\.NETFramework\v4.5
-
-
-
-
- $(CodeContractsInstallDir)Contracts\.NETFramework\v4.6
-
-
-
-
- $(CodeContractsInstallDir)Contracts\v3.5
-
-
-
-
-
-
-
-
-
- CodeContractsSlipInDefineSymbolDynamically;$(CompileDependsOn);CodeContractReferenceAssembly
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 4
-
-
-
-
-
- 4
-
-
-
-
- 3
-
-
-
-
- 2
-
-
-
-
-
- 1
-
-
-
-
- 1
-
-
-
-
- 0
-
-
-
-
-
-
-
-
- $(CompileDependsOn); CodeContractInstrument
-
-
-
-
- $(CompileDependsOn);ContractXmlDocumentation
-
-
-
-
-
- $(CodeContractRewriteOptions) "/framework:$(TargetFrameworkVersion)"
- $(CodeContractRewriteOptions) "/targetplatform:$(CodeContractsPlatformPath)"
- $(CodeContractRewriteOptions) "/contractLibrary:$(CodeContractsClassLibrary)"
- $(CodeContractRewriteOptions) "/assemblyMode=standard"
- $(CodeContractRewriteOptions) /publicsurface
- $(CodeContractRewriteOptions) /throwonfailure
- $(CodeContractRewriteOptions) /callsiterequires
- $(CodeContractRewriteOptions) /skipQuantifiers
- $(CodeContractRewriteOptions) "/rewriterMethods:$(CodeContractsCustomRewriterAssembly),$(CodeContractsCustomRewriterClass)"
- $(CodeContractRewriteOptions) $(CodeContractsExtraRewriteOptions)
- /level:$(CodeContractsRuntimeLevel) /nologo /rewrite $(CodeContractRewriteOptions) "/resolvedPaths:@(ReferencePath,';')" "/libpaths:@(CodeContractsAllLibPaths) " "$(TargetName)$(TargetExt)"
- $(CodeContractsInstallDir)Bin\ccrewrite.exe
-
- $(IntermediateOutputPath)$(TargetName).rewritten
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- <_CodeContractsCCRewriteArguments>$(CodeContractRewriteOptions)
-
-
-
- <_CodeContractsCCRewriteArgumentLines
- Include="$(_CodeContractsCCRewriteArguments)"
- />
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- $(TargetFrameworkSDKToolsDirectory)sn.exe
- $(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.6 Tools\sn.exe
-
-
-
-
-
-
-
-
-
-
- <_CodeContractOutputDirectory Include="$(OutDir)$(CodeContractsContractSubDir)"/>
- <_ContractDummyReferenceAssembly Include="$(OutDir)$(CodeContractsContractSubDir)$(TargetName).noReferenceAssembly"/>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- <_CodeContractsCCRefGenArguments>"/resolvedPaths:@(ReferencePath,';')" "/libPaths:@(CodeContractsAllLibPaths) " /pdb "/out:@(ContractReferenceAssembly)" "@(ContractDeclarativeAssembly)"
-
-
-
- <_CodeContractsCCRefGenArgumentLines
- Include="$(_CodeContractsCCRefGenArguments)"
- />
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- <_CodeContractsBuildReferences
- Include="@(ReferencePath->'%(RootDir)%(Directory)')"/>
- <_CodeContractsBuildReferences
- Include="@(ReferencePath->'%(RootDir)%(Directory)CodeContracts')"/>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- $(CodeContractsInstallDir)Bin\ccdocgen.exe
-
-
-
-
-
- <_CodeContractsCCDocGenArguments>-assembly "@(ContractReferenceAssembly)" -xmlFile "@(DocFileItem)" "-resolvedPaths:@(ReferencePath)" -libpaths "@(CodeContractsAllLibPaths) "
-
-
-
- <_CodeContractsCCDocGenArgumentLines
- Include="$(_CodeContractsCCDocGenArguments)"
- />
-
-
-
-
-
-
-
-
-
- $(CodeContractsInstallDir)MsBuild\v14.0\Microsoft.CodeContractAnalysis.targets
-
-
-
-
-
diff --git a/Contracts/MsBuild/v4.0/Microsoft.CodeContractAnalysis.targets b/Contracts/MsBuild/v4.0/Microsoft.CodeContractAnalysis.targets
index ad5f2d6..385b072 100644
--- a/Contracts/MsBuild/v4.0/Microsoft.CodeContractAnalysis.targets
+++ b/Contracts/MsBuild/v4.0/Microsoft.CodeContractAnalysis.targets
@@ -143,7 +143,7 @@
Condition="'$(CodeContractsClassLibrary)' != ''">$(CodeContractCodeAnalysisOptions) -cclib "$(CodeContractsClassLibrary)"
$(CodeContractCodeAnalysisOptions) -assemblyMode=standard
- $(CodeContractCodeAnalysisOptions) -maxwarnings 400
+ $(CodeContractCodeAnalysisOptions) -maxwarnings 1200
$(CodeContractCodeAnalysisOptions) -nonnull:noObl
$(CodeContractCodeAnalysisOptions) -check assumptions
$(CodeContractCodeAnalysisOptions) -suggest asserttocontracts
- $(CodeContractCodeAnalysisOptions) -check conditionsvalidity
$(CodeContractCodeAnalysisOptions) -missingPublicRequiresAreErrors
@@ -170,29 +170,29 @@
Condition="'$(CodeContractsSuggestAssumptionsForCallees)' == 'true'">$(CodeContractCodeAnalysisOptions) -suggest calleeassumes
$(CodeContractCodeAnalysisOptions) -suggest assumes
- $(CodeContractCodeAnalysisOptions) -suggest requires
- $(CodeContractCodeAnalysisOptions) -suggest methodensures -suggest propertyensures
$(CodeContractCodeAnalysisOptions) -infer autopropertiesensures
- $(CodeContractCodeAnalysisOptions) -suggest methodensures -suggest propertyensures
+ $(CodeContractCodeAnalysisOptions) -suggest necessaryensures
- $(CodeContractCodeAnalysisOptions) -suggest objectinvariants
$(CodeContractCodeAnalysisOptions) -suggest readonlyfields
+ Condition="'$(CodeContractsSuggestReadonly)' == 'true'">$(CodeContractCodeAnalysisOptions) -suggest readonlyfields
$(CodeContractCodeAnalysisOptions) -infer requires
$(CodeContractCodeAnalysisOptions) -infer methodensures
$(CodeContractCodeAnalysisOptions) -infer autopropertiesensures
+ $(CodeContractCodeAnalysisOptions) -infer objectinvariants
$(CodeContractCodeAnalysisOptions) -cache
- $(CodeContractCodeAnalysisOptions) -forcecacheserver=true
- $(CodeContractCodeAnalysisOptions) -failOnWarnings
$(CodeContractCodeAnalysisOptions) -cacheFileDirectory "$(CodeContractsCacheDirectory)"
@@ -206,7 +206,7 @@
Condition="'$(CodeContractsTargetType)' != ''">$(CodeContractCodeAnalysisOptions) -typeNameSelect:$(CodeContractsTargetType)
$(CodeContractCodeAnalysisOptions) -lowScoreForExternal=false
- $(CodeContractCodeAnalysisOptions) -namespaceSelect:$(CodeContractsTargetNamespace)
$(CodeContractCodeAnalysisOptions) -baseline "$(CodeContractsBaseLineFile)"
diff --git a/Contracts/MsBuild/v4.0/Microsoft.CodeContracts.targets b/Contracts/MsBuild/v4.0/Microsoft.CodeContracts.targets
index 4f936e4..675adfb 100644
--- a/Contracts/MsBuild/v4.0/Microsoft.CodeContracts.targets
+++ b/Contracts/MsBuild/v4.0/Microsoft.CodeContracts.targets
@@ -5,11 +5,11 @@
- $(OutDir)CodeContractsDeclarative\
+ $(IntermediateOutputPath)Decl\
CodeContracts\
$(CodeContractsInstallDir)Bin\ccrefgen.exe
@@ -50,14 +50,14 @@
$(CodeContractsInstallDir)Contracts\.NETFramework\v4.0
-
+
$(CodeContractsInstallDir)Contracts\.NETFramework\v4.5
-
+
- $(CodeContractsInstallDir)Contracts\.NETFramework\v4.5
+ $(CodeContractsInstallDir)Contracts\.NETFramework\v4.6
@@ -77,7 +77,7 @@
VS property build pane picks it up and may persist it into the project
settings!
=====================================================================-->
-
+
CodeContractsSlipInDefineSymbolDynamically;$(CompileDependsOn);CodeContractReferenceAssembly
@@ -271,7 +271,7 @@
- "$(CodeContractsSdkPath)Bin\NETFX 4.0 Tools\sn.exe"
+
+ $(TargetFrameworkSDKToolsDirectory)sn.exe
+ $(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.6 Tools\sn.exe
+ Condition="'$(KeyOriginatorFile)' != ''"
+ Command='"$(CodeContractsSnExe)" /R "@(IntermediateAssembly)" "$(KeyOriginatorFile)"' />
+ Condition="'$(KeyContainerName)' != ''"
+ Command='"$(CodeContractsSnExe)" /Rc "@(IntermediateAssembly)" "$(KeyContainerName)"' />
-
+
-
-
+
-
+
@@ -528,7 +530,7 @@
NoWin32Manifest="$(NoWin32Manifest)"
Optimize="true"
OutputAssembly="@(ContractDeclarativeAssembly)"
- PdbFile="@(ContractDeclarativeAssemblyPDB)"
+ PdbFile="@(ContractDeclarativeAssemblyPDB)"
Platform="$(PlatformTarget)"
References="@(ReferencePath)"
Resources=""
@@ -546,8 +548,8 @@
Win32Icon=""
Win32Manifest="$(Win32Manifest)"
Win32Resource="$(Win32Resource)"
- />
-
+ />
+
@@ -628,17 +630,33 @@
/>
- $(CodeContractsInstallDir)MsBuild\v4.0\Microsoft.CodeContractAnalysis.targets
+ $(BuiltProjectOutputGroupDependsOn);_IncludeCodeContractIntoBuiltProjectOutputGroup
-
+
+
+
+
+ $(CodeContractsContractSubDir)%(Filename)%(Extension)
+ %(FullPath)
+ %(FullPath)
+
+
+
+
+
+
diff --git a/nuget/CodeContracts.MSBuild/build/CodeContracts.MSBuild.targets b/nuget/CodeContracts.MSBuild/build/CodeContracts.MSBuild.targets
index 0bca494..cff231d 100644
--- a/nuget/CodeContracts.MSBuild/build/CodeContracts.MSBuild.targets
+++ b/nuget/CodeContracts.MSBuild/build/CodeContracts.MSBuild.targets
@@ -1,7 +1,9 @@
-
+
$(MSBuildThisFileDirectory)..\Contracts\
+ <_CodeContractsBuildToolsVersion Condition="$(MSBuildToolsVersion) < 4.0">3.5
+ <_CodeContractsBuildToolsVersion Condition="$(MSBuildToolsVersion) >= 4.0">4.0
-
+
\ No newline at end of file