visual-studio-templates

Is there a way to add conditions in vsTemplates? or a way to generate output projects based on user selections

纵饮孤独 提交于 2020-05-31 05:42:49
问题 I have a requirement to generate a custom projects template. I am showing the wizard (using vsix project) to the user which has three check boxes in which user can select one or many of them, based on the selection the number of projects need to be created. Suppose user choose one, then output solution must have one project. Suppose user choose any two, then output solution must have those two projects. At Present irrespective of selection three output projects are created. The root

How to add conditions in Visual Studio Template Schema and generate projects based on conditions

痴心易碎 提交于 2020-04-07 09:19:51
问题 I have a requirement to generate a custom project template using vsix and IWizard. Wizard will show three check boxes. for example (Bot, Tab , Chat). The output solution must have projects only for checkboxes selected in the wizard i.e if both Bot and Tab are selected then Bot.csproj and Tab.csproj projects will be generated in the solution. If all three of them are selected then all projects must be generated. Right now it generates all the projects irrespective of the selection because

Visual studio item template $safeitemname$ not working as expected

↘锁芯ラ 提交于 2020-02-26 09:45:28
问题 I'm creating a Visual Studio Item template to create a few files which depend on a 'container' file. The last file <ProjectItem SubType="Code" TargetFileName="$fileinputname$\I$fileinputname$ View.cs" ReplaceParameters="true">Container View.cs</ProjectItem> creates a view interface that expects a certain model type. However the $safeitemname$ parameter didn't work as I expected. Output Container View.cs file: public interface IIMy_Triplet_View : IView<IMy_Triplet_View_Model> { } Expected:

Visual studio item template $safeitemname$ not working as expected

只谈情不闲聊 提交于 2020-02-26 09:43:52
问题 I'm creating a Visual Studio Item template to create a few files which depend on a 'container' file. The last file <ProjectItem SubType="Code" TargetFileName="$fileinputname$\I$fileinputname$ View.cs" ReplaceParameters="true">Container View.cs</ProjectItem> creates a view interface that expects a certain model type. However the $safeitemname$ parameter didn't work as I expected. Output Container View.cs file: public interface IIMy_Triplet_View : IView<IMy_Triplet_View_Model> { } Expected:

Visual studio item template $safeitemname$ not working as expected

这一生的挚爱 提交于 2020-02-26 09:43:49
问题 I'm creating a Visual Studio Item template to create a few files which depend on a 'container' file. The last file <ProjectItem SubType="Code" TargetFileName="$fileinputname$\I$fileinputname$ View.cs" ReplaceParameters="true">Container View.cs</ProjectItem> creates a view interface that expects a certain model type. However the $safeitemname$ parameter didn't work as I expected. Output Container View.cs file: public interface IIMy_Triplet_View : IView<IMy_Triplet_View_Model> { } Expected:

Visual Studio Templates - custom parameters

ぃ、小莉子 提交于 2020-02-07 05:21:24
问题 I am using VS 2015 templates to create a project for me, within my C# classes I have substitutions like $projectname$ and they work great if I name my project like this - MyTemplatedProject . I use $projectname$ for the part of class names and namespaces. If I create generate a class like $projectname$Context , it becomes MyTemplatedProjectContext and all is well. But if I name my project MyTemplatedProject.FrontEnd I have problems with the classes that are generated because they have the .

WebApi2 in visual studio 2012

一笑奈何 提交于 2020-01-12 12:08:48
问题 How can I create a project that uses WebApi2 in visual studio 2012? Do I have to create with a blank project or do I have to create a MVC project? I don't want to install Visual Studio 2013 preview, please help. 回答1: You need to install ASP.NET and Web Tools 2013.1 for Visual Studio 2012 which adds the Web API 2 and MVC 5 templates 回答2: Create a MVC project, right-click to and select Create an MVC project Right click the project in solution explorer and select "Manage nuget packages" Select

Visual stuio template parameters not returning values?

北战南征 提交于 2020-01-04 04:26:46
问题 I'm trying to get these parameters while creating a visual studio template but it doesn't return a value, it just stays like this: string rootnamespace = $rootnamespace$; // this is the output, it just stays as it was declared string SpecificSolutionName = $SpecificSolutionName$; // this is the output, it just stays as it was declared According to msdn - Template Parameters: SpecificSolutionName: The name of the solution. When "create solution directory" is checked, SpecificSolutionName has

How to change Resources.resx template

泄露秘密 提交于 2019-12-24 09:38:11
问题 I want to change Resources.resx template. Whenever I add a new resource file it should show autogenerated code in following form: //------------------------------------------------------------------------------ // <auto-generated> // This code was generated by a tool. // Runtime Version:4.0.30319.296 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // </auto-generated> //--------------------------------------------------------------------

Custom templates for SSDT

巧了我就是萌 提交于 2019-12-23 17:25:02
问题 What is the correct folder name to store a custom Item Template for a SQL Server Data Tools Database Project? eg. What sub-folder should it live in under C:\Users\accountname\Documents\Visual Studio 11\Templates\ItemTemplates The SSDT-provided templates seem to be located under C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\Extensions\Microsoft\SQLDB\Extensions\SqlServer (For VS2010, substitute '10' for '11' in the paths above) 回答1: You save the Template RDL in C:\Program