部署Winform项目.NET 2.0

发布于 2024-10-20 21:15:33 字数 355 浏览 1 评论 0原文

我使用 .NET 3.5 开发了一个小型应用程序,其中包含几个表单和一个 rdlc 报告。之后我将其升级到.NET 4.0并分发给客户端,并在先决条件中添加了.NET客户端配置文件和Windows安装程序3.1。它在一个客户端上安装并工作正常,但在另一个客户端上,它在 .NET 客户端配置文件 4.0 期间出现意外错误。 我的应用程序相对较小,不需要 .NET 4.0 功能,因此现在我将其降级到 .NET 2.0 并使用 clickOnce 发布它,并在先决条件中添加了 .NET 2.0,但在客户端计算机上,它在安装过程中再次显示错误并退出。有关安装的详细信息,它引用了我在系统上找不到的日志文件。 我正在 Windows 7 上进行开发,大多数客户端计算机都使用 Windows XP。

I have developed a tiny application with .NET 3.5 with couple of forms and one rdlc report. after then I upgraded it to .NET 4.0 and distributed to the client with .NET client profile and windows installer 3.1 added in prerequisite. It installed and worked fine on one client but on the other client it gave unexpected error during .NET client profile 4.0.
My application is relatively small and does not require .NET 4.0 functionality so now I downgraded it to .NET 2.0 and published it using clickOnce with .NET 2.0 added in prerequisite but on client machine it again shows error during installation and quits. For details of installation it refers to a log file that I could not locate on the system.
I am developing on windows 7 and most of client machines use windows XP.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

浅暮の光 2024-10-27 21:15:33

在 .NET 2.0 中,对于失败和成功的部署和启动,每次安装的 ClickOnce 日志文件都会写入 WinInet 缓存(Temporary Internet Files 文件夹)。不幸的是,日志文件的名称很模糊,这使得识别哪个日志文件属于哪个应用程序变得相当困难。您可能还必须从大多数用户的 Internet 缓存中最终出现的数十或数百个其他文件中过滤掉它们。这些文件的命名约定是前缀 System_Deployment_Log_XXX,其中 XXX 是混淆。

您还可以设置自定义日志文件位置。如果您选择这样做,所有错误都会写入您指定位置的单个文件中,并且每次激活都会将其日志条目附加到该文件的末尾。因此,这种方法可以为您提供多次启动尝试的运行注释。

要进行此设置,请找到注册表项:HK_Current_User\Software\Classes\Software\Microsoft\Windows\CurrentVersion\Deployment

添加名为 LogFilePath 的字符串值,并设置其值到您想要写入日志条目的完全限定路径(即C:\temp\ClickOnceErrors.txt)。一旦你这样做了,所有的错误都会被写在那里。您还可以通过添加名为 LogVerbosityLevel 的新字符串值并将其设置为 1 来提高记录的详细级别。

In .NET 2.0, ClickOnce log files for each installation are written to the WinInet cache (the Temporary Internet Files folder), for both failed and successful deployments and launches. The log files unfortunately have obfuscated names that make it fairly difficult to identify which log file belongs to which application. You may also have to filter them from the dozens or hundreds of other files that end up in most users' Internet caches. The naming convention for these files is the prefix System_Deployment_Log_XXX, where XXX is the obfuscation.

You can also set a custom log file location. If you choose to do this, all errors are written to a single file in the location that you specify, and each activation appends its log entries to the end of the file. So this approach can give you a running commentary of multiple launch attempts.

To set this up, find the registry key: HK_Current_User\Software\Classes\Software\Microsoft\Windows\CurrentVersion\Deployment

Add a string value named LogFilePath, and set its value to a fully qualified path to where you want the log entries written (i.e. C:\temp\ClickOnceErrors.txt). Once you do that, all errors will be written there. You can also increase the level of detail logged by adding a new string value named LogVerbosityLevel and setting it to 1.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文