❔ Is it possible to add project template inside a solution/multi-project template in Visual Studio
Yes, of course you can have multiple projects under one solution 🙂
12 Replies
You can add them either by using CLI od VS 2022
In CLI type command dotnet sln YourSln.sln add YourProject.csproj (if C#)
In VS
Right Click on Solution in Solution Explorer -> Add -> New/Existing Project
Wdym "`item template"?
Yes I know, but my question is specific to templates.
Do you want to have different project's e.g. console app proj and unit tests proj in one solution?
An item template can be a class template.
Not exactly like that
A project template example can be choosing ASP.net Web Api when you click on create project from visual studio. It then gives you a weather forecast example which already includes a controller, class, settings file and swagger
So you want a project and a class in one solution?
For example ofc
yeah
in a way,
My solution will also be a template, and inside the solution I want to create different projects which are also in template format
May I ask why? 😄
I don't think it's possible according to official documentation
What are Visual Studio solutions & projects? - Visual Studio (Windows)
Learn about Visual Studio projects and solutions, how to create new projects from a template, and how to view & manage projects in Solution Explorer.
Templates are useful to cut repetitive work. Its a time optimization, so devs can concentrate on the actual logic
it is very possible to create a solution template, but what I am wondering is if it possible to create project templates inside the solution template
Ok, I get it. Have you solved it?
No
I still havent find a way to create templates inside a solution template
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.
Was this issue resolved? If so, run /close
- otherwise I will mark this as stale and this post will be archived until there is new activity.