VSTO:“找不到项目或库”属性获取CallVSTOAssembly发生错误 [英] VSTO: "Can't find project or library" error occurs on Property Get CallVSTOAssembly

查看:99
本文介绍了VSTO:“找不到项目或库”属性获取CallVSTOAssembly发生错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用VSTO使用Visual Studio 2008
Excel 2007工作簿自定义

Using Visual Studio 2008 Excel 2007 workbook customization using VSTO

最近在Excel VBA中开始出现错误找不到项目或库编辑器上的以下代码行:

The error "Can't find project or library" recently began occurring in the Excel VBA editor on the following line of code:

   Property Get CallVSTOAssembly() As ShipdebitClaimProcessor.ThisWorkbook

这仅在使用发布版本的客户端上发生。在我的开发PC上,它可以正常工作。在VBE的客户端上,在工具,引用下,显示为

This only happens on clients using the published version. On my development PC it works fine. On the client in the VBE, under Tools, References, it says

MISSING: ShipDebitClaimProcessor
Location: C:\MyCompany\OfficeApplication\Excel\ShipDebitClaimProcesor\bi

尽管该位置看起来被截断了,但是可能指向我的开发PC上存在的bin文件夹中的程序集。当然,客户端上不存在此路径。要使其在客户端上起作用,应该说些什么,以及如何纠正它?是否应该以某种方式引用ClickOnce缓存?

Although the location appears truncated, it probably points to the assembly located in the bin folder as it exists on my development PC. Of course, this path does not exist on the client. What should it say instead to make it work on the client, and how can it be corrected? Is it supposed to reference the ClickOnce cache somehow?

此自定义功能已经使用了几年。它可能已被最近的更改所破坏,该更改涉及删除一些工作表并更改VBA代码。我尝试使用现有的Excel文件从头开始创建新项目,但无济于事。

This customization has been in use for several years. It may have been broken by the most recent changes which involved deleting some sheets and changing the VBA code. I've tried creating a new project from scratch, using an existing Excel file, but to no avail.

推荐答案

我相信你将需要


  • 使该库在客户的桌面上可用

OR


  • 从项目中删除引用

首先,您需要知道为什么以及何时在项目中使用每个引用。我相信现在最好的做法是删除引用并重新测试您的应用程序,以确保不再使用该库(否则,在以前的版本中,如果没有该库,客户也会遇到问题)。

First of all, you need to know why and when every reference is used within the project. I believe the best to do now is to remove the reference and retest your application, to ensure this library is no longer used (otherwise, clients would have problems without it in previous versions as well).

Rgds

这篇关于VSTO:“找不到项目或库”属性获取CallVSTOAssembly发生错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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