I want to make a solution template for visual studio for Mac. IN window work for me but I would like to know how to do it for visual studio for mac
1 Answers
Currently you would need to create an extension for Visual Studio for Mac to add a new project template.
Then there are two options for how to create the project template. You can use the old templating engine which is documented on the MonoDevelop website.
Or you can use the new .NET Core templating engine to create a NuGet package. Then add some metadata to your extension's addin.xml file to get Visual Studio for Mac to use that project template.
<Extension path="/MonoDevelop/Ide/Templates">
<Template
id="Microsoft.Common.Console.CSharp"
_overrideName="Console Application"
_overrideDescription="Creates a new .NET Core console project."
path="Templates/Microsoft.DotNet.Common.ProjectTemplates.1.x.1.0.0-beta2-20170430-208.nupkg"
icon="md-netcore-console-project"
imageId="md-netcore-console-project"
category="netcore/app/general" />
</Extension>
I am also working on simplifying this for project templates you use locally with an template creator extension which is not yet published. This would allow you to right click an existing project or solution and then select Create Template and then it would be available in the New Project dialog for you to use.

- 47,057
- 5
- 93
- 94
-
I downloaded and tried the extension and it seems to work, thanks.This is great – Dagmar Fernandez Nov 03 '17 at 15:34
-
If you are on the master branch of the extension please be aware that there is a bug in the templating engine used by VS Mac which can cause the project files used by the template to be deleted if you build the original project. The templating engine if it finds any .dll files will just delete all the project files. There is the custom-categories branch where this is fixed. – Matt Ward Nov 03 '17 at 17:18