Here's a handy little tool for developers of add-on and customisation projects. This tool is free of charge and can be downloaded using the link at the bottom of this page.
A lot of our development work in Autodesk Consulting helps our customers make better and more effective use of Autodesk and related products through custom add-ons and enhancements. Most frequently, we use the functionality exposed by the application's .Net API. Some of our enhancements touch multiple Autodesk applications.
Autodesk has a yearly release cycle for much of the desktop range of products. In between yearly releases there can be one or more Service Pack releases. And in between Service Packs there can be hotfix patches. If you have a custom component for a product that uses the .Net API, then you will probably already know that each release, Service Pack and/or Hotfix could require that your component be re-built against the updated assemblies from the target application.
Introducing: Component Library Updater. This tool automates the tedious task of updating the API library files for one or more development projects.
Put simply, the tool looks for filename matches between an installed application's files and the files in your development code folders. When filename matches are found, the tool compares the files so that only files needing to be updated are displayed.
Some features of the tool are:
- Exclude pattern matching on the destination folders (i.e. your development code files) essentially allows you to target just the files in the 'library' folders.
- Files are first compared by version number and length, and only then by actual file contents. This, along with an optimised file difference engine, is why this tool has such a fast file analysis process.
I'll run through the use of the tool with a quick example of the tool being used for a set of components developed for Autodesk Map 3D. In this case, I am upgrading the components from 2013 RTM to 2013 SP1.
Source Path Specifications
This item specifies the locations and file types that will be used to source the updated dll files.
If you haven't already done so, install the target application and apply service pack, hotfix, etc. to get it to the version you are targeting. If multiple applications are involved, get them all installed and updated to the desired target version.
Source locations are specified by full paths and can include wildcards, but searching within these folders does not recurse subdirectories. Note also that if a file could be matched from more than one of the source paths, the tool will use the first path that contains the file.
You can use UNC paths here too, which means you can utilise an application that has been installed on another computer.
Fire up the tool and enter the source locations.
Target Root Folder and Exclude Pattern
These two settings define the set of folders that the tool will look for and update matching product dll's. The target root folder is where you checked out your source code for all the components you want to update. The exclude pattern allows you to exclude folders like 'bin', 'obj', etc. that typically contain dlls, but would be little value in updating with this tool.
At Autodesk Consulting our team typically keeps copies of the referenced product dll's with our source code. Frequently this is in a subfolder named 'lib', 'Library' or similar. This keeps our source code projects somewhat independent from what is installed on any particular machine.
Analyse
Once you have source and target settings entered, you are ready to perform an analysis run. This will populate the Items to Update panel, but no files will be modified at this point.
Note that you can run Analyse as many times as you like. This can be useful to in tweaking the exclude pattern so that you are targeting only the folders you want.
There are two views of the items to update. The folder view is essentially a summary, and tooltips display the list of matched files for each item.
Switch to the file view for details of the files that will be updated, including version numbers before and after.
In the file view, tooltips show the full path of the source file that will be used. This can be useful because the same file may exist in multiple source locations.
Update
Once you are happy with the list of files to be updated, click Update to proceed.
You should get a confirmation message letting you know how many files were updated.
Download
Windows binary: ComponentLibraryUpdater_1.0.0
Source (Visual Studio 2010): ComponentLibraryUpdater_1.0.0_src
No warranty is provided with this tool, but if you find it useful please let us know.
Comments
You can follow this conversation by subscribing to the comment feed for this post.