c# - Visual Studio Excel 加载项开发 - 无法激活 Windows 应用商店应用错误
问题描述
我正在尝试构建我的第一个 Excel 插件开发项目。我添加了加载项功能区和一个按钮。
当我尝试运行(在调试模式下)时,它给了我以下错误。
无法激活 Windows 应用商店应用程序“Microsoft.Office.Desktop_8wekyb3d8bbwe!Excel”,激活请求失败并出现错误“找不到元素”。
当我打开 Excel 应用程序时,我的插件安装为 COM 插件。
但我只需要使用我的加载项打开 excel 进行测试。正如其他人建议的那样,我尝试清理解决方案,重新启动机器,删除 obj 和 bin 文件夹,在发布模式下运行项目,然后在调试模式下运行。没有任何效果。
namespace ExcelAddInHW
{
public partial class ThisAddIn
{
private void ThisAddIn_Startup(object sender, System.EventArgs e)
{
}
private void ThisAddIn_Shutdown(object sender, System.EventArgs e)
{
}
#region VSTO generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InternalStartup()
{
this.Startup += new System.EventHandler(ThisAddIn_Startup);
this.Shutdown += new System.EventHandler(ThisAddIn_Shutdown);
}
#endregion
}
}
解决方案
推荐阅读
- python - 如何从 GridSearchCV 绘制 cv_results_replacy grid_scores_?
- glassfish - 以管理员身份执行 Glassfish 5.1 时出现 Java 安全错误,但证书有效
- bash - 文件开头的通配模式?
- reactjs - 在 React 中提交表单后无法重置输入字段
- php - 该页面未在 codeigniter 中正确重定向
- css - 为什么这个 nth-of-type 选择器不起作用
- swift - swift : UIView 的平滑翻译与 iOS 控制面板完全一样(跟随用户手指,使用平移)
- php - 如何使用 PHP 将“字符串”操作为给定格式
- r - R中每组的第k个最小元素
- python - 如何在运行时更新 Gtk 中嵌入的 matplotlib?