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

How to install an update setup.msi file to the Current Media Center Project?

Last post 09-17-2010, 3:51 AM by thus. 20 replies.
Page 2 of 2 (21 items)   < Previous 1 2
Sort Posts: Previous Next
  •  09-15-2010, 12:42 AM 9887 in reply to 9886

    Re: How to install an update setup.msi file to the Current Media Center Project?

    I found an example, ObjectModelApplicationContextInstallApplication.mcml, in Microsoft SDK folder and it works fine.

    Now I have a different problem :) After the installation when I re-open the Media Center and click my application, the previous application still there!

    I changed my codes in application.cs, for example I set all the ArrayListDataSet return values as null, changed the images links from the styles.mcml, changed some colors etc. But nothing has changed, why?

    I applied the same codes in ObjectModelApplicationContextInstallApplication.mcml. In my opinion update process works fine but due to the entrypoints issue I can't see the latest exe in Media Center.

    Do I have to change the GUID ID or assembly version?
  •  09-15-2010, 11:50 PM 9889 in reply to 9887

    Re: How to install an update setup.msi file to the Current Media Center Project?

    Do I have to change the Setup.wxs file? I found this link:

    http://msdn.microsoft.com/en-us/library/Aa369786

    There are lots of information regarding updating the current application. Also it says the current application can be uninstalled by using the REMOVE="ALL" AND NOT UPGRADINGPRODUCTCODE but how?

    I accomplished to set the installation process from MCML. As you know this time I can't see the new version of my application in MediaCenter. After the installation process, MediaCenter directly jumps to my application bur it shows the previous one :(
  •  09-16-2010, 4:45 AM 9890 in reply to 9889

    Re: How to install an update setup.msi file to the Current Media Center Project?

    Additional info:

    -?define Property_ProductVersion = "1.0.0.0" ?-

    I have changed the line above in setup.wxs as:

    -?define Property_ProductVersion = "1.0.0.1" ?-

    Then the installation process has been completed via my Media Center application. I can see the new version info in Program Add Remove window. But nothing has changed in application.

    Do I have to change these lines in stup.wxs ?

    -Feature Id="APPROOTFEATURE"
    Title="MyMediaCenter"
    Level="1"-
    -ComponentRef Id="MyMediaCenter.dll" />
    -ComponentRef Id="Registration.xml" /-
    -ComponentRef Id="Application.png" /-
    -/Feature-

    OR any comments? I need serious help.. How do you update your current application? I followed and applied the Microsoft SDK rules and I am not getting an error.. Can you share your sample projects or send me them as .rar or .zip?
  •  09-16-2010, 11:20 PM 9891 in reply to 9890

    Re: How to install an update setup.msi file to the Current Media Center Project?

    Have you changed the version number of your assembly? If you don't the in-place installer (part of MSI) will not replace the assembly even if it is different.

    Cheers,
    Andrew
  •  09-17-2010, 3:02 AM 9895 in reply to 9891

    Re: How to install an update setup.msi file to the Current Media Center Project?

    I have changed the assembly version from 1.0.0.0 to 1.0.0.1 then I compiled my project. This time everthing worked fine during the installation process and probably my assembly has been replaced.

    Now I am getting a different error when I click my application in Media Center; also I am happy cus I am in progress :)

    If I fix this new error probably I will learn the product upgrade issue in Media Center. Thank you for everything Andrew :)

    Here is the event log:
    Exception Microsoft.MediaCenter.Hosting.Infrastructure.InvalidAddInException: Unable to load invalid add-in MyMediaCenter.MyAddIn, MyMediaCenter,Culture=Neutral,Version=1.0.0.0,PublicKeyToken=007ea8ae5a2e2ece

    at MediaCenter.Extensibility.ExtensibilityPlugInEntryPointInfo.ExtensibilityPlugInLaunchInfo.LoadAddIn()
    at MediaCenter.Extensibility.ExtensibilityPlugInEntryPointInfo.Launch(Object& objState)
    at MediaCenter.Extensibility.ExtensibilityEntryPoint.Launch(PageBasedUCPService ucp, Object objMediaContext, Object[] entryPointParameters, String altPageUrl, ExtensibilityAutomation& exautoUsed)

    InnerException System.ArgumentException: Unable to load assembly: MyMediaCenter,Culture=Neutral,Version=1.0.0.0,PublicKeyToken=007ea8ae5a2e2ece
    Parameter name: fullName


    Server stack trace:
    at MediaCenter.Extensibility.RemoteTypeLoader.CreateInstance(String fullName, Assembly& asm)
    at MediaCenter.Extensibility.AddInLoader.CreateInstance(String fullName)
    at System.Runtime.Remoting.Messaging.Message.Dispatch(Object target, Boolean fExecuteInContext)
    at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg, Int32 methodPtr, Boolean fExecuteInContext)

    Exception rethrown at [0]:
    at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
    at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
    at MediaCenter.Extensibility.AddInLoader.CreateInstance(String fullName)
    at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs)
    at System.Runtime.Remoting.Messaging.StackBuilderSink.PrivateProcessMessage(RuntimeMethodHandle md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs)
    at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg, Int32 methodPtr, Boolean fExecuteInContext)

    Exception rethrown at [1]:
    at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
    at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
    at Microsoft.MediaCenter.Hosting.Infrastructure.IRemoteTypeLoader.CreateInstance(String fullName)
    at MediaCenter.Extensibility.ExtensibilityPlugInEntryPointInfo.ExtensibilityPlugInLaunchInfo.LoadAddIn()

    InnerException System.IO.FileNotFoundException: Could not load file or assembly 'MyMediaCenter, Version=1.0.0.0, Culture=neutral, PublicKeyToken=007ea8ae5a2e2ece' or one of its dependencies. The system cannot find the file specified.

    at System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection)
    at System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection)
    at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
    at System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
    at System.Reflection.Assembly.Load(String assemblyString)
    at MediaCenter.Extensibility.RemoteTypeLoader.LoadAssembly(String assemblyName, Exception& loadException)

    The new assembly has been replaced but the previous assembly is still in GAC. Any comments?
  •  09-17-2010, 3:51 AM 9896 in reply to 9895

    Re: How to install an update setup.msi file to the Current Media Center Project?

    I solved the problem!! I changed the new assembly version in the registration.xml as well. Now I am not getting error :)

    Thank you for your support Andrew..
Page 2 of 2 (21 items)   < Previous 1 2
View as RSS news feed in XML
Powered by Community Server, by Telligent Systems