VSTO: “Can't find project or library” error occurs on Property Get CallVSTOAssembly

懵懂的女人 提交于 2019-12-12 04:24:33

问题


Using Visual Studio 2008 Excel 2007 workbook customization using VSTO

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

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

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?

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.


回答1:


I believe you'll need to

  • Make the library available in client's desktop

OR

  • Removing the reference from the project

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



来源:https://stackoverflow.com/questions/5356550/vsto-cant-find-project-or-library-error-occurs-on-property-get-callvstoassem

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!