I am working in legacy code with the author long gone and documentation completely absent. I have an application running in production that I am trying to track down the source code in Team Foundation Server. I have been unable to find it in the AssemblyInfo.cs of the projects I have looked at.
Does anyone know where to look or how to search to find which solution makes that executable? I have found no similar questions in searching here.
Successfully found the source code by pasting the .csproj into a text editor and looking for the tag. That was the kind of answer I was looking for. Tip O' the hat to xDJR1875.
Related
I made today few changes by ctrl+h to all the solution.
When I understood my mistakes I tried to undo it with ctrl-Z but the results were awful.
The question is : How can I reload the last compiled project before I had done this stupid move.
Lets say I want the solution as it was at yesterday.
Thanks for your help,
Eliran.
you can try decompiling the old binary with tools like dotPeek. But in general that is the reason why you use a source control system.
You cannot. Once saved, the changes are irreversible. That's the point of backups. There are tools to decompile your .NET executable, but as not all sourcecode is actually compiled into the executable (for example formatting and comments are not), you will never get your original code back.
You may want to look into source control software like Git, Subversion or Team Foundation Server to handle this problem properly next time.
I browsed through some questions and this one stood out as the better one:
.Net Classes and their source code which pointed me to this place here: Microsoft Reference Source Server.
I tried everything the site says, downloaded a file that I cannot open from there and at some point ended up with a .pdb file in my source folder for the symbol cache that I could not open with a multitude of tools I looked into.
So this is my last resort to find an answer to my question. Out of pure curiosity (and lack of a better way to understand some stuff) I want to open a particular class from Microsoft (namely I wanna look into RichTextBox and maybe the classes it inherits from) but I simply cannot find a way to make this work for me. I want the original source, not a decompiler product because, well because I mainly need to understand some stuff, not see random variable names. I appreciate any help that may get me around my stupidity and clumsiness, as well as the right tools to do so (if any other than VS).
Note that I am using Visual Studio 2012 and yes, I went over a guide covering this specific version instead of the guide on VS 2008.
The "download" links on this page: http://referencesource.microsoft.com/netframework.aspx should work. However try downloading them via Internet Explorer; my Firefox attempted to download an .aspx file instead of the installer itself for some reason. (EDIT: as #ParagMeshram pointed out, just rename the netframework.aspx to netframework.msi as a quick fix if necessary)
In addition, here's a link to the source hosted by dotnetframework.org: http://www.dotnetframework.org/default.aspx/4#0/4#0/untmp/DEVDIV_TFS/Dev10/Releases/RTMRel/wpf/src/Framework/System/Windows/Controls/RichTextBox#cs/1305600/RichTextBox#cs
I can't say for certain if it's the latest greatest, or what you would be compiling against exactly, but should give you a good idea of how it works.
Is it possible to take a set of published web files and convert them back into a solution? I say this because a solution has been lost from our system, and the only files that can be found are the actual published files. I have looked around and can't seem to find anything on the matter, any help would be great!
Thanks a lot
For a Web Application the source code is compiled into DLL's. As far as I know there is no easy way to reverse engineer a Web Application back to source code. If you wish to do further research, use search terms such 'reverse engineer web application DLL', or 'retrieve source code from DLL' etc. Good luck!
written by Jeff Atwood, this program cleans the project folders from bin, obj and Resharper files ... BUT its downlaod link is broken , does anybody know where can I get it from ?
http://www.codinghorror.com/blog/2005/08/clean-sources-plus.html
Update: This comment was left by Christian Junk
https://github.com/coding-horror/CleanSourcesPlus
Which seems to be exactly what you're looking for.
Old answer:
I can't find Clean Source Plus, but I did find Tree Trim, which seems to do the same thing
You can download from this link
TreeTrim is very cool but it will report an exception when i try to clean svn work copy. the exception message just like " no privilege to delete all-wcprops...".
i got the source code and fixed the issue, so if someone like TreeTrim, you can download the setup file on http://db.tt/hFdwQWId
Hi, Everyone, i just found a good alternative---CleanPoject from http://wf.codeplex.com/wikipage?title=Thank%20you%20for%20installing%20CleanProject, Maybe we can replace CleanSourcePlus with CleanProject.
Hello I recently deleted what I thought was an unused folder which happened to have the solution and code for a windows application I am maintaining.
I have published the app multiple times with ClickOnce and have access to the application manifest, deploy, etc. Is there a way for me to use the published application to get back my solution?
Thanks
If you don't currently use source control, I would highly recommend using one. I'm not aware of a way to get back all the solution files without source control, but you can get back the code using .NET Reflector. There is a file disassembler add-in which allows you to dump the code straight out of Reflector.
not possible. you can't recover the solution and original code from the compiled and deployed version.
if you have not used that machine or hard drive since you deleted it, you may be able to recover the files but it's a long shot and may be expensive.
you need to invest some time in learning source control. git, mercurial, subversion... they're all free and easy to use in windows. having your code in source control would prevent this problem - delete it all you want, just do a checkout from source control again.
Just go get the project back from Subversion.
Basically all you can do at this point is feed the assemblies to a program like reflector and reverse engineer it back. Welcome to sucksville.
If you don't have your stuff in some type of repository already I'd highly recommend fixing that first thing in the morning. With free tools like subversion available, nevermind things like TFS or even VSS there just isnt a good excuse.