Leon Meijer's Weblog

About my personal life, technology and business/work related...
posts - 129, comments - 305, trackbacks - 0

Using WCF ServiceContracts with the .NET Compact Framework

The .NET Compact Framework 3.5 is only a subset of the full framework. One of the limitations is that you cannot talk to WCF services using ServiceContracts.

Microsoft released a long time ago PowerToys that can generate a WCF proxy to overcome this problem.

One of the application of the PowerToys is NETCFSvcUtil.exe. This tool generates two files. One file does the magic, the other is the implementation of the proxy client. You can add these two files to your Windows Mobile solution in order to communicate with WCF services. Unfortunately it only supports the basicHttpBinding and not the more powerfull wsHttpbinding.

I added the path of the PowerToys to my Visual Studio 2008 Command Prompt variables. I added the PowerToys path (C:\Program Files\Microsoft.NET\SDK\CompactFramework\v3.5\bin) to the vsvar32.bat file which is located in C:\Program Files\Microsoft Visual Studio 9.0\Common7\Tools.

Now it looks like this:

@set PATH=C:\Program Files\Microsoft.NET\SDK\CompactFramework\v3.5\bin;C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE;C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN;C:\Program Files\Microsoft Visual Studio 9.0\Common7\Tools;C:\WINDOWS\Microsoft.NET\Framework\v3.5;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727;C:\Program Files\Microsoft Visual Studio 9.0\VC\VCPackages;%PATH%

Print | posted on Tuesday, March 03, 2009 2:01 PM |

Feedback

Gravatar

# re: Using WCF ServiceContracts with the .NET Compact Framework

.Net Framework was open source even before it v1.0 release.Now you can even step in Framework's source code when you debug.The .NET Micro Framework has not been very successful, and yet it is key to the long term success of the .NET Framework as a one size fits all programming model for high level programming that still needs some performance and system-level ties...
3/10/2010 8:50 AM | jouer aux casinos gratuitement

Post Comment

Title  
Name  
Email
Url
Comment   
Please add 6 and 4 and type the answer here:

Powered by: