Abstract
Almost two months has come since the previous release of Xaps Minifier (see part 1 and part 2). This add-on has been downloaded from the Visual Studio Gallery site more than 450 times and I am sure it is pretty successful. I have some ideas and time to implement them has come.
First of all, I want to add ability to avoid adding references to startup projects. Some professionals claim it’s essential to have a tiny startup project to avoid disappointing users. I do agree and I must implement an option to protect startup project from adding new assemblies into it.
The second feature I want to implement is being able to process multi-startup solutions. In many cases developers create more than one startup project (projects for unit testing is startup ones) in a solution and the add-on could not help them in that case.
As a result, I have to implement a window with a set of options and display it in the begin of minifying action.
Settings Window
I would like to start from the settings.
As you can see, the window has options for mentioned features. There are special information areas where you can get additional notes about each option.
When a user start the Minifier the first time, it will get a window with default settings. The first one (Add new reference assemblies...) will be checked to maximize effect of the minifying process. If you want to keep startup projects as small as possible and minimize the rest of xap files, uncheck it.
The second option allows choosing startup projects to minify. By default, the add-on do not select projects that have “.Test” occurrence in the name. In most cases such projects are test ones and do not need to be minimized. If a new project has been added/removed to/from the solution since the last minifying action, the window will be displayed, previous and new states of startup projects will be merged and displayed in a listbox control. All new projects except ones with “.Test” occurrence will be added as checked. The add-on compares projects by ProjectGuid property (see *.csproj files for more) so, developers are free to change project names – they will be processed correctly.
The last option allows using saved settings without displaying the window. If a user wants to see the settings window, they can hold the Shift button while clicking on the Minify Xaps menu item. By default it is checked.
Each option allows getting detailed information about the impact on the minifying process. Just move the mouse cursor to an info icon and you will get a tool tip.
After clicking the Ok button, the add-on will store settings (XapsMinifier.config) at the same folder where the solution file is placed. After that, it will start the minifying process.
Implementation
First of all, I started using Mef to unite all parts of the application.
The rest of changes in the applications are clear for everyone who reads my previous posts about Xaps Minifier.
Sources and Binaries
You can download sources here. The package can be downloaded here.
Add-on Update
Developers can get new version of the add-on via Visual Studio Extension Manager. Check my previous post for details
Feedback
If you have any ideas to improve Xaps Minifier, let me know in any way (check my contacts here).