Is it possible to add custom scaffolding templates to Visual Studio 2017 community for things like MVC Controllers and Views?
I've seen a number of tutorials which suggest adding custom templates to the following locations but nothing seems to work:
C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Web\Mvc\Scaffolding\Templates
C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\ItemTemplates\CSharp\Web\MVC 4\CodeTemplates
C:\Users\<user>\.nuget\packages\microsoft.visualstudio.web.codegenerators.mvc\2.0.4\Templates
For example, if I want to add a new Controller via the right-click menu, any custom templates added to the above locations just do not show. Likewise the View templates do not appear either.
Ok, so the following steps work:
Copy the Templates folder from the following location to the root of the project directory:
C:\Program Files\dotnet\sdk\NuGetFallbackFolder\microsoft.visualstudio.web.codegenerators.mvc\<version>
In VS2017, when adding a Controller or View, the selected scaffold is then brought in from the local Template directory residing within the project. These can be tweaked and changed as necessary.
It looks as though it is not possible to "add" to the scaffold list.
Related
I've got an Entity Framework Core 2.1 project in which for some reason VS has decided to spam my solution items with dlls, props and target files as you can see below.
Is there any way to hide these files? Strangely enough they're not even in that file location.
I'm using a scaffolding in visual studio 2017 now, but I want to set up my own scaffolding template and controller and I want to replace the previous one
Play around with all MVC templates at C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\ItemTemplates\CSharp\Web\MVC\1033
Refer: How do I create my own Scaffold Template in ASP.NET MVC 3?
I have a template that needs to be edited (new logo and color scheme).
I cannot find a way to edit the current template. The template is located in "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\PrivateAssemblies\ProjectItems\ReportProject", however when I try to open the template, I get an error.
I cannot open it in SSRS by going to File >> Open.
Searching on the internet did not show me how to edit an existing template, only how to create a new one.
I am currently using visual studio 2010.
I will go around. First create a project in your visual studio and add your template as existing item to your reports. Edit the report and save it back to the desired folder.
How do I add a new Template-type in the tree view of Visual Studio 2013 available templates?
If one clicks on New Project, on the right hand side pane of the next window which opens, is a list of the available templates offered by Visual Studio, such as those categorized under Visual C#, Visual C++ etc.
I wish to add a similar template in the tree view. Is there a way to achieve that?
Private templates go in (but adjust the C:\Users\{{username}} as necessary):
C:\Users\{{username}}\Documents\Visual Studio 2013\Templates\ProjectTemplates\Visual C++ Project\
Public templates go subdirectories of:
{{VisualStudioInstallationDirectory}}\Common7\IDE\ProjectTemplates\{{Language}}
See here for more details.
I created a custom SSRS template and it works if I use new item; however, most of our developers use the new report wizard. Is there a way to get customer templates to appear in that list (Ocean, Generic, Corporate, Slate, etc.)?
Thnaks
Mark
I don't know many of the details of what is permitted in the style definition, but the file to edit is C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\PrivateAssemblies\Business Intelligence Wizards\Reports\Styles\en\StyleTemplates.xml
I'm surprised to see that Microsoft does acknowledge (support?) that this file can be edited:
http://technet.microsoft.com/en-us/library/ms160326(v=sql.105).aspx
You can alter existing templates or add new ones by editing the
StyleTemplates.xml file in the \Program Files\Microsoft Visual Studio
9.0\Common7\IDE\PrivateAssemblies\Business Intelligence Wizards\Reports\Styles\ folder, where is the language you
are using (for example, if you are using the English language version
of Visual Studio, the folder name is "EN"). This folder is located on
the computer on which Report Designer is installed. NoteNote There are
two copies of the StyleTemplates.xml file. To modify the styles that
are applied through the Report Wizard, edit the file that is in the
folder created for the language you are using.
Being able to update StyleTemplates.xml was helpful, but to add default Page Headers and Footers you need to update Report.rdl
For the version of SSRS listed in the answers below, this file should be found in the following location:
C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\PrivateAssemblies\ProjectItems\ReportProject\Report.rdl
I had to make my changes in another folder, then copy the file back into this directory.
source: http://www.powerpivotblog.nl/sql-server-reporting-services-ssrs-templates-and-styles/