Changing file/folder names

J

Jay

What's the recommended way to change file/folder names within a project?

I want to change the solution name from (say) sol1.sln to sol2.sln, and also everything else named
sol1.* (eg sol1.suo, the folder sol1, and within this folder, sol1.csproj, and also, files within
Debug and Release folders)

Also, how do I change other names (eg .cs files)?

I'm using VS C# 2005 Express.
 
J

j1mb0jay

Jay said:
What's the recommended way to change file/folder names within a
project?

I want to change the solution name from (say) sol1.sln to sol2.sln,
and also everything else named sol1.* (eg sol1.suo, the folder sol1,
and within this folder, sol1.csproj, and also, files within Debug and
Release folders)

Also, how do I change other names (eg .cs files)?

I'm using VS C# 2005 Express.
Use regual expressions in the terminal do it in seconds.
 
L

Laurent Bugnion [MVP]

Hi,
What's the recommended way to change file/folder names within a project?

I want to change the solution name from (say) sol1.sln to sol2.sln, and also everything else named
sol1.* (eg sol1.suo, the folder sol1, and within this folder, sol1.csproj, and also, files within
Debug and Release folders)

Also, how do I change other names (eg .cs files)?

I'm using VS C# 2005 Express.

All the Solution and CSPROJ files are text files. The only non-text file
is the SUO file, but this stores only user information and can actually
be deleted without too many risks.

So in short: Search-and-replace all folder names, file names and all
file content, delete the SUO file, and you should be OK.

HTH,
Laurent
 
J

Jay

Thanks,

I was a little worried that changing the file names themselves may affect something (perhaps a file
lists the other files, so would reference non-existent files and cause an error) but if this isn't
the case, it looks like the solution.

Jay


Hi,
What's the recommended way to change file/folder names within a project?

I want to change the solution name from (say) sol1.sln to sol2.sln, and also everything else named
sol1.* (eg sol1.suo, the folder sol1, and within this folder, sol1.csproj, and also, files within
Debug and Release folders)

Also, how do I change other names (eg .cs files)?

I'm using VS C# 2005 Express.

All the Solution and CSPROJ files are text files. The only non-text file
is the SUO file, but this stores only user information and can actually
be deleted without too many risks.

So in short: Search-and-replace all folder names, file names and all
file content, delete the SUO file, and you should be OK.

HTH,
Laurent
 
L

Laurent Bugnion [MVP]

Hi,
Thanks,

I was a little worried that changing the file names themselves may affect something (perhaps a file
lists the other files, so would reference non-existent files and cause an error) but if this isn't
the case, it looks like the solution.

Jay

You got me wrong. The CSPROJ files are listed in the solution file, but
since they're all text, you can change the names everywhere and it will
work.

Greetings,
Laurent
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top