In the 2018.1 documentation there is a typo:
Assembly Reference Cleanup
When an IProjectAssembly is no longer needed in your application, it is a good idea to its AssemblyReferences collection. When an assembly repository is used (described later in this topic), it will often track the reference count of an assembly. While that reference count remains above zero, it will track data for the assembly. When the reference count returns to zero, it will close up any open cache files or other resources that it may have open for the assembly.
Thus it is very important to clear the assembly references collection on a project assembly prior to the project assembly going out of scope, so that memory and resources for its referenced assemblies can be reclaimed when appropriate.
- I assume the word "cleanup" is missing?
- What is recommendation to remove an assembly reference? Use, e.g.,
The Remove wants an IProjectAssemblyReference object though. I'm having a difficult time navigating the object model from a string "assembly name" -> an IProjectAssemblyReference object.