“此应用程序只能在应用程序容器的上下文中运行。” - Visual Studio 2015 开发新手

2024-05-07

我有点绝望了。我几个小时以来一直在尝试解决以下问题。

我开发了一个应用程序,现在尝试使用 Visual Studio 2015 的安装向导扩展来安装。一切都在构建或(没有错误),但是当我打开应用程序时,它突出显示它只能在应用程序容器的上下文中打开。这意味着什么?任何建议将不胜感激!

该应用程序正在使用 SQlite 数据库。这可能与依赖关系有关吗?如果是这样,我该如何解决这个问题?

UPDATE:

# Culture = "en-US"
ConvertFrom-StringData @'
###PSLOC
    PromptYesString = &Yes
    PromptNoString = &No
    BundleFound = Found bundle: {0}
    PackageFound = Found package: {0}
    CertificateFound = Found certificate: {0}
    DependenciesFound = Found dependency package(s):
    GettingDeveloperLicense = Acquiring developer license...
    InstallingCertificate = Installing certificate...
    InstallingPackage = \nInstalling app...
    AcquireLicenseSuccessful = A developer license was successfully acquired.
    InstallCertificateSuccessful = The certificate was successfully installed.
    Success = \nSuccess: Your app was successfully installed.
    WarningInstallCert = \nYou are about to install a digital certificate to your computer's Trusted People certificate store. Doing so carries serious security risk and should only be done if you trust the originator of this digital certificate.\n\nWhen you are done using this app, you should manually remove the associated digital certificate. Instructions for doing so can be found here: http://go.microsoft.com/fwlink/?LinkId=243053\n\nAre you sure you wish to continue?\n\n
    ElevateActions = \nBefore installing this app, you need to do the following:
    ElevateActionDevLicense = \t- Acquire a developer license
    ElevateActionCertificate = \t- Install the signing certificate
    ElevateActionsContinue = Administrator credentials are required to continue.  Please accept the UAC prompt and provide your administrator password if asked.
    ErrorForceElevate = You must provide administrator credentials to proceed.  Please run this script without the -Force parameter or from an elevated PowerShell window.
    ErrorForceDeveloperLicense = Acquiring a developer license requires user interaction.  Please rerun the script without the -Force parameter.
    ErrorLaunchAdminFailed = Error: Could not start a new process as administrator.
    ErrorNoScriptPath = Error: You must launch this script from a file.
    ErrorNoPackageFound = Error: No package or bundle found in the script directory.  Please make sure the package or bundle you want to install is placed in the same directory as this script.
    ErrorManyPackagesFound = Error: More than one package or bundle found in the script directory.  Please make sure only the package or bundle you want to install is placed in the same directory as this script.
    ErrorPackageUnsigned = Error: The package or bundle is not digitally signed or its signature is corrupted.
    ErrorNoCertificateFound = Error: No certificate found in the script directory.  Please make sure the certificate used to sign the package or bundle you are installing is placed in the same directory as this script.
    ErrorManyCertificatesFound = Error: More than one certificate found in the script directory.  Please make sure only the certificate used to sign the package or bundle you are installing is placed in the same directory as this script.
    ErrorBadCertificate = Error: The file "{0}" is not a valid digital certificate.  CertUtil returned with error code {1}.
    ErrorExpiredCertificate = Error: The developer certificate "{0}" has expired. One possible cause is the system clock isn't set to the correct date and time. If the system settings are correct, contact the app owner to re-create a package or bundle with a valid certificate.
    ErrorCertificateMismatch = Error: The certificate does not match the one used to sign the package or bundle.
    ErrorCertIsCA = Error: The certificate can't be a certificate authority.
    ErrorBannedKeyUsage = Error: The certificate can't have the following key usage: {0}.  Key usage must be unspecified or equal to "DigitalSignature".
    ErrorBannedEKU = Error: The certificate can't have the following extended key usage: {0}.  Only the Code Signing and Lifetime Signing EKUs are allowed.
    ErrorNoBasicConstraints = Error: The certificate is missing the basic constraints extension.
    ErrorNoCodeSigningEku = Error: The certificate is missing the extended key usage for Code Signing.
    ErrorInstallCertificateCancelled = Error: Installation of the certificate was cancelled.
    ErrorCertUtilInstallFailed = Error: Could not install the certificate.  CertUtil returned with error code {0}.
    ErrorGetDeveloperLicenseFailed = Error: Could not acquire a developer license. For more information, see http://go.microsoft.com/fwlink/?LinkID=252740.
    ErrorInstallCertificateFailed = Error: Could not install the certificate. Status: {0}. For more information, see http://go.microsoft.com/fwlink/?LinkID=252740.
    ErrorAddPackageFailed = Error: Could not install the app.
    ErrorAddPackageFailedWithCert = Error: Could not install the app.  To ensure security, please consider uninstalling the signing certificate until you can install the app.  Instructions for doing so can be found here:\nhttp://go.microsoft.com/fwlink/?LinkId=243053

另一个更新:在 PowerShell 中以管理员身份运行侧面加载安装脚本,现在收到以下错误:

无法注册包。 (HRESULT 异常:0x80073CF6)谷歌搜索了一下,但针对 Windows 10 开发人员的结果并不多。


如果这是商店/UWP 应用程序,则只能通过 appx 包安装。通常这应该通过商店进行。
无法使用 MSI 安装现代/商店/UWP 应用程序。

如果您不想(或不能)通过商店分发,那么您可以创建一个可以直接安装的包。

在 VS 中,转到:项目 > 商店 > 创建应用程序包... > 并选择否为商店构建包

