Here is what you should do :
Make sure your application is handling the arguments correctly. When you open an associated file type with an application, It would be equivalent of executing this command in cmd
YourApp.exe "C:\Path\fileName.ext"
So
C:\Path\fileName.ext
would be passed as an argument to your application.Your main class should look something like this :
static void Main(string[] args) { ... }
Check for filePath in
args
and write the code to load the read the file.You need to associate file extension with the Application. You can either do it via Control Panel or by browsing the App in Open With window. (This you have already done)
Edit : Try using these registries to associate file type with your application :
[HKEY_CURRENT_USER\Software\Classes\<fileExt>]
@="<fileClass>"
[HKEY_CURRENT_USER\Software\Classes\<fileClass>]
[HKEY_CURRENT_USER\Software\Classes\<fileClass>\OpenWithList]
[HKEY_CURRENT_USER\Software\Classes\<fileClass>\OpenWithList\<appName>]
[HKEY_CURRENT_USER\Software\Classes\Applications\<appName>]
[HKEY_CURRENT_USER\Software\Classes\Applications\<appName>\shell]
[HKEY_CURRENT_USER\Software\Classes\Applications\<appName>\shell\open]
[HKEY_CURRENT_USER\Software\Classes\Applications\<appName>\shell\open\command]
@="\"C:\\Program Files\\appFolder\\<appName>\" \"%1\""
[HKEY_CURRENT_USER\Software\Classes\Applications\<appName>\SupportedTypes]
"<fileExt>"=""