VS.Net 2005 Solution needs to reference CSLA 1.0 AND CSLA 2.0

VS.Net 2005 Solution needs to reference CSLA 1.0 AND CSLA 2.0

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


bradygaster posted on Monday, August 28, 2006

Sounds weird, I know, but its true.

I have a situation in which Project A is a new project that makes use of an Project B's functionality. Project B was written in .Net 1.1 using CSLA 1.0. Project B is written in .Net 2.0 and will make use of Project B, which has been converted using the VS.Net Conversion Utility. Project A will also reference CSLA 2.0.

So here's the RUB.

Since Project A references Project B and Project B uses the CSLA 1.0, Project A won't compile without having a reference set to the CSLA 1.0 libraries. Since VS.Net 2005 won't let me reference both the CSLA 2.0 assemblies and the CSLA 1.0 assemblies at the same time, I'm stuck and can't figure out what to do next.

Anyone run into this problem? Seems like I'd be allowed to reference 2 different versions of an assembly with no problems, as MS promised the "removal from the pits of DLL Hell" with .Net. Thing is, this just doesn't appear to be the case right now.

Is what I'm talking about impossibly? I'm aware that it isn't optimal, and that the optimal solution would be to convert Project B to .Net 2005 and CSLA 2.0, but that's another project. My project is in jeopardy as a result of this inability, and unless I can finish Project A, Project C (the conversion of Project B) will never happen!

Any help is appreciated!

ajj3085 replied on Monday, August 28, 2006

I believe others have done this with success.  You'll have to rename the .net 1.x Csla assemblies (at least that's what I'd recommend since your eventual goal is to be free of them).  Then update  your references in project B to those assemblies.   I think that you may also have to update the Csla 1.0 namespace to Csla1 or something like that.

Search this forum, its been done before, so don't panic.  Good luck! 

Andy

JoeFallon1 replied on Monday, August 28, 2006

ajj3085:
I believe others have done this with success.  You'll have to rename the .net 1.x Csla assemblies (at least that's what I'd recommend since your eventual goal is to be free of them).  Then update  your references in project B to those assemblies.   I think that you may also have to update the Csla 1.0 namespace to Csla1 or something like that.

Search this forum, its been done before, so don't panic.  Good luck! 

Andy

I have a similar requirement and found it easier to change the .dll name and namespace of 2.0 to CSLA2. Then I can reference both sets of .dlls. I think Rocky ssaid you would also have to configure 2 remoting endpoints if you pursue this path. But that shouldn't be too hard.

Joe

 

ajj3085 replied on Monday, August 28, 2006

I was just rehasing what I read.  I'd think in the OP's case though, he should leave the Csla 2 alone, since the next project in his pipeline will be porting the Csla 1.x project to Csla 2.  Once that's done, he can just dump the older assemblies.

Going the other way would mean continued maintence of Csla down the road.. as he'll have to rename the dll and namespaces for all the classes everytime he wants to update to the next Csla 2.x.

Good point about the remoting; that's certainly something to watch for.

Andy

Copyright (c) Marimer LLC