Posts filed under 'C#'

Alternatives To .Net Reflector

RedGate recently announced that from the next version of Reflector (v7), they will charge $35 for a licence. Since the announcement a few weeks ago, there has been quite a backlash against the decision from the .Net community, mainly because RedGate have put a time-bomb in the currently free version so that it will expire at the end of May 2011.

In response to this announcement, several alternatives to Reflector have surfaced - some free, some commercial. The list below outlines all of the alternatives, some of which have been around for many years.

  • JetBrains ReSharper [commercial + free]

    Within a day of the announcement, JetBrains put out a teaser suggesting that a decompiler was in the works. Two weeks later, they announced that the next version of ReSharper will have an integrated decompiler akin to reflector, along with a free standalone version to be released later in the year.

  • Telerik JustCode [commercial]

    Just as JetBrains put out a teaser, Telerik followed suit and showed a decompilation feature that will be in the next version of their JustCode tool.

  • ldasm [free]

    This tool comes bundled with the Windows SDK Tools (that get installed as part of Visual Studio). It is purely an IL disassembler, and so cannot decompile to C#.

  • ILSpy [free]

    The team behind SharpDevelop have been working hard on ILSpy and have already released a major milestone of v1 of their decompiler. It can decompile to C#.

  • Cecil Studio [free]

    This is a Windows forms UI based on the Mono Cecil library. It has already been around for a few years.

  • MonoReflector [free]

    This is a WPF UI based on the Mono Cecil library.

  • MonoDevelop Assembly Browser [free]

    Released for the first time in version 2.0 of MonoDevelop (currently at v2.4.2).

  • Salamander .Net Decompiler [commercial]

    This is part of a larger tool called .Net Explorer.

  • Dis# [commercial]

    This tool has been around for a while, but is not often mentioned. It is not as polished as Reflector and does not support never versions of .Net, but has some nice features not seen anywhere else. Once such feature is to rename the decompiled variables within the tool to give them a more meaningful name.

  • Spices .Net Decompiler [commercial]

    As well as decompiling to IL, C#, J#, C++ and Delphi.Net, this tool has a feature to build code flow diagrams from the decompiled source to show the execution flow.

  • Decompiler.NET [commercial]

    This is s decompiler combined with an obfuscator, language translator and refactoring tool that integrates with Visual Studio.

  • Keep Decompiling Free

    This website popped up recently with nothing more than a teaser to get more information when it is available.

  • RedGate Reflector [commercial]

    Of course, there is still the current king of them all, albeit in a now charged-for format. Still well worth the $35.

Which of these will turn out to be the best/most successful to take Reflector’s throne is yet to play out, but there seems to be a healthy interest from both the community and commercial aspects in making a replacement.

9 comments Permalink March 2nd, 2011 Adrian Banks
Subscribe to this feed Bookmark this post on del.icio.us Digg this post on digg.com Share this post

Building Solutions Without Visual Studio

When working with several source control branches, especially with a large solution with many projects, it is not always practical to open Visual Studio to perform a quick build. Using NAnt is one alternative solution, but this requires creating and maintaining a build script. Using MSBuild from the command line is another option, but this involves getting the command line arguments correct, and working with command line output is not easy to visually filter. The same goes for using Visual Studio from the command line.

Gaston Milano has created a simple tool called Build Console capable of loading both MSBuild and Visual Studio solution files, and building any of the available build targets.

It’s main features are:

  • The ability to choose which target/project to build.
  • A build report in a tree structure to show the status of each project built.
  • The ability to choose the verbosity of the build output.
  • A coloured build output log to distinguish different types out log output.
  • A ‘quick history’ to load recently built solutions.

Whilst a little rough around the edges, it comes in very handy for those times where you just need to compile quickly without the overhead of loading Visual Studio.

Add comment Permalink October 18th, 2007 Adrian Banks
Subscribe to this feed Bookmark this post on del.icio.us Digg this post on digg.com Share this post

Running The OUTPUT Clause From C#

SQL Server 2005 introduced a new feature called the output clause. This enables INSERT, UPDATE and DELETE queries to be run, with the original information which has been changed being returned. This is particularly useful if you want to run a query and know what has been changed by it by returning the identites of the modified rows.

The full documentation for the output clause can be found in SQL Server 2005 Books Online.

In trying to use this feature, I could get it to work in a query window, but when trying it using C# and ADO, it was not obvious how to execute the query and return the results because the ExecuteNonQuery() method of SqlCommand only returns the count of the number of rows that have been updated. After a bit of unsuccessful searching, I came across a post by Keyvan Nayyeri with something that gave me an idea:

OUTPUT clause works like a SELECT statement but its usage differs in INSERT, UPDATE and DELETE commands


Switching my code around to run the update query using the ExecuteReader() method of SqlCommand as would be used for a SELECT query proved to be fruitful, enabling the returned result set to be read.

2 comments Permalink May 1st, 2007 Adrian Banks
Subscribe to this feed Bookmark this post on del.icio.us Digg this post on digg.com Share this post

AssemblyFileVersion Compiler Warning

If you are using the AssemblyFileVersion attribute to mark your compiled assemblies with specific Win32 file version numbers, you may get a compiler warning with certain revision numbers. The compiler warning looks like this:

warning CS1607: Assembly generation -- The version '2.0.0.070105' specified for the 'file version' is not in the normal 'major.minor.build.revision' format.

This warning is documented as occurring when the version string is not in the major.minor.build.revision format, but does not explain why it happens for the example above.

Frans Bouma updated his existing post with the reason why. The revision part of the version number must not exceed 65535 (ie. a 16-bit number). If it does, the compiler generates the warning. The MSBuild Team posted about the same thing, but also provided the fact that it is the underlying operating system that imposes this limit.

Add comment Permalink April 23rd, 2007 Adrian Banks
Subscribe to this feed Bookmark this post on del.icio.us Digg this post on digg.com Share this post

C# Data Types And Other Language Features

There's a nice little section on Microsoft's MSDN site entitled The C# Programming Language for Java Developers that explains the basics of the C# language features.

Although not incredibly detailed, it's quite a useful reference for simple language information, especially about the system types (such as the range of a double or what types can be implicitly cast to a short).

Add comment Permalink March 19th, 2007 Adrian Banks
Subscribe to this feed Bookmark this post on del.icio.us Digg this post on digg.com Share this post

Previous Posts


Calendar

February 2017
M T W T F S S
« Oct    
 12345
6789101112
13141516171819
20212223242526
2728  

Posts by Month

Posts by Category

RSS Feeds Feeds

Visitors

Visitor Map