472,146 Members | 1,432 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,146 software developers and data experts.

adding custom build steps to custom types


I've been trying to add a script to create a custom C++ file type to
visual studio 2005 with limited success. I can get the file created
added to a project, however, I need to add a custom build step to the
and I am not having much success (in implementing or finding the
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)
return e.number


function writeTemplate(file, className)


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).N ame).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
just added - that would be fantastic.

Jun 27 '08 #1
0 1228

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Lee Alexander | last post: by
2 posts views Thread by prabhupr | last post: by
8 posts views Thread by Techno_Dex | last post: by
1 post views Thread by Michael Russell | last post: by
1 post views Thread by rohan_from_mars | last post: by
11 posts views Thread by Pete Kane | last post: by
reply views Thread by Saiars | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.