热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

如何部署WindowsWPF应用程序?-howtodeployWindowsWPFApplication?

IhaveasimpleWindowsFormapplication(WPF)withentityframework.Aftercompiled,onlyafewfile

I have a simple Windows Form application(WPF) with entity framework. After compiled, only a few files generated:

我有一个带有实体框架的简单Windows窗体应用程序(WPF)。编译后,只生成几个文件:

EntityFramework.dll
EntityFramework.xml
MyApp.exe
MyApp.application
MyApp.exe.config
...

Then I just copy following files to a network shared folder:

然后我将以下文件复制到网络共享文件夹:

EntityFramework.dll
MyApp.exe
MyApp.exe.config

Then I can double click on MyApp.exe from developer computer the launch the app, but can not launch from another end user computer.

然后我可以双击MyApp。exe从开发人员电脑上启动应用程序,但不能从其他终端用户电脑上启动。

How to resolve this problem?

如何解决这个问题?

2 个解决方案

#1


0  

When you double click, app is not launching means certainly it is crashing so type the command eventvwr in run or cmd it'll open the Event viewer in that go to Windows Logs and Click on Application, you can see different levels of logs in that just find the last error log view the details it might help you

当你双击时,应用程序不启动意味着当然是崩溃类型在运行或cmd命令eventvwr它会打开事件查看器,Windows日志,点击应用程序,你可以看到不同级别的日志,发现过去的错误日志查看细节可能会帮助你

#2


0  

Have a look in the event log on the target computer and look at the error that is actually being reported.

查看目标计算机上的事件日志并查看实际报告的错误。

It could be a missing installation of the correct version of the DotNet framework as suggested in the comments above, or it could also be that the execution policy of the target computer is preventing the user from running from a network drive (As a developer you probably have admin rights on your local pc allowing you to do this).

可能是失踪的安装正确版本DotNet框架的建议在上面的评论中,或者它也可以执行的政策目标计算机是防止用户从网络驱动器(作为一名开发人员你可能有管理的权利在您的本地电脑允许你这么做)。

Whatever the actual cause you are always better to use some form of installer, rather than this form of putting files on the network (commonly known as xcopy deployment).

无论实际原因是什么,最好使用某种形式的安装程序,而不是将文件放在网络上的这种形式(通常称为xcopy部署)。

Probably the best solution is to use Visual studio to generate you a click once installer and publish it to your network drive. This will then copy the application locally on the users pc and run it from there.

也许最好的解决方案是使用Visual studio在安装后生成一个单击并将其发布到您的网络驱动器。然后,它将在用户pc上本地复制应用程序并从那里运行它。


推荐阅读
author-avatar
磊仔2502898265
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有