简体   繁体   English

WinRT c# 编译为 exe 但不在 Visual Studio 外部运行

[英]WinRT c# compiled to exe but does not run outside visual studio

Hey all I am pretty new to the "old" WinRT (Windows Runtime) framework and I am unsure about one thing so far.嘿,我对“旧”WinRT(Windows 运行时)框架还很陌生,到目前为止我还不确定一件事。 How do I run the app outside of Visual Studio?如何在 Visual Studio 之外运行应用程序? In Visual Studio when ran using "Local Machine" it compiles and runs just fine.在 Visual Studio 中,当使用“本地机器”运行时,它编译并运行得很好。 However, if I try the.exe that it produces outside of Visual Studio then nothing happens - no error and no app screen...但是,如果我尝试它在 Visual Studio 之外生成的.exe,那么什么也不会发生 - 没有错误,也没有应用程序屏幕......

Like I said, in Visual Studio it compiles and runs:就像我说的,在 Visual Studio 中它编译并运行:

在此处输入图像描述 在此处输入图像描述

So when I go and execute the NitroCarEntertainmant.exe outside of Visual Studio then nothing happens.因此,当我 go 并在 Visual Studio 之外执行 NitroCarEntertainmant.exe 时,什么也没有发生。 What am I missing that seems to be something that it needs to run?我错过了什么似乎是它需要运行的东西? I know a store app has a extension of.Appx so not sure if I have to package it up in some way or if this.exe can work - I just don't know how to make it work myself - with some type of trick/hack/bypass?我知道商店应用程序的扩展名为.Appx,所以不确定我是否必须以某种方式 package 或者 this.exe 是否可以工作 - 我只是不知道如何让它自己工作 - 使用某种技巧/黑客/绕过?

Help would be greatly appreciated!帮助将不胜感激!

You need to create a package and install it before running.您需要创建一个 package 并在运行前安装它。 On Windows 8 and 8.1 you'll need a developer license for this but on Windows 10 you can install it normally however you added to sign it with a certificate and import it before installing.在 Windows 8 和 8.1 上,您需要为此获得开发人员许可证,但在 Windows 10 上,您可以正常安装它,但是您添加了使用证书对其进行签名并在安装前导入它。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM