详细信息:无法加载文件或程序集'BarcodeLib,版本= 1.0.0.19或其依赖项之一

时间:2019-03-27 09:53:50

标签: reporting-services barcode ssrs-2008-r2

我之前使用的是带有3.5框架的VS2013,但现在我在打开报表项目时安装了VisualStudio 2017,它将项目转换为最新框架,然后在尝试构建项目时抛出以下错误:

我正在使用第三方库BarcodeLib进行条形码和字体调整,其中每一次我使用各自报告文件中已经引用的库。

任何人对此问题都有想法

Severity    Code    Description Project File    Line    Suppression State
    Error       [rsErrorLoadingCodeModule] Error while loading code module: ‘BarcodeLib, Version=1.0.0.19, Culture=neutral, PublicKeyToken=null’. Details: Could not load file or assembly 'BarcodeLib, Version=1.0.0.19, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.      C:\softwares\End.rdl    0   
    Error       [rsCompilerErrorInClassInstanceDeclaration] Error in class instance declaration for class BarcodeLib.Barcode: [BC30002] Type 'BarcodeLib.Barcode' is not defined.       C:\softwares\End.rdl    0   
    Error       [rsCompilerErrorInCode] There is an error on line 328 of custom code: [BC30451] 'BarcodeLib' is not declared. It may be inaccessible due to its protection level.       C:\softwares\End.rdl    0   
    Error       [rsCompilerErrorInCode] There is an error on line 33 of custom code: [BC30451] 'BarcodeLib' is not declared. It may be inaccessible due to its protection level.        C:\softwares\Projects\App.rdl   0   
    Error       [rsCompilerErrorInClassInstanceDeclaration] Error in class instance declaration for class Barcodelib.Barcode: [BC30002] Type 'Barcodelib.Barcode' is not defined.       C:\softwares\App.rdl    0   
    Error       [rsErrorLoadingCodeModule] Error while loading code module: ‘BarcodeLib, Version=1.0.0.19, Culture=neutral, PublicKeyToken=null’. Details: Could not load file or assembly 'BarcodeLib, Version=1.0.0.19, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.      C:\softwares\App.rdl    0   
    Error       [rsErrorLoadingCodeModule] Error while loading code module: ‘BarcodeLib, Version=1.0.0.19, Culture=neutral, PublicKeyToken=null’. Details: Could not load file or assembly 'BarcodeLib, Version=1.0.0.19, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.      C:\softwares\AppChild.rdl   0   
    Error       [rsCompilerErrorInCode] There is an error on line 44 of custom code: [BC30451] 'BarcodeLib' is not declared. It may be inaccessible due to its protection level.        C:\softwares\AppChild.rdl   0   
    Error       [rsCompilerErrorInClassInstanceDeclaration] Error in class instance declaration for class Barcodelib.Barcode: [BC30002] Type 'Barcodelib.Barcode' is not defined.       C:\softwares\AppChild.rdl   0   
    Error       [rsCompilerErrorInCode] There is an error on line 13 of custom code: [BC30451] 'BarcodeLib' is not declared. It may be inaccessible due to its protection level.        C:\softwares\Cancellation.rdl   0   
    Error       [rsCompilerErrorInClassInstanceDeclaration] Error in class instance declaration for class Barcodelib.Barcode: [BC30002] Type 'Barcodelib.Barcode' is not defined.       C:\softwares\Cancellation.rdl   0   

1 个答案:

答案 0 :(得分:0)

我无法在报告定义文件中使用的VS2019 Barcodelib版本1.1.0.0中进行编译/加载,所以最终我将dll注册到了看起来不错的GAC中。