I have VS 2022 with dotnet 6. I want to create custom project templates.
- How do I package it, so that my peers can just use it in their machine ? (I tried VSIX but I think it does not support dotnet 6 yet)
- Also, I want to use custom variables. e.g. if I create a project with name
XYZ,
the controller name should be 'XYZController'. and I want to use this variable value across multiple places within the project.
There is a comprehensive documentation for creating a custom template. Here is the steps for packageing:
The
.csprojfile is slightly different from a traditional code-project.csprojfile. Note the following settings:See this for a working example.