VSTO学习问题(一)

入门按照网上的写了第一个VSTO外接程序,点击运行按钮进行调试,发生错误:

名称: 
从: file:///D:/Program Files (x86)/Microsoft Visual Studio 11.0/Common7/IDE/PrivateAssemblies/Microsoft.VisualStudio.QualityTools.WordAddInTest01.vsto

************** 异常文本 **************
System.ArgumentException: 值不在预期的范围内。
   在 System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
   在 Microsoft.VisualStudio.Tools.Office.Runtime.Interop.VSTOEENativeMethods.GetValidCompatibleFramework(String compatibleFrameworkXml)
   在 Microsoft.VisualStudio.Tools.Office.Runtime.CompatibleFrameworksValidation.ParseFirstValidFramework(String compatibleFrameworksXml)
   在 Microsoft.VisualStudio.Tools.Office.Runtime.OfficeAddInDeploymentManager.OnAddInManifestsDownloaded(AddInManifestsDownloadedArgs args)
   在 Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInDeploymentManager.RaiseOnAddInManifestsDownloadedEvent(IClickOnceAddInInstaller addInInstaller, Uri deploymentManifestUri, AddInInstallationStatus addinSolutionState, String productName, String deploymentManifestXml, String applicationManifestXml, String hostManifestXml, String logFilePath, String version, Uri supportUri)
   在 Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInDeploymentManager.InstallAddIn()
=================================================

找了各种方法,包括安装新的补丁更新都不可以。最后才了解到,原来点击生成之后,要找到生成的.vsto文件进行点击安装,这样就可以在office中看到你做的插件了

一个不努力的人在努力做到努力
原文地址:https://www.cnblogs.com/Betty-IT/p/9056621.html