Transform Generator broken in 1.5?
There has been a change in the way that transforms are generated in the 1.5 CTP that has broken one of my services. I use a Vector3 in my initial state. Previously this worked fine (all the way through the CTPs up to and including V1.0). Now it falls over with an error during the initialization of the service when it tries to read the config.xml file and create the initial state. The problem is that it is trying to use CopyTo with a Vector3 and a Vector3.Proxy.
Here is the code generated for the transform under previous versions of MSRS:
// copy Microsoft.Robotics.PhysicalModel.Vector3[] target.WallColors = from.WallColors
if (from.WallColors != null)
{
target.WallColors = new Microsoft.Robotics.PhysicalModel.Vector3[from.WallColors.GetLength(0)];
for (int d0 = 0; d0 < from.WallColors.GetLength(0); d0++)
target.WallColors[d0] = (Microsoft.Robotics.PhysicalModel.Vector3)Transform_Microsoft_Robotics_PhysicalModel_Proxy_Vector3_Microsoft_Robotics_PhysicalModel_Vector3(from.WallColors[d0]);
}
Notice that this code explicitly copied the elements of the Vector3.
Here is the new code:
// copy Microsoft.Robotics.PhysicalModel.Vector3[] target.WallColors = from.WallColors
if (from.WallColors != null)
{
target.WallColors = new Microsoft.Robotics.PhysicalModel.Vector3[from.WallColors.GetLength(0)];
from.WallColors.CopyTo(target.WallColors, 0);
}
As this code is automatically generated, so I can't fix this problem unless I remove the Vector3 from the initial state. However, that simply ignores the problem.
By the way, I have a reference to Robotics.Common and the following using statement:
// This is needed for the colors (Vector3)
using
Microsoft.Robotics.PhysicalModel;If I change this to use PhysicalModel.Proxy, the code will not compile because Vector3 (not the Proxy version) is used all over the place in other code throughout MSRS, e.g. CameraView.EyePosition.
Trevor

