none
ClickOnce File Associations are not registering.

    Question

  • So here's a brief summary of the problem:

    Summary:

    I set fileAssociations of my ClickOnce applications, however, they are not registering when Irun/update my program (as in, the .bvr files I am trying to associate have no icon and I can't double-click them to start my application).

    Extra Info:

    I first tried going to Properties -> Publish -> Options -> File Associations and setting my associations from there. After that failed attempt, I tried setting it directly in app.manifest:

    <fileAssociation
    xmlns
    ="urn:schemas-microsoft-com:clickonce.v1"
    extension
    =".bvr"
    description
    ="Behavior File"
    progid
    ="GGS.Behavior"
    defaultIcon
    ="bvrico.ico"
    />

    I've read so many articles about this that I am starting to get frustrated. Some information:

    1. I've set it to a full-trust application (Under security -> Enable ClickOnce security settings -> This is a full trust application)
    2. I am using .NET 4.0 and Visual Studio 2010
    3. Enable "offline" mode

    I was wondering maybe file associations are only set on install.

    Anyways, I would really appreciate some insight on this problem. I would really like file associations in my project.

    Thanks everyone in advance.

    PS: Tested on Windows XP and Windows 7.

    If you guys would like to help me get answers on Stack Overflow, I've included the link here:

    http://stackoverflow.com/questions/6489112/clickonce-deployment-file-association-not-registering

    Thanks :D

    Tuesday, June 28, 2011 12:49 AM

Answers

  • Hi kwang,

    I just made a test.

    1. Create a Windows Form project, and open the Publish page setting the update location with a correct UNC path(it only accept the UNC and HTTP path, the update will be failed if this path is incorrect), and publish it without setting the file type association.

    2. Open the Publish page, and setting the file type association(File Associations in the Publish Options dialog box). Then publish it.

    3. Boot the application, it will show you a box to see it find there's a update, so you can let it update your application, then you will find the file association set succeed for my system, I can double click on my type file to open the application, and that type file also has my icon.

    I think the probable root cause in your side is the update process has not succeed.

    You can follow the steps in my this post to make a ClickOnce log file help you record the ClickOnce log, you can delete that log file first before you update the application, then the log file content will just this time's log.

    http://social.msdn.microsoft.com/Forums/en/winformssetup/thread/32d84703-b11d-4b86-a149-c30c581b97db

     

    If there's any concern, please feel free to let me know.

    Best wishes,


    Mike [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Friday, July 01, 2011 8:27 AM

All replies

  • Hi kwang,

    I would like to know the result after you tried this articles steps and sample:

    http://blogs.msdn.com/b/mwade/archive/2008/01/30/how-to-add-file-associations-to-a-clickonce-application.aspx

     

    And do you mean your problem is occur when you update your application, and it worked fine before you update you application?

    And after you edit the manifest, have you sign it again?

     

    If there's any concern,please feel free to let me know.

    Best wishes,


    Mike [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Thursday, June 30, 2011 12:20 PM
  • As I stated in my post, I have attempted both methods.

     

    It did not work before I updated my application, as before the update I didn't have file associations set anyways.  However, once I set them and update my app, the associations still won't register.  That is my problem.

    Friday, July 01, 2011 4:47 AM
  • Hi kwang,

    I just made a test.

    1. Create a Windows Form project, and open the Publish page setting the update location with a correct UNC path(it only accept the UNC and HTTP path, the update will be failed if this path is incorrect), and publish it without setting the file type association.

    2. Open the Publish page, and setting the file type association(File Associations in the Publish Options dialog box). Then publish it.

    3. Boot the application, it will show you a box to see it find there's a update, so you can let it update your application, then you will find the file association set succeed for my system, I can double click on my type file to open the application, and that type file also has my icon.

    I think the probable root cause in your side is the update process has not succeed.

    You can follow the steps in my this post to make a ClickOnce log file help you record the ClickOnce log, you can delete that log file first before you update the application, then the log file content will just this time's log.

    http://social.msdn.microsoft.com/Forums/en/winformssetup/thread/32d84703-b11d-4b86-a149-c30c581b97db

     

    If there's any concern, please feel free to let me know.

    Best wishes,


    Mike [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Friday, July 01, 2011 8:27 AM