I have a (.NET 4) test project which references (the .NET 4) NSubstitute.dll.
When I run CodeAnalysis against the project I get a number of CA0001 errors:
Running Code Analysis...
MSBUILD : error : CA0001 : The following error was encountered while reading module 'NSubstitute': Could not resolve type reference: [mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]System.Runtime.CompilerServices.ExtensionAttribute.
MSBUILD : error : CA0001 : Rule=Microsoft.Interoperability#CA1404, Target=arcplan.test.engage.admin.ecmFramework.CAppSettingsTest.#IsSettingsStoreReadyToUse_SettingsStoreIsNotReady_ReturnsFalse() : The following error was encountered while reading module 'ECMFrameworkTest': Method type parameter in position 0 is not valid.
MSBUILD : error : CA0001 : Rule=Microsoft.Security#CA2122, Target=arcplan.test.engage.admin.ecmFramework.CAppSettingsTest.#IsSettingsStoreReadyToUse_SettingsStoreIsNotReady_ReturnsFalse() : The following error was encountered while reading module 'ECMFrameworkTest': Method type parameter in position 0 is not valid.
(etc.)
Does anyone know how to solve this?