Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ClickOnce Deployment - File Association not Registering

So here's a brief summary of the problem:

Summary:

I set fileAssociations of my ClickOnce applications, however, they are not registering when I run/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 also handle the data passed through AppDomain, but I doubt that really changes anything.

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.

Edit: I also have posted this on Microsoft, btw.

http://social.msdn.microsoft.com/Forums/en-US/winformssetup/thread/d610cd55-f3c7-4775-a417-251261832200

If anyone would like to post an answer on there as well. I really can't figure this one out. :D

like image 897
Kevin Wang Avatar asked Jun 27 '11 05:06

Kevin Wang


1 Answers

If the filetype you are trying to register has previously been registered with another program (such as notepad), or even opened in notepad, then the only way ive found to get it working is to delete from the registry the filetype in 2 locations, and then reboot. After that publish an update for your app, and if its that sort of problem your in good shape.

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.bvr

HKEY_CLASSES_ROOT\.bvr

Reboot

Publish an update to your app.

like image 99
Alan Avatar answered Sep 28 '22 03:09

Alan