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

后端 未结 3 867
滥情空心
滥情空心 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:21

    Finally, for a multi-project solution, here's what got me working:-

    Solution level (multi-project) template:-

    
        
            
                WebApp\MyTemplate.vstemplate
               .....
    

    Code level changes

    namespace $safeprojectname$
    

    Due to the 1st step, the project name now includes the solution name. At project level, the namespace and the assembly name should be ideally like that, without any requirement to separate out there.

    Let me know if this helps

提交回复
热议问题