启动 Visual Studio 2015 生成的 exe 文件 [英] Launch exe file generated by Visual Studio 2015

查看:41
本文介绍了启动 Visual Studio 2015 生成的 exe 文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要从 VisualStudio 2015 社区版中开发的简单 Windows 10 通用应用程序中获取可运行的 .exe 文件.这之前在带有 Visual Studio 2012(或可能是 2013)的 Windows 7 PC 上工作,.exe 位于 MyProject/bin/x64/Debug,我能够运行它.

I need to get a runnable .exe file from a simple Windows 10 universal app developed in VisualStudio 2015 community edition. This worked before on a windows 7 PC with Visual Studio 2012 (or maybe 2013), the .exe was located at MyProject/bin/x64/Debug, and I was able to run it.

现在,使用 Visual Studio 2015,我仍然可以找到 .exe 文件,但是当我尝试运行它时出现错误:

Now, with Visual Studio 2015, I can still find the .exe file, but it gives me an error when I try to run it:

此应用程序只能在应用程序容器的上下文中运行.

This application can only run in the context of an app container.

有没有办法导出可执行文件,而无需付费开发者帐户?

Is there a way to export an executable, without having a payed developer account?

推荐答案

如果它是 Windows 10 通用应用程序,则无法使用 exe 文件运行它.您需要在 Visual Studio 中创建 appxupload 二进制文件.以下是创建二进制文件的步骤.

If it's a windows 10 universal app then you cannot run it with a exe file. You need to create the appxupload binary in visual studio. Here's the steps to follow to create the binaries.

打开解决方案

选择项目-->商店-->创建应用程序包

Select Project-->Store-->Create App Packages

如果您想生成供您自己使用的 appx 文件,则会打开一个对话框并选择否".然后点击下一步.在检查适当的要求后,在下一个屏幕中选择创建.

A dialog opens and select 'No' if you want to generate appx file for your own use. Then click next. In the next screen select create after checking the appropriate requirements.

希望这对您的情况有所帮助.检查这些链接以获取屏幕截图.

Hope this helps your case. Check these links for screenshots.

https://www.dropbox.com/s/64fvm3huy64qqda/Capture.jpg?dl=0

https://www.dropbox.com/s/hw52n281u7rse1z/Capture1.jpg?dl=0

这篇关于启动 Visual Studio 2015 生成的 exe 文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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