XAML PowerToys is not working with CSLA

XAML PowerToys is not working with CSLA

Old forum URL: forums.lhotka.net/forums/t/6409.aspx


mhnyborg posted on Thursday, February 12, 2009

I get this error that stops me from using XAML PowerToys

"Unable to create secondary AppDomain Worker
Could not load file or assembly Csla or one of its dependencies. The system can not find the file specified."
 
Hope someone can help me out. It's a great tool

RockfordLhotka replied on Thursday, February 12, 2009

You may need to put Csla.dll, and probably your business assemblies, into the GAC.

It sounds like the tool is spinning up a secondary AppDomain - and take it from me, that is a really bad idea in general. It is nearly impossible for such an AppDomain to find and load assemblies from the primary development environment, and they probably didn't figure out how to do it.

Ha! I say that, but I never figured out how to do it reliably either, so my solution only worked around 90% of the time...

The typical answer is to put the assemblies into the GAC, because then the type loader can resolve them from that location.

Everything I'm saying here is assuming you are encountering the failure in Visual Studio.

If you are encountering the failure at runtime the GAC may still help - but in that case there is a very well known solution that they should implement in their tool, because any dynamically loaded assembly will fail without this workaround.

Jack replied on Friday, February 13, 2009

I just installed the newly released XAML 4.0 power toys yesterday afternoon and I haven’t seen a problem yet.  I haven’t done much but so far out of the box it seems to be okay.  Are you using 4.0?

 

From: RockfordLhotka [mailto:cslanet@lhotka.net]
Sent: Thursday, February 12, 2009 8:20 PM
To: jaddington@alexandergracie.com
Subject: Re: [CSLA .NET] XAML PowerToys is not working with CSLA

 

You may need to put Csla.dll, and probably your business assemblies, into the GAC.

It sounds like the tool is spinning up a secondary AppDomain - and take it from me, that is a really bad idea in general. It is nearly impossible for such an AppDomain to find and load assemblies from the primary development environment, and they probably didn't figure out how to do it.

Ha! I say that, but I never figured out how to do it reliably either, so my solution only worked around 90% of the time...

The typical answer is to put the assemblies into the GAC, because then the type loader can resolve them from that location.

Everything I'm saying here is assuming you are encountering the failure in Visual Studio.

If you are encountering the failure at runtime the GAC may still help - but in that case there is a very well known solution that they should implement in their tool, because any dynamically loaded assembly will fail without this workaround.



mhnyborg replied on Saturday, February 14, 2009

Yes I am using ver. 4.0

I guess that it must be something with the project I am working on because all the developers on the project get the same problem.

Try to see if you can run the menu "Create form, ListView or Grid ..." and let me know. If you are having the same problem then I will contact Karl.

Jack replied on Saturday, February 14, 2009

What is your BO like that you are trying to build from?  I’ll try the same sort of thing

 

jack

 

From: mhnyborg [mailto:cslanet@lhotka.net]
Sent: February-14-09 6:23 AM
To: jaddington@alexandergracie.com
Subject: Re: [CSLA .NET] RE: XAML PowerToys is not working with CSLA

 

Yes I am using ver. 4.0

I guess that it must be something with the project I am working on because all the developers on the project get the same problem.

Try to see if you can run the menu "Create form, ListView or Grid ..." and let me know. If you are having the same problem then I will contact Karl.



mhnyborg replied on Saturday, February 14, 2009

Silverlight with linked files and objectfactory

Jack replied on Tuesday, February 17, 2009

I found that I can right click and generate the BusinessForm if I click on the original version of the class I want to use.  If I click on the linked version I get a reflection error – but not the one you are getting.

 

From: mhnyborg [mailto:cslanet@lhotka.net]
Sent: Saturday, February 14, 2009 3:35 PM
To: jaddington@alexandergracie.com
Subject: Re: [CSLA .NET] RE: RE: XAML PowerToys is not working with CSLA

 

Silverlight with linked files and objectfactory

Jack replied on Thursday, February 19, 2009

I am actually having no problems at all.  Earlier I had not linked my Generated partial class to the silverlight version of the library.

Now if I right click on the class in the Silverlight library I get the BusinessForms / Silverlight datagrid option and haven't had a problem yet generating code.


Copyright (c) Marimer LLC