Visual Studio Development Bookmark and Share   
 index > Visual Studio Guidance Automation Toolkit > Cannot use customized Visual Studio 2008 template
 

Cannot use customized Visual Studio 2008 template

Hi,

I've created a template from a project using the Export Template wizzard. That all works fine. Now I would like to edit the .vstemplate file in order to rename the files of the project when it is created from the template. To do that, I've changed the TargetFileName attribute in the ProjectItem tag in the .vstemplate-file. However, as I do that, I get an exception when trying to create a project from the template. I doesn't matter if I use parameter names, i.e. $safeprojectname$ or any other name (except the original one) in the .vstemplate-file, it all crashes. Nor does it matter if I have spaces in the project name that I want to create.

The exception thrown says: Error HRESULT E_FAIL has been returned from a call to a COM component.

I'm running this as administrator.

Any ideas?
rhevin  Wednesday, May 13, 2009 3:43 PM
After even more searching I actually found the solution on another forum here:
http://forums.asp.net/t/941773.aspx?PageIndex=1

The problem was that I hadn't changed the referencing file names in the project file to the ones in the TargetFileName attribute. After that, everything was OK!
  • Marked As Answer byrhevin Tuesday, May 19, 2009 7:00 AM
  •  
rhevin  Tuesday, May 19, 2009 7:00 AM
After even more searching I actually found the solution on another forum here:
http://forums.asp.net/t/941773.aspx?PageIndex=1

The problem was that I hadn't changed the referencing file names in the project file to the ones in the TargetFileName attribute. After that, everything was OK!
  • Marked As Answer byrhevin Tuesday, May 19, 2009 7:00 AM
  •  
rhevin  Tuesday, May 19, 2009 7:00 AM

You can use google to search for other answers

Custom Search

More Threads

• Getting the project object after Add New Project?
• How to generate code for a method in an existing class using T4 Template
• How can you skip the UI when you run a recipe?
• What is the benefit of using GAT versus implementing patterns
• MSI Installer Report
• Execute Action when content of Combobox changes
• warnings when I try to create guidance package
• Thrown exception does not trigger Undo in an action
• UnfoldTempalteAction replacing parameters
• Adding an Item to a solution (as opposed to a project)