Weird problem with MySql

5 posts, 0 answers
  1. Smail
    Smail avatar
    10 posts
    Member since:
    Apr 2013

    Posted 20 Feb 2014 Link to this post

    Greetings guys, 

    We have OpenAccess/Data Access installed and are using it for our main product. We do have a small side project that uses BLToolkit for the purposes of creating a DAL.

    Now the problem, if we build the solution on a PC with OpenAccess installed somehow it gets "injected" as a reference or embedded type or something like that and if you run the assembly on a test pc WITHOUT OA installed it will start throwing errors. If we build the exact same solution - no changes no nothing - on a pc WITHOUT OpenAccess installed it will then run fine on the test pc.

    I'd like to point out that will did used to have a reference to OpenAccess in this project at the very beginning, but had to remove it a bit later on (due to the way bltoolkit builds business objects), however we've checked and triple checked every reference and made sure the libs we use are not shared between telerik (namely the mysql connector) and still nothing.
  2. Doroteya
    Admin
    Doroteya avatar
    502 posts

    Posted 25 Feb 2014 Link to this post

    Hi Smail,

    As far as I understand the scenario on your side, the project that uses BL Toolkit used to use Telerik Data Access, but it no longer does. When that same project is built on a machine with Telerik Data Access installed on it, and is run on a machine which does not have Telerik Data Access installed on it, you experience errors. In the opposite scenario, when the project is built on a machine without Telerik Data Access, and it is run on any other machine, the errors do not appear.

    If that is indeed the case, the answers to the following questions would be really helpful in the process of defining a feasible solution for the situation:
    1. What are the text messages of the errors?
    2. Did the project hold a Telerik Data Access model?
    3. If so, is the following line present in the .csproj\.vbproj file?
    <Import Condition="Exists('$(MSBuildExtensionsPath)\OpenAccess.targets')" Project="$(MSBuildExtensionsPath)\OpenAccess.targets" />

    4. If not, how did the project consume Telerik Data Access?

    Additionally, any information you find relevant about the setup would be highly appreciated.

    I am looking forward to your feedback.


    Regards,
    Doroteya
    Telerik
    OpenAccess ORM is now Telerik Data Access. For more information on the new names, please, check out the Telerik Product Map.
  3. DevCraft banner
  4. Smail
    Smail avatar
    10 posts
    Member since:
    Apr 2013

    Posted 25 Feb 2014 in reply to Doroteya Link to this post

    1. The full stacktrace is here http://pastebin.com/Kev5jm7D ,the actual relevant message from it is this:
    "BLToolkit.Data.DataException: Could not build the 'Taxi.DAL.Core.KeyValue' type. ---> BLToolkit.TypeBuilder.TypeBuilderException: Could not build the 'Taxi.DAL.Core.KeyValue' type. ---> System.IO.FileNotFoundException: Could not load file or assembly 'Telerik.OpenAccess, Version=2013.3.1320.1, Culture=neutral, PublicKeyToken=7ce17eeaf1d59342' or one of its dependencies. The system cannot find the file specified."

    2. Yes it did.
    3. This is the only line that is in the .csproj containing Telerik:
    <Import Condition="Exists('$(MSBuildExtensionsPath)\OpenAccess.targets')" Project="$(MSBuildExtensionsPath)\OpenAccess.targets" />

    I haven't though about checking the csproj files.
  5. Doroteya
    Admin
    Doroteya avatar
    502 posts

    Posted 28 Feb 2014 Link to this post

    Hi Smail,

    Thank you for your cooperation.

    Generally, there is a special process for extracting a Telerik Data Access model from a project. With it you can completely remove Telerik Data Access processes from a project. The workflow requires you to rebuild your code as a final step. Please kindly find the steps below:

    1. Open the project in Visual Studio.
    2. Extract the domain model (the .rlinq file) or the fluent model (the classes, the metadatasource, and the context) in a separate place and delete it from the project.
    3. Remove the references to the Telerik.OpenAccess assemblies from the project that used to hold the model.
    4. Edit the .csproj/.vbproj file to remove the following line, which indicates that the custom build process of  Telerik Data Access should be executed:
    <Import Condition="Exists('$(MSBuildExtensionsPath)\OpenAccess.targets')" Project="$(MSBuildExtensionsPath)\OpenAccess.targets" />

    I hope this helps. If you have additional questions, do not hesitate to get back to us.


    Regards,
    Doroteya
    Telerik
    OpenAccess ORM is now Telerik Data Access. For more information on the new names, please, check out the Telerik Product Map.
  6. Smail
    Smail avatar
    10 posts
    Member since:
    Apr 2013

    Posted 28 Feb 2014 in reply to Doroteya Link to this post

    Removing the line in .csproj fixed the issue, thank you for the support!
Back to Top
DevCraft banner