0

Is there a way to modify the project template to change how the Visual Studio Xamarin (Shared PCL) Project Templates names the default project names? For example, in VS,

File->New Project->Cross-Platform->Blank App (Xamarin.Forms Portable) 

will create the following projects:

{SolutionName}
 + {AppName}
 + {AppName}.Droid
 + {AppName}.iOS

The physical file paths are the same as the solution/project structure. I'm wondering if it's possible to change the default names of the projects and folder for the physical files.

I've tried looking for the project templates in /common7/ide/projecttemplates, but I don't see anything relevant.

chad
  • 717
  • 1
  • 9
  • 23

2 Answers2

0

You can find the templates here:

C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Xamarin\Xamarin

Note: This is a path for VS 2015. You would need to go to the respective path version of VS.

In which you can select the latest version you have downloaded. i.e. 4.2.0.719

Inside you can then go to the T\PT\CSharp\Cross-Platform folder and find the template you're after.

Keep in mind that they might not be located here if you have older versions installed. They might actually be referenced in your earliest version.

EX:

4.1.2.18\T\~PC\PT\Cross-Platform\Xamarin.Forms.PCL.zip

Once inside this folder, you can edit the .vstemplate however you'd like for each project.

Jon Douglas
  • 13,006
  • 4
  • 38
  • 51
0

This is never-ending story. I suggest extract the project template change what you need and repackage as your custom template. This was for me the best method so far (last 6+ years).

So:

  1. locate the template
  2. unzip it into a folder
  3. edit template
  4. repackage (zip)
  5. redeploy (install/copy)
    My recommendation into place for custom templates Otherwise it will eventually be overwritten.
  6. rebuild template cache
    devenv /installvstemplates

Mine are in:

"%ProgramFiles(x86)%\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Xamarin\Xamarin\4.2.0.695\T\PT\CSharp"
moljac
  • 946
  • 9
  • 12