<2008 November>

On this page...



Member of...

ASP Insiders

MVP Visual Developer ASP/ASP.NET

Enter CodeZone

Blog Categories



Deutsche Resourcen


Sign In

#  Tuesday, 04 November 2008

At PDC 2008 we got a nice Freescale JM badge board to test with Windows 7 and its Sensor API. I definitely wanted to try it, but didn't have the luxury to re-pave a machine just for this.

VirtualPC doesn't support USB (a lack that annoys me immensely, not only now, but also for Windows Mobile development), so I had to look for another option: VirtualBox. It supports USB. I decided to give it a try (VMware was on my list too, but when I saw their registration requirement for a trial version I balked).

Installed the x64 version of VirtualBox, and inside it the 32 Bit version of Windows 7. First stumbling block - the virtual machine additions. In default mode, they refuse to install on Windows 7 (too new). But you can help it see the "light":

The additions are required, otherwise no USB support (or easy network, but you could work around that one via emulating a different NIC).

Next, plug in the sensor development kit badge and tell VirtualBox to route it into the VM:

The "CMX Systems USB HID sensor demo for HC9S08JM devices" is what you are looking for. At least that's what Vista calls the device.

Now all you need to do is boot up your Windows 7 VM again and install the SDK from the supplied disc. Note that I achieved the best results by following the guideline at the end of the document entitled "Sensor Development Kit Driver and Firmware.rtf", to be found in the Documentation folder.

When done, you can try the MSDN reader demo (nope, Marbles not going to work inside a VM). As a proof, here is a screenshot of everything running in VirtualBox (yes, the light sensor works):

By the way, there is a MSDN forum Development with the Windows Sensor and Location Platform just for this topic. If you don't know what I was talking about, check out the session recording Windows 7: The Sensor and Location Platform: Building Context-Aware Applications.

Tuesday, 04 November 2008 17:08:21 (W. Europe Standard Time, UTC+01:00)  #    Comments [0]


#  Friday, 31 October 2008

During PDC2008, aside from the keynotes and pre-conference “Performance by Design” I went to the  following sessions:

  • TL02 – Under the hood: Advances in the .NET type system
  • TL16 – The future of C#
  • TL52 – Team Foundation Server 2010: Cool new features
  • TL09 – Agile development with Microsoft Visual Studio
  • TL23 – A lap around “Oslo”
  • TL27 - “Oslo”: The language
  • TL20 – Entity Framework futures
  • TL26 – Parallel programming for managed developers with the next generation of Microsoft Visual Studio
  • TL18 - “Oslo”: Customizing and extending the visual design experience
  • TL28 - “Oslo”: Repository and models
  • TL15 – Architecture without big design up front
  • TL36 – Microsoft .NET Framework: Declarative programming using XAML
  • PC49 – Microsoft .NET Framework: CLR futures
  • TL31 - “Oslo”: Building textual DSLs
  • PC32 – ASP.NET AJAX futures

I was rather disappointed this year by the varied quality of the sessions, plus the not-so-matching session descriptions / session levels.

Friday, 31 October 2008 23:03:17 (W. Europe Standard Time, UTC+01:00)  #    Comments [0]


#  Friday, 24 October 2008

During PDC05 I put up a post PDC's I have attended so far. Next week, I am going to add another one to the list - PDC2008 is my seventh Professional Developers Conference. Kind of makes me look old ;-)


Categories: .NET | this | Training and Conferences
Friday, 24 October 2008 08:09:45 (W. Europe Daylight Time, UTC+02:00)  #    Comments [0]


#  Wednesday, 08 October 2008

IndexOf has overloads that take StringComparison which allows me to specify how the comparison is done: culture (in)sensitive, case (in) sensitive, et cetera. Why is it that Contains doesn't sport such an overload? IndexOf makes a LINQ query look so much more ugly than Contains...

Categories: .NET | C#
Wednesday, 08 October 2008 14:37:23 (W. Europe Daylight Time, UTC+02:00)  #    Comments [3]


#  Tuesday, 07 October 2008

This time it is the Visual Studio 2008 extensions for Windows Sharepoint Services 3.0:

Given all my past run-ins with developing on x64, how is anyone supposed get any development work done on a x64 box?

Categories: .NET | x64
Tuesday, 07 October 2008 18:36:13 (W. Europe Daylight Time, UTC+02:00)  #    Comments [2]


#  Saturday, 23 August 2008

Today I wanted to install SQL Server 2008 Developer Edition. Easy enough, at least so I thought. Started setup for a new instance, chose a different directory from where SQL 2005 lives (my c: drive is nearly full), selected a few components, clicked Next>:

I have no idea what SQL Server tries to tell me. This is sick.

Categories: SQL Server
Saturday, 23 August 2008 11:07:40 (W. Europe Daylight Time, UTC+02:00)  #    Comments [0]


#  Tuesday, 05 August 2008

The MSDN article Synchronous and Asynchronous Operations explains what options are available to you when using WCF. It even tells me that svcutil.exe has an /async switch. Great!

