From: Jeroen Mostert on
Jesse Houwing wrote:
> I've implemented a simple plug-in based file parser for a customer and
> I'm running into CA2001, which I'd like to solve.
>
It would have behooved you to spell out what CA2001 was. Would've saved me a
trip to Google.

For the rest of us, it's "Avoid calling problematic methods", blacklisting
several methods with problems, including Assembly.LoadFile().

> The problem is that I cannot find any information on how to solve this
> error, other than removing my call to Assembly.LoadFile.

Basically, it's because Microsoft wants you to use the GAC, or else muck
around with a new AppDomain. See
http://blogs.msdn.com/suzcook/archive/2003/05/29/57143.aspx and
http://blogs.msdn.com/suzcook/archive/2003/06/13/57180.aspx.

Personally, I'd just suppress the CA2001 warning. This is one area where
Microsoft's ideas of the perfect world just don't mesh with what people
actually want.

--
J.
 | 
Pages: 1
Prev: 17 KewaSa.com DDL Torrents
Next: Reading Folders