如何使我的安装项目生成可执行文件? [英] How do I make my Setup project produce an executable?

查看:108
本文介绍了如何使我的安装项目生成可执行文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经构建了一个小型桌面应用程序,试图通过它使用安装程序项目来允许其他用户安装它.但是,每当我运行此安装程序时,它都不会生成可执行文件.这是我第一次制作安装项目.

I've built a small desktop application with which I am trying to use a Setup project to allow other users to install it. But whenever I run this installer, it does not produce an executable file. This is my first time making a setup project.

我的解决方案包含两个项目.一个是安装项目,该安装项目将安装另一个项目的主要输出.另一个项目是WPF应用程序,它由两个xaml文件,每个xaml.cs文件,一个App.config文件和一个图标组成.它还具有一些依赖关系,包括一个程序集,两个框架和一些软件包.每当我在调试"或发布"配置上启动Visual Studio调试实例时,该应用程序便会按预期运行.

My solution contains two projects. One is the setup project which installs the primary output from the other project. The other project is a WPF App that consists of two xaml files, a xaml.cs file for each, an App.config file, and an icon. It also has a few dependencies including one Assembly, two Frameworks, and a handful of Packages. The app works exactly as intended whenever I start a Visual Studio debugging instance on either Debug or Release configurations.

我遵循了

I followed these instructions to build my Setup and deploy my app.

每当我运行生成的安装程序时,它都会为我的程序集安装XML配置文件,JSON文件,主应用程序dll文件和一堆dll文件.我研究了一些有关如何正确运行主dll文件的资源,仅(A)我完全被那个主题上的所有内容所困扰,并且(B)无论如何我还是想生成一个可执行文件,因为我打算此安装程序项目供其他人使用,要求其他人跳过相同的步骤只是为了运行它会很不方便.

Whenever I ran the resulting Setup, it installed an XML configuration file, a JSON file, a main application dll file, and a bunch of dll files for my assemblies. I looked into some resources on how to run the main dll file properly, only (A) I'm completely stumped by everything I find on that topic, and (B) I would rather just produce an executable file anyway, since I intend for this Setup project to be used by other people and it would be inconvenient to ask said others to jump through the same hoops just to run it.

为什么我的安装项目不生成.exe文件?我看到,每当我构建项目时,bin文件夹中都会生成一个.exe文件(该.exe可以工作),因此我认为安装项目也应该生成其中一个,但事实并非如此.我的安装项目或其他任何问题在哪里?

Why does my Setup project not produce a .exe file? I see that a .exe file is produced in my bin folder whenever I build my project (and this .exe works), so I would think the setup project should also produce one of those, but it doesn't. What am I doing wrong with my Setup project or anything else?

推荐答案

切换到发布模式,然后重建您的安装项目.如果一切顺利(请检查输出控制台),您将在{setup project folder}/bin/Release

Switch to Release mode, then rebuild your setup project. If everything went well (check the output console), you'll find an MSI file inside {setup project folder}/bin/Release

这篇关于如何使我的安装项目生成可执行文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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