Can I use VSTA to create a program or add-ins that run on a mobile device, like a PDA?

 

Many ISVs would like to use VSTA as a development environment for mobile devices that run the Compact Framework version of the .Net  runtime. 

One common scenario has the ISV’s desktop/smart client app running VSTA customizations very nicely and a mobile version of the same app wishing that it could run the same VSTA customizations.  It can’t.

The following is a brief summary of the features that are excluded from the .NET Compact Framework.

  1. No application configuration files.
  2. No support for COM Interop.
  3. No support for remoting.
  4. No support for printing.
  5. No support for the SoapFormatter or the BinaryFormatter classes.
  6. No support for XPath and XSLT.
  7. No support for the System.Web namespace.

Here’s my thinking:

1. VSTA’s proxy layer bits use remoting, so we are certain that a ‘normal’ Addin assembly it could not be used with the .Net Compact Framework.  VSTA does not create applications (.exe), only addin assemblies (.dll) that must be loaded by a host application.

 

2. If the VSTA author created a blank project with no references to the proxy, or VSTA bits, they would be able to build a generic library assembly .dll.  However, the assembly would still need to be discovered, loaded and run by an application (all the things the proxy bits do for the addin assembly).

 

3. The generic assembly would load and run on the Desktop CLR, but not run on the Compact Framework’s CLR.

 

4.  Since the assembly will not load/run on Compact Runtime, we are left with a generic project and source in the VSTA IDE, with no way to compile/debug for target device.  Not much value there...

 

I am not familiar enough with CF designtime to know whether VSTA could be re-configured  (use different compiler, CF dependencies) to build an assembly that would load/run on the CF runtime.  It seems unlikely or at least quite ugly.  There are also CF debug/deployment issues that VSTA is not going to handle.

 

Some hopeful notes to end on: 

  1. Microsoft is very interested in software development for the mobile marketplace – strategically interested. 
  2. Because ISVs want to deploy VSTA addins on mobile devices it is being considered for a future version of VSTA.

 


Posted Dec 06 2006, 05:18 PM by Gary

Comments

Gary wrote re: Can I use VSTA to create a program or add-ins that run on a mobile device, like a PDA?
on 12-07-2006 1:56 PM

My mention of the CF design time was probably misleading.   The CF design time actually runs on the desktop computer (running the full-size CLR/.Net framework).  

I am assuming that, on mobile devices, ISVs want to deploy VSTA Addins for Runtime only and ISVs do not expect to create addin on the mobile device using VSTA's Design Time (IDE).

Here’s a clearer description:

==

In the case of the desktop .NET Framework both designtime and runtime code is executed by the desktop CLR. But for .NET CF, the designtime code is executed by the desktop CLR (hosted inside Visual Studio) while the runtime code is executed by the device CLR. This implies that for .NET CF components the designtime code targets the desktop .NET Framework while the runtime code targets the .NET CF.

(http://blogs.msdn.com/parthopdas/archive/2005/10/10/479085.aspx)

==

So (1) ideally, ISV wants to design/build the addin once (on desktop) and deploy twice (load/run on desktop and PDA).

The next best (2), would be to design once (VSTA IDE on desktop), build twice (on desktop and CF design time environment), and deploy twice (load/run on desktop and PDA).

.Net remoting is not supported by CF.  Therfore, only until the addin ceases to be an addin (reference to proxy assembly) and becomes a generic library assembly is there any possible CF code reuse.  Creating generic library assemblies is not the intended purpose of the VSTA IDE.  Even then, the assembly must be recompiled for the CF target, using a CF compiler, which may not be possible in VSTA’s IDE.

Copyright Summit Software Company, 2008. All rights reserved.