Still looking for a sponsor Max Paulousky is looking for a Silverlight/.Net job in the Commonwealth

Share to Facebook Tweet this! Share to MySpace Share to Google Share to Live   Share via AddThis

Xaps Minifier. A Step Forward. New Options and New Features

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.

Xaps Minifier Settings Window

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).

This work is licensed under a Creative Commons Attribution By license.

Leave a Comment [ RSS ]

  • Silverlight Cream for August 31, 2010 -- #937

    In this Issue: Benjamin Gavin , Haruhiro Isowa , Scott Fletcher , Georgi Atanasov , Timmy Kokke , Kirupa

  • re: Xaps Minifier. A Step Forward. New Options and New Features

    Requesting Gravatar... Carsten says:

    Great tool!

    The only thing I miss is a configuration option to exclude unit test silverlight projects by their names. My test projects usually start with "Tests." and use nunit. This test framework needs to have local copies of all referenced assemblies in the output folder.

    I managed to modify your sources to my needs, but would really appreciate an official config section for this.

    Cheers
    Csraten

  • re: Xaps Minifier. A Step Forward. New Options and New Features

    Carsten,
    Some projects are not marked by default because the add-on thinks that they should not be optimized

    You can uncheck all startup projects you suppose they should not be optimized (test projects) and then check option 'Do not show dialog....'

    So, in that case all your test projects will not be optimized. if you do not see the dialog now, please hold the Shift button while clicking on the Minify Xaps menu item (or delete settings file XapsMinifier.config for your solution)

    Hope, this helps

Comments have been closed on this topic.