文件关联打开例外 [英] File association open exception

查看:80
本文介绍了文件关联打开例外的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

美好的一天,



使用VS2013



我在注册表中为我创建了一个文件关联应用程序允许用户双击保存的文件以在应用程序中自动打开它。



当应用程序发布(通过clickOnce)并安装在机器上时,应用程序没有异常启动并保存文件可以在应用程序中打开而不会出现问题。



当关闭应用程序并双击相关文件并启动应用程序时,将抛出异常应用程序标识未设置。在异常之后,除了应用程序部署类项目之外,确认应用程序正常运行。



我不知道任何帮助将不胜感激。



我尝试了什么:



一篇文章有​​不同的情况,但同样的例外建议检查是否应用程序没有网络部署。

我使用下面的代码并且应用程序未部署网络。

System.Deployment.Application.ApplicationDeployment.IsNetworkDeployed

Good Day,

Using VS2013

I have created a file association in registry for my application to allow users to double click saved files to automatically open it within application.

When application is published (via clickOnce) and installed on machine there is no exception when application starts up and saved files can be opened without issues within application.

When application is closed and a associated file is double clicked and the application starts up an exception is thrown "Application identity is not set". After Exception is acknowledge the application functions normally except for application deployment class items.

I am at a loss any help would be appreciated.

What I have tried:

One article with a different scenario but same exception recommended to check if the application is not network deployed.
I used code below and the application is NOT network deployed.
System.Deployment.Application.ApplicationDeployment.IsNetworkDeployed

推荐答案

看看这里:如何:为ClickOnce创建文件关联申请 [ ^ ] < br $> b $ b

更多:

如何为。注册文件类型新应用程序(Windows) [ ^ ]

文件关联的最佳实践(Windows) [ ^ ]
Take a look here: How to: Create File Associations For a ClickOnce Application[^]

More:
How to Register a File Type for a New Application (Windows)[^]
Best Practices for File Associations (Windows)[^]


这篇关于文件关联打开例外的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