Unable to build the application after adding telerik references

12 posts, 0 answers
  1. Avinash
    Avinash avatar
    31 posts
    Member since:
    May 2015

    Posted 04 Aug 2015 Link to this post

    Hi,

    I added references to telerik dlls in the code, with copy local set to true. But, when I am building the project I am receiving an error randomly. 

    Error1Unknown build error, 'Cannot resolve dependency to assembly 'Telerik.OpenAccess, Version=2015.1.220.1, Culture=neutral, PublicKeyToken=7ce17eeaf1d59342' 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.' C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.WinFx.targets2689SMS

    I am not using openaccess assembly at all. I have no idea why this keeps coming randomly. I am not even able to find the dll anywhere to add it to the project. 

    Kindly help me fix this issue. 

  2. Martin
    Admin
    Martin avatar
    1101 posts

    Posted 05 Aug 2015 Link to this post

    Hello Avinash,

    We are not aware of this error and I am afraid that without your setup I won't be able to determine what is causing it. This is I would ask you to send me a sample project that references the mentioned assemblies and reproduces the issue. You can attach a .zip file in the support thread that concerns the same topic that you posted in our ticketing system. In the meantime you can double check the following:
    • Check if the all referenced Telerik assemblies are of the same version
    • Check if the assemblies built framework matches the target framework of the project. You can check the project's framework in its Properties.
    • Check if all dlls required from the used Telerik controls are added in the project's referenced assemblies.

    Thank you for any help you can provide.

    Regards,
    Martin
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. UI for WPF is Visual Studio 2017 Ready
  4. Avinash
    Avinash avatar
    31 posts
    Member since:
    May 2015

    Posted 05 Aug 2015 in reply to Martin Link to this post

    Hi,

    I noticed that this problem occurs when telerik api is added with "Copy local" enabled, and if the solution is opened in a different machine than the one references were added from. I checked the version for all assemblies, and version is same for all of them, on both the machines. Project target framework is 4.5, and I am using telerik's Q2 version (I believe that is 4.5 as well). 

    I have added all the telerik assemblies, although I am using only radexpander and gridview for now (I plan to use most of these at later stages). 

    I noticed that the project is saving the full path of the bin folder instead of relative path. So, on other machine, build fails, and I have to manually add the references again. When I do that, I receive this error. 

     For your reference, I have updated the sample project to onedrive. You can download the same from http://1drv.ms/1UpwHSG

    Kindly let me know if that helps.

  5. Martin
    Admin
    Martin avatar
    1101 posts

    Posted 10 Aug 2015 Link to this post

    Hello Avinash,

    Thank you for the project. I tested it but the error doesn't appear on my side as you can see in the linked video. About the Copy Local attribute, note that it is set set to True by default and we are not aware of any issues with it. Can you please modify the project that you sent me to use only the dll's which causes the error and also include them in the project's local folder and send it back to me so I can try it with the assemblies you are using?

    As for the dll's paths that are saved as absolute paths, you can change this behavior by using the HintPath attribute of the Reference tag in the project's file XML. Basically, the hint path gives visual studio a relative path where to search for the specific dll.

    Thank you for any help you can provide.

    Regards,
    Martin
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  6. Avinash
    Avinash avatar
    31 posts
    Member since:
    May 2015

    Posted 10 Aug 2015 in reply to Martin Link to this post

    Hi,

    I am unsure, how it is working properly on your side. I have tried this on multiple devices, and I was receiving same error, because solution was unable to find the path.

    Anyway, I tried copying the files to a solution folder, and then using hintpath to save the relative path. Thankfully, that works well. 

    The error was happening because solution was unable to find the path to any of the telerik api. I tried adding only one reference, and same problem. I can send the full project with the dlls copied to solution folder, but that works properly now, so I don't think you will be able to recreate the problem. Kindly let me know if I should still send the project file again.

    Thanks.

  7. Martin
    Admin
    Martin avatar
    1101 posts

    Posted 10 Aug 2015 Link to this post

    Hello Avinash,

    I am glad to hear that you managed to resolve the error.

    It seems that the dll's in your project were referenced from the local installation folder of the UI for WPF suite. Since I also have the installation on my side and I guess its location matches the location on the original machine where the project was create and its assemblies were referenced for the first time, visual studio managed to automatically find the required dlls. 

    As for sending me a project, if the errors are not presented and you doesn't have anymore issues on your side, there is no need for sharing your implementation with me.

    Regards,
    Martin
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  8. Avinash
    Avinash avatar
    31 posts
    Member since:
    May 2015

    Posted 10 Aug 2015 in reply to Martin Link to this post

    Hi,

    Yes, even I gathered that much. Although, since I had "Copy Local" true, I would have thought it will update the reference path during build. Anyway, it works for now. I will let you know if the same issue happens again. Thanks for your help in this regard. 

  9. Srikanth
    Srikanth avatar
    2 posts
    Member since:
    Nov 2015

    Posted 19 Feb Link to this post

    Hi,

    I am experiencing the same issue with Telerik.Web.UI. I have simply added RadCombobox to the aspx page and after i checkin i get the error "licenses.licx (1): Unable to resolve type 'Telerik.Web.UI.RadComboBox, Telerik.Web.UI, Version=2016.1.113.45, Culture=neutral, PublicKeyToken=121fae78165ba3d4' "

    I tried changing the CopyLocal to False but do not see any change.We have a check-in build configured and if i remove the licenses.licx file then the solution give this error:Index.aspx.designer.cs (400): The type or namespace name 'RadComboBox' does not exist in the namespace 'Telerik.Web.UI' (are you missing an assembly reference?)

  10. Marin Bratanov
    Admin
    Marin Bratanov avatar
    3602 posts

    Posted 22 Feb Link to this post

    Hi,

    Could you try simply deleting the contents of the license.licx file? This file is generated by the .NET framework and it is its components that maintain it (the lc.exe piece, to be more precise) and deleting the file should let you rebuild the solution so .NET can generate the file again.

    If this does not happen, there may be something wrong with the .NET framework installation on your machine and I would suggest repairing its installation.

    In the meantime, I can suggest you review the following article that explains common questions related to the licensing mechanism: http://docs.telerik.com/devtools/aspnet-ajax/licensing/license-file. It is highly likely that the source control integration is preventing .NET from properly updating the file (e.g., it may be read-only) so you may want to exclude it from the source control binding.


    Regards,
    Marin Bratanov
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  11. Srikanth
    Srikanth avatar
    2 posts
    Member since:
    Nov 2015

    Posted 22 Feb Link to this post

    Here is what we did to fix this issue:

    1. Deleted the Telerik.Web.UI dll from references.

    2. Created "ThirdParty_Dlls" folder and moved the Telerik.Web.UI dll from Bin45 to this folder.

    3. Cheked in that folder.

    4. Added reference to the dll from ThirdParty_Dlls folder.

    5. Checked in the Proj file.

    6. CI build is able to get the dll reference and build is successful.

  12. Magzhan
    Magzhan avatar
    3 posts
    Member since:
    Jul 2015

    Posted 17 May in reply to Avinash Link to this post

    how you solved the problem? details can be
  13. Magzhan
    Magzhan avatar
    3 posts
    Member since:
    Jul 2015

    Posted 18 May in reply to Martin Link to this post

    Unknown build error, 'Could not load file or assembly'Telerik.OpenAccess, Version=2015.1.220.1, Culture=neutral, PublicKeyToken=7ce17eeaf1d59342' or one of their dependencies. Can not find the file specified.

Back to Top
UI for WPF is Visual Studio 2017 Ready