Comments (11)
@dotMorten This is by design actually, the vstemplate based model does not have the ability to use or surface any options on the additional information page. The additional information page is only accessible for .NET Core based templates via the preview feature.
However, as part of the preview feature we do have an IVsFilterNewProjectDlg filter which should be filtering out any vstemplate files invoking the TemplateEngineWizard in order to remove duplicates entries. Looking at the code though, the filter only applies if there is an explict CustomParameter specified
<CustomParameter Name="$uistyle$" Value="none"/>
I'll update the sample to reflect this. Let me know if explicitly setting the custom parameter works for you. This is the same mechanism we use to hide the other vstemplate stubs for .NET Core templates which are shipped in Visual Studio.
from templates.
@jeromelaban Yeah there's a few features missing. Personally my issue is I can't associate icons with the .NET Core templates. So I get this sort of terrible experience where the .net core based ones looks out of place:
@dotMorten My templateSample repo was created before we had support for .NET Core templates available directly in the project dialog and has not been significantly updated.
We actually do have support for custom icons. I describe the process to get them hooked up here:
https://github.com/phenning/templateSamples/wiki/Including-an-icon
from templates.
@dotMorten sorry about that, not sure how I missed that you already closed this.
from templates.
@phenning Thanks! I'll add that to mine as well.
from templates.
When we designed the core feature we didn't anticipate the importance of vsix containing templates. I'm now aware of several extensions that use this approach. It would be great to have a better story here. Next week I will discuss with Phil, and others, to see what all the options are. Ideally I'd like to be able to "discover" Template Engine templates when a vsix is installed. I haven't consulted anyone on this approach yet, so it may not be feasible. Once we discuss I will post an update here. I'd like to note that we are very busy with other work at the moment, so if we are able to come up with something, it will take time to implement. This likely will need updates from a few different teams, and that requires coordination, which lengthens the amount of time it takes to get anything done.
from templates.
I was not aware this was an option, though as far as Uno's templates are concerned, we're able to support more scenarios with "original" vsix templates, such as extended token to support spaces and dashes in project names, custom DTE post build actions and wizard extensions such as the certificate generator for UWP.
In order to support those vsix features, we're generating the "dotnet template" content from the vsix template by replacing tokens to what the templating engine expects.
Yet, it'd be a time saver to be able to use dotnet templates completely, particularly to get a proper experience on macOS and Linux, including getting options shown to the user where possible.
That being said, being able to bundle dotnet templates in a vsix has an ease-of-use aspect that is difficult to beat for VS users that are not particularly aware of CLI's dotnet new templates. Some more unification would be very welcome :)
from templates.
@jeromelaban Yeah there's a few features missing. Personally my issue is I can't associate icons with the .NET Core templates. So I get this sort of terrible experience where the .net core based ones looks out of place:
from templates.
And to comment on one other thing. The current implementation can discover template engine templates which are shipped via VSIX. The samples repo provides steps on how to do this. What is no longer needed with the new Visual Studio experience is the step to include the vstemplate breadcrumb file. All the other steps for generating the template package itself as well as the VSIX are still valid though.
from templates.
@dotMorten here are some docs you can take a loo at https://github.com/sayedihashimi/template-sample. There is also a template analyzer tool there.
from templates.
@dotMorten have you got this working now? If so, I believe that we can close this issue.
from templates.
@sayedihashimi Yup. I already closed it on Feb 28 btw :)
from templates.
Related Issues (20)
- defaultName option not working as expected with Item templates HOT 1
- Add i18n examples to templates
- Proposal: Two console templates: console & main HOT 2
- Inconsistent capitalisation of "Class library" template
- dotnet new command should work with the Name provided without the need to specify the name option (-n)
- Preprocessor directives within comments are also getting processed while invoking the dotnet new command
- Angular SPA template fails to start
- Angular SPA Template with Individual Auth doesn't work when the project name contains spaces HOT 2
- Add solution name to project name ? HOT 1
- Is it possible to create a user input parameter where multiple values can be entered seperated by a ";" ?
- EditorConfig Template description should be updated from `default` to `empty` HOT 1
- Introduce `dotnet new` templates for analyzers/codefixes, refactorings, and source generators
- [net8 preview 2] dotnet new command never finishes for unknown parameter condition evaluation HOT 4
- ASP.NET Core template should configure Data Protection API key storage
- Add a template for RESX files HOT 3
- SolutionName bind variable
- Update the class template to add the sealed modifier by default HOT 3
- Git option in templates
- All dotnet core templates should have docker-file support
- Let template access MSBuild properties.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from templates.