Blogs

Rory Becker - DevExpress CodeRush Blog

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.

Published Sep 02 2011, 04:00 PM by Rory Becker - DevExpress
Filed under: , ,
Technorati tags: References, Plugin, Project
Bookmark and Share

Comments

No Comments
More from DevExpress
Live Chat
Have a pre-sales question?
Need assistance with your evaluation?
We are here to help.
Chat is one of the many ways you can contact members of the DevExpress Team. We are available Monday-Friday between 8:30am and 5:00pm Pacific Time.
If you need additional product information, require pre-sales assistance, or want help with your order, write to us at info@devexpress.com or call us at
+1 (818) 844-3383.