DaveB Posted February 22 Posted February 22 (edited) I am building a .NET app for ACAD 2024 and have a question about dependent DLLs. In the Initialize method of my IExtensionApplication app I have this... public void Initialize() { var editor = AcadLib.Instance.Editor; editor.WriteMessage("\nLoading SuperDuperApp v2024.2... "); try { var executingAssemblyLocation = Assembly.GetExecutingAssembly().Location; var baseDirectory = Path.GetDirectoryName(executingAssemblyLocation); editor.WriteMessage("\nSuperDuperApp Support Assemblies... "); // support assemblies TryToLoadAssembly($"{baseDirectory}\\Csv.dll"); TryToLoadAssembly($"{baseDirectory}\\CommonServiceLocator.dll"); This way I should only need to load the top level DLL (automatically, or otherwise) and everything dependent loads during initialization. This is a WPF app living in a palette set and using MVVM. I am using the older Galasoft MVVMLight library because I've found ACAD really doesn't like the newer community version. Too bad. That CommonServiceLocator is being a problem though. If I don't have the directory with my app in it in the support file search path, ACAD complains that my ViewModelLocator class can't find the CommonServiceLocator, despite it being pre-loaded into the .NET sandbox. Is there a way to specify a search location or should I just let everything load on demand by going through the support search path? Edited February 22 by DaveB Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.