ReSharper 3.1 Released

I am back, after a pause for the flu and the Christmas whirlwind tour.

Jetbrains has released ReSharper 3.1.  Although it does not contain the C# 3.0 functionality, it does contain some speed increases.  Release notes can be found here.

If you have recently purchased 3.0, this is a free upgrade.  If you haven’t purchased 3.0, purchasing this release will give you a free upgrade to 4.0 when it is released.

I highly recommend this add-in for Visual Studio.

Tags: ,

Ease Versioning Multiple Assemblies by Splitting Up AssemblyInfo

Most .Net project deployments are made up of multiple assemblies and it is common to version all assemblies in a given release with the same version numbers.  Since changing each AssemblyInfo.cs file can be time consuming and error prone, most projects take one of two approaches to solving the problem:

  1. Generate AssemblyInfo.cs files using an nant build scripts and setting properties.
  2. Use a single AssemblyInfo file and have all projects reference that file.

Both approaches have pluses and minuses.  Generating AssemblyInfo.cs can be hard to setup and get correct but is more flexible.  Using a single AssemblyInfo.cs and have each project reference it is easier but all projects will have the same information in the assembly properties.

A hybrid approach that many developers overlook is splitting AssemblyInfo.cs into an assembly specific version and a product wide version.  Each Visual Studio project would contain the standard AssemblyInfo.cs file that is generated by the project templates.  The difference would be that product wide attributes are removed.  See the sample AssemblyInfo.cs file below for an assembly named ClassLibrary1.dll:

using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following 
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("ClassLibrary1")]
[assembly: AssemblyDescription("Assembly for ClassLibrary1")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCulture("")]

// Setting ComVisible to false makes the types in this assembly not visible 
// to COM components.  If you need to access a type in this assembly from 
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]

// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("e96237d4-2420-4dc7-aed2-43a121bd0221")]

Notice that several of the standard attributes have been removed.  Those attributes are moved to a file in a central directory so that it can be changed once for several projects.  The following is the contents of a sample file containing these attributes, named ProductAssemblyInfo.cs:

using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following 
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyCompany("My Company")]
[assembly: AssemblyProduct("My Product")]
[assembly: AssemblyCopyright("Copyright ©  2007")]
[assembly: AssemblyTrademark("")]


// Version information for an assembly consists of the following four values:
//
//      Major Version
//      Minor Version 
//      Build Number
//      Revision
//
// You can specify all the values or you can default the Revision and Build Numbers 
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.1.0.0")]
[assembly: AssemblyFileVersion("1.1.1.0")]

After creating the product level AssemblyInfo, multiple VS.net projects can reference it and pull in those attributes.  Below is a snapshot of my Solution Explorer within VS.net 2005.  Each project has their own AssemblyInfo.cs but each also has a reference to ProductAssemblyInfo.cs.  Once the solution is rebuilt, each assembly will have the combination of the attributes in ProductAssemblyInfo.cs and the specific AssemblyInfo.cs.


This approach allows each assembly to have a separate AssemblyTitle, AssemblyDescription, GUID, and ComVisible Setting, while maintaining the ability to change the version numbers and company information in one place and have all assembly builds pick up the updated attributes.

If you are using a continuous integration server like CruiseControl.net, a build dependency can be set on the directory containing ProductAssemblyInfo.cs for each individual build in your product deployment.  That way, the entire product will rebuild automatically with new version numbers after ProductAssemblyInfo.cs has been modified.

kick it on DotNetKicks.com

Tags: , , , , ,

How Not to Respond to User Requests for Functionality

I love ReSharper.  I am using Visual Studio 2008 and Jetbrains does not have a released version of ReSharper that completely works with the new language features in C# 3.0.  This morning I was looking at the ReSharper newsgroup to see if there is any discussion about the upcoming 4.0 release and I did find an informative discussion.  A user of ReSharper was met with an interesting reply when he asked when the product would support the C# 3.0 language features.  I have removed names and links that would identify people because the purpose of this post is not to embarrass people.

