WebJul 3, 2011 · In this case, you should compare the name, not version (or not just version). In this case Assembly.GetName and Assembly.Location — it will give you the exact full path of the assembly's main executable module; you can extract the directory name using System.IO.Path.GetDirectoryName. WebAug 22, 2024 · As mentioned by @Ben, since you mention wanting to get the configuration information, use the ConfigurationManager class. Solution 3 To get the exact name …
How to extract assembly name from DLL file in C#
WebJul 3, 2024 · A really rough way to get all solution DLLs is actually to load them out of your bin folder. Something like : public static Assembly [] GetSolutionAssemblies () { var assemblies = Directory.GetFiles (AppDomain.CurrentDomain.BaseDirectory, "*.dll") .Select (x => Assembly.Load (AssemblyName.GetAssemblyName (x))); return … WebAug 22, 2024 · As mentioned by @Ben, since you mention wanting to get the configuration information, use the ConfigurationManager class. Solution 3 To get the exact name without versions, etc. use: string appName = Assembly. GetEntryAssembly (). GetName () .Name; Works with .NET v1.1 and later. View more solutions 66,227 Author by Michael Kniskern check att texts online
How to: Find an assembly
WebNov 16, 2024 · A Computer Science portal for geeks. It contains well written, well thought and well explained computer science and programming articles, quizzes and practice/competitive programming/company interview Questions. WebThe .Location property returns the location of the currently running DLL file. Under some conditions the DLL is shadow copied before execution, and the .Location property will return the path of the copy. If you want the path of the original DLL, use the Assembly.GetExecutingAssembly ().CodeBase property instead. check attribute python