开发者

Code analysis fails on project referencing obfuscated assembly

Visual Studio 2010 code analysis fails to run now that we've incor开发者_如何学Goporated a 3rd-party assembly into our project.

Project : error : CA0055 : Could not load C:\Programming\MyAssembly.dll.

Project : error : CA0052 : No targets were selected.

Project : error : CA0058 : The referenced assembly 'TheirAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=...' could not be found. This assembly is required for analysis and was referenced by: C:\Programming\MyAssembly.dll.

When opening the 3rd-party assembly Reflector gives the error:

Invalid number of data directories in NT header.

I've done some searching online and it appears that assembly is obfuscated.

Are there any ways around this? Can we exclude this assembly from code analysis?


We just ran into this on our build. We're incorporating a 3rd party comercial library into our code base.

To dodge the problem we've refactored out the code that calls against the referenced assembly into another project, called ProjectName.External, on which code analysis is disabled.

We can now leave code analysis enabled for most of the solution but it is disabled just for the calls that use the obfuscated dll.

Not the prettiest but it works for us.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