This add-in for Visual Studio will make it very easy to add a reference to a gem to your project. Change LogVersion 0.1.3 (2010-09-01)
Version 0.1.2 (2010-08-11)
Version 0.1.1 (2010-08-10)
Version 0.1.0 (2010-08-09)
Prerequisites
Installing Nu for Visual StudioDownload and open the NuForVS.vsix file from the Downloads page. This will execute the Visual Studio Extension installer. Restart Visual Studio to enable the extension. Using Nu for Visual StudioTo add a reference to a gem, right-click on your project and select Add Nu Reference… A window will be displayed with the currently installed gems. Select one or more gems in the list and clickInstall Gem. You can also double-click on a gem to install it. If the gem is not listed, type the name of the gem in the text box and click Install Gem or press Enter. If you are not sure of the name, you can search for a gem by entering part of the name in theSearch Gems box. Press Enter to search. A list of gems will be displayed that match your search criteria. If the gem is not installed locally, it will displayYes in the Remote column. When you install a gem, it will call “nu install gem” and the output will be displayed in the output area. If the gem is not installed locally, the gem will be downloaded from the gems server and installed in your gem cache. All of the gem’s dependencies will also be downloaded. Nu will then copy the lib folder to thelib folder in your project root. Nu for Visual Studio will then scan the lib folder for assemblies to reference. If a gem has a single assembly, it will be automatically referenced in your project. If a gem has multiple assemblies, NuForVS will display a list of all gems and the available assemblies. Check the assemblies you want to reference. You can check the gem to includeall assemblies. NuForVS knows what the target framework version of the current project is. When it scans for assemblies, it will check to see if there are version specific assemblies like (net-2.0, net-3.5). It will reference the assemblies with the greatest version number that is not later than the target framework version. That is, it will reference net-3.5 assemblies, but not net-4.0 if targeting .NET Framework 3.5. Configuring Nu for Visual StudioThe options page is currently work in progress. For now it is simply a text box that you can use to modify the config.ini that is located in%AppData%\Roaming\NuForVS There are 2 sections in the config file. The general section contains the following items:
The next section is for auto-references. As stated above, when NuForVS scans for assemblies, it will only auto-reference an assembly if there is only 1 assembly in the gem. Otherwise, it will prompt for which assemblies to reference. My goal for NuForVS was to make sure “It Just Works”. There are some common gems that have multiple assemblies that we want to auto-reference. This section lists those gems and which assemblies to reference. The format is: gemname=assemblies Where assemblies is a comma-delimited list of assemblies. These assemblies are relative to the /lib folder. You can use the wildcard * to reference all assemblies in a given folder. [auto-reference]autofac=Autofac.dll,Autofac.Configuration.dllcastle.core=Castle.Core.dllnhibernate=/Required_Bins/*nunit=/framework/nunit.framework.dllnlog=/Mono 2.0/*mbunit2=MbUnit.Framework.dllxunitnet=xunit.dll Future EnhancementsThe next version of NuForVS will include a feature called Saved Sets. This will allow you to select multiple gems as a named set that can be installed with one click. This will be useful for configuring your common development stack. Questions and FeedbackIf you have any questions about Nu for Visual Studio, feel free to contact me via Twitter @kiliman or on theNu project site |