Hello <potential user>,

It seems to me there are two parts in the topic.

First, current state of ReSharper in regards of VS2008 I tried to address
in my post here: <link to post at employee’s personal blog>

Second, why do you need to use C# 3.0 right now? It is not mature enough,
it is not tested in industry, pitfalls and glitches are not known yet, there
are plenty of scepticism out there on the web and nobody really knows how
to work with it. Well, there are some marketing and other "it’s so cool"
stuff on the web, but do you believe that LINQ or extension methods will
do their job better than existing solutions like ActiveRecord (http://www.castleproject.org/activerecord/index.html)
and other alternative, non-microsoft tools? We really want to know this,
honestly. There is so much buzz about how cool "var" keyword or automatic
properties are, but with ReSharper you almost don’t need them 🙂 
So, could you please tell us, why do you need to use VS2008 with C# 3.0 right
now?

Sincerely,
<employee>

JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

After a few users chimed in with WTF types of responses, <employee> realized that this was probably not the correct way to respond and attempted to rectify the situation with the following reply.

Hello <another potential user>,

My apologise, I didn’t mean to abuse anyone. I just expressed my own opinion,
it is community newsgroup after all 🙂 May be I was too much expressive…

Anyway, I’m really interested in the reasons people are so anxious about
VS2008 and C# 3.0. And more than that, I’m interested why people need it
*now*! It was out there for a while, in a CTP, then Beta. Release in not
something that significantly changes products like VS2008 or .NET 3.5.

For me, I have to use VS2008 and C# 3.0, so that ReSharper 4 will be good
in terms of usability, feature set and language support. If I were developing
business application, I’d wait several months while constantly monitoring
the web to understand the problems I may have when I upgrade. That’s how
I would treat VS2008 release if I were on different project. On the other
hand, if I were on the hobby-project or something research-like, I’d be using
Orcas since any time it was usable to write code and do not crash too often.
For me, "RTM" mark doesn’t change much.

Sincerely,
<employee>

JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

First, I would like to say that ReSharper is an outstanding product and I have a great deal of admiration for the Jetbrains developers.  As a Visual Studio addin developer, I realize how difficult the functionality is to develop that they have in their product.

That said, these were both terrible posts.  I realize this employee was voicing his own personal feelings but it was on a newsgroup for the company’s product and the signature of the post makes it seem like an official company stance on the matter.

There are two major roles in software development:  users and developers.  I know there are actually many more than that, like QA staff, technical writers, project managers, etc. but I am lumping all of those roles into developers for this discussion.  If you are in the developer category, people in the user category tell you the functionality they want.  Your job, as a developer,  is to evaluate those requests and to deliver that functionality if it is cost effective to do so.  Obviously, you can’t spend a huge amount of money working on a feature that will never make back your investment in that feature. 

However, in this case, users want the product to work with the latest C# language features and I do not think that is unreasonable for them to expect.  There was a long beta period for VS.net 2008 and I know that the VS.net SDK documentation was not kept up to date with the beta releases, which makes it difficult for addin and package developers to release products simultaneously with the Visual Studio release.

Yes, Visual Studio betas are not always stable.  Yes, supporting C# 3.0 was very difficult even for the Microsoft compiler developers.  That is why people are paying for ReSharper.  The product does amazing things that are difficult to develop.  If it were easy, nobody would need to buy the product.  Instead, they would develop it themselves.  In fact, there is a value proposition that every potential customer of every development or support tool product weighs when they look at options to fill a need. 

"Will it cost me more to develop the equivalent functionality than it will to buy it?"

 In the case of ReSharper and Visual Studio addins specifically, the question is more like

"Will this product pay for itself by increasing my productivity to cover the cost of the initial expense?" 

If you need to use C# 3.0 features, the answer currently for ReSharper is more questionable than it has been in the past.

Telling your users that the features they want are not important right now is a sure way to get them looking at your competitors.

Tags: , ,

« Previous Page