| Subject: adding custom build step to custom file |
| Group: microsoft.public.vstudio.general |
| Date: 4/28/2008 5:05:30 PM |
| From: thomas.santos@gmail.com |
Hi, I've been trying to add a script to create a custom file type to visual studio with limited success. I can get the file created and added to a project, however, I need to add a custom build step to it and I am not having much success (in implementing or finding the first step to getting things done). So what I have so far is this (with some modifications): function OnFinish(selProj, selObj) { try { var className = wizard.FindSymbol('ITEM_NAME'); var fullFileName = wizard.FindSymbol('PROJECT_PATH') + "\\" + className + ".xml" addFileToSolutionExplorerFolder(fullFileName, selProj); var file = createFileOnDisk(fullFileName); writeTemplate(file, className); } catch(e) { if (e.description.length != 0) SetErrorInfo(e); return e.number } } function writeTemplate(file, className) { file.WriteLine("...stuff...");; } function createFileOnDisk(fullFileName){ var fso = new ActiveXObject('Scripting.FileSystemObject'); var file = fso.CreateTextFile(fullFileName, true, false); return file; } function addFileToSolutionExplorerFolder(fullFileName, selProj) { selProj.Object.Filters.Item(dte.SelectedItems(1).Name).AddFile(fullFileName); } If someone can point me to some reference (or post a follow-up) as to how i can add a custom build step for all configurations to the file I just added - that would be fantastic. tom |
| Back |
| Subject: Re: adding custom build step to custom file |
| Group: microsoft.public.vstudio.general |
| Date: 4/28/2008 5:13:31 PM |
| From: thomas.santos@gmail.com |
On Apr 29, 10:05 am, thomas.san...@gmail.com wrote: > > I've been trying to add a script to create a custom file type to > visual studio with limited success. I can get the file created and > added to a project, however, I need to add a custom build step to it > and I am not having much success (in implementing or finding the first > step to getting things done). I should mention, this is a Visual C++ project... |
| Back |
| Subject: Re: adding custom build step to custom file |
| Group: microsoft.public.vstudio.general |
| Date: 4/28/2008 5:55:26 PM |
| From: thomas.santos@gmail.com |
On Apr 29, 10:13 am, thomas.san...@gmail.com wrote: > On Apr 29, 10:05 am, thomas.san...@gmail.com wrote: > > > > > I've been trying to add a script to create a custom file type to > > visual studio with limited success. I can get the file created and > > added to a project, however, I need to add a custom build step to it > > and I am not having much success (in implementing or finding the first > > step to getting things done). > > I should mention, this is a Visual C++ project... urgh.... for Visual Studio 2005 |
| Back |