Visual Studio Extensions: Editing code files in the current solution?
Is there a way to get a list of all of the .cs files in a solution, and edit them using the vs2010 interface?
im trying to develop an extension that will open up my code files, and tweak them automatically, and then resave them. Ive seen extensions do it before.
If this is not possible, is it possible to get a list of file locations perhaps? so i can edit them like normal files?
You might want to look into the EnvDT100 namespace. In that you have the Solution4 interface which allows you to open your solution object. Within the solution object you will find all of your projects and within these you will find the code files.
You can get the name (including the path) of the files by using the Name property of the ProjectItem.