I use Addin in VS 2010 and VS Package (vsix) in VS 2012. Addin and VSPackage uses common libraries.
I need detect if the library code (in execution time) is executed by Addin OR VSPackage.
Now, I have this code, but always true for Addin AND VSPackage
public static bool VSAddinVSPackageMode
{
get { return (System.Diagnostics.Process.GetCurrentProcess().ProcessName == "devenv"); }
}
I would like
public static bool VSAddinMode { get { ... } }
public static bool VSPackageMode { get { ... } }
Any suggestions for do best way about it?