This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Hello I am trying to get Lightspeed working with Mono. I have built the latest version of Mono (2.6.1) and the latest version of mod_mono. Thats all working fine. But I am wondering what version of Lightspeed I should be referencing; I was trying the latest build but it has a dependency on System.Data.Services which hasn't been implemented. I am guessing a previous build used for http://www.mindscape.co.nz/blog/index.php/2009/02/12/lightspeed-and-mono/ never required System.Data.Services Any help from anybody that has it working with Mono would be great. Cheers, |
|
|
Sorry mean't to add (incase it helps): 500 - Internal Server Error
System.IO.FileNotFoundException: Could not load file or assembly 'System.Data.Services, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies.
File name: 'System.Data.Services, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' at (wrapper managed-to-native) System.MonoCustomAttrs:GetCustomAttributesInternal (System.Reflection.ICustomAttributeProvider,System.Type,bool) at System.MonoCustomAttrs.GetCustomAttributesBase (ICustomAttributeProvider obj, System.Type attributeType) [0x00000] in <filename unknown>:0 at System.MonoCustomAttrs.GetCustomAttributes (ICustomAttributeProvider obj, System.Type attributeType, Boolean inherit) [0x00000] in <filename unknown>:0 at System.MonoType.GetCustomAttributes (System.Type attributeType, Boolean inherit) [0x00000] in <filename unknown>:0 at Mindscape.LightSpeed.Utils.Reflection. (ICustomAttributeProvider , System.Type ) [0x00000] in <filename unknown>:0 at Mindscape.LightSpeed.Model.TypeModel. (System.Type , IList`1 ) [0x00000] in <filename unknown>:0 at Mindscape.LightSpeed.Model.TypeModel.GetTypeModel (System.Type ) [0x00000] in <filename unknown>:0 |
|
|
Have been looking at some old posts and was thinking that Lightspeed 2 may be more suited to Mono if Lightspeed 3 is going to reference ADO.NET - I only need basic LINQ support. While I can reference the Lightspeed 2 dll thats included for compatibility, the Lightspeed 3 designer does not create Lightspeed 2 compatible code. Is there anywhere I can get Lightspeed 2 builds to try with mono? Thanks Scott |
|
|
Hi Scott, As I believe you have found, you will need to use the .NET 2.0 compatibility DLL (It is still LightSpeed 3, not LightSpeed 2) when targetting Mono as this does not have the additional assembly references which are problematic. In regards to the designer not producing compatible code - it should be producing a model which is entirely usable by the compatibility version - if it isnt could you let us know what the error you are seeing is and we can look at correcting this. As far as we know and are testing for there shouldnt be anything which isnt compatible :) |
|
|
Thanks for your help Jeremy, much appreciated. What you said makes sense but I am a little unsure how to visual studio setup with this compatible dll. Should I still be targetting .NET 3.5 - to allow LINQ queries? If I leave the target as 3.5 when I create a lightspeed model it references Mindscape.Lightspeed (the 3.5 version) automatically. How do I configure the designed to work in compatibility. Thanks Scott |
|
|
Have you tried just putting the missing Assembly DLLs into your output directory? I'm not sure if that DLL is the only missing one, or what the legal situation would be if you wanted to distrubute the DLL(s) with the resulting application but I found putting the Microsoft ASP.NET MVC DLLs into the bin directory of our website allowed us to run MVC on Mono before the Mono MVC assemblies were released. Maybe a similar trick would get the full LightSpeed 3 assembly working? I was hoping to take advantage of new querying features such as grouping and joins in our Mono website so it would be great if we could find a way to get the full version 3 code working on Mono. Do you have any idea what might be required before this can happen? Thanks, Chris |
|
|
Wow thanks Chris, that suggestion was just brilliant - I never knew you could do that. It works perfectly like that. I have Mono running with full latest Lightspeed 3 on Mono 2.6.1 (on Ubuntu Karmic). For anybody else now struggling with Mono I am going to put together a tutorial soon of the steps I took to get it setup with Lightspeed.
Once again thanks Chris - really can't thank you enough! |
|
|
[quote user="jeremy"] In regards to the designer not producing compatible code - it should be producing a model which is entirely usable by the compatibility version - if it isnt could you let us know what the error you are seeing is and we can look at correcting this. [/quote] I have exactly the same problem as exm. I want to get LightSpeed to work with Mono. When I save my model in the designer, "Mindscape.LightSpeed.dll" gets automatically added to my references. When I remove it and add "Mindscape.LightSpeed.20.dll" instead, I get several error, for example:
The type 'Mindscape.LightSpeed.IUnitOfWork' is defined in an assembly that is not referenced. You must add a reference to assembly 'Mindscape.LightSpeed, Version=3.0.1464.13803, Culture=neutral, PublicKeyToken=360c8f37b466ebb2'. When am I missing? When can I do to get LightSpeed to work with Mono? |
|
|
The simplest solution is to using the standard LightSpeed.dll not the LightSpeed.20.dll and copy System.Data.Services.dll into your bin folder of your application. Mono doesn't work by default because System.Data.Services has not been implemented yet. Copying Microsoft's dll will work. C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\v3.5\ Hope that helps. Scott |
|
|
Thank for your post. Unfortunately that doesn't work for me (severals new "missing dll" errors appear). Besides, I'm not sure about the legal aspect of this.
How do I get "Mindscape.LightSpeed.20.dll" to work? (see my previous post)
|
|
|
I have to compile my version of lightspeed as I make changes to the source code, and have a problem running under Mono 2.8.1 Simply copying the .Dll's might work using VS2010 and then copying your app to linux, and copying the System.Data.Services.dll and System.Data.Services.Client.dll
However I bought the Novell mono tools addin for VS, and also test using monodevelop, and this option does not work for me. I like to test my work before deploying it :P Any ideas on how I can get Lightspeed to run under VS2010 (with Monotools) or under monodevelop with a customized Lightspeed (ie: I cant use the compatibility version)
|
|
|
Hi Anthony, When you say "does not work for me", can you elaborate on what actually doesn't work? Also, it may be worth doing a quick test with a VS compiled version and copying the DLL's in case this is an issue that needs to be raised with the Novell/Mono guys. Cheers, John-Daniel |
|
|
By copying the .dlls (or even referencing them) in monodevelop does not help. It still fails to compile. When I use mono tools in VS2010 I have the same problem.
I cant use the lightspeed2.dll as I change the source code of Lightspeed, so im left with working in VS and copying the app to linux and hoping that it works.. It would be really great if I could run the app in de-debugger of mono tools (within the VS IDE) or monodevelop IDE.
cheers Anthony |
|
|
What's the error message that it gives when it fails to compile? Is it the same in both environments? Kind regards, John-Daniel |
|
|
Yes it has to do with the .dll references... |
|
|
Hi Anthony, I really need you to be more descriptive. Is it that the DLL is not found? Is it that it finds it but complains about something else? There's hundreds of things that could be possibly going wrong - ideally could you copy and paste me the error message the environments give you? Maybe even a screen shot if it's a long message. Cheers, John-Daniel |
|
|
Compiling under monodevelop I get the following.
Building: Data (Debug)
Performing main compilation... C:\Program Files\Mono-2.8.1\bin\dmcs.bat /noconfig "/out:C:\HeAnSoft\Pensioen\HeAn.Pensioen.Data\bin\Debug\HeAn.Pensioen.Data.dll" "/r:C:\HeAnSoft\Pensioen\SharedBinaries\Mindscape.LightSpeed.dll" "/r:C:\HeAnSoft\Pensioen\SharedBinaries\Mindscape.LightSpeed.Linq.dll" "/r:C:\HeAnSoft\Pensioen\SharedBinaries\Norm.dll" "/r:C:\HeAnSoft\Pensioen\HeAn.Pensioen.Lib\bin\Debug\HeAn.Pensioen.Lib.dll" "/r:C:\Program Files\Mono-2.8.1\lib\mono\4.0\System.dll" "/r:C:\Program Files\Mono-2.8.1\lib\mono\4.0\System.Core.dll" "/r:C:\Program Files\Mono-2.8.1\lib\mono\4.0\System.Data.dll" "/r:C:\Program Files\Mono-2.8.1\lib\mono\4.0\System.Configuration.dll" "/r:C:\Program Files\Mono-2.8.1\lib\mono\4.0\System.Data.DataSetExtensions.dll" "/r:C:\Program Files\Mono-2.8.1\lib\mono\4.0\System.Web.dll" "/r:C:\Program Files\Mono-2.8.1\lib\mono\4.0\System.Xml.Linq.dll" "/r:C:\Program Files\Mono-2.8.1\lib\mono\4.0\System.Xml.dll" /nologo /warn:4 /debug:+ /debug:full /optimize- /codepage:utf8 "/define:DEBUG;TRACE"
/t:library "C:\HeAnSoft\Pensioen\HeAn.Pensioen.Data\DBConnections\ConnectionFactory.cs" "C:\HeAnSoft\Pensioen\HeAn.Pensioen.Data\DBConnections\MongoDBConnection.cs" "C:\HeAnSoft\Pensioen\HeAn.Pensioen.Data\Dynamic.cs" "C:\HeAnSoft\Pensioen\HeAn.Pensioen.Data\GeneratedCode.cs" "C:\HeAnSoft\Pensioen\HeAn.Pensioen.Data\Interfaces.cs" "C:\HeAnSoft\Pensioen\HeAn.Pensioen.Data\InternalData.cs" "C:\HeAnSoft\Pensioen\HeAn.Pensioen.Data\LightSpeedModel1.cs" "C:\HeAnSoft\Pensioen\HeAn.Pensioen.Data\DBConnections\LightSpeedConnection.cs" "C:\HeAnSoft\Pensioen\HeAn.Pensioen.Data\DataModel.cs" "C:\HeAnSoft\Pensioen\HeAn.Pensioen.Data\Properties\AssemblyInfo.cs" "C:\HeAnSoft\Pensioen\HeAn.Pensioen.Data\SessionHelper.cs" "C:\HeAnSoft\Pensioen\HeAn.Pensioen.Data\CompiledQueries.cs"
Could not load file or assembly 'System.Data.Services.Client, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. Missing method .ctor in assembly C:\HeAnSoft\Pensioen\SharedBinaries\Mindscape.LightSpeed.dll, type System.Data.Services.Common.DataServiceKeyAttribute Can't find custom attr constructor image: C:\HeAnSoft\Pensioen\SharedBinaries\Mindscape.LightSpeed.dll mtoken: 0x0a00056e
Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'System.Data.Services.Client, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies.
File name: 'System.Data.Services.Client, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
Build complete -- 1 error, 0 warnings
---------------------- Done ----------------------
Build: 1 error, 0 warnings
|
|
|
Whether I add the correct references manually or not makes no difference |
|
|
Hmm ok. Remove the references to the assemblies and then remove the code that makes references to the Data.Services.* Once you have no references to the assemblies and in code to it you should be fine. I hope that helps, John-Daniel |
|
|
I found the solution for the Mono Guys :) I did NOT have to modify the Lightspeed code in any way. All you have to do is copy the "System.Data.Services.dll" and "System.Data.Services.Client.dll" to C:\Program Files\Mono-2.8.1\lib\mono\4.0 (if that is your current version of mono) In Linux (I will try later) I suppose copy the .dlls to the mono folder or use them locally.. Anyway, it now works in Monodevelop and VS. Hope this helps other people. Perhaps you (John-Daniel) would like to download Monodevelop, and try what iv said, If it works (as I believe it does :P) then there is no longer any need for the compatibility version... Mono guys only have to copy the .dlls to get it working.
regards Anthony
|
|