C# 无法激活 Windows 商店应用程序未启动

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/19847563/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-10 15:59:16  来源:igfitidea点击:

Unable to activate windows store app the app didn't start

c#visual-studio-2013windows-8.1

提问by msa

First of all I would like to say that I already tried all the solutions I could find on the internet, including Unable to Activate Windows Store App

首先我想说我已经尝试了我在互联网上可以找到的所有解决方案,包括无法激活Windows Store App

I recently upgraded my Windows 7 machine to Windows 8.1 to be capable of developing Windows Store apps using Visual Studio 2013. When I open a blank project (Windows Store -> Blank App) and run it I get this error:

我最近将我的 Windows 7 机器升级到 Windows 8.1,以便能够使用 Visual Studio 2013 开发 Windows Store 应用程序。当我打开一个空白项目(Windows Store -> Blank App)并运行它时,我收到此错误:

Unable to activate Windows Store app 'Package Name'. The App1.exe process started, but the activation request failed with error 'The app didn't start'.

See help for advice on troubleshooting the issue.

无法激活 Windows 应用商店应用“程序包名称”。App1.exe 进程已启动,但激活请求失败并显示“应用程序未启动”错误。

有关故障排除的建议,请参阅帮助。

I already tried:

我已经尝试过:

  • Reinstalling Windows (Clean install)
  • Reinstalling Visual Studio 2013
  • Installing Visual Studio 2012 (same error)
  • Deleting "bin" and "obj" folder
  • Cleaning the solution
  • Uninstalling the app from start menu
  • Creating a new project
  • Acquiring the license multiple times (the license is valid)
  • Making sure that app.config doesn't exist
  • Investigating the Windows Event Log which says
  • 重新安装 Windows(干净安装)
  • 重新安装 Visual Studio 2013
  • 安装 Visual Studio 2012(同样的错误)
  • 删除“bin”和“obj”文件夹
  • 清洁溶液
  • 从开始菜单卸载应用程序
  • 创建一个新项目
  • 多次获取License(License有效)
  • 确保 app.config 不存在
  • 调查 Windows 事件日志,其中说

Activation of the app 'Package Name' for the Windows.Launch contract failed with error: The app didn't start..

激活 Windows.Launch 合同的应用程序“包名称”失败,错误为:应用程序未启动..

but found nothing useful

但没有发现任何有用的东西

  • Adding a new Windows user
  • Run everything as administrator
  • and at last, changing the desktop background :)
  • 添加新的 Windows 用户
  • 以管理员身份运行一切
  • 最后,更改桌面背景:)

None of this did bring a solution. Does anyone have an idea what else could be the reason for this error?

这些都没有带来解决方案。有谁知道这个错误的原因还有什么?

Thank you.

谢谢你。

采纳答案by msa

I found a solution. The problem was that the drive I was working on was encrypted (TrueCrypt). Moving the output folder to an unencrypted drive solved the problem.

我找到了解决方案。问题是我正在处理的驱动器是加密的(TrueCrypt)。将输出文件夹移动到未加密的驱动器解决了这个问题。

回答by Niels Verhoeven

I had the same problem a couple of weeks ago. A simple restart helped me out.

几周前我遇到了同样的问题。一个简单的重启帮助了我。

Also tried this one?: http://irisclasson.com/2012/11/04/problem-unable-to-activate-windows-store-app-the-app1-exe-process-started-but-the-activation-request-failed-with-error-the-app-didnt-start/

也试过这个?:http: //irisclasson.com/2012/11/04/problem-unable-to-activate-windows-store-app-the-app1-exe-process-started-but-the-activation- request-failed-with-error-the-app-didnt-start/

Hope its usefull to you

希望对你有用

回答by Oli Haley

I managed to fix the same problem by rebuilding the solution. (In Vis Studio 2012)

我通过重建解决方案设法解决了同样的问题。(在 Vis Studio 2012 中)

回答by Maurizio Manca

I've tried all the solutions found on the net and none applied to my case, not even this one.

我已经尝试了在网上找到的所有解决方案,但没有一个适用于我的案例,甚至没有一个。

The only way I could make it work was changing the Package Name in the appxmanifest. This made me think there must be some leftovers somewhere around with the old package name, that are either corrupted or inaccessible because of some permissions issues.

我可以使它工作的唯一方法是更改​​ appxmanifest 中的包名称。这让我认为旧包名周围一定有一些遗留物,由于某些权限问题,它们要么已损坏,要么无法访问。

It might be just a coincidence but the problem appeared twice after I tried using the app verifier (appverif.exe)

这可能只是巧合,但在我尝试使用应用程序验证程序 (appverif.exe) 后问题出现了两次

Now I reassociated my app to a store app package and things seem to continue working...

现在我将我的应用程序重新关联到商店应用程序包,事情似乎继续工作......

回答by user3079834

I had the same Error and tried after loading the SQLite Package for WP 8.1 some things above:

我有同样的错误,并在为 WP 8.1 加载 SQLite 包后尝试了上面的一些事情:

not working:

不工作:

  • Clean and Rebuild
  • Restart Computer/Phone
  • 清理和重建
  • 重启电脑/手机

what did the deal (for me)

交易是什么(对我来说)

  • I put Platform Targetunder Properties-> Buildto ARMinstead of x86
  • 我把Platform TargetProperties- >BuildARM而非x86的

Hopefully this might help somebody else facing this ridiculously informative Errormessage.

希望这可以帮助其他人面对这个可笑的信息错误消息。

回答by Douglas Ludlow

Ensure that ALL APPLICATION PACKAGEShas "read" permissions on C:\Windows.

确保ALL APPLICATION PACKAGESC:\Windows.

My organization's group policy likes to strip all permissions from C:\Windows, including the ALL APPLICATION PACKAGESgroup . By adding it back in and setting Read & execute, List folder contents, and Read, I'm able to run the app from Visual Studio without any problems.

我组织的组策略喜欢从 中删除所有权限C:\Windows,包括ALL APPLICATION PACKAGES组。通过将其重新添加并设置Read & executeList folder contentsRead,我能够从 Visual Studio 运行该应用程序而不会出现任何问题。

See What to do if your Windows 8 Modern App fails to startfor more tips, including this one.

请参阅如果您的 Windows 8 现代应用程序无法启动怎么办以获取更多提示,包括此提示。

回答by user3091593

I have tried many solutions and nothing worked. At the end what worked for me was to change the startup project to windows phone 8.1 and after it runs OK I changed it back to windows 8.1 and it runs OK. It works for me as I am making a universal app. Hope it helps anyone else.

我尝试了很多解决方案,但没有任何效果。最后,对我有用的是将启动项目更改为 Windows Phone 8.1,在它运行正常后,我将其改回 Windows 8.1 并且它运行正常。它对我有用,因为我正在制作一个通用的应用程序。希望它可以帮助其他人。

回答by FRP

I had the same issue with a Windows Store App after moving some files around. I ended up opening an older file (as Admin) to see if it would run and found that it did. I then returned to the file that would not and it ran also. I believe opening the older file (as Admin) reset the paths for development and the permissions. Hope this helps.

移动一些文件后,我在 Windows 应用商店应用程序中遇到了同样的问题。我最终打开了一个旧文件(以管理员身份),看看它是否会运行并发现它确实运行了。然后我返回到不会运行的文件,它也运行了。我相信打开旧文件(以管理员身份)会重置开发路径和权限。希望这可以帮助。

回答by Mina Samy

I had a similar issue, solved by choosing a new publisher certificate. And of course restarting Windows

我有一个类似的问题,通过选择一个新的发布者证书来解决。当然还有重启 Windows

回答by AlexBaker

I had the same problem with Visual Studio Community 2015 while trying to debug an Blank App (Universal Windows) using Visual C#.

我在尝试使用 Visual C# 调试空白应用程序(通用 Windows)时遇到了与 Visual Studio Community 2015 相同的问题。

Visual Studio was installed on Disk C:(SSD), and Project files were placed on D:(HDD). I′ve created a Folder on C: Drive and placed my test project there. After that Error messages gone.

Visual Studio 安装在磁盘 C:(SSD) 上,项目文件放在 D:(HDD) 上。我在 C: Drive 上创建了一个文件夹并将我的测试项目放在那里。在那之后错误消息消失了。