Creating a VST3 AudioPluginInstance from filename


Using the code below I find I can load VST2 and AU plugins, but not VST3 plugins

void initialise (const String& commandLineParameters) override
    AudioPluginFormatManager formatManager;
    for (int formatIndex = 0; formatIndex < formatManager.getNumFormats(); ++formatIndex)
        if (AudioPluginFormat* format = formatManager.getFormat (formatIndex))
            DBG ("Loading " << format->getName() << "...");
            PluginDescription description;
            description.fileOrIdentifier = getFileForFormat (format->getName());
            if (ScopedPointer<AudioPluginInstance> plugin = format->createInstanceFromDescription (description, 44100.0, 1024))
                DBG ("Successfully loaded");
                DBG ("Failed to load");
            DBG ("");

After some debugging it seems that the the VST3 format wants some more details in the description for example if I add…

description.uid = 21727128; = "JUCE Project";

…the VST3 at least reports to load. However it’s unclear how I would fill this data using only a file path, without access to private functions in the VST3 format.

Is this a bug or am I using it wrong?