无法在VS 2015专业版中调试VSTO Addin Excel 2016 [英] Not able to debug VSTO Addin Excel 2016 in VS 2015 professional

查看:521
本文介绍了无法在VS 2015专业版中调试VSTO Addin Excel 2016的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

My last VSTO project was with Excel 2007 and office 2010. I remembered I always be able

在ThisAddin_Startup(..)函数中休息一下。使用vs 2015和VSTO for Excel 2016

to put a break within ThisAddin_Startup(..) function. With vs 2015 and VSTO for Excel 2016

它没有破坏。我在这里遗漏了什么。请帮忙。

it did not break. Am I missing anything here. Please help.

使用System;
使用System.Collections.Generic;
使用System.Linq;
使用System.Text;
使用System.Xml.Linq;
使用Excel = Microsoft.Office.Interop.Excel;
使用Office = Microsoft.Office.Core;
使用Microsoft.Office.Tools.Excel;
使用System.Windows.Forms;

命名空间Tanker_Optimizer
{
公共部分类ThisAddIn
{
private void ThisAddIn_Startup(object sender,System.EventArgs e)
{
int x;
int y;
x = 5;
y = x;

MessageBox.Show(y.ToString());



}

private void ThisAddIn_Shutdown(object sender,System.EventArgs e)
{

}

#region VSTO生成代码

///< summary>
/// Designer支持的必需方法 - 不要使用代码编辑器修改
///此方法的内容。
///< / summary>
private void InternalStartup()
{
this.Startup + = new System.EventHandler(ThisAddIn_Startup);
Shutdown + = new System.EventHandler(ThisAddIn_Shutdown);
}

#endregion



}
}

using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Xml.Linq; using Excel = Microsoft.Office.Interop.Excel; using Office = Microsoft.Office.Core; using Microsoft.Office.Tools.Excel; using System.Windows.Forms; namespace Tanker_Optimizer { public partial class ThisAddIn { private void ThisAddIn_Startup(object sender, System.EventArgs e) { int x; int y; x = 5; y = x; MessageBox.Show(y.ToString()); } 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); Shutdown += new System.EventHandler(ThisAddIn_Shutdown); } #endregion } }







推荐答案

Hi,

VSTO加载项在应用程序启动时加载。因此,如果我们在ThisAddIn_Startup中设置断点,则Excel无法完全启动。 Excel应用程序将一直处理,直到您进入。

VSTO add-in is loaded when application starts. So if we set a breakpoint at ThisAddIn_Startup, Excel does not start completely. Excel application would be processing until you Step into.

问候,

Celeste


这篇关于无法在VS 2015专业版中调试VSTO Addin Excel 2016的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