如何制作包含我的WPF C#应用程序2010和SQL Server 2012以及我的MDF数据库文件的安装文件? [英] How To make setup file that contains my WPF C# application 2010 and SQL server 2012 and my MDF database file?
问题描述
我正在尝试将SQL Server 2012安装集成到我的WPF C#(2010)应用程序设置项目中。因此,每当我的应用程序在客户端计算机上安装时,如果客户端计算机没有安装它们,如果要检查SQL server 2012 express,.net framework和crystal报告运行时间。安装程序文件应该在客户端计算机上安装它们,之后附加数据库MDF文件。
我通过Google多次搜索,并尝试了几个解决方案但没有成功。 :(
任何人都可以指导我解决这个问题。
提前感谢您的帮助!
I am trying to integrate SQL server 2012 install within my WPF C# (2010) application setup project. So that whenever my application is installing on a client machine, if would check for SQL server 2012 express, .net framework & crystal reports run time , if the client machine does not installed them. the installer file should install them on the client machine, and after that attach database MDF file.
I searched several times via Google, & try several solutions with no success. :(
Can anybody guide me come out of this problem.
Thanks in advance for any help!
推荐答案
您可以使用mdf设置连接字符串:
C# - 连接到MDF数据库 [ ^ ]
AttachDbFileName = | DataDirector ... [ ^ ]
You can set your connection string with your mdf:
C# - Connect to MDF database[^]
AttachDbFileName=|DataDirector...[^]
这篇关于如何制作包含我的WPF C#应用程序2010和SQL Server 2012以及我的MDF数据库文件的安装文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!