Welcome to MSDN Blogs Sign in | Join | Help

XNA Game Studio 2.0 Released

I just got an email about XNA Game Studio 2.0 being released this morning and thought I'd share since XNA includes parts of the .NET Compact Framework.

XNA Game Studio is a product from Microsoft that allows you to create games for Windows and the Xbox 360 using C#. We’ve seen a tremendous amount of great games from our community and recently several games were awarded publishing contracts based on the games that our customers produced in an ongoing contest called Dream Build Play.

 

In XNA Game Studio 2.0 some of the key features we’ve added are:

·         Networking Support over Xbox 360 and Windows using LIVE.

o   http://blogs.msdn.com/xna/archive/2007/11/16/xna-framework-networking-and-live-requirements.aspx

·         XNA Game Studio now supports all versions of Visual Studio 2005 (v1 was C# Express only)

·         Improved Xbox 360 Integration and Management Experience

o   http://blogs.msdn.com/xna/archive/2007/12/03/xna-game-studio-and-the-fall-dashboard-update.aspx

o   http://blogs.msdn.com/xna/archive/2007/11/19/hello-xna-game-studio-connect.aspx

·         Art and sound content can be processed through XNA Game Studio with parameters.

 

You can find the official announcement on our team blog at: http://blogs.msdn.com/xna/archive/2007/12/13/xna-game-studio-2-0-released.aspx  

 

XNA Game Studio 2.0 can be downloaded from:  http://creators.xna.com/Education/GettingStarted.aspx

 

-Dan

Posted by daniel.horbatt | 1 Comments
Filed under: , ,

Changes to NetCFSvcUtil in Power Toys for .NET Compact Framework 3.5 RTM

In order to fix a couple of bugs, as well as to enable a few edge case scenarios, there were some changes made to the NetCFSvcUtil.

  • CFClientBase has been modified.
  • There might be a change in the public API of a proxy class depending on the service that was being called.

What does this mean? If you generated a proxy class with a previous version of the NetCFSvcUtil and it worked then, it will still work now. If the service has changed, you merely need to call the NetCFSvcUtil on it again, and the updated proxy should work just as it did before. Future versions of NetCFSvcUtil are not guaranteed to generate identical proxies to current versions due to bug fixes and new features added to later versions.

Another thing that should be watched for is making sure that if there is a common CFClientBase source file shared across multiple generated proxies, it's important to keep the version of the CFClientBase and the proxies in sync.

-Dan

Posted by daniel.horbatt | 1 Comments
Filed under: , ,

Power Toys for .NET Compact Framework 3.5 have been released

The Power Toys for .NET Compact Framework 3.5 have just gone live at http://www.microsoft.com/downloads/details.aspx?familyid=C8174C14-A27D-4148-BF01-86C2E0953EAB&displaylang=en. If you downloaded a previous version, you might want to upgrade as there have been several bug fixes and improvements made to several of the tools.

What’s New

Many here are likely familiar with Remote Performance Monitor which shipped as a part of .NET Compact Framework 2.0 SP1 and the Heap Viewer extension that shipped 2.0 SP2. This time we’ve added the CLR Profiler based on the desktop tool, NetCF SVCUtil for making it easy to consume WCF services on device, and the App Config tool for creating config files on the fly. We’ve improved our remote tools platform to make it significantly easier to use: client side tools components now deploy automatically so tools “just work”, everything works with emulators and a common device manager UI is provided to keep tabs on all your remote devices.

Comprehensive documentation for the tools is now also provided out of the box in the form of a chm file.

The Tools

NETCF CLR Profiler – CLR Profiler is an instrumenting allocation profiler for NETCF applications. It provides detailed allocation visualizations, allocation callstacks and other views of the managed heap for diagnosing various memory management issues.

NETCF ServiceModel Metadata Tool – The .NET Compact Framework ServiceModel Metadata Tool (netcfsvcutil.exe) allows you to generate a Windows Communication Foundation (WCF) client proxy to help developers consume WCF services on device. Like svcutil.exe, which is the desktop version of the utility, netcfsvcutil.exe is a command-line tool that generates service model code from metadata documents and generates metadata documents from service model code.

App Configuration Tool - On-device tool for specifying what version of NETCF an application will run against (ie. Create config file), displaying installed versions of NETCF and displaying info about DLLs in the GAC.

Remote Logging Configuration Tool– The Logging Configuration Tool enables users to easily configure logging options on a NETCF device including: loader, interop, network, error and finalizer logs. (used to be a part of RPM)

Remote Performance Monitor and GC Heap Viewer – Provides real time counter data (ranging from Garbage Collector activity to type loading info) on a running NETCF application. The GC Heap Viewer feature allows you to capture the managed heap at any moment your app is running to view live references, and allows you to compare multiple snapshots to find memory leaks.

NETCF Network Log Viewer – A utility for viewing NETCF network log data.

Other Notes

Important to note is that there have been several changes to the NetCFSvcUtil, which I'll blog about shortly.

Steven Pratschner has a few links to some overview on the tools here: http://blogs.msdn.com/stevenpr/archive/2007/12/10/powertoys-for-the-net-compact-framework-version-3-5-now-released.aspx.

Enjoy!
-Dan

Posted by daniel.horbatt | 1 Comments
Filed under: , , ,

Mobile Blocks - Automatic Application Updating and Deployment

I was browsing through http://www.codeplex.com/ the other day and stumbled up Mobile Blocks.

Mobile Blocks is a framework to handle the deployment and maintenance of applications.

It touts the following features:

  • It helps you implement a "pull model" to automatically download updates for .NET Compact Framework applications.
  • It helps you perform pre-download and pre-configuration tasks based on device status queries.
  • It helps you perform post-download configuration tasks without requiring user intervention.
  • It helps you drive the download and configuration tasks from your live, already-running application, ensuring protection from data loss.
  • Which if you've developed applications for a large base of users can be lifesaving. Check it out.

    -Dan

    Posted by daniel.horbatt | 0 Comments
    Filed under: , , ,

    Remote Logging WCF on .NET Compact Framework

    Debugging WCF can be hard. Frusteratingly hard. Small details can easily cause failures; A simple namespace mismatch on an XML envelope, for instance, will cause the entire message to be dropped silently by the server. Luckily, WCF with the .NET Framework comes with several logging and debugging tools that allow you, the developer, to hook directly into the messaging stack and get all the information you need. Unfortunately, the .NET Compact Framework does not have these hooks due to size constraints and prerequisites that are also not implemented. What is one to do?

    You might have seen the .NET Compact Framework Power Toys CTP I blogged about earlier, and if you were thinking we might have something to help out included with that, then you would be absolutely correct. Here's a quick and dirty run-through on how to use our new remote logging tool for WCF. You can download these tools at this MSDN download link.

    First off, deploy your favorite WCF project/sample to your device or emulator of choice and then run the .NETCF Logging Configuration.

    Step 1: Connect the remote logger to your device

    Step 1

    This step is easy, simply select your device or emulator image from the device drop-down menu. The .NETCF Remote Logger will be deployed to the device and be ready to go.

    Step 2: Enable network logging

    Step 2

    While you can select other things to log, we only really care about the network logging, so check the Network box.

    Step 3: Run your program

    Step 3

    Run your program on your device and you should get the same dialog as shown above. Select yes to continue with the tracing. Now, go through your program and utilize WCF.

    Step 4: Copy the log file to your desktop

    Step 4

    In the same directory as your program, assuming you left the log file directory text box blank, should be a the log file netcf_Network.log. Copy this to your desktop machine either by using a shared folder set up through the emulator configuration or browsing to it after connecting your device or emulator to your machine through ActiveSync or the Windows Mobile Device Center.

    Step 5: Open the log file in the .NETCF Log Viewer

    Step 5

    From here you are able to see every single connection that was made and what information was sent over each of those connections. Shown for instance above is the sending of a simple Hello message wrapped in an XML envelope by one of our .NET Compact Framework WCF technology samples. More information can be shown, and additional columns can be added as needed to show virtually all of the status and data sent.

    Step 6-?: Where to go from here

    This is a powerful tool, and it can give you most of the information needed. There are a few problems with this approach though. This tool only will give you data sent and received by the device, so if you want the data sent and received from the server you're going to have to rely on the WCF logging solutions with the .NET Framework. Also, this approach is only effective when you can attach the .NETCF Remote Logger to the device. What about when the device is 'out in the field'?

    As is usually the case, there are alternative solutions to this problem as well. When moving WCF From the .NET Framework to the .NET Compact Framework, it was made sure that the extensability that was so popular with WCF was maintained. It is therefore possible to make a logging binding element that can be inserted wherever is needed in the WCF messaging stack for both the .NET Framework and .NET Compact Framework. Alternatively, it is possible to simply modify the XmlSerializerWrapper used by many of the samples to wrap up the message and have it write out the XML to a file as well as the networking stream.

    Please post comments if there is anything else you want me to run through with regards to the .NET Compact Framework and WCF.

    -Dan

    Posted by daniel.horbatt | 10 Comments
    Filed under: , ,

    Overview of Device Messaging Over the Internet

    The .NET Compact Framework has made programming for Windows Mobile based devices easier than ever and extremely similar to programming with .NET targeting a desktop. Still, there are numerous minute differences between the two that can lead to unexpected and unwanted situations. This posting will go over one of the major differences between the desktop and mobile platforms: Internet messaging.

    The Problems with Devices

    There are many near certainties when you program targeting computers running the .NET Framework. Your internet connection won't be immediately cut if you receive a phone call (unless you're using a dial-up modem). Barring an unreliable power grid, your computer will most likely not have to worry about running out of batteries while transmitting data. The OS virtually never gets into a state where it's forced to kill processes to continue operating. Last but not least, it's not really be possible to accidently drop your server into the toilet or accidently leave it on your seat after lunch. When you start talking about mobile devices however, all of these possibilities become reality.

     

    Pitfalls with Device Addressability

    Failed Communication Due to Device Addressability

    It's not easy to find a mobile device over the internet. Why? Because it's mobile. Device Addressability becomes a big issue, since when moving between access points on a wireless network the device's IP address is liable to change without warning. This problem is coupled with the fact that the mobile device could be in an area without service or have been shut off to conserve battery. Being able to communicate with the device through the cellular network, or with SMS text-messages is one option when communication is possible, but is potentially costly depending on the volume of traffic. Due to this, it is currently unrealistic to assume that a server can easily get in touch with a mobile device.

     

    The Request/Reply

    Simple Request/Reply Diagram

    With this being the case, the simple answer is just doing internet communication with requests initiated by the device. WCF with the .NET Compact Framework takes this into account for the default bindings and only supporting request/reply channels in .NET Compact Framework 2.0. This solves most of the aforementioned problems about device addressability, and allows the device to initiate communication when it's capable of handling the data. On the other hand, this introduces various other problems related to caching, timeliness of data, and reliability.

     

    Store and Forward Messaging

    Store and Forward Messaging Diagram

    In response to some of this, the .NET Compact Framework team developed Store and Forward Messaging for the .NET Compact Framework 3.5. This feature addresses some of the problems with caching by using some of the built in functionality of Windows Mobile. Utilizing ActiveSync's Always Up-To-Date, (more info on how that works here), it is now possible for data to get pushed to devices instead of pulling with requests. Also, since there already is an inbox and outbox associated with the Exchange mailbox, caching of the information is handled without additional work. While this enables scenarios that were not possible with the .NET Compact Framework 2.0, there still remains the issue with reliability, which I shall discuss in an upcoming blog posting.

     

    Where to go from here?

    • Design your applications around these constraints and common failure cases.
    • For some Compact WCF HelloWorld examples and more background on Store and Forward Messaging, read Mark Prentice's blog here.
    • For more information on the support of WCF for mobile devices, read Andrew Arnott's blog post here.
    Posted by daniel.horbatt | 1 Comments
    Filed under: ,

    Using NetCFSvcUtil.exe to interact with ServiceContracts

    Due to size constraints, only a subset of WCF features were ported over, excluding ServiceContract support. Since then a big request we've seen for the .NET Compact Framework is the ability for WCF on devices to be able to interact with servers running ServiceContracts. Currently in order to communicate with a server running a ServiceContract interface it requires that the end-programmer must emulate the XML output of a client connecting to the same ServiceContract interface. Getting examples of the interface, replicating it accurately and handling the server’s response requires additional coding and debugging time for the programmer. In response to this, we have developed the NetCF ServiceModel Metadata Tool (NetCFSvcUtil.exe), modelled after SvcUtil.exe.

     Usage is essentially the same from a command line perspective:

    Command Line

    SvcUtil.exe http://localhost/ServiceModelSamples/service.svc
    NetCFSvcUtil.exe http://localhost/ServiceModelSamples/service.svc

    The NetCFSvcUtil will generate two code files from this: The CFClientBase which implements various requirements for interaction and another that implements the client. Simply include these in your .NET Compact Framework project and you will have the ability to interact with ServiceContracts with a minimal of effort. Assuming you're accessing the Calculator service contained within several of the WCF samples, the following examples show usage which is identical to proxy usage with SvcUtil generated code:

    C# Example

    CalculatorClient client = new CalculatorClient();
    double
    result = client.Add(10.0D, 15.7D);

    VB Example

    Dim client As CalculatorClient = New CalculatorClient()
    Dim result As Double = client.Add(10D, 15.7D)

    The NetCFSvcUtil can be found within the .NET Compact Framework Power Toys CTP here: Powertoys for .NET Compact Framework v3.5 CTP (September 2007).

     Of course, the proxies generated by this tool are still subject to the subsest of features from WCF that .NET Compact Framework implements. A list of these can be found on Andrew Arnott's blog here.

    -Dan Horbatt

    Posted by daniel.horbatt | 4 Comments
    Filed under: , , ,

    Another New Face

    Hello World!

    It's the phrase that we all learn whenever we delve into a new language, so it felt fitting to start off my blogging with it. I'll be working with the great guys and girls of the .NET Compact Framework, so expect to see some postings about all the fun stuff we'll be working on and releasing soon.

     -Dan Horbatt

    Posted by daniel.horbatt | 0 Comments
    Filed under: ,
     
    Page view tracker