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

A Visual Studio template in addition to CLI #555

Closed
Happypig375 opened this issue Aug 26, 2019 · 4 comments
Closed

A Visual Studio template in addition to CLI #555

Happypig375 opened this issue Aug 26, 2019 · 4 comments
Labels
a/templates The issue is regarding the templates t/discussion A subject is being debated

Comments

@Happypig375
Copy link

Just like Avalonia.
https://marketplace.visualstudio.com/items?itemName=AvaloniaTeam.AvaloniaforVisualStudio&ssr=false#qna
image

@TimLariviere
Copy link
Member

As nice as it sounds, in my opinion it is actually not something we should do.

Unfortunately Visual Studio Templates are extremely limited.
There's 2 ways to write templates for Visual Studio, the simplest is by wrapping our solution in a zip file, the other is to write an actual VSIX (Visual Studio extension) which is definitely way harder.

The zip file way is almost useless when you want to go beyond "copy-paste-rename".

  • You have to use specific tokens in the file names and source code to make sure it will be replaced at creation time (like the project name).
  • These tokens break your code, making it not testable (like our templates)
  • There is no built-in tools to help automating the conversion of a valid project into a VS template zip.
  • You can't do conditionals (so we can't reuse our flags --WPF --GTK)

The wizard way (VSIX) would be better to handle that.
But still, it would be redeveloping dotnet new for not much added value...

The best solution for us would be that Visual Studio finally support dotnet new out of the box.
Jetbrains Rider already supports that to some extent.

And with the upcoming of .NET 5, I would dare to say that Visual Studio will most likely add that feature in a not too distant future.

@TimLariviere TimLariviere added a/templates The issue is regarding the templates t/discussion A subject is being debated t/enhancement New feature or request proj/xamarinforms labels Aug 28, 2019
@Happypig375
Copy link
Author

The corresponding issue dotnet/templating#481 has been open for 2 years with no updates.

@TimLariviere TimLariviere removed proj/xamarinforms t/enhancement New feature or request labels Feb 18, 2020
@TimLariviere
Copy link
Member

Seems like Visual Studio will finally display .NET Core templates in its New Project dialog in 16.8
https://twitter.com/timheuer/status/1298716833852166144?s=20

@TimLariviere
Copy link
Member

We will keep using dotnet new templates for now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a/templates The issue is regarding the templates t/discussion A subject is being debated
Projects
None yet
Development

No branches or pull requests

2 participants