Alessandro Del Sole's Blog

{ A programming space about Microsoft® .NET® }
posts - 1909, comments - 2047, trackbacks - 352

My Links

News

Your host

This is me! Questo spazio è dedicato a Microsoft® .NET®, di cui sono molto appassionato :-)

Cookie e Privacy

Disabilita cookie ShinyStat

Microsoft MVP

My MVP Profile

Microsoft Certified Professional

Microsoft Specialist

Xamarin Certified Mobile Developer

Il mio libro su VB 2015!

Pre-ordina il mio libro su VB 2015 Pre-ordina il mio libro "Visual Basic 2015 Unleashed". Clicca sulla copertina per informazioni!

Il mio libro su WPF 4.5.1!

Clicca sulla copertina per informazioni! E' uscito il mio libro "Programmare con WPF 4.5.1". Clicca sulla copertina per informazioni!

These postings are provided 'AS IS' for entertainment purposes only with absolutely no warranty expressed or implied and confer no rights.
If you're not an Italian user, please visit my English blog

Le vostre visite

I'm a VB!

Guarda la mia intervista a Seattle

Follow me on Twitter!

Altri spazi

GitHub
I miei progetti open-source su GitHub

Article Categories

Archives

Post Categories

Image Galleries

Privacy Policy

Announcing Vsi Builder v. 1.0

Introducing Vsi Builder

Vsi Builder is an application for developers who use Microsoft Visual Studio 2005/2008 or single Express editions.

It can build redistributable .vsi (Visual Studio Content Installer) installation packages to deploy additional contents for Visual Studio as code snippets, add-ins, macro projects, templates and starter kits, Visual Studio settings, debugger visualizers, toolbox controls.

Even if it is not a code snippet editor, Vsi Builder allows you to create .vsi packages containing multiple code snippet, in a different way from Microsoft Snippet Editor 2005 which allows you to export to .vsi only one snippet at a time. By the way, you should still use this application as a code snippets editor.

You can download Vsi Builder from Visual Basic Tips & Tricks web-site

System requirements and prerequisites

Vsi Builder requires that Microsoft .NET Framework 2.0 is installed on your machine.

To be able to build and use .vsi packages, Microsoft Visual Studio 2005/2008 (or at least one of the Express editions) must be installed on your machine.

10 Megabytes of available disk space are required for setup.

Notices about Windows Vista

Vsi Builder frequently reads/writes files from/to disk. If you are running the application on Windows Vista systems, you should run it with Administrator permissions (right mouse click on the link in Start menu, then click on Run as administrator).

Menus and toolbars

File menu

Command: Add content items 

Allows you to specify Visual Studio 2005 additional contents to be included in a .vsi installation package.

Command: Specify End User License Agreement

Lets you specify a license agreement for the .vsi package, according to these two choices:

                 Command: Existing text file 

                 Adds a license agreement to the .vsi package importing the content of an existing text file (.txt).

                 Command: Type new text

                 By this choice you can manually type the content of the license agreement for your .vsi inside a dialog box.

Command: Quit

Exits the application and goes back to Windows

Edit menu

Removes items  from the contents list

Command: Erase contents 

Empties the contents list previously specified for .vsi creation.

Command: Remove selected 

Removes from the list only selected items. You can obtain the same result by pressing DEL. 

Build menu

Command: Build .vsi package

Creates .vsi packages for Visual Studio 2005/2008 containing the items specified with the File|Add content items command.

Command: Add EULA to packages

Determines if a .vsi package should contain a license agreement. By default, packages are marked with a license agreement (if one was specified).

Tools menu

Command: Apply digital signature to .vsi file

Allows you to digitally sign .vsi packages with Authenticode certificates.

Command: Uninstall contents

Shows a list of installed contents and lets you uninstall one or more.

? menu

Shows help and informations about Vsi Builder

Command: Vsi Builder help topics

Shows this help file

Command: Vsi Builder's home page

Shows the Vsi Builder dedicated web-site

Command: Send feedback or report a bug

Allows you to send comments, suggestion or bug reports to Visual Basic Tips & Tricks' support about Vsi Builder.

Command: About Vsi Builder

