简体   繁体   English

如何从 .NET Framework 4.8 项目创建 .EXE 文件?

[英]How can I create an .EXE file from .NET Framework 4.8 project?

As the question states, How can I create an.EXE file from .NET Framework 4.8 project?如问题所述,如何从 .NET Framework 4.8 项目创建 .EXE 文件? This is a Windows Forms Application.这是一个 Windows Forms 应用程序。

When I publish my application, I get the following files/directory created:当我发布我的应用程序时,我创建了以下文件/目录:

在此处输入图像描述

I can run the setup.exe file to download the application, and from there can open the application from my system or through the TapeRedGreen.application file.我可以运行 setup.exe 文件来下载应用程序,然后可以从我的系统或通过 TapeRedGreen.application 文件打开应用程序。

Many other users have had an issue in their project properties where there output type is set to Class Library, but I can verify mine is set correctly:许多其他用户在他们的项目属性中遇到问题,其中 output 类型设置为 Class 库,但我可以验证我的设置是否正确:

在此处输入图像描述

I would like to instead have a TapeRedGreen.exe file that will run the program/application, avoiding having to run the setup/install.exe.我想要一个 TapeRedGreen.exe 文件来运行程序/应用程序,避免必须运行 setup/install.exe。 How can I do this?我怎样才能做到这一点?

You can just build the application and then look in the output folder (under the bin folder of your project).您可以只构建应用程序,然后查看 output 文件夹(在项目的bin文件夹下)。

The target folder will have the same name of the configuration selected for the build (debug or release).目标文件夹将具有与为构建(调试或发布)选择的配置相同的名称。

The last row of the output console will give you the full path. output 控制台的最后一行将为您提供完整路径。

A quick tutorial from Microsoft:来自 Microsoft 的快速教程:
https://learn.microsoft.com/en-us/visualstudio/ide/walkthrough-building-an-application?view=vs-2022 https://learn.microsoft.com/en-us/visualstudio/ide/walkthrough-building-an-application?view=vs-2022

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在 .NET Framework 4.8 中使用 TimeOnly 和 DateOnly - How can I use TimeOnly and DateOnly in .NET Framework 4.8 如何检查机器上安装的.Net Framework 4.8 - How can I check .Net Framework 4.8 Installed on machine 将项目从 .NET5 转换为 .NET Framework 4.8 - Converting a project from .NET5 to .NET Framework 4.8 如何在asp.net core 3.1中使用asp.net framework 4.8中的StatisticFormula类 - How can I use a StatisticFormula Class from asp.net framework 4.8 in asp.net core 3.1 如何使用 dotnet CLI 构建 .NET Framework 4.8 应用程序? - How can I build a .NET Framework 4.8 application using the dotnet CLI? 在我将 .NET 6 项目重新定位到 .NET Framework 4.8 后,编译器拒绝编译 - Compiler refuses to compile after I retarget a .NET 6 project to .NET Framework 4.8 我可以使用.Net标准库中的PowerShell类在.Net Framework项目(exe)中使用吗 - Can I use PowerShell class in .Net Standard library to use in .Net Framework project (exe) 从 .Net Framework 4.7 升级到 4.8 后使用 MSBuild 发布项目时出错 - Error in publishing project with MSBuild after upgrading from .Net Framework 4.7 to 4.8 我可以从 .NET 6 项目中添加对 .NET 框架 DLL 的引用吗? - Can I add a reference to a .NET Framework DLL from a .NET 6 project? 从WPF项目创建单个Exe文件 - Create single Exe file from WPF project
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM