We have been compiling the server side of our Silverlight App using 32bit for years. We need to support a 64bit only reference in our next release so we changed our server side code to compile with AnyCpu. In doing so we found a strange problem.
Our Silverlight XAML that references CslaDataProvider fails to compile when the AnyCpu version of Csla.Dll is in the Gac. It only compiles successfully when the 32bit version of Csla.Dll is in the Gac. The error we get is: "The tag 'CslaDataProvider' does not exist in XML namespace 'clr-namespace:Csla.Silverlight;assembly=Csla'."
This stumps me primarily because the XAML/ClientSide/SilverLight code should not even look in the GAC for DLLs.
The code compiles successfully on our build server. I think the problem only occurs when compiling in the Visual Studio IDE.
Have any of you seen something like this? Can you offer an explanation?
We are using Csla 3.8.3. We have not changed this version for years and don't plan to in the short term.
Thanks in advance for your time!
I haven't seen this, but I also never use the GAC except in very rare server-side scenarios, and never on a dev machine.
I think there are actually two GACs; one 32-bit, and one 64-bit. I'd make sure that you have the required assemblies in both. (Actually, there's an MSIL GAC too). If you have a 32-bit specific version, gacutil will put in the 32-bit only GAC. If its anycpu, it should go to the MSIL one.
Thanks for the suggestion Andy, but if we put Csla.dll in both GACs then it works sometimes and sometimes it does not work. I couldn't determine why that occurred.
Do you use addins in Visual Studio like R# or other intellisense providers.
I have seen similar problems earlier with R#. If you have try to suspend/deactivate these components and reopen the solution and compile.
Thanks for the suggestion JonnyBee, but I have absolutely zero add-ins in VStudio.
I reviewed the reason why we are putting the Csla.dll in the GAC and it is because we use Cassini to debug and we have custom Identity/principal classes. I am pondering trying the workaround from this thread: http://forums.lhotka.net/forums/p/157/29700.aspx so that we don't have to have any of our DLLs in the GAC, but we have some customizations to our Custom Identity class and I'm not sure this will work.
Can you switch to IIS Express? It is way better than Cassini, including not having that assembly loading bug (oh, sorry, feature).
Good call Rocky! We tested IIS Express and it seems to work for us and we don't need any files in the GAC! Thanks!
Copyright (c) Marimer LLC