visual studio 2013 - Project template: file's replacement with TargetFileName -


i'm trying make template project's name user provide on "add-new project" affect file name. discribed here, should rather easy. nothing in vstemplate file won't modify file name, thought should.

vstemplate relevant section:

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

i expect after vsix (which referencing c# project template) installed, , when adding new project newly created template, creation failed error:enter image description here

i tried modify csproj file, unsuccessful too: did create project, desired replacement wasn't executed.

does file renaming vstemplate doable??

the csproj-file referencing in project node in vstemplate-file needs extra file, not csproj-file referenced in template project' solution.

also add reference $safeprojectname$class1.cs csproj-file. should work expected.

so file structure in template project example:

/ -- /properties           -- assemblyinfo.cs -- project.csproj               [the 1 referenced in .sln] -- projecttemplate.csproj       [the 1 used replacements] -- class1.cs 

Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -