Introjucer and open in VS2010 Express

when I start the Introjucer, I have multiple project targets in the ‘Config’ panel.
If I want to open the Visual Studio 2010 project with the open button, it won’t do it
until there is a Visual Studio 2008 project. It works if I delete it.
I looked into the code and found this:

[code]ProjectExporter *ProjectExporter::createPlatformDefaultExporter(Project &project)
ScopedPointer best;
int bestPref = 0;

for (Project::ExporterIterator exporter(project);;)
    const int pref = exporter->getLaunchPreferenceOrderForCurrentOS();
	DBG(("pref = ") + String(pref))

    if (pref > bestPref)
        bestPref = pref;
		DBG(("bestPref = ") + String(bestPref))
        best = exporter.exporter;

return best.release();


‘pref’ get the number 4 for the 2008 project and a 3 for 2010 project.
I changed the number between the two projects and it works. But I don’t know,
if there other classes involved with this numbers (btw: I would prefer constants or enums).

[code]class MSVCProjectExporterVC2008 : public MSVCProjectExporterBase
MSVCProjectExporterVC2008 (Project& project_, const ValueTree& settings_, const char* folderName = “VisualStudio2008”)
: MSVCProjectExporterBase (project_, settings_, folderName)
name = getName();

static const char* getName()                    { return "Visual Studio 2008"; }
static const char* getValueTreeTypeName()       { return "VS2008"; }
int getVisualStudioVersion() const              { return 9; }

void launchProject()                            { getSLNFile().startAsProcess(); }

int getLaunchPreferenceOrderForCurrentOS()
    return 3; /* My change */
    return 0;


And, it would be nice to have the same name from the ‘Target Project Folder’ (right side) in the ‘Config’ tree, if there are
more than one project target for the same IDE.
Create two Visual Studio 2010 project targets and you see the name twice, whatever is in the ‘Target Project Folder’ named.


Fair point - actually, now that we have a list of exporters that can be re-arranged, it should probably just open the first one in the list rather than using different priorities. Thanks, I’ll change that.

Not sure about the importance of showing the folder in the tree… Will have a look at that.

I have tried to compile the changes with VS 2010 Express (Debug and Release) and I got two errors:

\introjucer\source\project saving\jucer_projectexport_msvc.h(58): error C2228: left of ‘.startAsProcess’ must have class/struct/union
\introjucer\source\project saving\jucer_projectexport_msvc.h(58): error C3861: ‘getSLNFile’: identifier not found


Sorry! Fixed now.

Thanks, now it works like your description: