0

How can I tell the difference between source and published .NET code?

I am looking at some inherited code that I have not touched in about a year. The original designer had me first publish locally before uploading the published code to the internet server. Now I am looking a number of backed up source folders as well bas backed up published folders. I should have done a better job at naming the folders, I guess. Now I wonder: How can I tell the difference between source and published .NET code? Is there some easy way to see if some folder that contains only published code is lacking a file or xml setting?

xarzu
  • 8,657
  • 40
  • 108
  • 160
  • 9
    Source is readable and published code is a binary. Not sure what you are asking. – Adam Modlin Feb 05 '14 at 18:23
  • 1
    Source should have lots of files with `.aspx` and `.aspx.cs` extensions, published should have `.aspx` and `.dll`. – Dave Zych Feb 05 '14 at 18:25
  • If this is about deploying ASP.NET code, you should consider [precompiling](http://msdn.microsoft.com/en-us/library/bb398860.aspx). Precompiling will detect some errors like missing references, before you deploy. You can also compile everything into a single assembly, and deploy that instead. – Robert Harvey Feb 05 '14 at 18:25
  • Voting to close because this is about process management, not programming. – Nicholas Carey Feb 05 '14 at 18:33

1 Answers1

0

As changes are made, they are published in the UI, so that means there should be some new files, or deleted files, and the directory tree may not be 100% the same. What you could do is download the deployed code to your local machine, and use a tool like Beyond Compare or some other directory comparer and let it determine the markup changes for you. There are several tools that do a good job for this.

That would give you an idea of the difference between files, but won't parse DLL's. That you would have to use a tool like reflector or Telerik's JustDecompile to compare the code, but I really wouldn't go that far, but you could.

halfer
  • 19,824
  • 17
  • 99
  • 186
Brian Mains
  • 50,520
  • 35
  • 148
  • 257