-1

I just recovered files I deleted by mistake from Visual Studio and the type of the file recovered is File.
How can I convert them to .cs files in order to add them to my classlib in my project?

LopDev
  • 823
  • 10
  • 26

1 Answers1

2

How can I convert them to .cs files in order to add them to my classlib in my project?

You can not.

You can REANME them so they end in .cs instead of .file - and that will mark them as .cs files for the compiler etc. Use the command line for that if you do not know how to show extensions in explorer (which is a menu item).

If that is not enough, there is NO WAY to "convert" them - same as you can not convert an omelette back to eggs. So, if the recovered files you have are the result of some processing, and not the original source files....

...you better learn to live with the consequences of what you did. Which is not using source control.

TomTom
  • 61,059
  • 10
  • 88
  • 148
  • I always say to myself that I should start using a source control and then I just ignore the fact and continue to work on my project. Now that I've learned it the hard way, I'm feeling a bit better because I started with the project just 2 days ago. – Karim Sabsabi Jul 11 '20 at 08:42