To get the Calling Assembly in C# or VB.NET you can use Reflection.
Sample C#
using System.Reflection;
public static string GetCallingAssemblyName()
{
var callingAssembly = Assembly.GetCallingAssembly();
return callingAssembly.FullName;
}
Sample VB.NET
Imports System.Reflection
Public Shared Function GetCallingAssemblyName() As String
Dim callingAssembly = Assembly.GetCallingAssembly()
Return callingAssembly.FullName
End Function
for more informations see the MSDN: Reflection (C# and Visual Basic), Assembly.GetCallingAssembly Method
RT @CodeSnippetsNET: How to get the Calling Assembly in C# or http://t.co/85naMTtT4u: http://t.co/KeyQ50osVE #csharp #programming #dotnet
RT @CodeSnippetsNET: How to get the Calling Assembly in C# or http://t.co/85naMTtT4u: http://t.co/KeyQ50osVE #csharp #programming #dotnet