ClickOnce and file association issues

I was trying to setup .sql file association working for our lightweight SQL editor, but it took me more time than expected. Below are steps that I applied to make it work:

  • Configure the file association
  • Make sure at least .NET Framework 3.5 is used
  • Activate ClickOnce Full Trust
  • Read arguments using activation data
  • Make sure no app is associated with the extension you want to use!

The last step was probably the biggest problem from the start, so I am not sure all of the other steps are required. I enabled ClickOnce logging and found out there is a warning regarding the extension.

File association for ".sql" skipped, since another application is using it.

I had to remove association information from registry (HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.sql) and restart!

Leave a Reply

Your email address will not be published. Required fields are marked *