c# - VSIX project template add inside vstemplate a new projectitem -


i'm creating project template in visual studio 2015 vsix project , linked c# class library project should template if i'm creating new project.

in c# class library project in .vstemplate file want add folder and/or file put myself there. add items project in vs.

  <templatecontent>     <project file="projecttemplate.csproj" replaceparameters="true">       <projectitem replaceparameters="true" targetfilename="properties\assemblyinfo.cs">assemblyinfo.cs</projectitem>       <projectitem replaceparameters="true" openineditor="true">class1.cs</projectitem>     </project>   </templatecontent> 

this part of automatically generated .vstemplate file.

now want add file created "usercontrol1.cs" , want add this:

  <templatecontent>     <project file="projecttemplate.csproj" replaceparameters="true">       <projectitem replaceparameters="true" targetfilename="usercontrol1.cs">usercontrol1.cs</projectitem>       <projectitem replaceparameters="true" targetfilename="properties\assemblyinfo.cs">assemblyinfo.cs</projectitem>       <projectitem replaceparameters="true" openineditor="true">class1.cs</projectitem>     </project>   </templatecontent> 

but when install vsix template don't see usercontrol1.cs there.

is there problem in .vstemplate file?

thanks help.

hannes. h

what coincidence! facing same problem....

but hey, figure out already: need add .csproj file well!

<itemgroup>     <compile include="class1.cs"/>     <compile include="properties\assemblyinfo.cs"/>     <compile include="usercontrol1.cs"/> </itemgroup> 

for example in case.

cheers


Comments

Popular posts from this blog

magento2 - Magento 2 admin grid add filter to collection -

Android volley - avoid multiple requests of the same kind to the server? -

Combining PHP Registration and Login into one class with multiple functions in one PHP file -