Business assembly names

Business assembly names

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


KevinKlasman posted on Wednesday, April 21, 2010

Can the client and server side business assemblies have different names? Business.Server.dll and Business.Client.dll for example?

I have an SL4 (all the latest bits from everyone) demo project that works when both assemblies have the same name. If I change them as above, the SL app can talk to the client side business object, but it fails when DataPortal.BeginFetch is called with the following error. I presume that this means that the data portal cannot find the "matching" business assembly on the server side since in fact, it does not have the same name.

--------------------------
Message from webpage
---------------------------
Could not load file or assembly 'Business.Client, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
---------------------------
OK  
---------------------------

Can Csla be configured to work with the above naming scheme? I'm thinking its necessary for mstest code coverage analysis to work (because I got a name conflict on those two assemblies when VS tried to instrument the assemblies. Note that that was when the entire application was in a single solution.

I suppose if I split the application into client-side and server-side solutions built into separate output folders that I VS would be happy with the identical assembly names since they'd be in different output folders.

RockfordLhotka replied on Wednesday, April 21, 2010

No, absolutely not. The BinaryFormatter, NetDataContractSerializer and MobileFormatter (the three serializers used by CSLA) all require the same assembly qualified type name for the types on the client and server - and that includes the assembly name.

Copyright (c) Marimer LLC