Подробности: Не удалось загрузить файл или сборку ‘BarcodeLib, версия = 1.0.0.19 или одну из его зависимостей

#reporting-services #barcode #ssrs-2008-r2

#службы отчетов #штрих-код #ssrs-2008-r2

Вопрос:

Ранее я использовал VS2013 с фреймворком 3.5, но теперь я установил VisualStudio 2017, когда я открываю проект report, он преобразует проект в последнюю версию framework, а затем, когда я пытаюсь собрать проект, он выдает следующую ошибку :

Я использую стороннюю библиотеку 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:softwaresEnd.rdl    0   
    Error       [rsCompilerErrorInClassInstanceDeclaration] Error in class instance declaration for class BarcodeLib.Barcode: [BC30002] Type 'BarcodeLib.Barcode' is not defined.       C:softwaresEnd.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:softwaresEnd.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:softwaresProjectsApp.rdl   0   
    Error       [rsCompilerErrorInClassInstanceDeclaration] Error in class instance declaration for class Barcodelib.Barcode: [BC30002] Type 'Barcodelib.Barcode' is not defined.       C:softwaresApp.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:softwaresApp.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:softwaresAppChild.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:softwaresAppChild.rdl   0   
    Error       [rsCompilerErrorInClassInstanceDeclaration] Error in class instance declaration for class Barcodelib.Barcode: [BC30002] Type 'Barcodelib.Barcode' is not defined.       C:softwaresAppChild.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:softwaresCancellation.rdl   0   
    Error       [rsCompilerErrorInClassInstanceDeclaration] Error in class instance declaration for class Barcodelib.Barcode: [BC30002] Type 'Barcodelib.Barcode' is not defined.       C:softwaresCancellation.rdl   0   
  

Ответ №1:

Я не смог скомпилировать / загрузить в VS2019 Barcodelib версии 1.1.0.0, которая использовалась в файле определения отчета, поэтому в итоге я зарегистрировал DLL в GAC, который, казалось, работал.