Shows the About dialog which contains also Copyright informations and third party components informations.

Target environment control box

Allows you to choose whether .vsi packages must target Visual Studio 2005 or Visual Studio 2008 when installing contents or if uninstalling contents must affect Visual Studio 2005 or Visual Studio 2008.

Vsi Builder can create redistributable .vsi packages for the following kind of Visual Studio 2005/2008 additional contents:

  • Code Snippets;
  • add-ins;
  • macro projects;
  • Visual Studio settings (.vssettings files);
  • project templates/starter kits;
  • item templates (e.g. single forms or classes templates);
  • user controls to be added to the toolbox;
  • debugger visualizers.

Simply use the File|Add contents command to select contents you want to include in a .vsi package, or click the button on the toolbar.

The appearing dialog automatically opens the default Visual Studio 2005 contents folder, which is determined by reading the registry. You can use  the file  types filter to limit your search to a given content type. Multiple selection is allowed for files of the same type.

This list shows folders where Visual Studio 2005 stores additional contents:

Content type Directory
Code Snippets \Documents\Visual Studio 2005\Code Snippets
IDE Settings \Documents\Visual Studio 2005\Settings
Exported templates/starter kit \Documents\Visual Studio 2005\My Exported Templates
Base templates/starter kits \Documents\Visual Studio 2005\Templates
Macro projects \Documents\Visual Studio 2005\Projects\VsMacros80
Debugger visualizers \Documents\Visual Studio 2005\Visualizers

Regarding add-ins, compiled help files, toolbox controls, other templates and code snippets, directories can be different so it's your job to search the disk.

The work area is divided in two columns. The first column contains the full pathname for files you have added, while the second one explains the content type. Take particular care when you add debugger visualizzers and toolbox controls: since both have .dll extension, Vsi Builder will store content types depending on what filter you used in the file selection dialog. It is very important to be sure that selected files correspond to selected file type filter. 

You can read some file informations scrolling the list. To remove one or more content from the list, select the files to remove by pressing CTRL + click, then press DEL.

You can specify an End User License Agreement for your .vsi packages. When the packages gets launched, the EULA will appear as first and your user will have to accept it before proceeding. 

EULA is specified as text and you have to select or type it before building the .vsi package. By default, Vsi Builder always include the EULA (if specified) inside .vsi packages. You can change this setting with the Add EULA to the package of the Build menu.

There are two ways to indicate the EULA:

  • importing an existing text file;
  • manually typing the text of the EULA.

In the first way you can add the EULA contained in an existing text file (.txt), by the File->Specify End User License Agreement->Existing text file command. In this way a dialog will appear and you will be able to select the desired text file.

In the second way it's possible to manually type the EULA text calling the File->Specify End User License Agreement->Type new text command. Using this second feature, Vsi Builder shows a dialog box where you can type in your license agreement. Click OK when finished. Vsi Builder keeps in memory the EULA text and will show every time the window is called.

Building the Vsi packages

Once you have added to the list the new contents for Visual Studio 2005 that you want to deploy, you are ready to build an installation .vsi package. 

To make this, just call the command Build .vsi package from Tools menu.

In the appearing dialog, you will have to select the destination folder and a name for the .vsi package. Vsi Builder builds a single .vsi package which allows developers to install simultaneously all the specified contents.

If the job is succeeded, Vsi Builder will ask if you want to launch the newly created package. You should verify that the package works correctly before you distribute it.

Once the .vsi package is built, you can sign it with a digital signature by the Add digital signature command in the Tools menu.

Notices about usage with Visual Studio 2008

Vsi Builder v. 1.0 has been created for .NET Framework 2.0. Anyway it can build .vsi files bound to work with both Visual Studio 2005 and Visual Studio 2008. To determine the target development environment for your additional contents, you can set the value of the Target environment combo box on the toolbar. By selecting Visual Studio 2008 as the target environment, you will be able to run built .vsi packages only on this Visual Studio version (they will be available as well also for the final release). On the contrary, supposing you have installed both Visual Studio 2005 and Visual Studio 2008, by selecting Visual Studio 2005 as the target environment, you will be able to run .vsi packages on both editions. During installation Visual Studio Content Installer will allow you to choose which development environment will receive the contents (Visual Studio 2005, Visual Studio 2008 or both).

