Telerik WPF demos vs ClickOnce

15 posts, 0 answers
  1. Koen
    Koen avatar
    27 posts
    Member since:
    Apr 2012

    Posted 08 Nov 2013 Link to this post

    Hi all,


    We have a WPF application that gets deployed using click once.
    This applications uses the Telerik WPF control suite. Everything runs just fine.

    ..except when, after installing our application, a client installs the Telerik WPF demos on his machine.
    Then, for whatever reason, our application seems to load the Telerik binaries from the Telerik WPF demos,
    NOT from the deployed application (license warning appears, theming is gone, ..).

    Any idea why this happens?
    The Telerik WPF demos do not install assemblies into the GAC, right?
    (note that after uninstalling the Telerik WPF demos & re-installing our application, everything works just fine again)

    Thanks for your time,
    Koen
  2. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 13 Nov 2013 Link to this post

    Hi Koen,

    Would you please test this also on another machine? What happens if you test locally, at your environment?
    Would you then confirm that the references to our assemblies in your project are static? You can check them editing the .csproj file.  Please ensure the paths for the binaries are correct.

    Regards,
    Didie
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  3. UI for WPF is Visual Studio 2017 Ready
  4. Koen
    Koen avatar
    27 posts
    Member since:
    Apr 2012

    Posted 14 Nov 2013 Link to this post

    Hi Didie,

    I have tested this on 2 different windows 7 machines (1 dev machine, 1 clean machine), and 1 windows 8 machine.
    Note that this does NOT happen when running from VisualStudio, only when running the clickonce deployed version.

    I'll call our client application "OurClient" from here on.

    The steps to reproduce are:
    1. Install OurClient through clickonce 
      Launch & run (everything works fine), then close
    2. Install Telerik WPF demos (latest one, exe version says 1.0.0.0) through clickonce
      Launch & browse to GanttView example, then close
    3. Run OurClient 
          It uses wrong Telerik dlls now (license warning, themes are gone).

    To steps to fix are:
    1. Uninstall Telerik WPF demos
    2. Uninstall OurClient 
    3. Install OurClient 


    I am confident the references in our project are correct, they all look like this:
    <Reference Include="Telerik.Windows.Controls, Version=2013.3.1016.40, Culture=neutral, PublicKeyToken=5803cfa389c90ce7, processorArchitecture=MSIL">
      <SpecificVersion>False</SpecificVersion>
      <HintPath>..\..\..\Libraries\Telerik\Telerik.Windows.Controls.dll</HintPath>
    </Reference>


    When I look at the clickonce install location (C:\Users\Username\AppData\Local\Apps\2.0\xyz\abc) for OurClient,
    It contains all the correct Telerik dlls.

    If it would be of any help, I could send you the URL to our clickonce installer, so you can reproduce the issue.


    Thanks for your time,
    Koen


  5. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 14 Nov 2013 Link to this post

    Hello Koen,

    Yes, it will be very helpful if you can send us the URL to your clickonce installer, so we can install it and try to reproduce the issue at our end. You can open a support thread and send it in a private ticket.

    Regards,
    Didie
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  6. Koen
    Koen avatar
    27 posts
    Member since:
    Apr 2012

    Posted 14 Nov 2013 Link to this post

    Hello Didie,

    I've managed to isolate this issue in a separate application.
    Here's the clickonce url (please install from Internet Explorer).

    Let me know if you have any trouble reproducing this issue.
    1. Make sure you do NOT have Telerik WPF demos installed.
    2. Install OurClient through clickonce 
      Launch & run (everything works fine, no license warning, windows 8 theme showing), then close
    3. Install Telerik WPF demos (latest one, exe version says 1.0.0.0) through clickonce
      Launch & browse to GanttView example, then close
    4. Run OurClient
      You'll see a license warning and the default Office black theme.


    Thanks for your time,
    Koen
  7. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 15 Nov 2013 Link to this post

    Hi Koen,

    I am able to reproduce the issue with your click once application. Then I checked on my machine and I do not have any assemblies installed in GAC.
    I also tested the same scenario with another application and I was not able to spot an issue with it. This means that most probably there should be a problem with the references you have added.
    Would it be possible for you to open a support thread and attach a demo project illustrating the problem?

    Regards,
    Didie
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  8. Koen
    Koen avatar
    27 posts
    Member since:
    Apr 2012

    Posted 15 Nov 2013 Link to this post

    Hi Didie,

    I created a support ticket (759027), and attached the source code for the ClickOnce application you tested.


    Thanks for your time,
    Koen

  9. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 18 Nov 2013 Link to this post

    Hi,

    Thank you for submitting the demo project.
    I have changed it to reference NoXaml binaries and it seems to have resolved the issue.
    Please test the solution I send back in the support thread and let me know about the result.

    Regards,
    Didie
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  10. Koen
    Koen avatar
    27 posts
    Member since:
    Apr 2012

    Posted 18 Nov 2013 Link to this post

    Hi Didie,

    I have tested and deployed your project with the NoXaml binaries and that resolves the issue.
    (I did get the license warning, but I suppose that's just because you included no-license binaries?)

    However, this is just a work-around, which I'm not happy to take:
    • I want to use Telerik's StyleManager for theme switching
    • I don't like having to list all different Telerik xamls in the App.xaml

    Do you have any idea why my original application switches to a different theme / license warning
    after installing the Telerik WPF demos?


    Thanks for your time!
    Koen

  11. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 19 Nov 2013 Link to this post

    Hi Koen,

    We performed some additional tests with the application you originally sent.

    One of the experiment was to publish it in a folder we created in C: drive. Then I executed the same steps to reproduce the issue and I was not able to any more. 
    So, would you please try publishing the application in such a location? How does this work for you?

    As to your requirement about using the StyleManager to switch the Theme, I should mention that the recommended approach would be the one I used in the updated sample. 
    In our online documentation we have an article explaining in details the purpose of these binaries and the benefits of using implicit styles. Please check this link.  

    Regards,
    Didie
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  12. Koen
    Koen avatar
    27 posts
    Member since:
    Apr 2012

    Posted 21 Nov 2013 Link to this post

    Hi Didie,

    I did what you suggested:
    • I published the original application (with my Telerik libraries including xaml) to the C drive
    • I copied that folder to our web server
    • I reproduced the scenario as described earlier

    But I still got the same errors (license warning & theme gone after installing Telerik WPF demos).
    Why would publishing to the C drive behave any different than publishing to the web server straight away?

    Anyhow, I did some more research myself, and noticed the following strange behavior (starting from a VM without any installs):
    • When my application is installed, the correct Telerik DLLs are present in my application's ClickOnce installation folder (C:\Users\Username\AppData\Local\Apps\2.0\xyz\abc) 
    • When, afterwards, the 'Telerik WPF demos' application is installed, the Telerik DLLs in MY application's ClickOnce installation folder are overwritten with the Telerik DLLs from the 'Telerik WPF demos' (see image).

    How on earth is that possible?
    ClickOnce applications are supposed to be isolated from one another.
    The 'Telerik WPF demos' application is not copying Telerik DLLs to folders outside it's own ClickOnce application folder, right?
    Could you please confirm this.

    Thanks for your time,
    Koen
  13. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 21 Nov 2013 Link to this post

    Hello Koen,

    Thank you for sharing the image - it is clearly seen on it.

    I suggested this approach as we are not able to reproduce the issue that way.
    Your test is showing the opposite. There is something I cannot explain though.
    The case is that our WPF Demos are installed with NoXaml binaries, not with the full ones (that you reference in your solution). It is indeed strange where those trial, full binaries come from.
    What is the case with the solution using NoXaml assemblies - it seems that they are not replaced with another ones.

    Another point is that the StyleManager does not do anything specific to lead to such a result. It is strange that the issue only occurs when using the StyleManager. Would you please confirm this?

    Regards,
    Didie
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  14. Koen
    Koen avatar
    27 posts
    Member since:
    Apr 2012

    Posted 21 Nov 2013 Link to this post

    Hi Didie,


    I'm not saying this issue is related to using the StyleManager;

    All I'm clearly seeing is that the Telerik DLLs in MyApplication's ClickOnce folder,
    are overwritten with the Telerik DLLs from the 'Telerik WPF Demos' application when the 'Telerik WPF Demos' starts.

    This could explain why a license warning is shown and why the theming is gone in my application
    after installing and starting'Telerik WPF Demos':
    The demos app overwrote my licensed-including xaml DLLs with unlicensed-no-xaml DLLs.

    Another point that proves the Telerik DLLs in MyApplication's ClickOnce folder are overwritten (on a clean machine):
    • Install my application and keep it open
    • Install WPF demos: after starting and downloading all files up to 100%, it throws this exception: 
    (I guess because it's not able to over-write the Telerik dlls in MyApplication, because it's open).

    Exception at 21/11/2013 8:45:06.728 :
    ----------------
    Could not load file or assembly 'Application, Version=1.0.0.0, Culture=neutral, PublicKeyToken=5803cfa389c90ce7' or one of its dependencies. The system cannot find the file specified.
       at Telerik.Windows.QuickStart.Shell.OnViewModelInitialized(Object sender, EventArgs e)
       at Telerik.Windows.QuickStart.ShellViewModel.OnApplicationModuleDownloaded()
       at Telerik.Windows.QuickStart.ShellViewModel.CurrentDeployment_DownloadFileGroupCompleted(Object sender, DownloadFileGroupCompletedEventArgs e)
       at System.Deployment.Application.ApplicationDeployment.SynchronizeGroupCompletedEventHandler(Object sender, SynchronizeCompletedEventArgs e)
       at System.Deployment.Application.DeploymentManager.SynchronizeAsyncCompleted(Object arg)
       at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
       at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)

    End of exception.



    Regards,
    Koen
  15. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 22 Nov 2013 Link to this post

    Hello,

    My point was that the project with the NoXaml binaries works fine and its binaries are not overwritten. 
    But when you use full binaries, then there is the issue.
    Another point is that even with the Trial Binaries, the StyleManager should set the Windows8Theme successfully. It is not the case though.

    We are not able to reproduce the issue as we publish it in a local folder. 

    Once again I would like to point that the approach setting a Theme with the StyleManager is now Obsoleted. The recommended way would be to use Implicit Styles and NoXaml binaries. 
    You can also read this blog post, explaining additional information and offering a very helpful tool.

    Regards,
    Didie
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  16. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 22 Nov 2013 Link to this post

    Hello,

    In addition to my previous reply, you can check this blog post on the differences between both the styling mechanisms. There are explained the Pros and Cons of using each of them.

    Regards,
    Didie
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
Back to Top
UI for WPF is Visual Studio 2017 Ready