What does this error mean?

5 posts, 1 answers
  1. zlazic
    zlazic avatar
    3 posts
    Member since:
    May 2016

    Posted 02 Jun Link to this post

    Severity Code Description Project File Line Suppression State
    Error Unknown build error, 'Cannot resolve dependency to assembly 'Telerik.Windows.Documents.Spreadsheet, Version=2016.2.421.45, Culture=neutral, PublicKeyToken=5803cfa389c90ce7' because it has not been preloaded. When using the ReflectionOnly APIs, dependent assemblies must be pre-loaded or loaded on demand through the ReflectionOnlyAssemblyResolve event. Line 442 Position 76.' TelerikWpfApp2 D:\visual studio 2015 Projects\TelerikWpfSolution\TelerikWpfApp2\Views\MailView.xaml 442
  2. Answer
    Tanya
    Admin
    Tanya avatar
    405 posts

    Posted 06 Jun Link to this post

    Hi Zeljko,

    A similar error is usually observed when there is an assembly that is missing or it is with a different version compared with the other referenced binaries. Please, ensure that all the required references are added to the project and they are with the same version.

    If you have previously added different references, you could also manually delete the bin and obj folders and rebuild the project in order to ensure that there are no cached by Visual Studio files.

    Hope this helps.

    Regards,
    Tanya
    Telerik
    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
  3. UI for WPF is Visual Studio 2017 Ready
  4. Alex
    Alex avatar
    1 posts
    Member since:
    Jul 2016

    Posted 25 Jul Link to this post

    Hi, I'm also getting a weird error. 

    Workbook workbook;
                IWorkbookFormatProvider formatProvider = new XlsxFormatProvider();

                using (FileStream input = new FileStream(fileName, FileMode.Open))
                {
                    workbook = formatProvider.Import(input);
                }

    When I'm running this code, there is an exception at the line 

    IWorkbookFormatProvider formatProvider = new XlsxFormatProvider();

    With the error message:

    Additional information: Could not load file or assembly 'Telerik.Windows.Documents.Core, Version=2015.3.930.40, Culture=neutral, PublicKeyToken=5803cfa389c90ce7' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040).

    I did use all of the references that you linked in the replied. 

    Also, when I try to make the radSpreadSheetControl with the XAML:

     <telerik:RadSpreadsheet Name="hello" HorizontalAlignment="Left" Margin="0,10,0,0" VerticalAlignment="Top"/>

    There is a constructor error of

    A first chance exception of type 'System.Windows.Markup.XamlParseException' occurred in PresentationFramework.dll

    Additional information: 'The invocation of the constructor on type 'Telerik.Windows.Controls.RadSpreadsheet' that matches the specified binding constraints threw an exception.' Line number '7' and line position '10'.

    How would you fix this problem? 

  5. zlazic
    zlazic avatar
    3 posts
    Member since:
    May 2016

    Posted 26 Jul in reply to Alex Link to this post

    I ended up having to create a new solution and a new WPF project.
  6. Todor
    Admin
    Todor avatar
    168 posts

    Posted 28 Jul Link to this post

    Hello Alex,

    As Tanya mentioned, when such problems are experienced, basically clean/rebuild the projects in your solution do the job if you sure all the necessary assemblies are referenced and their version is correct.

    However, if this doesn't work in your scenario and even after the approach which Zeljko suggested the same problem occurs, please open a support ticket and send us the problematic project with assemblies included. In this way, it will be much easier for us to investigate the issue and try to find a solution for it.

    Regards,
    Todor
    Telerik by Progress
    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
Back to Top
UI for WPF is Visual Studio 2017 Ready