Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding Device-Binding Template to New VS Project Dialog #1173

Closed
shaggygi opened this issue Sep 3, 2020 · 10 comments
Closed

Adding Device-Binding Template to New VS Project Dialog #1173

shaggygi opened this issue Sep 3, 2020 · 10 comments
Labels
api-suggestion Early API idea and discussion, it is NOT ready for implementation blocked Issue/PR is blocked on something - see comments untriaged

Comments

@shaggygi
Copy link
Contributor

shaggygi commented Sep 3, 2020

What needs to be updated in order for the device binding template to show up in the new VS Project Dialog that is previewed in VS 16.8P2? I attempted to verify by installing locally again, but doesn't appear to show. I tried searching by textbox search and using the dropdowns (i.e. IoT, which is one of the categories we originally added in template.json).

Related content:
https://github.com/dotnet/iot/tree/master/tools/templates/DeviceBindingTemplate
https://devblogs.microsoft.com/dotnet/net-cli-templates-in-visual-studio/

@shaggygi shaggygi added the api-suggestion Early API idea and discussion, it is NOT ready for implementation label Sep 3, 2020
@sayedihashimi
Copy link
Member

The issue here has nothing to do with the template itself. The issue is that currently Visual Studio we do not support showing templates that have been installed via a folder path.

@shaggygi can you file a new developer community Suggestion, and then share the link with me? We can use that to track the status of getting this new feature added.

@shaggygi
Copy link
Contributor Author

shaggygi commented Sep 9, 2020

@sayedihashimi I just created suggestion.

https://developercommunity.visualstudio.com/content/idea/1179562/show-templates-installed-by-folder-path-in-vs-new.html

Thanks for reaching out. It will be helpful.

@sayedihashimi
Copy link
Member

@shaggygi thanks for the link, I have moved it to my team's area. Let's see how much interest we get from the community on that issue. The more interest, the easier it will be for us to get it prioritized.

@Ellerbach Ellerbach added blocked Issue/PR is blocked on something - see comments and removed untriaged labels Jul 1, 2021
@Ellerbach
Copy link
Member

[Triage] Blocked as waiting for the Visual Studio team to answer the suggestion.

@sayedihashimi
Copy link
Member

As I mentioned in my previous comment, Visual Studio doesn't support showing templates from a folder path. The template must be in a nuget package. In addition to this, I briefly looked at the template, and it isn't setup to properly support Visual Studio. You'll need to add an icon at least for VS support, but you may want to tweak additional things as well. I have some guidance over at https://github.com/sayedihashimi/template-sample on how to prep the templates.
After you have the template in a nuget package, it would be good to publish that to nuget.org so that users don't need to fork the repo to install the template.

Regarding building the template into Visual Studio, we are trying to simplify the built in templates and reduce the list of preinstalled templates. IMO it would be better to get this template to support Visual Studio and have users install from nuget.org for now. If the template becomes popular, or if there are a lot of requests to build it in (currently the score on the devcom issue is low), then we should consider the template to be built in.

cc @timheuer

@krwq krwq added the untriaged label Jul 7, 2021
@krwq
Copy link
Member

krwq commented Jul 7, 2021

marking as untriaged so that it shows again on our triage radar

@joperezr
Copy link
Member

joperezr commented May 5, 2022

[Triage]: We talked about this issue in our triage call. We don't think that the device-binding template should be part of the File-> New project because the percentage amount of people that would want to use that would be rather small. On the other hand, we think it would be rather useful to have a new project template for a IoT sample (which could very well be a blinking LED sample) which uses System.Device.Gpio, and have this project template be part of the VS File->New Project dialog. That way, our library will get more visibility by developers creating projects and finding that there are IoT templates now. @richlander is going to do some investigation for the feasibility of doing this.

@phenning
Copy link

Note that in Visual Studio 2022, we do support template engine base templates being used in the new project dialog via dotnet new --install [path]

@shaggygi
Copy link
Contributor Author

Does appear to now work in VS17. Use the following to add...

dotnet new -i C:\[PATH]\iot\tools\templates\DeviceBindingTemplate\dotnet_new_device-binding_csharp

@phenning
Copy link

@sayedihashimi , @shaggygi FYI, I resolved the Suggestion ticket as well, since we've had this since 17.0

@ghost ghost locked as resolved and limited conversation to collaborators Jun 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api-suggestion Early API idea and discussion, it is NOT ready for implementation blocked Issue/PR is blocked on something - see comments untriaged
Projects
None yet
Development

No branches or pull requests

6 participants