[Core/BuildTool] Dispose projects in a more convenient way