$SpecificSolutionName$ is always empty. How can I tell if the user is making a new solution directory or not?

后端 未结 3 864
滥情空心
滥情空心 2020-12-22 01:25

In Visual Studio 2017, creating a C# Project Template project with the IWizard interface, I pop up my customised dialog to the user but I can\'t determine whether they\'ve p

3条回答
  •  天涯浪人
    2020-12-22 02:08

    Here's what works in VS2019:

    When the user checks the 'Place solution and project in the same directory' checkbox, $specifiedsolutionname$ is empty, and $solutiondirectory$ contains the path to the root folder where everything related to the new solution is placed. When unchecked, $specifiedsolutionname$ contains a 'solution name' specified by the user (which is the name of the sub-folder created under the solution root folder, and where project(s) are placed), and $destinationdirectory$ contains the correct path to the solution root folder.

    HTH

提交回复
热议问题