This is a migrated thread and some comments may be shown as answers.

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

3 Answers 71 Views
Databases and Data Types
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Richard Koslik
Top achievements
Rank 1
Richard Koslik asked on 25 Jul 2012, 09:14 AM
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.

3 Answers, 1 is accepted

Sort by
0
Zoran
Telerik team
answered on 27 Jul 2012, 10:10 AM
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.
0
Richard Koslik
Top achievements
Rank 1
answered on 27 Jul 2012, 10:57 AM
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.
0
Richard Koslik
Top achievements
Rank 1
answered on 27 Jul 2012, 11:29 AM
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.
Tags
Databases and Data Types
Asked by
Richard Koslik
Top achievements
Rank 1
Answers by
Zoran
Telerik team
Richard Koslik
Top achievements
Rank 1
Share this question
or