CSLA Framework NUnit test results - the cause to my failed Remoting Portal ?

CSLA Framework NUnit test results - the cause to my failed Remoting Portal ?

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


brettswift posted on Monday, June 26, 2006

Ok, if you've been reading these threads lately you will be aware of my issues with configuring remoting.  I found the test project on Rocky's site, and have been trying to get rid of them. 

Fixed - regional settings.  I was getting some errors in the SafeDataReader tests because I'm Canadian, and for some reason our countries (CAN / US) can't agree on a date format.  
IE
12/13/2006 vs  13/12/2006.  

So I had to set my system to US regional settings to eliminate that error (I know I can do this via code as well).


Errors I still can't eliminate:
1)
Csla.Test.SafeDataReader.SafeDataReaderTests.RetrieveBinaryObjectFromDB :


 System.IO.FileLoadException : Could not load file or assembly 'Csla, Version=2.0.0.0, Culture=neutral, PublicKeyToken=93be5fdc093e4c30' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

I'm not sure why it can't find that file, its already using it in other places!  This is a deserialization line of code that is running though, so I think this may have a lot to do with why my server side DataPortal isn't working.



2)Csla.Test.AppContext.AppContextTests.ClearContexts : Csla.ClientContext should not be null

This is the code at the spot that errors, line 200 - which is the last line of code here.


 //put stuff into the application context
ApplicationContext.ClientContext.Add("Test", "Test");
ApplicationContext.GlobalContext.Add("Test", "Test");

//it should NOT be null
System.LocalDataStoreSlot slot = Thread.GetNamedDataSlot("Csla.ClientContext");
200-   Assert.IsNotNull(Thread.GetData(slot), "Csla.ClientContext should not be null");


3)
 Csla.Test.AppContext.AppContextTests.ClientContext : can't get named data slot

ClientContext() method, similar line as above
Assert.IsNotNull(Thread.GetData(Thread.GetNamedDataSlot("Csla.ClientContext"))  fails.


4)
Csla.Test.AppContext.AppContextTests.NoContext : Csla.ClientContext should not be null

5)
Csla.Test.AppContext.AppContextTests.TestOnDemandContexts : ClientContext should be null



SUMMARY ----->>>
So,
            ApplicationContext.ClientContext.Add("Test", "Test");
That line is failing everywhere, and my deserialization:
            object obj = formatter.Deserialize(stream);

methods are failing.   

How can I fix this?







Brian Criswell replied on Monday, June 26, 2006

For #1, try removing all of the references to Csla in all of the projects, then add Csla back to all of the projects, ensuring that they are all pointing at the same file.

brettswift replied on Monday, June 26, 2006

I tried that, and still get the same error... its looking for v. 2.0.0.0  still, but in the designer properties of csla.dll its showing v.2.

I don't know why its still using the old reference, or where that is coming from?  I deleted the entire contents of the BIN directory, and the references... its set to copy local, and use the specific version of the assembly.  

Copyright (c) Marimer LLC