When Code Analysis complaints about different versions of assemblies

If Code Analysis is making you have a bad time with your build agent (for example, TFS build agents), it may complain with the following message.

Code Analysis detected errors. See Code Analysis results window or log file for details.

Bla bla bla could not be found. This assembly is required for analysis and was referenced by ble ble ble.

Clipboard01

Put this line in the *.csproj that is failing in under the build configuration that is being built in the build agent.

<CodeAnalysisAdditionalOptions>/assemblyCompareMode:StrongNameIgnoringVersion</CodeAnalysisAdditionalOptions>

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s