开发者

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

开发者 https://www.devze.com 2023-02-18 05:41 出处:网络
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:

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 folde开发者_JS百科r 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.


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

0

精彩评论

暂无评论...
验证码 换一张
取 消