Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Visual Studio.NET / Extensibility / May 2006

Tip: Looking for answers? Try searching our database.

GetProjectTemplate() doesn't work with my custom template.

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
datamodel - 18 May 2006 14:40 GMT
I am unable to use the Solution.GetProjectTemplate() method for my own
custom project template.

When I made the template, using the VS2005 "Export Template" command,
it was saved in the following directory:

C:\Documents and Settings\<username>\My Documents\Visual Studio
2005\Templates\ProjectTemplates

the zip file for the template has spaces in it: "My own template.zip" .

Furthermore, this location is the value set for the VS Tools > Options
> Projects & solutions > VS user project templates location option.

Now this is how I use GetProjectTemplate() in my code:

MyTemplatePath = soln.GetProjectTemplate("My own template.zip","");

The problem seems to be in the second paramaters. I've used the
following values for it, with the following results:
"CSharp" -> File not found.
"" (empty) -> File not found
"Visual C#" (which is a subdirectory of the custom templates default
folder given above) -> still no luck.

MSDN doesn't specify what to use for the second argument when the
template in question is a custom user template place in the directory
given above.

What am I doing wrong, and how do I do it right? I would greatly
appreciate help on this matter as it is delaying the work. Thanks in
advance.

Data.
Dustin Campbell - 18 May 2006 14:49 GMT
> C:\Documents and Settings\<username>\My Documents\Visual Studio
> 2005\Templates\ProjectTemplates

Is this a C# template? If so, have you tried moving it to:

C:\Documents and Settings\<username>\My Documents\Visual Studio 2005\Templates\ProjectTemplates\Visual
C#?

Best Regards,
Dustin Campbell
Developer Express Inc
datamodel - 18 May 2006 14:58 GMT
Yes it is a C# template, and I did try to move it to the "Visual C#"
subdirectory. Still no luck.
BTW, I tried the following strings for the second argument of
GetProjectTemplates() :
"CSharp", "Visual C#", and "" . Still no luck.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.