RemoveExternalReference not removing assembly

SyntaxEditor .NET Languages Add-on for Windows Forms Forum

Posted 8 years ago by Brook Hunter
Version: 4.0.0289
Avatar
Hello,

First off, let me say what a FANTASTIC component the ActiPro Syntax Editor for Winforms with the .NET Languages Add-On is. I've made a complex Visual Studio .NET 2010-like interface with it and it is hard to tell the difference between the two when I am using it!

Now my question: My application has a dialog box to remove assembly references from my "code project". When I do this, I would like the Intelliprompt for this assembly to immediately disappear. How can I do this?

Note: I am able to make the Intelliprompt disappear once the application is restarted by doing the following, but I want it to work without the application having to be restarted every time.

////////////////////////////////////////////////////////////////////
/// My "Intelliprompt Disappear on Application Restart" Solution ///
////////////////////////////////////////////////////////////////////

#1. When I press the "Remove Assembly Reference" button, I call this line of code:

_dotNetProjectResolver.RemoveExternalReference(myAssemblyReferenceFilePath);

#2. Then, on application close, I call:

SemanticParserService.Stop();
_dotNetProjectResolver.Dispose();
_dotNetProjectResolver.PruneCache();

#3. Then, on Application Start, I load up all the assemblies that are still in the my list (not the one I just removed) by calling:

_dotNetProjectResolver.AddExternalReference(myAssemblyReferenceFilePath);

////////////////////////////////////////////////////////////////////

Thanks is advance for any help!

Brook

Comments (2)

Posted 8 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Brook,

We're glad you're having a great experience with the product.

For your question, doing your first line (RemoveExternalReference call) should be enough to remove the assembly reference. If I run our .NET Reflection sample and then remove the System.Drawing reference using the toolbar button, hovering over Color in the sample code no longer shows quick info. We just call RemoveExternalReference there.


Actipro Software Support

Posted 8 years ago by Brook Hunter
Avatar
Hello ActiPro Software Support,

Thanks for the tip! I figured it out by looking at your sample.

I was passing the File Path of the assembly to the RemoveExternalReference() method, which doesn't work.

Your sample passes the Assembly.FullName to the RemoveExternalReference() instead of the file path to the assembly, which works perfectly.

Thanks again!

Brook
The latest build of this product (v2020.1 build 0400) was released 24 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.