New Plugin: CR_ProjectReferenceDefaults

This week’s CodeRush Feature Workshop saw the creation of a plugin to manage the values given to properties of a reference, when it is first added to your project.

Background

When you add a new reference to a project…

For Non GAC assemblies, Copy Local typically defaults to true with Specific Version defaulting to false.
For GAC Assemblies, Copy Local typically defaults to false with Specific Version defaulting to true.

However this is not always the effect you’re looking for.
For example. I mostly code plugins on my Laptop and would prefer…

For Non GAC assemblies, Copy Local should default to true with Specific Version defaulting to true.
For GAC Assemblies, Copy Local should default to false with Specific Version defaulting to false.

These are clearly personal preferences and everyone will have their opinions.

CR_ProjectReferenceDefaults allows you to change the default values of these properties, so that all new references take on the values you decide.

Limitations

Note: This version does not provide for differences between GAC and NonGAC assemblies and chooses to treat them the same way. However the code is relatively simply and should be very easy to extend.

Configuration

Configuration is simple.

  • Visit the Options Screen (DevExpress\Options or Ctrl+Shift+Alt+O)
  • Locate the Project\Default Reference Properties page.
  • Adjust options to suit and click Ok.

Note that each of the 2 options, can be set to any of 3 values. The default value of these is indeterminate, which means that no action will be taken for this property when the reference is added. The other values (checked and cleared) represent the true and false states that will otherwise be assigned to the property in question.

DefaultReferenceProperties

Usage

Usage is automatic. Once the plugin is installed and configured, adding a reference will trigger a post add operation, which will alter the properties as configured.

So what are you waiting for? Go download CR_ProjectReferenceDefaults now.

Free DevExpress Products - Get Your Copy Today

The following free DevExpress product offers remain available. Should you have any questions about the free offers below, please submit a ticket via the DevExpress Support Center at your convenience. We'll be happy to follow-up.
No Comments

Please login or register to post comments.