artificial.....dll - why is it generated?

4 posts, 0 answers
  1. Richard Koslik
    Richard Koslik avatar
    71 posts
    Member since:
    Apr 2010

    Posted 25 Jul 2012 Link to this post

    Hello,

    i extend my .rlinq file at runtime with the tables i need for processing...
    All works well, but i have now seen in my application folder there are hundreds of artificial....dll files!

    Why are they generated?
    Can i somehow prevent it's creation?
    Can i delete them automaticaly?
    When is it used?

    The problem is that each time a modify my .rlinq at runtime, it looks like such a dll is created. So if i do it 1000 times per day.....

    regards
    Richard.
  2. Zoran
    Admin
    Zoran avatar
    534 posts

    Posted 27 Jul 2012 Link to this post

    Hello Richard,

     When you extend your model with artificial types during runtime, those types are actually created and stored in their own assemblies. Those assemblies however are not necessary for OpenAccess if an application is re-started, they are only necessary in memory during runtime. We do understand your concern and we plan to include a dedicated setting that would disable writing these assemblies to the hard drive. Currently this can only be disabled a as side-effect of turning on the Medium Trust setting of the Backend Configuration object.

    Thanks a lot for this feedback, even though unfortunately we can't stop the writing of these assemblies on your site at the moment, we will add the required setting for one of our future versions of the product.

    Greetings,
    Zoran
    the Telerik team
    OpenAccess ORM Q2'12 Now Available! Get your hands on all the new stuff.
  3. DevCraft banner
  4. Richard Koslik
    Richard Koslik avatar
    71 posts
    Member since:
    Apr 2010

    Posted 27 Jul 2012 Link to this post

    Hello Zoran,

    ok...if i understand it correct, this dll is only used while using my extended metadatasource.
    Since i load it each time form the .rlinq file before extending it, i could delete this dll at the end of my procedure.
    Are i am right?
    It looks like that the filename ends with the timestamp at creation, but what if it is done by more than one thread in the same second?
    So how can i get the filename of the dll?

    regards
    Richard.
  5. Richard Koslik
    Richard Koslik avatar
    71 posts
    Member since:
    Apr 2010

    Posted 27 Jul 2012 Link to this post

    Hello,

    i have tested it to delete them like "artificial*.dll" , right after creation of the dll and before usage of the extended metadatasource.
    This is working without any problems, and also the current file is not locked.
    IQueryable<PersistenceCapable> query = fluentContext.Scope.ExtentByName(theDefinitionSet.sHeadTable) as IQueryable<PersistenceCapable>;
    try
    {
        foreach (string f in Directory.GetFiles(sRootPath, "artificial*.dll"))
            File.Delete(f);
    }
    catch (Exception ex)
    {
        TraceLog.WriteLine("ERROR [generic export]: " + ex.Message);
    }
    foreach (PersistenceCapable instance in query)
    { ....

    So until this works, it is not so a big issue to me...

    regards
    Richard.
Back to Top