public void RemoveReference(ProjectReference reference)
 {
     switch (reference.Kind)
     {
     case ProjectReferenceKind.ExtensionModule:
         if (_references != null && _references.Remove(reference) && _typeDb != null)
         {
             _typeDb.UnloadExtensionModule(Path.GetFileNameWithoutExtension(reference.Name));
             RaiseModulesChanged(null);
         }
         break;
     }
 }