1

I want to prepare a general visual studio solution in c# programming language. But any user will download it a custom name. Is this possible. For example, my own project is prepered and filled like this:

ECommerceInfrastructure (vs solution)
   WebApi (Project)
     files and folders
   Database (class library)
     files and folders
   Tools (class library)
     files and folders

Wen a user want s to download it from my server, he can select a custom project name. For example he selected a name "ToysShop". So he will download it:

ToysShop(vs solution)
   ToysShop.WebApi (Project)
     files and folders
   ToysShop.Database (class library)
     files and folders
   ToysShop.Tools (class library)
     files and folders

Is this possible? How can I do it? (the files and folders namespaces will adjust as well).

barteloma
  • 6,403
  • 14
  • 79
  • 173

1 Answers1

1

I would look into using the dotnet CLI to create the template project. You provide the structure and then process the files for renaming, etc. when the project is created.

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

The template can be a NuGet package which give you the ability to distribute via remote or local options (file system or http).

Ken Brittain
  • 2,255
  • 17
  • 21
  • I have explored a bit about templates. The custom tremplate solves my first step. I can create a custom template now. But this teplate should be download from my server, if user is a member of my web site. And the solution project name will be get from user. Is it possible to create a solution from web site and download it? – barteloma Dec 14 '19 at 16:08