Author Topic: B2: VS 2013 Solution detection fails (Win64)  (Read 3462 times)

Marcel

  • Senior Community Member
  • Posts: 166
  • Hero Points: 13
Re: B2: VS 2013 Solution detection fails (Win64)
« Reply #15 on: October 29, 2015, 03:01:43 pm »
RC3 has this fix:

"Options for choosing the Visual Studio version used for a Visual Studio solution has been added. By default, it looks for the tool set version used in one of the projects."

Where are these new options? I opened a .sln and didn't get to choose.

Lee

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1151
  • Hero Points: 107
Re: B2: VS 2013 Solution detection fails (Win64)
« Reply #16 on: October 29, 2015, 03:27:28 pm »
We were able to some tweaks to try to help this, but did not a chance to update documentation.  Is it still selecting the incorrect version of Visual Studio in your case?  At the very least, it should be picking the latest version of Visual Studio you have installed.

Marcel

  • Senior Community Member
  • Posts: 166
  • Hero Points: 13
Re: B2: VS 2013 Solution detection fails (Win64)
« Reply #17 on: October 29, 2015, 04:15:32 pm »
The machine I tested RC3 with had 2015 installed. The solution contains

Code: [Select]
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0.31101.0
MinimumVisualStudioVersion = 10.0.40219.1

RC3 picked toolset 12, it should "upgraded" to 14.  A manual override would have been very useful.

Btw, the compile/link tab in the project properties doesn't seem to do anything.

Lee

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1151
  • Hero Points: 107
Re: B2: VS 2013 Solution detection fails (Win64)
« Reply #18 on: October 29, 2015, 04:41:09 pm »
The updated version no longer relies on solution file.  It should not be looking there at all.  We did add a new def-var that will allow you to override, which is off by default.   On the SlickEdit command-line you can use:
Code: [Select]
set-var def_use_visual_studio_version 14
That should pick the Visual Studio 2015 toolset for building if devenv is not already found on PATH.  The updated version by default uses the following search:

1) If devenv is found in PATH, use the that version.
2) If def_use_visual_studio_version is set to non-zero use the toolset version specified (14 is Visual Studio 2015, 12 -> Visual Studio 2013, 11 -> Visual Studio 2012, 10 -> Visual Studio 2010).
3) Search vcxproj files for PlatformToolset. 
4) Use latest installed version of Visual Studio.

We also added an additional macro variable that sets the order of tests: def_auto_visual_studio_select.  This is a comma delimited string, and defaults to: project,latest,solution,prompt.

After checking PATH and def_use_visual_studio_version, it will use the checks defined in def_use_visual_studio_version
project:  Search vcxproj files for PlatformToolset setting.
latest:  Use latest installed version of Visual Studio.
solution:  Use version specified in .sln file (same method from)   
prompt:  Select version from installed versions of Visual Studio (new command: vstudio_select_environment)

You can re-order the tests in with this def-var, in case some would rather have it check solution first.  You would probably be best suited to use the def_use_visual_studio_version and just set it to the version you want.

Marcel

  • Senior Community Member
  • Posts: 166
  • Hero Points: 13
Re: B2: VS 2013 Solution detection fails (Win64)
« Reply #19 on: October 29, 2015, 05:29:02 pm »
Thanks Lee.
This appears to work for my VS 2015 scenario. I'll try a few more solutions.