Compare Two DLL's [closed] - c#

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
Scenario
I have a C# application compiled as a DLL.
I have a build from last week and a build from this week.
There has been a significant change in performance so I want to compare the the two builds to see what has changed.
ANY IDEAS?........SUGGESTIONS?
Cheers
EDIT:
Yes it would be better to compare the source code from version control........except we are using TFS, not by choice, and even with the bolton application TFS takes source control to a whole new level of shite........it's very difficult to revert without messing around with workspaces etc....i just thought the DLL approach would be easier...The application is a monster as well......

I would recommend to disassemble two libraries with the Reflector (right click on the assembly -> Export) and then compare directories generated with some merging tool, like WinMerge.

This is a free option to compare .Net C # assembly:
Assembly Diff Tool for .NET - JustAssembly

Today the same can be done with JetBrains dotPeek. Load the dll right mouse button -> export to project and compare in WinMerge

Wouldn't it be better to profile the two dll? You will find where in the second one you are spending more time than in the first. This should give you an indication of what has gone wrong.

An updated answer to this question, if it is a dll written in C#, I would recommend dotPeek by JetBrains. Its free! After decompiling, you can copy the code text into a text editor like Notepad++ that allows you to compare two text files.

Related

How to unpublish a complete website? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
My client give me his FTP I'm download source code.
Its published.
How can i do changes in code.
My client have not the Unpublished code.
What can i do?
Well, you need to check a few things
1- Check the code and see whether you can find .cs files with you .aspx files. If you can find them then it means that the website was deployed in Debug mode and you can atleast have the code of all the asp.net forms.
And if you cannot find the .cs files then it was deployed in Release mode and you are screwed.
2- Check the debug/release folder of the code and see whether you can find some custom DLL's. (By custom, i mean DLL's that are not from Microsoft and any third party). If you can find some custom DLL's then you cannot do anything because you donot have the code for the DLL's. (So, you do not have the Dll project).
You can still retrieve the code of DLL's by using some tools but that is not recommended.
EDIT:
You cannot get the exact code, but you can get a decompiled version of it.
The most popular (and best) tool is Reflector, but there are also other .Net decompilers (such as Dis#). You can also decompile the IL using ILDASM, which comes bundled with the .Net Framework SDK Tools.

why Light Inject's source code all in one .cs file [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
like this https://github.com/seesharper/LightInject/blob/master/LightInject/LightInject.cs
It's hard to reading, is there any deep meaning?
Being the author of LightInject, I feel I should comment on this :)
Say that you are a library developer and want to be able to utilize an IoC framework internally without taking a dependency on a third party assembly. By using the source version of LightInject, this can be done quite easily and you can still ship your library as a single assembly.
Many framework developers choose not to use an IoC framework just because they don't want that extra dependency.
The alternative to this would be to use tools like ILMerge that is capable of merging two or more assemblies into a single assembly.
This is a far more advanced option and would also require an extra build step that performs the merging.
Note that LightInject comes in two flavors, the source version where all the types are internal and the binary version that acts just like any other third party dependency.
Taking on a dependency might not seem so bad at first, but if you are a framework developer, you could easily run into issues if the consumer of your framework uses another version of the same dependency
Best regards
Bernhard Richter
It makes integration as source in another project easier: simply add one file to your project and forget about it. This is a supported installation scenario according to the official website of LightInject, there's even a NuGet package for it.
If you want to read it, I'd strongly suggest opening it in Visual Studio and using the code navigation features to find what you want, e.g. VS 2013's Solution Explorer can display the classes inside of a file as children of that file.

Obfuscating c# code not the assembly [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 3 years ago.
Improve this question
Is there a way to obfuscate c# code (visual studio solution ) so that if soem one even get the project could not understand it ?
note: I'm not talking bout obfuscating assembly/Executable here..
I've not seen anything commercially, but you could probably write your own application to do this. I actually know someone once did this for some ASPX pages that were being deployed.
You'd have to take similar steps:
Rename all local variables to very similar names B___0, B_0 etc.
Rename all internal and private methods/classes and all their references.
Encode all your strings.
Insert random code/calls that don't do anything.
Consider why you want this though... It means:
You can't ever view your own code. You'll have the original somewhere - why not just password protect it?
You're going to screw with any source control you're running.
You're going to have some crazy "process my entire solution" everytime you save/publish it?
In short it's probably not a good idea, which is why you probably can't find a commercial solution.
Close the door and windows tight.
Disconnect your computer from Internet during the developement.
Obfuscate your assemblies when your done.
Save them a a disk.
Burn down your computer.
Keep hitting your head onto a wall until you fergot why you're doing it.
There, you're safe, nobody will ever have the same exact source.
I hope your application has no bug, though.
A more sensible alternative might be to just encrypt your hard drive using something like
BitLocker or
TrueCrypt.
Obfuscate the dll
Use a decompiler like ILSpy and decompile the dll
This way you get obfuscated C# code.

Can a .cs file override the code in the bin file for a compiled Asp.net site? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I have take over a old asp.net website and there is no Visual Studio Project for it. If i want to change some functionality, is there a way to put in a .cs file overriding the logic in the bin file?
I am not aware of any other solution but one.
You can decompile the whole dll, create a new project and attach all classes there. Then recompile and replace an old dll with a new one.
You may need to decompile the whole web site, as it is likely there will be some dependencies to other dlls.
For anyone who stumbles across this question, I'd like to suggest an alternate approach. Take a look at Fody. Fody is an IL weaving tool which allows you to weave in changes to existing .dll compiled files. Here is a Basic Fody Addin Project. You'll notice Fody would allow you to inject or 'weave' code changes into the IL without a decompile.

Opensource project setup [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
I want to set up an opensource community project in .NET, how do I go about it?
With my project, I started by choosing one of the many open source licenses (went with Apache 2.0). Then I added a LICENSE-file to my project, copy/pasted the license there and did the 'required' headers to each source file.
After that, I chose a project platform (or watchamacallit). I skipped SourceForge and chose Google Code instead, later moved to Assembla + GitHub. I upladed my source to the provided SCM-system (first SVN, later Git).
Alas, the hard part isn't selecting a license, getting your source public, documenting your stuff to a wiki or writing tickets. The hard part is to build the (successful) community around your project. For that you need an interesting project, people that are interested in your interesting project and a platform to connect these dots together. A dash of luck and/or reputation don't hurt, not the very least.
choose which license (bsd, gpl, etc.) you wish to release under
add README.txt, LICENSE.txt
there are many excellent options for free public hosting. You can see a lot of good comments here:
https://stackoverflow.com/questions/29736/what-open-source-hosting-service-should-i-use
www.codeplex.com would be another good starting place.
Go to:
http://code.google.com/hosting/
And follow the directions in the:
Create a new project link.
You can use other portals too.
You want to look create a repository on SourceForge or Github (those are the two I know of, there may be others). That would be the first step.
Setting up a blog, if you already do not have one, and blogging about your progress, frustrations, and everything in between during the journey is also good for few reasons. It will serve as a note to self for you for future projects. It will also be a good thing for others who want to do something similar to look at as a roadmap. Finally, its a great way to get more and more interest in your project.
You also might want to look into Mono Project (http://www.mono-project.com/Main_Page) and use that instead of Visual Studio so that there is not a barrier for entrance for others to join your project. Those Visual Studio licenses are not cheap and Mono is free. While I have not worked with the Mono environment in a while, I have heard a lot of good things about it.
I hope this helps and good luck to you.

Categories