如何使用Install shield在VB.Net 2012中为项目创建设置 [英] How to create a setup for a project in VB.Net 2012 with Install shield

查看:68
本文介绍了如何使用Install shield在VB.Net 2012中为项目创建设置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好。

我在VB.Net和Microsoft Access 2007中创建了一个Project作为数据库。我有以下代码连接到数据库

Hello everyone
I have created a Project in VB.Net and Microsoft Access 2007 as database. I have the following code to connect to the database

<br />
Imports System.Data.OleDb<br />
Module connection<br />
    Dim dbPath = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) & _<br />
        "\digimate.accdb"<br />
    Public Con As OleDbConnection = New OleDbConnection("Provider=Microsoft.Ace.OLEDB.12.0;Data Source=" & dbPath)<br />
    Public Dad As OleDbDataAdapter<br />
    Public Drd As OleDbDataReader<br />
    Public Cmd As OleDbCommand<br />
    Public Dst = New DataSet<br />
    Public CurrentRow As Integer<br />
    Public acno As Integer<br />
End Module<br />
<br />





现在,我只是想为项目创建一个设置但我认为我遗漏了一些因为它没有按预期工作。

请在这方面提供帮助,或者如果有任何视频可用于带有访问数据库的VB.Net 2012中的安装程序。

谢谢

Sarfaraz



Now, I just wanted to create a setup for the project but I think I am missing something as a result it is not working as expected.
Please, help in this regard or if any video is available for Setup in VB.Net 2012 with access database.
Thank you
Sarfaraz

推荐答案

我们到目前为止的摘要...



- 你确定了访问数据库和bin文件夹的内容已经全部进入了目标机器。



- 然后你得到一个错误无法加载程序集Microsoft.ReportViewer.Winforms所以你安装了报告查看器 [ ^ ]但您仍然收到错误...



尝试...



1.在Visual Studio项目中,确保为 Microsoft.ReportViewer添加了引用.WinForms AND Microsoft.ReportViewer.Common



2.在解决方案资源管理器中单击在Microsoft.ReportViewer.Winforms的参考上(您可能需要单击显示所有文件按钮才能在资源管理器中显示它)



3.在属性窗口中(如果不可见则按F4)查找属性复制本地并将其设置为。这将确保将相应的DLL复制到您的bin文件夹



4.对 Microsoft.ReportViewer重复上面的步骤2和3 .Common



5.重建项目并包含设置中Bin文件夹中的所有内容
A summary of where we are so far...

- You made sure the access database and the contents of the bin folder had all made their way to the target machine.

- You then got an error "Could not load the assembly Microsoft.ReportViewer.Winforms so you installed Report Viewer[^] but you are still getting the error...

Try ...

1. In your Visual Studio project make sure you have added references for both Microsoft.ReportViewer.WinForms AND Microsoft.ReportViewer.Common

2. In Solution Explorer click on the reference for Microsoft.ReportViewer.Winforms (you may need to click the Show All Files button to get it visible in the explorer)

3. In the Properties Window (Hit F4 if it is not visible) look for property Copy Local and set it to True. This will ensure that the appropriate DLL(s) are copied to your bin folder

4. Repeat steps 2 and 3 above for Microsoft.ReportViewer.Common

5. Rebuild your project and include everything from the Bin folder in your setup


这篇关于如何使用Install shield在VB.Net 2012中为项目创建设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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