之前我正在使用带有3.5框架的VS2013,但是现在我在打开报表项目时安装了VisualStudio 2017,它将项目转换为最新框架,然后当我尝试构建项目时,它会抛出以下错误:
我正在使用第三方库barcodeLib进行条形码和字体调整,其中每个我都使用我已在相应报告文件中引用的lib。
任何人都对这个问题有所了解
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
我无法在报告定义文件中使用的VS2019,Barcodelib版本1.1.0.0中编译/加载,所以我最终将dll注册到GAC中,这似乎有效。