Summary: Migrating to Microsoft Robotics Studio 1.5 from an older version

Use the DSS Project Migration Tool (DssProjectMigration.exe) to convert DSS projects that were developed for an earlier version of MSRS to target the current installation version. The dssProjectMigration.exe tool will convert the project files and service definitions in the source code to match the latest design and API. However, after migrating you may still need to do some manual fix ups on your projects for it to compile and work as desired.


When migrating to MSRS v1.5 consider the following changes:

Version Specific References (warning MSB3245)

If you see Could not resolve this reference warnings for DssBase, Ccr.Core, or DssRuntime, this indicates that you are attempting to compile a project which was written for a previos release of Microsoft Robotics Studio, AND the project references in the project are marked with Specific Version.
* ... : warning MSB3245: Could not resolve this reference. Could not locate the assembly "DssBase, Version=1.0.313.2, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.
Walk through the references in your project. Mark all MSRS References as follows:
* Copy Local : False
* Specific Version: False

TimeSpan is not supported by the Xml Serializer

TimeSpan is not supported as a DataMember. It has never fully worked because it is not Xml Serializable. For 1.5 use DateTime instead.

DssEnvironment.FindService is obsolete.

Use DssEnvironment.DirectoryQuery instead to asynchronously query the service directory for a running service. See Hosting Tutorial 2 (samples\HostingTutorials\Tutorial2\CSharp\HostingTutorial2.sln) for an example of how to use it.

PortSet Definitions

* "Portset is invalid" - All operation types which inherit from another operation type on the same portset must come before the base type in the portset definition.
* For example, Subscribe must be preceeded by ReliableSubscribe. Otherwise, you will see the following error:
		 *** Error: [Microsoft.Robotics.Services.LegoNxt.LegoNxtOperations] Portset is invalid. 
		     Subscribe must be preceeded by [Microsoft.Robotics.Services.LegoNxt.SelectiveSubscribe.]
	
* See an example of PortsetIsInvalid errors and find out how to resolve this compilation error.

* In order for a DSSP Operation to be included in a proxy, it must be defined on the primary ServicePort PortSet in the same namespace where the operation is declared. In MSRS 1.0, all PorSets which inherited from DsspOperation were transferred to the proxy, even if they were only used on internal (private) portsets. For example, now if a portset FooOperations is defined in namespace FooNamespace, and is the only portset to reference a particular operation type Bar in BarNamespace, the Bar operation type will not be transferred to the proxy, and a compile error will be generated in the proxy when defining the FooOperations portset.

* ServicePort is no longer an acceptable attribute for ResponsePort definitions. A DSSP Portset definition is only carried over to the proxy if it is the primary service operation port. Code must be rewritten if it depends on named portset defitions.

		    Example:
		    [ServicePort]
		    public class [SpecialResponse:] [PortSet<SpecialDataContract,] Fault>{}
	

All file paths are now relative to the MSRS installation directory

In MSRS 1.0 all the file paths were relative to MSRS installation directory except the persistent (InitialStatePartner) URIs which were relative to the store directory. As of MSRS 1.5 all of the paths are relative to the installation path. If you want the initial state file to still be in store then you can add that to the path when you declare the initial service partner like this:

InitialStatePartner(Optional = true, ServiceUri = ServicePaths.Store + @"/MyServiceInit.xml")
private _state = null;

Related Links

* PortsetIsInvalid
* MSRoboticsStudio
Microsoft Communities