且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何从Windows窗体创建EXE文件?

更新时间:2023-12-06 11:49:28

非常简单的步骤:


  1. 发布模式编译应用程序:

  1. Compile the application in Release mode:



  • Visual Studio:


  • .NET Framework MSBuild: msbuild.exe ConsoleApp1.sln / t:Build / p:Configuration = Release

  • .NET Core CLI: dotnet build -c版本(您可能需要配置项目以输出EXE)

    • Visual Studio:
    • .NET Framework MSBuild: msbuild.exe ConsoleApp1.sln /t:Build /p:Configuration=Release
    • .NET Core CLI: dotnet build -c Release (you may need to configure the project to output EXE)

  1. 打开解决方案文件夹

  2. 打开应用程序项目文件夹

  3. 打开 Bin 文件夹

  4. 打开 Release 文件夹

  5. 复制 .exe 文件

  6. 共享它。

  1. Open the solution folder
  2. Open the application project folder
  3. Open the Bin folder
  4. Open the Release folder
  5. Copy the .exe file
  6. Share it.