13

Is there a way to set a vcproj Project folder in order to automatically include all .cpp or .h files depending on the path of the project ?

On other words, when adding files to the folder of my project using Windows explorer, is it possible to have these new files automatically added to a vcproj Project, inside Visual Studio ? (even if I have to relaunch Visual Studio).
I do not need just to see them, but I need them to be automatically included inside the project for compiling and other operations...

The only way I see is to create a Visual Studio addin or a VB Script to do that...

Thanks, Regards

Richard J. Ross III
  • 55,009
  • 24
  • 135
  • 201
oaimac
  • 784
  • 2
  • 12
  • 27
  • What are you trying to accomplish here? Are you generating code and you want the code to be compiled? If that, why not generate a vcproj for the generated files? – Gustavo Muenz Feb 11 '11 at 19:15
  • 4
    I just want to be able to use several IDE, and have all the source files automatically taken into account into my vcproj Project. For exemple, I have to use Eclipse and Visual Studio. When an user create a file with Eclipse, I would like this file to be automatically inserted inside the Visual Studio project without doing it file by file by hand. – oaimac Feb 14 '11 at 08:43

1 Answers1

1

You can edit project file and use wildcards. http://msdn.microsoft.com/en-us/library/ms171454%28v=VS.90%29.aspx

  • But be careful. Visual Studio occasionally expands the wildcards out and re-saves the project file. – Roger Lipscombe Mar 03 '11 at 09:32
  • 6
    This doesn't seem to work with VC++ projects. The vcproj format file is not the same as the C# and VB one. When using wildcard, Visual insert the wildcard as a file... which do not work. Furthermore, Visual seems to ask for the mandatory flag "RelativePath" instead of "Include" (C# and VB). – oaimac Mar 07 '11 at 14:13