11 August 2011

Pex and Moles DevExpress CodeRush Templates

CodeRush Xpress (or with RefactorPro), from DevExpress, is probably the most useful and well-built IDE add-ons I have ever used. The templates are extremely useful, especially when you can modify them and create your own. Here are a few templates that I have created for Pex and Moles.


NOTE: These templates are for the Microsoft Test Framework, and will not work when in an NUnit project.  The template shortcut is highlighted in yellow, followed by a description and an example of its output.

How to Clear DevExpress CodeRush Assembly and Solution Cache

My employer has been wrestling with a juggernaut-class ASP.NET application, complete with an intermediary framework, that is a port of the soon-to-be-retired mainframe.  This is a colossal, 4GB monster with procedural C# files, frequently exceeding 30,000 lines.  Needless to say, CodeRush gets pretty busy, when we get a new revision from the external conversion company, every 2 weeks.

With 25GB of cache data, CodeRush really starts to drag down performance; WAY more cache data than most developers dreamed of.  Blowing the cobwebs out of DevExpress CodeRush cache every month or two helps keep things humming along nicely, around the office.

There are a few ways to clear out the assembly cache and solution cache:

05 July 2011

Assembly Not Available in the Currently Targeted Framework

Oh, dreaded .NET 4.0 target framework issue... how I loathe thee.

Symptoms

When attempting to compile a .NET application, using Visual Studio 2010, the build fails, and the following warnings, or similar warnings, are issued:
The primary reference "System.Configuration.Install", which is a framework assembly, could not be resolved in the currently targeted framework. ".NETFramework,Version=v4.0". To resolve this problem, either remove the reference "System.Configuration.Install" or retarget your application to a framework version which contains "System.Configuration.Install". 
The primary reference "System.ServiceProcess", which is a framework assembly, could not be resolved in the currently targeted framework. ".NETFramework,Version=v4.0". To resolve this problem, either remove the reference "System.ServiceProcess" or retarget your application to a framework version which contains "System.ServiceProcess".
I found that even though the .NET Client profiles are supposed to be a subset of the full profile, many assemblies, including the two noted above, are not included in the "Add Reference" dialog.  These assemblies properly appear in the Client Profile.  It's as if the list has somehow been modified.  Now, to identify the culprit...

15 June 2011

Introducing Moles and PEX

*NOTE: I am compiling materials for Pex/Moles presentations, and will post them here.  Production of the remainder of this series of posts is on hold, until then.  Sorry!


Microsoft's Research in Software Engineering (RiSE) has been developing a pair of unit testing technologies for the past several years, named MOLES and PEX.  Awareness and pre-market adoption of these technologies is being increasingly adopted by the programming community.

UPDATE:  Please see the new Testing with Pex and Moles page, that contains links to all related posts!