DSS Project Migration Tool (DssProjectMigration.exe)

Glossary Item Box

DSS User Guide: DSS Service Projects Overview

See Also Microsoft Robotics Developer Studio Send feedback on this topic

DSS Project Migration Tool (DssProjectMigration.exe)

The Decentralized Software Services (DSS) Project Migration tool allows migrating DSS service projects from pervious public releases and community technical previews (CTPs).

  <strong>dssprojectmigration.exe</strong> [options] [SearchDirectoriesAndFiles]

Parameters

Argument Description

SearchDirectoriesAndFiles

One or more directories to search for projects to convert, or one or more specific files to convert

Option Short Name Description

/Backup[+|-]

/b

Create backup for all changed files. We strongly encourage you to use backups to prevent irreversible corruption of your code.

/ForceMigrateReferencePaths[+|-]

/f

Forces update of relative paths regardless of MigrateProjectFiles or MigrateProjectUserFiles flags

/MigrateProjectFiles[+|-]

/p

Update project files to target this version of Microsoft Robotics Developer Studio runtime.

/MigrateProjectUserFiles[+|-]

/u

Update project user files.

/MigrateSourceFiles[+|-]

/s

Update source files with breaking changes.

/TargetDevice:

Remarks

Multiple versions of Microsoft Robotics Developer Studio (RDS) can be installed side-by-side on the same machine. Using the DssProjectMigration.exe utility you can convert service projects created by another version of RDS to target the current version of the studio. This enables you to migrate source code projects between different versions of RDS. In fact, any time that you upgrade or if you get source code from somebody else you should run DssProjectMigration.

The conversion happens in two steps:

  1. Modification of project files to use this version of the Microsoft Robotics Developer Studio Runtime.
  2. Modification of source code files to handle Application Programming Interface (API) changes between versions of RDS.

The conversion of source code between versions cannot be entirely automated. Some breaking changes between versions might require hand-editing. As a result you should expect to have to fix the code even after you have migrated the code using the DssProjectMigration tool. However, if you are importing already working code from a different computer that is running the same version of RDS, then it should compile correctly without changes after migration.

Once you convert a service project it can no longer be compiled with the other version of RDS unless you repeat the conversion in the other direction. The safest way to convert is to copy the project directories you want to migrate to somewhere under the installation folder of the current installation of RDS. Once you have copied the projects you can convert them as follows from a Microsoft Robotics Developer Studio Command Prompt:

DssProjectMigration <serviceproject1> <serviceproject2> ...

If your projects are located on another drive or a folder outside the installation folder then simply specify the folder where your projects can be found, for example:

DssProjectMigration "d:\dev\GpsTest" "d:\dev\MyRobotTest"

This will scan the folders for code and projects and you will see something like this:

        Microsoft Robotics Developer Studio Project Migration Utility

        Root Directory: C:\Microsoft Robotics Developer Studio
        Searching Directory: d:\dev

        Updating GpsTest.csproj ...
        Updating GpsTest.csproj.user ...
        Fixing Contract.Namespace reference in file: d:\dev\GpsTest\GpsTest.cs
        Fixing Contract.Namespace reference in file: d:\dev\GpsTest\GpsTest.manifest.xml
        Fixing Contract.Namespace reference in file: d:\dev\GpsTest\GpsTestTypes.cs
        Updating MyRobotTest.csproj ...
        Updating MyRobotTest.csproj.user ...
        Fixing Contract.Namespace reference in file: d:\dev\MyRobotTest\MyRobotTest.cs
        Fixing Contract.Namespace reference in file: d:\dev\MyRobotTest\MyRobotTest.manifest.xml
        Fixing Contract.Namespace reference in file: d:\dev\MyRobotTest\MyRobotTestTypes.cs
        Done

        C:\Microsoft Robotics Developer Studio>

Note that all sample services are shipped in Visual Studio 2010 (VS2010) project format. If you have older VS2005 or VS2008 solutions/projects they can be migrated using the command-line qualifier /vs2010. Once you have migrated to VS2010 you cannot easily go back to earlier VS versions without manually editing the solution and project files. Although these are XML files and can be edited in Notepad, this is only recommended to very experienced Visual Studio users.

Examples

Assume that you have upgraded to a new version of RDS. It is recommended that you keep all of your source code separate from the files that ship with RDS, say for example, in the Projects folder under the RDS installation point. To convert your code to the new version of RDS, open a DSS Command Prompt window and enter the command:

DssProjectMigration /b+ Projects

This will recursively migrate all the projects under the Projects folder and create backups first (because of the /b+) in case there are any problems during the migration.

Assume that a friend has sent you some source code in a ZIP file. To use this on your system you need to re-compile. Unzip the source into a folder under your RDS installation point, say FriendCode. Open a DSS Command Prompt window and enter the command:

DssProjectMigration /b- FriendCode

This will migrate all the services under FriendCode, but it will not create any backup copies. In this case, you have the original ZIP file so you do not need a backup and there is no point cluttering your hard drive with unnecessary copies.

See Also 

DSS User Guide: DSS Service Projects Overview

 

 

© 2012 Microsoft Corporation. All Rights Reserved.