June 27, 2009

Vista support when developing Media Center applications on Windows 7

Problem:
I switched from Vista to Windows 7 x64 a while back and currently also do my software development on a Windows 7 machine.

Some time ago I begun getting complaints from some users that they were not able to use my Media Center Status Application as it was giving some "Invalid Application - Unable to launch FBMCE" errors when starting Media Center on Windows Vista.

I hadn't done any drastic changes in my program code and testing the application on Windows 7 machines (both x86 and x64) didn't indicate any issues. Finally I decided to really dig into this and installed Vista to Virtual PC. Well, what do you know, I immediately got the same error users were reporting :)

Solution:
Error message was because I had started to build my application on Windows 7 instead of Vista.

In Windows 7, the Media Center version of the assemblies referenced (Microsoft.MediaCenter.dll and Microsoft.MediaCenter.UI.dll) is 6.1.* but Vista only has versions 6.0.*.

Taking the assemblies from Vista and referencing those directly instead of the ones in Windows 7 GAC solved the issue and the application again works on both Vista and Win7.

No comments:

Post a Comment