SmartAssembly

Latest version: 6.7

SmartAssembly

Knowledge Base

SmartAssembly MSBUILD tasks failing because of difference in log4net assembly

Category: Troubleshooting & error messages
Date: 20 Mar 2012
Product: SmartAssembly
When building a Visual Studio project using SmartAssembly's MSBUILD integration, the following error may appear in the output window and the build will fail:

Could not load file or assembly 'log4net, Version=1.2.11.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

This issue has arisen because a common third-party logging component called Log4Net has changed their public key. For this reason, SmartAssembly cannot load log4net into Visual Studio's process if log4net has already been loaded with a different public key.

The current workarounds, until all Visual Studio components have updated their log4net assembly, are to either remove the conflicting add-in from Visual Studio or to switch SmartAssembly from using the MSBUILD component to using an EXEC task that runs SmartAssembly.com as a console application from MSBUILD.

Document ID: KB201203000522 Keywords: SmartAssembly,MSBUILD,Visual,Studio,build,integration

Was this article helpful?

Search support
Forums
Visit the SmartAssembly forum.

SmartAssembly

all products