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
|
My program runs on Windows. I tried building this on Windows and running on Mono on Mac 10.6 but get the following exception. I tried building on Mac using MonoDevelop. Again, builds but fails for the same reason. Before I try something desperate, is there a known and sensible solution? Thank you. Here is the exception:
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' 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.LoadType (System.Type type, IList`1 typeModels) [0x00000] in <filename unknown>:0 at Mindscape.LightSpeed.Model.TypeModel.GetTypeModel (System.Type type) [0x00000] in <filename unknown>:0 [ERROR] FATAL 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' 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.LoadType (System.Type type, IList`1 typeModels) [0x00000] in <filename unknown>:0 at Mindscape.LightSpeed.Model.TypeModel.GetTypeModel (System.Type type) [0x00000] in <filename unknown>:0 |
|
|
This issue occurs because LightSpeed references System.Data.Services and System.Data.Services.Client but these are not implemented in Mono leading to the binding failure. There are two approaches you can use to solve this, either copy System.Data.Services.dll and System.Data.Services.Client.dll from your Windows environment and ship them along with your other assemblies so that they are present alongside your compiled output and can be found by Mono when your program executes (even though they are most likely never actually going to be used). This is definitely the simplest solution and is what most people have used in the past. I would suggest you try and use this approach. Or alternatively you can recompile your program against the "compatibility" version of LightSpeed which is located under the Bin\Compatibility folder of your installation of LightSpeed. (Mindscape.LightSpeed.20.dll). This will cause problems however if you want to use LINQ as the compatibility build targets .NET 2.0 rather than 3.5.
Jeremy |
|
|
That helped. Thank you. That fix allowed me to experience the error shown below. Same situation whether I build on Windows or Mono on Mac, and then run the assembly on Mono on Mac. I know that I cannot apply the same fix the Windows version of System.Data because that has native code in it. Any ideas about what I try? Also, would you expect one to be able to build on Windows, copy the assemblies over to Mono on a Mac and run them there? Or does one need to recompile? Thank you. Unhandled Exception: System.MissingMethodException: Method not found: 'System.Data.SqlClient.SqlParameter.set_UdtTypeName'.
|
|
|
Thank you. That helped. However, that led directly to the error shown below. Same situation: I tried builing on Windows and running on Mac, and I tried building on Mac and running on Mac. Any ideas on this one? Also, would you expect that building on Windows, copying the assemblies and such to a Mac, and then running those on Mac should work? Thank you. Unhandled Exception: System.MissingMethodException: Method not found: 'System.Data.SqlClient.SqlParameter.set_UdtTypeName'. |
|
|
Thank you. That helped. However, that led directly to the error shown below. Same situation: I tried builing on Windows and running on Mac, and I tried building on Mac and running on Mac. Any ideas on this one? Also, would you expect that building on Windows, copying the assemblies and such to a Mac, and then running those on Mac should work? Thank you. Unhandled Exception: System.MissingMethodException: Method not found: 'System.Data.SqlClient.SqlParameter.set_UdtTypeName'. |
|
|
Thank you. That helped. However, that led directly to the error shown below. Same situation: I tried builing on Windows and running on Mac, and I tried building on Mac and running on Mac. Any ideas on this one? Also, would you expect that building on Windows, copying the assemblies and such to a Mac, and then running those on Mac should work? Thank you. Unhandled Exception: System.MissingMethodException: Method not found: 'System.Data.SqlClient.SqlParameter.set_UdtTypeName'. |
|
|
I am sorry for the repeated replies. I kept getting an error, and I assumed my post was not sent. However, I see that it was. Is there a way to remove the duplicates? Am I able to edit my own posts? |
|
|
It may work, but it may not. The above is an example of where things fall down due to inconsistencies between what is available on the Windows .NET platform and Mono. I am guessing you have a mapping in your model which uses a SQL UDT (perhaps you are using one of the Spatial types?) which triggers the method call from LightSpeed. Unfortunately UDT support doesnt seem to be implemented in Mono - see http://www.go-mono.com/momareports/apis/System.Void%20System.Data.SqlClient.SqlParameter;;set_UdtTypeName(System.String) If this is the case you should look at switching the return type to be an object or a string instead so you can deal with the value more manually in your application code. I am not sure if the SQL Server types library loads happily on Mono (presumably it does) in which case you can re-cast or convert the value from Well Known Text to work around this.
Jeremy |
|