Building the satellite assemblies, Building from the command line – Pitney Bowes MapXtreme User Manual

Page 611

Advertising
background image

Appendix K: Localization Kit

How to Use the Localization Kit

MapXtreme v7.1

618

Developer Guide

Most of the .resx files are contained in Resources folders under each project. The Windows and
Windows.Dialog resources are located in Controls or Dialogs folders.

Building the Satellite Assemblies

Satellite assemblies are optional, standalone assemblies that contain just the compiled resources.
Once you have your .resx strings translated, you are ready to build your satellite assemblies.
Right-click on the project in Visual Studio and choose Build. Each project will generate a bin folder
with a language/locale-specific folder containing the assembly. The file naming convention for the
assembly is patterned after the English assembly name with the extension of .resources.dll. For
example, the WebControls assembly would be called MapInfo.WebControls.resources.dll.

At runtime, MapXtreme will use the appropriate language/locale resource dll when one is provided
and the .NET Resource Manager is set to look for that satellite assembly. If no localized assembly is
found, the English assembly is used instead.

Signing Assemblies

The satellite assemblies you build with the Localization Kit are signed with one of the following
strong named public keys (included in the kit):

MapInfo.CoreEngine.Public.snk

MapInfo.Ogc.Public.snk

MapInfo.WebControls.Public.snk.

MapInfo.CoreEngine.Public.Snk is the public key for all assemblies except for
MapInfo.Ogc.resources and MapInfo.WebControls.resources, which have their own public keys.
Signing your satellite assemblies with these public keys will allow you to use the assemblies for
testing and debugging. In order to run MapXtreme using these assemblies, they must be put in the
global assembly cache (GAC). Only signed assemblies can be placed in the GAC.

Registering the Satellite Assemblies

The output satellite assemblies from the Visual Studio 2008 solution are not quite ready to be
installed into the GAC and tested. After the satellite assemblies are built and signed with the public
keys, they must be registered so that the .NET runtime will allow them to be loaded into the GAC.
The Strong Name Utility (sn.exe) must be run on each of the satellite assemblies to register the
assemblies for verification skipping. This command is sn.exe -Vr <assembly_name>. Once the
satellite assembly is registered to skip verification, the satellite assembly is ready to be tested.

Building from the Command Line

As a part of the MapXtreme Localization Kit, two MSBuild project files have been provided to simplify
the process of preparing the satellite assemblies for testing. The MSBuild project files will build, sign,
register the assemblies to skip verification, and install them in the Global Assembly Cache. For more
information on MSBuild and its usage, visit

MSDN MSBuild Reference page

.

(http://msdn.microsoft.com/en-us/library/0k6kkbsd.aspx.)

The two MSBuild project files are LocalizationKit.proj and LocalizationKit.Utilities.proj.

Advertising