安装文件失败调试启用 [英] setup file failing debugging enabled

查看:48
本文介绍了安装文件失败调试启用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我之前使用过安装项目,没有问题,该项目没有 SQLite DB 作为依赖项
我现在正在尝试为一个包含 SQLite 作为 System.Data.SQLite.Core 的项目制作一个 EXE 或 msi 文件,该项目是一个带有 WPF TextBox 的 WinForms,代码如下

I have used Setup Project before with no issue the project did not have SQLite DB as a dependency
I am now trying to make a EXE or msi file for a project that has SQLite included as System.Data.SQLite.Core and the project is a WinForms with a WPF TextBox with this code below

    Public Sub LoadTB()
    Dim tb As Windows.Controls.TextBox = New Windows.Controls.TextBox()
    ElementHost1.Child = tb
    tb.SpellCheck.IsEnabled = True

    AddHandler tb.TextChanged, AddressOf tb_TextChanged

    tb.TextWrapping = Windows.TextWrapping.Wrap
    tb.AcceptsReturn = CBool("True")
End Sub

这是文件文件的一部分
************** 异常文本 **************System.IO.FileNotFoundException:无法加载文件或程序集System.Data.SQLite,版本=1.0.113.0,Culture=neutral,PublicKeyToken=db937bc2d44ff139"或其依赖项之一.该系统找不到指定的文件.文件名:'System.Data.SQLite,版本=1.0.113.0,Culture=neutral,PublicKeyToken=db937bc2d44ff139'

Here is part of the file file
************** Exception Text ************** System.IO.FileNotFoundException: Could not load file or assembly 'System.Data.SQLite, Version=1.0.113.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139' or one of its dependencies. The system cannot find the file specified. File name: 'System.Data.SQLite, Version=1.0.113.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139'

一张图片值1000字
这是项目中System.Data.SQLite.dll版本1.0.133.0的问题
NuGet 包 System.Data.SQLite.Core 是版本 1.0.113.1
询问我要更改什么以及在哪里更改它
是的,我曾尝试使用 NuGet 中的 System.Data.SQLite 没有运气

A picture is worth a 1000 words
Here is the issue the System.Data.SQLite.dll in the project is version 1.0.133.0
The NuGet package System.Data.SQLite.Core is version 1.0.113.1
Question what do I change and Where do I change it
YES I have tried using System.Data.SQLite from NuGet NO Luck

推荐答案

在继续尝试并使用 Visual Studio 2019 中的安装项目创建 EXE 和MSI 安装程序我找到了解决问题异常文本错误的方法,如我在上面的问题中所述
使用正常步骤创建您的安装项目
导航到 Setup 文件夹并打开 Debug 文件夹并单击 setup.exe 文件后,下一步如下 是的,与使用 Inno Setup 相比,它很奇怪且不理想,但如果您不想学习如何使用 Inno Setup这有效.为什么有必要超出我的理解

After continuing to try and use the Setup Project in Visual Studio 2019 to create both EXE & MSI installers I have found a FIX to the issue Exception Text ERROR as explained in my question above
Create your Setup Project with the Normal Steps
After you navigate to the Setup folder and open the Debug folder and click the setup.exe file the next Step is as follows YES it is Odd and not ideal compared to using Inno Setup but if you do not want to learn how to use Inno Setup this works. Why it is necessary is beyond me

确定现在导航到您的应用程序 EXE 文件所在的文件夹
从您的项目 X64 & 添加以下两个文件夹x86 文件夹,它们位于您项目的 VS 2019 源文件夹中

OK now navigate to the folder where your application EXE file is located
Add the following two folders from your project X64 & x86 folders they are in the source folder for VS 2019 for your project

另外一个细节不要使用由 setup.exe 创建的桌面图标
单击应用程序文件夹中的 AppName.exe 运行应用程序
是的,这是一个与问题中的应用程序不同的应用程序
下面是两个屏幕截图,可以更清楚地说明问题

One more detail DO NOT use the desktop icon created by setup.exe
Click the AppName.exe in the Application Folder to run the application
Yes It is a different app than the app in the question
Here are two screen shots that add more clarity to the issue

这篇关于安装文件失败调试启用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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