Miscellaneous Debris

Avner Kashtan's Frustrations and Exultations

October 2007 - Posts

Another minor C#/C++ difference - adding existing files

Another minor detail that bit me for a few minutes today. I'm posting this so I'll see it and remember, and possibly lodge it in other people's consciousness.

Using Visual Studio 2005, adding an existing .cs file to a C# project will cause a copy of that file to be created in the project directory. If I want to link to the original file, I need to explicitly choose Add As Link from the dropdown on the Add button.

C++ projects, however, have the opposite behavior. Adding an existing item in a different folder will add a link to the original file in the original location. To create a copy, manually copy it to the project dir.

That is all.

Posted Sunday, October 28, 2007 5:35 PM by Avner Kashtan | 1 comment(s)

Filed under: , ,

More Posts