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

发布于 2024-07-26 05:51:21 字数 115 浏览 4 评论 0原文

我刚刚设计完一个简单的代码程序。 我把它称为“猜谜游戏”。 该程序到目前为止运行良好,我想在不打开 Microsoft Visual Studio 的情况下打开它。

我怎样才能做到这一点?

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.

How can I do that?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(6

﹉夏雨初晴づ 2024-08-02 05:51:22

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

构建解决方案路径。

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.

Build solution path.

你的心境我的脸 2024-08-02 05:51:21

最简单的方法是:

  • 找到 Visual Studio 窗口顶部的下拉框,显示 调试
  • 选择 发布
  • F6 构建它
  • 切换返回调试,然后关闭 Visual Studio
  • 打开 Windows 资源管理器并导航到项目文件夹 (My Documents\Visual Studio 200x\Projects\my_project\)
  • 现在转到 bin\Release\ 并将可执行文件从那里复制到您想要存储它的任何位置
  • 创建适当的快捷方式并享受您的新游戏! :)

The easiest way is:

  • Find the drop-down box at the top of Visual Studio's window that says Debug
  • Select Release
  • Hit F6 to build it
  • Switch back to Debug and then close Visual Studio
  • Open Windows Explorer and navigate to your project's folder (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
  • Make shortcuts as appropriate and enjoy your new game! :)
仙气飘飘 2024-08-02 05:51:21

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

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.

绝情姑娘 2024-08-02 05:51:21

我正在使用 Visual Studio 2017。

  1. 转到下拉框构建。
  2. 选择“发布猜猜游戏”(或任何您的项目名称)。Wiz
  3. Box 打开,告诉它在哪里发布它,然后单击“下一步”。
  4. 选择安装方式(我通常选择 CD-ROM)。单击“下一步”。
  5. 选择更新检查(我通常选择“否”)检查)单击下一步。
  6. 单击完成

它会将安装文件发布到您指定的位置

I'm using Visual Studio 2017.

  1. Go to dropdown box build.
  2. Choose Pubish Guessing Game (or whatever your project is called.
  3. Wiz Box opens so tell it where to publish it and click Next.
  4. Choose how to install (I usually choose CD-ROM). click Next.
  5. Choose updates check (I usually choose no check) click Next.
  6. Click Finish

It will publish, complete with setup file to the location you specified.

Hope this helps

南…巷孤猫 2024-08-02 05:51:21

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

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

一袭白衣梦中忆 2024-08-02 05:51:21

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

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文