如何编译完成的C#项目然后在Visual Studio外部运行?

时间:2022-05-25 10:20:45

I just finished designing a simple code program. I called it a "Guessing Game". The program is so far working fine and I would like to open it without opening my Microsoft Visual Studio.

我刚刚完成了一个简单的代码程序设计。我称之为“猜猜游戏”。该程序到目前为止工作正常,我想打开它而不打开我的Microsoft Visual Studio。

How can I do that?

我怎样才能做到这一点?

5 个解决方案

#1


The easiest way is:

最简单的方法是:

  • Find the dropdown box at the top of Visual Studio's window that says "Debug"
  • 找到Visual Studio窗口顶部显示“Debug”的下拉框

  • Select "Release"
  • Hit F6 to build it
  • 点击F6来构建它

  • Switch back to Debug and then close Visual Studio
  • 切换回Debug,然后关闭Visual Studio

  • Open Windows Explorer and navigate to your projects folder (My Documents\Visual Studio 200x\Projects\my_project)
  • 打开Windows资源管理器并导航到项目文件夹(My Documents \ Visual Studio 200x \ Projects \ my_project)

  • Now go to bin\Release\ and copy the executable from there to wherever you want to store it.
  • 现在转到bin \ Release \并将可执行文件从那里复制到您要存储它的任何位置。

  • Make shortcuts as appropriate and enjoy your new game! :)
  • 根据需要制作快捷方式,享受您的新游戏! :)

#2


On your project folder, open up the bin\Debug subfolder and you'll see the compiled result.

在项目文件夹中,打开bin \ Debug子文件夹,您将看到编译结果。

#3


In the project file is folder "bin/debug/your_appliacion_name.exe". This is final executable program file.

在项目文件中是文件夹“bin / debug / your_appliacion_name.exe”。这是最终的可执行程序文件。

#4


Compile the Release version as .exe file, then just copy onto a machine with a suitable version of .NET Framework installed and run it there. The .exe file is located in the bin\Release subfolder of the project folder.

将Release版本编译为.exe文件,然后只需将其复制到安装了适当版本的.NET Framework的计算机上并在那里运行。 .exe文件位于项目文件夹的bin \ Release子文件夹中。

#5


If you cannot find the .exe file, rebuild your solution and in your "Output" from Visual Studio the path to the file will be shown.

如果找不到.exe文件,请重新构建解决方案,并在Visual Studio的“输出”中显示该文件的路径。

Build solution path.

构建解决方案路径

#1


The easiest way is:

最简单的方法是:

  • Find the dropdown box at the top of Visual Studio's window that says "Debug"
  • 找到Visual Studio窗口顶部显示“Debug”的下拉框

  • Select "Release"
  • Hit F6 to build it
  • 点击F6来构建它

  • Switch back to Debug and then close Visual Studio
  • 切换回Debug,然后关闭Visual Studio

  • Open Windows Explorer and navigate to your projects folder (My Documents\Visual Studio 200x\Projects\my_project)
  • 打开Windows资源管理器并导航到项目文件夹(My Documents \ Visual Studio 200x \ Projects \ my_project)

  • Now go to bin\Release\ and copy the executable from there to wherever you want to store it.
  • 现在转到bin \ Release \并将可执行文件从那里复制到您要存储它的任何位置。

  • Make shortcuts as appropriate and enjoy your new game! :)
  • 根据需要制作快捷方式,享受您的新游戏! :)

#2


On your project folder, open up the bin\Debug subfolder and you'll see the compiled result.

在项目文件夹中,打开bin \ Debug子文件夹,您将看到编译结果。

#3


In the project file is folder "bin/debug/your_appliacion_name.exe". This is final executable program file.

在项目文件中是文件夹“bin / debug / your_appliacion_name.exe”。这是最终的可执行程序文件。

#4


Compile the Release version as .exe file, then just copy onto a machine with a suitable version of .NET Framework installed and run it there. The .exe file is located in the bin\Release subfolder of the project folder.

将Release版本编译为.exe文件,然后只需将其复制到安装了适当版本的.NET Framework的计算机上并在那里运行。 .exe文件位于项目文件夹的bin \ Release子文件夹中。

#5


If you cannot find the .exe file, rebuild your solution and in your "Output" from Visual Studio the path to the file will be shown.

如果找不到.exe文件,请重新构建解决方案,并在Visual Studio的“输出”中显示该文件的路径。

Build solution path.

构建解决方案路径