Now, back to my current home turf, Compact Framework. There is netCFsvcutil.exe, that comes with the Compact Framework Power Toys 3.5. Guess what? That option isn't available in this scaled down rendition of svcutil.

Once again Compact Framework makes it so much harder to work productively, and here's why:


Quote: Asynchronous delegates, specifically the BeginInvoke and EndInvoke methods, are not supported in the .NET Compact Framework.

Back to the drawing board and the thread pool (most likely).

Categories: .NET | 3.5 | Smartphone and PocketPC
Tuesday, 05 August 2008 18:43:23 (W. Europe Daylight Time, UTC+02:00)  #    Comments [0]


Guilty Party Acer with its Acer Aspire One 110L

Charge Linking keyboard layout to selected user interface language

Aggravating Circumstances Overwriting configuration file on reboot with hardwired defaults for keyboard layout according to language settings

(Interim) Fix http://blog.laptopmag.com/acer-aspire-one-an-in-depth-look#comment-11841

Verdict Even my very seasoned Linux guru that helped me fix it (I failed miserably) was flabbergasted about this crude approach to internationalization. Sorry, but that's not the way to win over seasoned Windows users.

Categories: L-Word Stuff
Tuesday, 05 August 2008 10:33:43 (W. Europe Daylight Time, UTC+02:00)  #    Comments [0]


#  Wednesday, 30 July 2008

I am currently working on a Compact Framework project, and started development on a different machine - where I successfully used the Cellular Emulator of the Windows Mobile SDK. Today, on the other machine (the laptop), it didn't start but present me with the following error message:

After some searching (on the G-word search engine), I came across this post:


Sure enough I am using Vista x64, heck, we are living in 2008 with multicore CPUs and 4GB+ of RAM!

And here is the Catch 22: when moving development to a Virtual PC image, you don't get USB ports which you need for connecting to a real device...

Categories: .NET | Smartphone and PocketPC | Vista | x64
Wednesday, 30 July 2008 16:55:11 (W. Europe Daylight Time, UTC+02:00)  #    Comments [1]


#  Wednesday, 23 July 2008

I have created another (hopefully useful) checkin policy for Team Foundation Server 2008 - one that checks C# and VB.NET project files for COM references. The idea came from a customer, where they require the developers to use "authorized" interop assemblies instead of developers recreating those by simply adding a COM reference to each and every project. And how do you prevent this? By having a TFS checkin policy in place.

A COM reference looks like this in an MSBuild project file:

    <COMReference Include="XcpControlLib">

Instead of searching for the string "<COMReference" I decided to use the MSBuild Engine API in my implementation:

    public override PolicyFailure[] Evaluate()
      PendingChange[] checkedFiles = PendingCheckin.PendingChanges.CheckedPendingChanges;
      ArrayList failures = new ArrayList();

      foreach (PendingChange change in checkedFiles)
        string extension = Path.GetExtension(change.LocalItem);

        if ((0 == String.Compare(extension, ".csproj", false)) ||
            (0 == String.Compare(extension, ".vbproj", false)))
          if (change.ChangeType == ChangeType.Edit || change.ChangeType == ChangeType.Add)
            // this is a workaround because project.Load(fileName doesn't work in the same process as VS
            FileStream fs = File.OpenRead(change.LocalItem);

            Project project = new Project();
            project.Load(new StreamReader(fs), ProjectLoadSettings.IgnoreMissingImports);

            foreach (BuildItemGroup big in project.ItemGroups)
              foreach (BuildItem bi in big)
                if (0 == String.Compare(bi.Name, "COMReference", true))
                  PolicyFailure failure = new PolicyFailure(String.Format(ComReferencePolicyStrings.activateMessage, change.LocalItem), this);

      return (PolicyFailure[])failures.ToArray(typeof(PolicyFailure));

At first, I tried to load directly from the .??proj files, but Visual Studio (after thinking a bit about it it is pretty obvious...) doesn't like someone inside its process play around with the MSBuild engine. That's why I resorted to loading it indirectly.

For installation I have provided checkinpolicy.reg, however, you must adapt the path to the .dll before importing it into the registry.

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\9.0\TeamFoundation\SourceControl\Checkin Policies]

Once registered, you can add it to your team projects:

As usual I have included the source code (BSD licensed) in the download:

ChrisOnNet.CheckinPolicies.ComReferencePolicy.zip (35.35 KB)

Categories: C# | Team System | Use the source Luke
Wednesday, 23 July 2008 15:04:16 (W. Europe Daylight Time, UTC+02:00)  #    Comments [0]


© Copyright 2017 Christoph Wille

newtelligence dasBlog 2.3.9074.18820
Subscribe to this weblog's RSS feed with SharpReader, Radio Userland, NewsGator or any other aggregator listening on port 5335 by clicking this button.   RSS 2.0|Atom 1.0  Send mail to the author(s)

Don't contact us via this (fleischfalle@alphasierrapapa.com) email address.