在C#.NET中创建安装文件 [英] create setup file in c#.NET
本文介绍了在C#.NET中创建安装文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我不专业...
我在C#中有一个项目,
.NET框架4
带有SQL Server 2008的db1.mdf
现在,我想从我的项目中创建安装文件以在另一台计算机上安装.
我的错误:
1-目标计算机请求.NETframwork 4.0
2- db1.mdf文件位于安装文件旁边,因此用户可以删除它!
3目标计算机无法找到数据库文件
正在显示4个表格,但db无法正常运行!!
因此,我该如何解决这些问题?.
i am not professional...
I have a project in c#,
.NET framwork 4
db1.mdf with sql server 2008
Now I want to create setup file from my project to install on another computers.
my errors:
1- target computer requests .NET framwork 4.0
2- db1.mdf file is next to setup file,so user will be able to delete it!!!
3-target computer is not able to find database file
4-form is displaying but db not work!!
so how can i solve these problems?.
推荐答案
我使用一个称为高级安装程序的工具,有一个免费版本.它可以解决所有这些问题.
1-您将始终需要.NET才能使C#应用程序正常工作.您可以制作一个寻找并下载它的安装程序
2-文件将放置在您告诉安装程序放置的任何位置,但用户始终可以删除其文件系统上的文件
3-您需要编写代码来查找放置数据库的地方,并允许用户配置位置
4-DB不能正常工作,因为我找不到它.请参阅我对#3的回答.
I use a tool called advanced installer, there is a free version. It can solve all these issues.
1 - you will always need .NET for a C# app to work. You can make an installer that looks for and downloads it
2 - the file will be put where-ever you tell the installer to put it, but users can always delete files on their file system
3 - you need to write code that looks for the DB where you put it, and allows the user to configure the location
4 - the DB does not work because it can''t find it, I expect. See my answer to #3.
这篇关于在C#.NET中创建安装文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文