Click here to Skip to main content
15,887,485 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
My PC was stolen ,and i have a project in .NET Core MVC that i was working on in that.I could go to my hosting account where i published the website and get the published solution with .exe and dll ,but is there a way to get the razor files and .cs files from the published solution ?

What I have tried:

Searching on google doesnt give much of a result
Posted
Updated 4-Aug-20 21:00pm

If you mean as in reverse-engineer / decompile, no ... that being said you *may* be able to use a tool like Red-Gate Reflector .NET Decompiler: Decompile Any .NET Code | .NET Reflector[^] to inspect the source code.

This is probably not a good time, but you do know Github accounts are free, don't you ? (and Git etc skills are very useful)
 
Share this answer
 
If you compile your .Net Core Web application two dlls are generated in the bin folder.
e.g. WebApplication.dll and WebApplication.Views.dll
WebApplication.dll contains the *.cs file whereas contains the *.cshtml files.
You could use a decompiler tool like dotPeek from JetBrains dotPeek: Free .NET Decompiler & Assembly Browser by JetBrains[^]
Then you can open your dll files with this tool in order to see the source code.
The source code may not look exactly like the code you have written but can give you an idea about how it was written.
A better idea for the future would be to not only store your source code on your computer but somewhere else as well. (Google Drive, GitHub etc.)
If e.g. your hard drive crashes or your house is burning down you will have the same problem again...
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900