在计算机上安装应用程序之前,您需要在该计算机上启用开发人员功能:
设置 > 更新和安全 > 对于开发人员 > 选择:旁加载应用程序

然后只需运行使用该包创建的 PowerShell 脚本即可安装它。

您关于商店提交需要 7 天的评论听起来不正确。通常,提交将在一小时内完成,只有在特殊情况下才需要一天以上的时间。

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

“此应用程序只能在应用程序容器的上下文中运行。” - Visual Studio 2015 开发新手 的相关文章

  • MVC 重定向到没有控制器的视图

    希望应该是一个简单的 我创建了一个通用错误视图 当整个站点的操作方法内发生异常时 我想显示该视图 我创建了一个部分页面 所有导航都位于其中 因此我不需要在此视图上使用控制器 那么如何从控制器内的操作方法重定向到它 像这样的东西 HttpPo
  • 如何为 Windows 安装开源 Qt 库 5 二进制版本

    这个问题具体是关于Qt libraries 5 0 0 for Windows VS 2010 406 MB at http qt project org downloads http qt project org downloads 但我
  • 通过单个 GPIO 引脚转储闪存

    我正在使用 Infineon 的 XMC4500 Relax Kit 并尝试通过单个 GPIO 引脚提取固件 我非常天真的想法是通过 GPIO 引脚一次转储一位 然后用逻辑分析仪以某种方式 嗅探 数据 伪代码 while word by w
  • rand() 播种与 time() 问题

    我很难弄清楚如何使用 rand 并使用 Xcode 用 time 为其播种 我想生成 0 到 1 之间的随机十进制数 该代码为我提供了元素 1 和 2 看似随机的数字 但元素 0 始终在 0 077 左右 有什么想法吗 我的代码是 incl
  • C 中的模仿函数重写

    具体来说 函数重写能够调用基本重写方法 这有两部分 一个是预编译的库代码 1 另一个是库的用户代码 2 我在这里实现了一个尽可能最小的经典 Person 和 Employee 示例 非常感谢了解 OOP 概念的铁杆 C 开发人员的回应 我正
  • 将成员函数作为参数传递/c++

    我想用 C 实现一个类b可以通过封装该迭代器类型的成员集进行某种迭代 喜欢 b object for each x do function f so 函数 f会得到每个人的x成员并做任何事情 比方说 void function f x me
  • 使用反射获取基类的受保护属性值

    I would like to know if it is possible to access the value of the ConfigurationId property which is located in the base
  • 特定设备的不同字体大小

    我目前正在开发通用应用程序 我需要分别处理移动设备和桌面的文本框字体大小 我找到了一些方法 但都不能解决问题 使用 VisualStateManager 和 StateTrigger 为例
  • 导出到 CSV 时 Gridview 出现空行

    这个问题是由进一步讨论引发的这个问题 https stackoverflow com questions 6674555 export gridview data into csv file 6674589 noredirect 1 com
  • 如何使用泛型类型的 DataContractSerializer 编写自定义序列化器?

    我想编写一个自定义序列化器 用于将会话状态存储到Azure 缓存 预览版 这意味着这个自定义序列化器必须实现IDataCacheObjectSerializer 如果我错了 请告诉我 我需要编写这个自定义序列化程序的原因是我需要序列化一些包
  • 指示泛型返回动态类型的对象

    这个问题是我原来问题的后续问题here https stackoverflow com questions 2541184 using a type object to create a generic 假设我有以下泛型类 简化 class
  • QThread - 使用槽 quit() 退出线程

    我想在线程完成运行时通知对象 但是 我无法让线程正确退出 我有以下代码 处理器 cpp thread new QThread tw new ThreadWorker connect tw SIGNAL updateStatus QStrin
  • c# 如何生成锦标赛括号 HTML 表

    所以我已经被这个问题困扰了三个星期 但我一生都无法弄清楚 我想做的是使用表格获得这种输出 演示 http www esl world net masters season6 hanover sc2 playoffs rankings htt
  • 不要声明只读可变引用类型 - 为什么不呢?

    我一直在阅读这个问题 https stackoverflow com questions 2274412 immutable readonly reference types fxcop violation do not declare r
  • 为什么WCF中不允许方法重载?

    假设这是一个ServiceContract ServiceContract public interface MyService OperationContract int Sum int x int y OperationContract
  • `cosf`、`sinf` 等不在 `std` 中 [重复]

    这个问题在这里已经有答案了 根据这里的讨论 我有报告了一个错误 https bugs launchpad net ubuntu source gcc 8 bug 1831385给 Ubuntu 开发者 编译以下示例 C 程序时 includ
  • 当在 Repository/UnitOrWork 之上使用 Service 类时,我应该在哪里放置逻辑不适合 Repository 的常用数据访问代码?

    In my 先前的问题 https stackoverflow com questions 24906548 using the generic repository unit of work pattern in large projec
  • 在 SQL Server 上执行分页的最佳方式是什么?

    我有一个数据库超过200万记录 我需要执行分页以在我的 Web 应用程序上显示 该应用程序每页必须有 10 条记录DataGrid 我已经尝试使用ROW NUMBER 但是这种方式会选择所有 200 万条记录 然后只得到 10 条记录 我也
  • 使用剪贴板 SetText 换行

    如何使用 SetText 方法添加换行符 I tried Clipboard SetText eee n xxxx 但当我将剪贴板数据粘贴到记事本中时 它没有给我预期的结果 预期结果 eee xxxx 我怎样才能做到这一点 Windows
  • 如何确定给定方法可以抛出哪些异常?

    我的问题和这个真的一样 找出 C 中方法可能抛出的异常 https stackoverflow com questions 264747 finding out what exceptions a method might throw in

随机推荐