Is it possible to merge a Visual Studio project into a single file?
I just want to have all my code in one file to send around and review.
here is an idea of what I want.
****Myclass.cs****
code
code
code
code
code
*****file2.cs***开发者_开发知识库**
code
code
code
Even simpler:
type *.cs > oneFile.txt
Though this won't put any delimiters between the files. However this:
type *.cs >output.txt 2>&1
will put the file name before each file's contents.
Install cygwin, add to path, then run find path/to/my/project -name '*.cs' | xargs cat
from the command prompt.
You can do it with DOS commands - no need to install cygwin:
for %f in (*.cs) do (
if exist oneFile.txt del oneFile.txt
echo %f ---- File: %f ---- >> oneFile.txt
type %f >> oneFile.txt
)
If you have different types of files, you can actually key in their names instead of "*.cs"
精彩评论