PROBLEM: If you are trying to deploy a webpart from a Visual Studio solution and get this error...
Unable to add selected web part(s).
Assemblies that implement ASP.NET Web Parts and are installed into a partially trusted location, such as the bin directory, must be compiled with the AllowPartiallyTrustedCallers set for import to succeed.
FIX: Add the following to your AssemblyInfo.cs and recompile.
using System.Runtime.InteropServices;
[assembly: AllowPartiallyTrustedCallers]