Jump to content


Photo
- - - - -

How To Get A Custom Typed Data Context To Shadow Referenced The Custom Assembly?


  • Please log in to reply
26 replies to this topic

#21 JoeAlbahari

JoeAlbahari

    Super Veteran Member

  • Members
  • PipPipPipPipPipPipPipPipPipPipPip
  • 529 posts
  • Gender:Male
  • Location:Perth, Australia

Posted 23 March 2012 - 05:09 AM

It's changed such that it won't shadow assemblies in the third-party drivers folder.

However, LINQPad has also been changed such that it always looks for assemblies first in the user's data context folder, so it should only load from the drivers folder if the assembly isn't present in the user's folder. (Unless you explicitly load an assembly using Assembly.LoadFrom).

#22 Jeremy Thomas

Jeremy Thomas

    Active Member

  • Members
  • PipPip
  • 35 posts
  • Gender:Male
  • Location:Wellington, New Zealand

Posted 24 March 2012 - 12:55 AM

It's changed such that it won't shadow assemblies in the third-party drivers folder.

Why?

Is there any solution to my problem other than rolling up the 3 driver assemblies (AW.LLBLGen.DataContextDriver.dll, AW.Helper.LLBL.dll and AW.Winforms.Helpers.LLBL.dll) into one?
Like maybe LINQPad intercepting the second attempt to load SD.LLBLGen.Pro.ORMSupportClasses.NET20.DLL and returning the already loaded one.

#23 JoeAlbahari

JoeAlbahari

    Super Veteran Member

  • Members
  • PipPipPipPipPipPipPipPipPipPipPip
  • 529 posts
  • Gender:Male
  • Location:Perth, Australia

Posted 04 April 2012 - 10:59 PM

I've rewritten the shadowing system in the latest beta. Let me know if it makes any difference.

#24 Jeremy Thomas

Jeremy Thomas

    Active Member

  • Members
  • PipPip
  • 35 posts
  • Gender:Male
  • Location:Wellington, New Zealand

Posted 05 April 2012 - 02:35 AM

I've rewritten the shadowing system in the latest beta. Let me know if it makes any difference.

Yes and no

It no longer loads SD.LLBLGen.Pro.ORMSupportClasses.NET20.DLL

twice but running a query still fails - i think because the driver seems to be now loaded twice.

Also as usual in the selfservicing variant queries run but with shadowing on there is no sql output

Edited by Jeremy Thomas, 05 April 2012 - 04:15 AM.


#25 JoeAlbahari

JoeAlbahari

    Super Veteran Member

  • Members
  • PipPipPipPipPipPipPipPipPipPipPip
  • 529 posts
  • Gender:Male
  • Location:Perth, Australia

Posted 06 April 2012 - 11:34 PM

Do you know the two locations from where it's being loaded? Does it let you run the following?

AppDomain.CurrentDomain.GetAssemblies().Dump();

#26 Cyber World Uk Ltd

Cyber World Uk Ltd

    New Member

  • Members
  • Pip
  • 2 posts
  • Gender:Male
  • Location:uk

Posted 03 August 2012 - 05:41 AM

On a related matter when shadow assemblies is turned on GetSchema is called withAppDomain.CurrentDomain.BaseDirectory set to the linqpad directory rather than the directory of the custom assembly like it is when shadow assemblies is off, and this is causing a problem for me.

Shouldn't the BaseDirectory always be the custom assembly directory either way?

#27 tightline

tightline

    New Member

  • Members
  • Pip
  • 1 posts
  • Gender:Male

Posted 18 August 2012 - 12:28 PM

On a related matter when shadow assemblies is turned on GetSchema is called withAppDomain.CurrentDomain.BaseDirectory set to the linqpad directory rather than the directory of the custom assembly like it is when shadow assemblies is off, and this is causing a problem for me.

Shouldn't the BaseDirectory always be the custom assembly directory either way?


Thanks!




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users