Projucer adds Platform Toolset improperly?

We’re updating to Projucer / newer versions and I’m seeing that Platform Toolset is now written differently causing issues?

Steps to reproduce:

  • Create new Dynamic Library project

  • Add VS2015 target

  • Set platform toolset to v140_xp

  • Save and open in VS2015

  • Open project properties and set “Use of MFC” and change it to something else.

  • Try to Apply/OK.

I’m getting “An Error has occurred while saving the edited properties listed below: One or more values are invalid. Value cannot be null. Parameter name: userSuppliedValue”

I can’t really see what we changed in storing the platform toolset. Can you give me a hint?

I have yet to look at it, I’ll sure let you know when / if I see the blame.

But at least on 2 machines here the above recipe does produce it vs JUCE 4.1 introjucer projects.

There was something wonky about it before - I couldn’t change the toolset from inside Visual Studio if the project file was created by the jucer

Workaround: Set projucer toolset to default and then change toolset and MFC (this is another missing piece with current JUCE project exporter), then you can change all without a problem.

Diffing files shows the following:
Latest JUCE uses " />" instead of "/>" (that’s what VS2015 at least uses)
It’s weird because except of toolset and those additional whitespaces (and newline eof and from the xml header) I don’t see anything that might cause this.

Also tried VS2013 exporter and had same results.

Hmmm that is super odd. xml shouldn’t really depend on a whitespace being in front of the closing tag. Maybe it’s worth filing this bug to Microsoft. In my experience they are super responsive.

FYI, I’ve just hit this same problem and I think I know how to solve it, although I haven’t seen in a project created with Projucer, but rather in a older VS 2013 project when opened for the first time in VS2015 for upgrade.

The project had its “Platform toolset” set to “Visual Studio 2013 - Windows XP (v120_xp)”

Upon first opening in VS 2015, the import procedure prompted me to update that setting to the current toolset, which i did.

After that, the property page for the project looked like this

As you can see, it correctly detected that I wished to have XP support, and it updated the toolset to “Visual Studio 2015 - Windows XP (v140_xp)

Since that moment, I have been unable to change and apply any other setting, getting the “Value cannot be null” error message above.

After some hours of struggling and investigating, turns out that the cause are those two fields that you see at the top of that property window, i.e. “Target Platform” and “Target Platform Version”. Those two are fields that are added when you switch to a VS2015 toolset (they weren’t there before), and it turns out that the version field cannot be empty, and that one is the one that triggers the error.

Ok, so what value should be written there? I think it should be set to “8.1” for Windows desktop executables (even on Windows 10), and I have checked that in two ways:

  1. I have created a new pristine empty project with Visual Studio 2015 on Windows 10, and I got a nice 8.1 for that field.

  2. I updated a project that DIDN’T have XP support required in its toolset, and in that case VS 2015 updated the project by changing the toolset to 2015 and setting a 8.1 value for the Target Platform Toolset Version.

So, I have set it to 8.1 manually for all build configurations in my projects (see below) and it worked flawlessly, i.e. after that I have been able to change and apply all settings as needed.

Bonus points: if, at that point, you set the toolset to 2015 without XP support (see image below), it seems that Visual Studio recognizes that combination and puts a (unchangeable) “Windows” value for the “Target Platform”

I’ll leave it to the JUCE team to figure out how that setting translates inside the .vxcproj file, but I think that if Projucer adds it, this will be solved.

1 Like

I’ve had the same issue and following the instructions given by Yfede seems to have solved it. I had previously switched to v140_xp i in the Projucer in attempt to get my plugin working on Win7.

Changing the Target Platform Version to 8.1 in VS and then changing the toolset back to v140 in the Projucer seemed to solve it - I could however not get “Windows” to show up in Target Platform by changing the toolset in VS, it had to be in the Projucer.

Would be great with an update in the Projucer to handle this problem :slight_smile: