I’m running mono 2.10.6 on openSUSE 12.1. Shouldn’t there be a System.Data.dll in either /usr/lib/mono/4.0 or /usr/lib/mono/2.0 ?
I’m testing a .NET application compiled on windows. The application has a reference to automapper and I get the following error when I try to run the application:
Unhandled Exception: System.TypeInitializationException: An exception
was thrown by the type initializer for AutoMapper.Mappers.DataReaderMapper --->
System.IO.FileNotFoundException: Could not load file or assembly 'System.Data,
Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its
dependencies.
File name: 'System.Data, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089'
Here is the output of mono –version:
linux-19xt:~ # mono --version
Mono JIT compiler version 2.10.6 (tarball Sat Oct 29 18:16:09 UTC 2011)
Copyright (C) 2002-2011 Novell, Inc, Xamarin, Inc and Contributors. www.mono-project.com
TLS: __thread
SIGSEGV: altstack
Notifications: epoll
Architecture: amd64
Disabled: none
Misc: debugger softdebug
LLVM: supported, not enabled.
GC: Included Boehm (with typed GC and Parallel Mark)
Install “mono-complete” or “monodevelop” and you should no longer see this issue. On unbuntu the command is…
or for the monodevelop ide (which also installs mono-complete)
I had 3 vms (1 with just the mono runtime installed, 1 with the monodevelop ide installed, and 1 with mono-complete installed) all running the exact same executable but only one that saw the issue you described was the one with only the mono runtime installed. Running the “mono-complete” command above fixed the issue.