c#.net桌面应用程序部署问题 [英] c#.net desktop application deployment issue

查看:102
本文介绍了c#.net桌面应用程序部署问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在VS2012中使用localDB创建了c#.net桌面应用程序。

现在用于部署是否需要在客户端pc上安装sqlexpress或sql server ??

what确切的部署步骤。



我也使用了水晶报告,所以如何部署该水晶报告也能正常工作。

I have created c#.net desktop application in VS2012 with localDB.
now for deployment is it necessary to install sqlexpress or sql server at client pc ??
what exact steps for deployment.

I have also use crystal report in it, so how to deploy that crystal report also work properly.

推荐答案

不需要sqlexpress,但是你需要在部署中包含sql dll。

转到项目 - >属性 - >发布 - >应用程序文件

包含所有sql dll
No need of sqlexpress, but you need to include the sql dlls in deployment.
Goto project -> Properties -> Publish -> Application Files
Include all the sql dlls


对于窗口应用程序,最好使用压缩SQL。为此,您只需从nuget安装SQL compact即可。它将复制应用程序中的所有依赖项。一旦我们创建安装程序,我们只需要添加所有这些依赖项(DLL)。
For window application, it would be better to use compact SQL. For this, you can simply install SQL compact from nuget. It will copy all the dependencies in application. Once we make the installer we simply need to add all those dependencies(DLL).


不,您在资源连接中使用的连接字符串可以包含远程连接在里面。因此,您的数据可以出现在任何地方,您可以通过为服务器提供IP地址来连接到它。您可以获取数据库的连接字符串, http://www.connectionstrings.com/ [ ^ ]



其次,因为这是一个桌面应用程序,你需要添加一些程序集,或者我应该说,包中的所有依赖项。使用解决方案1提取所有必需的程序集。您只需要使用第三方程序集或刚刚创建的程序集。 .NET程序集已存在于那里,因此您无需发送它们。因此,只需要提供所需的.dll文件,以便程序可以毫无问题地执行。



我从未使用过Crystal Reports,但如果Crystal Report需要一个dll文件,那么是。您还需要在客户端系统上发送该DLL。
No, the connection string that you'll be using in your connection to the resource can have remote connections included in it. So, that your data can be present at any place, you can connect to it by providing an IP address for the server where to get the data from. You can get the connection string for you Database at, http://www.connectionstrings.com/[^]

Secondly, since this is a desktop application, you will need to add a few assemblies, or should I say, all of the dependencies in the package. Use the Solution 1 to extract all of the required assemblies. You just need to use the third-party assemblies or the ones you just created. The .NET assemblies would be present there already so you don't need to ship those. So, just the .dll files that you need must be shipped in order for your program to execute without any problem.

I have never worked with Crystal Reports, but if Crystal Report requires a dll file, then yes. You need to ship that dll too on the client system.


这篇关于c#.net桌面应用程序部署问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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