Using CustomParameter with Visual Studio Multi-Project Template

后端 未结 2 1433
不知归路
不知归路 2020-12-03 01:08

I would like to be able to create a Multi-Project Template for a solution which contains the following two projects (where the interface should include a reference to th

2条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-03 01:18

    Visual Studio 2013 Update 2 finally added a built-in way to do this with ProjectTemplateLink

    The CopyParameters attribute will enable child access to all the variables of the parent template, with the prefix of ext_.

    You don't even need CustomParameters for this. Change your ProjectTemplateLink to this:

    
      Interface\InterfaceTemplate.vstemplate
    
    

    And then you can achieve your goal in the child .csproj like so:

    
      
        {E5511F75-5B9C-4816-B991-E09225661CF4}
        MyTemplate.Business
      
    
    

提交回复
热议问题