views:

4122

answers:

4

Using Visual Studio 2008, When I add to a C++ project a file that is not .c/.cpp/.h/.rc or anything the IDE doesn't recognize a dialog pops up which asks me if I want to create a custom build step rule for this kind of files.

Does anybody know how to get to this dialog without adding a file? I can't seem to be able to find in any of the menus.


Edit: I know all about the .rules file. What I'm talking about is a GUI Dialog from within Visual Studio 2008 which allows you to create and edit these .rules files. This is the dialog I mentioned which pops up when you add a file with an unknown extension.

A: 

I can't recall this off of the top of my head, but I know that you can add XML files that tell VS how to build a file. Do some google'ing for .rules files or look on MSDN. I know that I wrote one a while ago for handling running the IDL compiler for MS-RPC. If no one happens to comment on this, I'll try to remember to dig up the information tomorrow when I'm at work ;)

D.Shawley
+1  A: 

Try this link: http://blogs.msdn.com/msbuild/archive/2005/10/06/477064.aspx

Aamir
still, no mentioned of the GUI dialog.
shoosh
A: 

This might be what you're looking for: http://msdn.microsoft.com/en-us/library/hefydhhy.aspx

Good luck!

Andy Mikula
+3  A: 

If you add an item with an unknown extension, you'll get a message box titled "Matching Custom Build Rule Not Found", which asks if you'd like to create a new rule file to define a custom build rule to build files with that extension. If you click "Yes", you'll get the "New Rule File" dialog.

If you'd like to just get that same "New Rule File" dialog:

  1. Right-click your project
  2. Select "Custom Build Rules..."
  3. Click the button "New Rule File..."

If you're asking how to get the "Matching Custom Build Rule Not Found" message box itself, I'm not sure how you'd do that. (If that's what you're trying to do, you may want to clarify that in your question)

Daniel LeCheminant