Compile VPL as a Service Bug when using Text Functions Activity
I think I have found a bug when trying to compile my VPL as a service when it includes the TextFunctions Activity. The DiagramService.cs source that is code generated is not vaild C#.
To demonstrate, try this very simple VPL:
+-+ +-+
|Data | LastIndexOf |TextFunctions|
|"Hello World"...................... |
|String | | "a" |
+-+ +-+
Where the Data Connection paramerters are:
Value Target
-- -
value String
"World" Query
0 StartIndex
When you Build->Compile as a Service, the build log shows:
* generating manifest: C:\dev\HomeControl\vpl\temp\Application.manifest.xml
* Loading Program: file:///C:/Microsoft Robotics Studio (1.5)/43e9c71f-78b8-45bf-a824-b68809480cab/Application.program.xml
* Starting internal DSS Node on ports 50000 and 50001...
* Finding Proxy assemblies for partners...
* http://schemas.microsoft.com/robotics/2006/10/string.html
* Utility.Y2006.M08.Proxy, Version=1.5.507.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
* Processing Activities...
* Activity: program.activity
* A user defined activity.
* Processing Handlers...
* Handler: program.activity.Start+start
* Handler: program.activity.Action
* Creating file: C:\dev\HomeControl\vpl\temp\DiagramTypes.cs
* Creating file: C:\dev\HomeControl\vpl\temp\DiagramService.cs
* Compiling Assembly...
* Compiling...
*** C:\Microsoft Robotics Studio (1.5)\bin> "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\csc.exe" /t:library /utf8output /R:"System.dll" /R:"System.Xml.dll" /R:"System.Drawing.dll" /R:"C:\Microsoft Robotics Studio (1.5)\bin\ccr.core.dll" /R:"C:\Microsoft Robotics Studio (1.5)\bin\dssbase.dll" /R:"C:\Microsoft Robotics Studio (1.5)\bin\dssruntime.dll" /R:"C:/Microsoft Robotics Studio (1.5)/bin/Utility.Y2006.M08.Proxy.DLL" /out:"C:\dev\HomeControl\vpl\temp\bin\Application.Y2007.M08.dll" /D
* Creating project file...
***
***
*** Microsoft (R) Visual C# 2005 Compiler version 8.00.50727.42
*** for Microsoft (R) Windows (R) 2005 Framework version 2.0.50727
*** Copyright (C) Microsoft Corporation 2001-2005. All rights reserved.
***
*** c:\dev\HomeControl\vpl\temp\DiagramService.cs(20,7): error CS1041: Identifier expected, 'string' is a keyword
*** c:\dev\HomeControl\vpl\temp\DiagramService.cs(44,15): error CS1519: Invalid token '.' in class, struct, or interface member declaration
*** c:\dev\HomeControl\vpl\temp\DiagramService.cs(44,64): error CS1526: A new expression requires () or [] after type
*** c:\dev\HomeControl\vpl\temp\DiagramService.cs(201,29): error CS1519: Invalid token '.' in class, struct, or interface member declaration
*** Compilation Failed!
*** Failed!
What appears to be the problem is that an invalid "using" statement is generated:
using string = Microsoft.Robotics.Services.Sample.StringHelper.Proxy;
As you can see the reserved work "string" is used as an alias name!
Is there a work-around for this? I am using MSRS 1.5 Released version.
Any help is much appreciated.

