Templates not showing up in Microsoft Visual Studi

2019-08-22 23:41发布

I just installed Visual Studio 2017 (Community). I'm trying to create a bot by using a template in C#.

I added the zip folder (the template) to C:\Users\NAME\Documents\Visual Studio 2017\Templates\ProjectTemplates\Visual C# and I'm trying to open it up by creating a new project.

The template doesn't show up at all.

Any ideas would be highly appreciated.

1条回答
▲ chillily
2楼-- · 2019-08-22 23:51

I got that to work on my side. How ..... after 5 hrs of trying.... and searching the web i did:

  1. Upgraded to latest version of Visual Studio Community 2017 with the installer in control panel.
  2. Did a Repair of Visual Studio Community 2017 with the installer in control panel.
  3. Then opened any C# project i had on hand and proceed with the export Template wizard.
    • check : Automatically import the template into Visual Studio
    • check : Display an explorer window on the output files folder

then waited..... then windows explorer opened with this path:

E:\Users\bern\Documents\Visual Studio 2017\My Exported Templates

with a zip file in it !!!! MYTESTTEMPLATE.ZIP just created

Then i when to the path

  • e:\Users\bern\Documents\Visual Studio 2017\Templates\ProjectTemplates listed in Visual studio TOOL/OPTION/Projects and solutions/Location

user project Templates location:

e:\Users\bern\Documents\Visual Studio 2017\Templates\ProjectTemplates

I saw again the zip files

MYTESTTEMPLATE.ZIP

  1. closed Visual Studio , re opened Visual studio
  2. BINGO! the template was listed under Visual C#

PS : sorry if it`s a marathon but it worked.

From there i proved to myself that it did at least worked with the wizard.

Now, for a template created manually from me just ZIPED and pasted in

user project Templates location: e:\Users\bern\Documents\Visual Studio 2017\Templates\ProjectTemplates

why it is not showing ???? continuing my investigation....

Then i managed to associate the file type *.vstemplate to open in Visual studio 2017. Opened both *.vstemplate file ( the test one and my manual one) to compare elements.

I did some cut and paste from the wizard template file into the manual template file just to make sure.

  1. Saved and zipped the manual template .
  2. copied the zip file in

    ** e:\Users\bern\Documents\Visual Studio 2017\Templates\ProjectTemplates** and copied in E:\Users\bern\Documents\Visual Studio 2017\My Exported Templates

  3. closed visual studio, open visual studio with a solution X.

  4. clicked ADD new Project

AND there it was , at the bottom of the list !!!! the template created with the wizard and my manual template created by hand... OUFFF.....

I could have maybe just said ....

copy your zip template in

** e:\Users*YOU*\Documents\Visual Studio 2017\Templates\ProjectTemplates** and E:\Users*YOU*\Documents\Visual Studio 2017\My Exported Templates

but it would not have given the process of investigation i when through .

I hope it will help some of you guys.

Thank you

查看更多
登录 后发表回答