Signing .Vsi packages

It is possible to apply a digital signature to .vsi packages by using Authenticode certificates.

You can buy an Authenticode certificate from one of the special authorities or create a personal certificate running the MakeCert.exe .NET Framework utility (you must not use this for deployment). It could happen that a signed .vsi file will not work. In this case you should contact the certificate vendor, since in the most cases this kind of error derives from the lack of an additional internal counter inside the certificate.

To digitally sign an existing .vsi package, choose the Tools|Apply digital signature to .vsi file command. In the appearing dialog box just specify the .vsi package to sign. Then you have to select the Visual Studio version run-time, since Vsi Builder makes use of some tools provided with the IDE and it determines which versions are installed (2005/2008).

Once set this, click Apply signature. First of all Vsi Builder creates a self-extracting .exe file starting from .vsi package, because this executable is suitable to receive the digital signature. Then Vsi Builder runs SignTool.exe, a tool included in the .NET Framework SDK which allows to apply digital signature to executable files. Vsi Builder automatically sets the file to sign, that you must not modify.

You just have to complete the next steps of the wizard. Vsi Builder requires your interaction during these steps, while running SignTool, to let you choose the most appropriate certificate (from file or from the local store).

After the .exe is signed, Vsi Builder will ask you if the job has been successful (you can acknowledge this depending on the messages shown by SignTool). If everything succeeded, Vsi Builder builds a new signed .vsi package. If not, Vsi Builder removes temporary files and closes the dialog.

Remember that you should always to check if the signed .vsi works before you distribute it.

Technical considerations

This application makes use of a tool called MakeZipExe.exe, which is shipped with Visual Studio 2005. If Service Pack 1 for Visual Studio 2005 is not installed, you could get some problems in digitally signing .vsi packages because of a known issue in the first release of MakeZipExe.exe. To solve this issue you should download and install the Service Pack 1 for Visual Studio 2005 which will install a new version of MakeZipExe. If you build .vsi packages for Visual Studio 2008 you should not experience this issue.

Uninstalling additional contents

Vsi Builder v. 1.0 implements a really useful feature which allows you to uninstall previously installed contents for Visual Studio 2005/2008.

Determining Visual Studio version

Vsi Builder supports uninstalling additional contents for both Visual Studio 2005 and Visual Studio 2008. To remove contents for a given version of the development environment, from the combo box on the toolbar of the main window select the desired environment (Visual Studio 2005 or Visual Studio 2008). Then, launch the uninstaller tool.

Uninstalling contents

Choose the Tools|Uninstall additional contents command, or click the button on the toolbar. In this way, a dialog will appear showing a list of all installed contents. For each item Vsi Builder shows informations like content type, description, installation date/time.

You have just to select the items you want to be removed, then click on Uninstall. A confirmation message will appear before proceeding with deletion.

Technical considerations

When installing new additional contents for Visual Studio 2005/2008, Visual Studio Content Installer stores the list of installed items in a XML document called ContentInstallerHistory.xml, which resides in the \Documents\Visual Studio 2005 (or \Documents\Visual Studio Codename Orcas) folder and it is hidden. At each new installation the file gets updated with new contents.

To remove additional contents, Vsi Builder reads the content of this file and rewrites at the end of the job. If you get errors during this time (even if tests done never threw this situation) Vsi Builder creates a backup copy of ContentInstallerHistory.xml. The application will show instructions to manually execute operation for restoring the XML file in case of errors.

Sending feedbacks and reporting bugs

You can send to Visual Basic Tips & Tricks comments and suggestions or report bugs about Vsi Builder during its usage.

To perform this, you can use the form provided by calling the command Send a feedback or report a bug in menu ?.

You just have to select the kind of feedback (comment/bug) and write the message body. Your message should be the most detailed possible so that the development team can understant and solve problems as precisely as they can, or evaluate the best way possible your suggestions.

Print | posted on domenica 9 dicembre 2007 18:18 |

Powered by:
Powered By Subtext Powered By ASP.NET