Skip to content

Unclear how to create custom templates #51380

@MarvinKlein1508

Description

@MarvinKlein1508

Type of issue

Missing information

Description

I want to create my own custom template, and I came across this documentation by accident while browsing:
https://github.com/dotnet/templating/tree/main/dotnet-template-samples

Via Google, I only found these two articles, which seem to be outdated:

Finally, I came across what I believe to be the most recent documentation here:
https://learn.microsoft.com/en-us/dotnet/core/tools/custom-templates

However I don't get how to start in this process even with the most basic example.

The docs are showing a very basic structure

Image

However there is no mentioning on how to do this. Do I need to create the .csproj file manually in VSCode? Can this process be done via Visual Studio at all?

I triey to follow along by manually creating a .csproj file and copying in the content from the docs. But for some reason it automatically generates a .sln file and bin + obj directories.

What is the supposed way to get a very basic template working like from the docs?

Page URL

https://learn.microsoft.com/en-us/dotnet/core/tools/custom-templates

Content source URL

https://github.com/dotnet/docs/blob/main/docs/core/tools/custom-templates.md

Document Version Independent Id

d6e6f989-3956-6a0e-5e9c-fb3d1f9bd751

Platform Id

5cc9715f-21d2-827f-38fe-398b5dbefbc4

Article author

@adegeo

Metadata

  • ID: 4e7deb06-37bb-b659-7cf3-9c47a91e065e
  • PlatformId: 5cc9715f-21d2-827f-38fe-398b5dbefbc4
  • Service: dotnet-fundamentals

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions