我使用Visual Studio Express 2012 RC开发了一个Windows 8 C#应用程序。我可以在我的电脑上运行它。但是,我想创建一个可执行文件,以便我的朋友也可以尝试该应用程序。当我单击bin / Release文件夹下的.exe文件时,它会显示:
此应用程序只能在应用程序容器的上下文中运行。
如何手动或使用Visual Studio 2012创建应用容器?
答案 0 :(得分:9)
请参阅here。
您需要开发人员许可才能开发和测试Metro风格的应用 在通过商店进行认证和部署之前。视觉工作室 2012年将在运行时自动请求开发人员许可 第一次。在没有Visual Studio运行的情况下获取开发人员许可证 powershell中的show-WindowsDeveloperLicenseRegistration函数:
C:\Windows\system32>powershell
Windows PowerShell Copyright (C) 2012
Microsoft Corporation. All rights reserved.
PS C:\Windows\system32> Show-WindowsDeveloperLicenseRegistration
有关 有关开发人员许可证的信息,请参阅:Get a developer license (Metro style apps)要部署应用程序,请在Visual Studio中构建程序包 Store.Build Pacakage菜单。构建它供本地使用。复制 生成包到目标机器并运行包含 Add-AppDevPackage.ps1文件。另见Sharing an app package locally. --Rob