The Media Center Sandbox

Resources and discussion for developing experiences in the Windows Media Center platform.
Welcome to The Media Center Sandbox Sign in | Join | Help
in Search

Installation Question

Last post 11-08-2007, 3:51 AM by AndyC. 8 replies.
Sort Posts: Previous Next
  •  10-30-2007, 5:19 PM 5405

    Installation Question

     I have added a COM reference to my MCML project.  This creates a Interop.MediaPlayer.DLL along with my application DLL when I build my project.

    Where should I install this Interop DLL?   Do I add it to the GAC like I do my app DLL?  If not, is there a default folder that it should be put in that the MCML app will find it?

    Thanks.

    Jeff

     

  •  10-31-2007, 5:19 AM 5414 in reply to 5405

    Re: Installation Question

    I answered this on your other thread, but this is probably more appropriate here.

    If you leave Interop.MediaPlayer.dll on it's own you'll need to strong name sign it and install it in the GAC for it to be found by the addin.

    Alternatively you can download a program called ILMerge 2.0 from MSDN and use that to merge the interop assembly into the primary assembly leaving you with only one DLL (your addin).  You develop in the same way with the interop assembly, but as part of your final build process you merge addin.dll and Interop.MediaPlayer.dll into a replacement addin.dll file.  This file contains the namespaces from both original assemblies, just in one DLL rather than separate ones.

    Cheers,
    Andrew

  •  10-31-2007, 9:45 AM 5419 in reply to 5414

    Re: Installation Question

    After using ILMerge 2.0 does anything need to change in my App.XML?  Can I just rename the new DLL to the same name as my addin.dll and register it in the GAC the same way so nothing in my install changes?

    Jeff

     

     

     

  •  10-31-2007, 2:35 PM 5428 in reply to 5419

    Re: Installation Question

    I wouldn't imagine anything would change...but the easiest way to test the theory is to just try it and see if it works.
    100 downloads a day for Yougle Vista - goin' allright!

    Check out http://www.thedigitallifestyle.com/cs/Blogs/developer/default.aspx and http://www.push-a-button.com.au/products/mce
  •  11-01-2007, 12:21 AM 5435 in reply to 5419

    Re: Installation Question

    Nope - you will need to re-sign it after merging, using the same key as you use in the property page, but other than that it works fine.

    Cheers,
    Andrew

  •  11-06-2007, 9:26 AM 5523 in reply to 5414

    Re: Installation Question

    I messed around with this for quite some time but just couldn't come up with a easy way to integrate this into my build process. 

    Calling the ILMerge utility with the proper paremeters, renaming the assembly so it had the same name as my app did, signing the new assembly was just not something that was easy to do.  I am using Visual Basic 2005 Express. 

    Turns out it was MUCH easier to just change my install to also add the Interop.MediaPlayer.dll to the GAC.   It is already strong name signed as part of the IDE build process. 

    Thanks for the help though.

    Jeff

     

  •  11-06-2007, 10:05 AM 5525 in reply to 5523

    Re: Installation Question

    If you're going to ship this as a commercial application, you'll need to do something differently.  At least recreate the interop with a different name/namespace so that you're not installing a generic interop DLL into the customer's GAC.

    Cheers,
    Andrew

  •  11-06-2007, 12:05 PM 5533 in reply to 5525

    Re: Installation Question

    How do I do that?  I add the reference as COM using wmp.dll.  It creates the reference name and it is greyed out so I can't rename it?

     

     

  •  11-08-2007, 3:51 AM 5566 in reply to 5533

    Re: Installation Question

    You need to use the tool that creates the interop DLL from the .NET Framework SDK (installed as part of VS2005 I think) - I think the tool is called AxImp (or something like that) - not at my dev PC at the moment.  It can create a strong name signed DLL with whatever namespace you like.

    I still think that the best approach is to use ILMerge though - saves all this faffing about.

    Cheers,
    Andrew

View as RSS news feed in XML
Powered by Community Server, by Telligent Systems