I have been using Visual Studio Code a little bit with some experimental Unity3D projects. Now I got an insiders email about the 0.2.0 update and decided to give it a go. After the update VSCode start up nicely, butit runs into errors when trying to open a .csproj file.
This is my error log
[INFORMATION:OmniSharp.MSBuild.MSBuildProjectSystem] Loading project from '/Users/username/Projects/NewSmallGame/NewSmallGame/Assembly-CSharp-vs.csproj'.
[WARNING:OmniSharp.MSBuild.MSBuildProjectSystem] Failed to process project file '/Users/username/Projects/NewSmallGame/NewSmallGame/Assembly-CSharp-vs.csproj'.
System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
at System.ThrowHelper.ThrowKeyNotFoundException () [0x00000] in <filename unknown>:0
at System.Collections.Generic.Dictionary`2[System.String,Microsoft.Build.BuildEngine.BuildProperty].get_Item (System.String key) [0x00000] in <filename unknown>:0
at OmniSharp.MSBuild.ProjectFile.ProjectFileInfo.Create (OmniSharp.Options.MSBuildOptions options, ILogger logger, System.String solutionDirectory, System.String projectFilePath, ICollection`1 diagnostics) [0x00000] in <filename unknown>:0
at OmniSharp.MSBuild.MSBuildProjectSystem.CreateProject (System.String projectFilePath) [0x00000] in <filename unknown>:0
/Users/username/Projects/NewSmallGame/NewSmallGame/Assembly-CSharp-vs.csproj(0,0)
System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
at System.ThrowHelper.ThrowKeyNotFoundException () [0x00000] in <filename unknown>:0
at System.Collections.Generic.Dictionary`2[System.String,Microsoft.Build.BuildEngine.BuildProperty].get_Item (System.String key) [0x00000] in <filename unknown>:0
at OmniSharp.MSBuild.ProjectFile.ProjectFileInfo.Create (OmniSharp.Options.MSBuildOptions options, ILogger logger, System.String solutionDirectory, System.String projectFilePath, ICollection`1 diagnostics) [0x00000] in <filename unknown>:0
at OmniSharp.MSBuild.MSBuildProjectSystem.CreateProject (System.String projectFilePath) [0x00000] in <filename unknown>:0
And this is not in any way restricted to Unity projects, but happens with all projects. I tried one generated with MonoDevelop and one made with Visual Studio 2010 that I downloaded.
What could be the cause of this error? It seems, that VSCode cant find a single character from the file since it refers to
/Assembly-CSharp-vs.csproj(0,0)
I do not know what caused the error on leading the projects, but it seems to have been fixed in the new 0.3.0 release.
Related
I am currently trying to set up an environment in which I can create winform applications with Visual Studio 2013 that I then want to put on an ARM v7 BeagleBone Black with an attached touchscreen where they are supposed to run with Mono.
In order to do so, I took a Ubuntu 14.10 AMD64 system and created a cross-compile environment with the BeagleBone Black's toolchain and scratchbox2.
I verified that the toolchain an sb2 work correctly by compiling some native test programs with it, they do run flawlessly on the Ubuntu machine (with sb2) as well as on the BeagleBone Black.
Next, I compiled mono from source, once for the Ubuntu machine and also once for the BeagleBone Black. To do so, I mainly followed this post. In the end I had a directory with the complete mono tree whose native components had been correctly compiled for ARM. I verified that by running sb2 mono -V on the Ubuntu system as well as mono -V on the BeagleBone Black after copying the mono directory onto it. I can also run a simple .NET console application that I created with VS2013 on the BBB's mono.
Next I tried to run a simple GUI application that basically only consists of a single form and a button that pops up a messagebox. The project settings in VS were set to .NET Framework version 4.5 and "Release".
Next, I tried to run this EXE with mono on the Ubuntu system and it worked after tweaking the ./configure options, recompiling mono (--with-tls=__thread) and installing the required libraries (libgdiplus and libx11). But when I try to run the same EXE on the BBB it crashes with this exception:
Unhandled Exception:
System.ArgumentException: A null reference or invalid value was found [GDI+ status: InvalidParameter]
at System.Drawing.GDIPlus.CheckStatus (Status status) [0x00000] in <filename unknown>:0
at System.Drawing.Bitmap..ctor (Int32 width, Int32 height, PixelFormat format) [0x00000] in <filename unknown>:0
at System.Drawing.Bitmap..ctor (System.Drawing.Image original, Int32 width, Int32 height) [0x00000] in <filename unknown>:0
at System.Drawing.Bitmap..ctor (System.Drawing.Image original, Size newSize) [0x00000] in <filename unknown>:0
at (wrapper remoting-invoke-with-check) System.Drawing.Bitmap:.ctor (System.Drawing.Image,System.Drawing.Size)
at System.Windows.Forms.XplatUIX11.DefineCursor (System.Drawing.Bitmap bitmap, System.Drawing.Bitmap mask, Color cursor_pixel, Color mask_pixel, Int32 xHotSpot, Int32 yHotSpot) [0x00000] in <filename unknown>:0
at System.Windows.Forms.XplatUI.DefineCursor (System.Drawing.Bitmap bitmap, System.Drawing.Bitmap mask, Color cursor_pixel, Color mask_pixel, Int32 xHotSpot, Int32 yHotSpot) [0x00000] in <filename unknown>:0
at System.Windows.Forms.Cursor.CreateCursor (System.IO.Stream stream) [0x00000] in <filename unknown>:0
at System.Windows.Forms.Cursor..ctor (System.Type type, System.String resource) [0x00000] in <filename unknown>:0
at System.Windows.Forms.Cursors.get_SizeNWSE () [0x00000] in <filename unknown>:0
at System.Windows.Forms.SizeGrip..ctor (System.Windows.Forms.Control CapturedControl) [0x00000] in <filename unknown>:0
at (wrapper remoting-invoke-with-check) System.Windows.Forms.SizeGrip:.ctor (System.Windows.Forms.Control)
at System.Windows.Forms.ScrollableControl.CreateScrollbars () [0x00000] in <filename unknown>:0
at System.Windows.Forms.ScrollableControl..ctor () [0x00000] in <filename unknown>:0
at System.Windows.Forms.ContainerControl..ctor () [0x00000] in <filename unknown>:0
at System.Windows.Forms.Form..ctor () [0x00000] in <filename unknown>:0
at guitest.Form1..ctor () [0x00000] in <filename unknown>:0
at (wrapper remoting-invoke-with-check) guitest.Form1:.ctor ()
at guitest.Program.Main () [0x00000] in <filename unknown>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.ArgumentException: A null reference or invalid value was found [GDI+ status: InvalidParameter]
at System.Drawing.GDIPlus.CheckStatus (Status status) [0x00000] in <filename unknown>:0
at System.Drawing.Bitmap..ctor (Int32 width, Int32 height, PixelFormat format) [0x00000] in <filename unknown>:0
at System.Drawing.Bitmap..ctor (System.Drawing.Image original, Int32 width, Int32 height) [0x00000] in <filename unknown>:0
at System.Drawing.Bitmap..ctor (System.Drawing.Image original, Size newSize) [0x00000] in <filename unknown>:0
at (wrapper remoting-invoke-with-check) System.Drawing.Bitmap:.ctor (System.Drawing.Image,System.Drawing.Size)
at System.Windows.Forms.XplatUIX11.DefineCursor (System.Drawing.Bitmap bitmap, System.Drawing.Bitmap mask, Color cursor_pixel, Color mask_pixel, Int32 xHotSpot, Int32 yHotSpot) [0x00000] in <filename unknown>:0
at System.Windows.Forms.XplatUI.DefineCursor (System.Drawing.Bitmap bitmap, System.Drawing.Bitmap mask, Color cursor_pixel, Color mask_pixel, Int32 xHotSpot, Int32 yHotSpot) [0x00000] in <filename unknown>:0
at System.Windows.Forms.Cursor.CreateCursor (System.IO.Stream stream) [0x00000] in <filename unknown>:0
at System.Windows.Forms.Cursor..ctor (System.Type type, System.String resource) [0x00000] in <filename unknown>:0
at System.Windows.Forms.Cursors.get_SizeNWSE () [0x00000] in <filename unknown>:0
at System.Windows.Forms.SizeGrip..ctor (System.Windows.Forms.Control CapturedControl) [0x00000] in <filename unknown>:0
at (wrapper remoting-invoke-with-check) System.Windows.Forms.SizeGrip:.ctor (System.Windows.Forms.Control)
at System.Windows.Forms.ScrollableControl.CreateScrollbars () [0x00000] in <filename unknown>:0
at System.Windows.Forms.ScrollableControl..ctor () [0x00000] in <filename unknown>:0
at System.Windows.Forms.ContainerControl..ctor () [0x00000] in <filename unknown>:0
at System.Windows.Forms.Form..ctor () [0x00000] in <filename unknown>:0
at guitest.Form1..ctor () [0x00000] in <filename unknown>:0
at (wrapper remoting-invoke-with-check) guitest.Form1:.ctor ()
at guitest.Program.Main () [0x00000] in <filename unknown>:0
I wonder what the problem might be? How can I go on from here?
BTW: This is the mono version on the BBB:
Mono JIT compiler version 3.12.0 (tarball Mo 23. Feb 11:40:46 CET 2015)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
TLS: __thread
SIGSEGV: normal
Notifications: epoll
Architecture: armel,vfp+fallback
Disabled: none
Misc: softdebug
LLVM: supported, not enabled.
GC: sgen
Update: I just noticed this little mono utility called mono-test-install. When I run it on the BBB, it tells me this:
./mono-test-install
Active Mono:
Warning: pkg-config could not find mono installed on this system
No dotnet pkgconfig found, Windows.Forms, System.Drawing and others will not work
I think that may be my problem. Does somebody know how to get things on track in this case? I assume that I somehow have to tell mono where it can find its libraries and assemblies, but I can't tell for sure... It would be great if someone could shed some light on this.
Update 2: I was able to get rid of the error shown by mono-test-install by creating the relevant environment variables for my hand-made mono version (described here). Also, I had to edit the file [mono-directory]/usr/local/bin/mcs and correct the paths to the executables. I assume you can set them automatically with PREFIX=... when you configure mono, but I didn't do that.
Now, when I run mono-test-install I get this:
Active Mono: /home/root/monotree_armv7/usr/local/bin/mono
Other Mono executables: /usr/local/bin/mono
Your have a working System.Drawing setup
Your file system watcher is: System.IO.InotifyWatcher
So I think there should be everything in place and set up correctly now. But it still does not work. When I run my little winforms test program, I get the very same exception as given above.
After some searching I found out that there is probably a bug in mono as I am not the first one to run into this. The strange thing however is the fact that the same EXE runs flawlessly on Ubuntu with the very same mono version (just compiled for amd64 and not armv7, same configure options). So on the PC everything works fine, on arm it crashes.
Update: I filed a report with an attached sample project that produces the problems here.
A bit of digging shows that GDI+ GdipCreateBitmapFromScan0 returns InvalidParameter when width or height is a non-positive number.
Going upper the stack trace indicates that Bitmap constructor is called from X11 driver when preferred cursor size (reported by XQueryBestCursor from libX11) differs from original cursor size (which is 32x32 pixels).
So the thought is that XQueryBestCursor() on your BeagleBone returns zero width/height for cursor. A bit of googling gets us to the thread describing a similar issue. There's even some kind of patch there.
I believe you should either recompile X11 on your BeagleBone with a patch provided, or add some checks in mono source (after calling XQueryBestCursor) so it use cursor's original width/height when X11 returns zero width/height.
UPD: HW cursor size seems to be actually reported by video driver, so you can probably just try another one, like recent xf86-video-fbdev.
I'm having a problems building a PCL in Xamarin Studio on the Mac. It works fine in debug mode but fody throws an exception in Release Mode.
Exception during build is listed below.
Error: Fody: An unhandled exception occurred:
Exception:
Symbol file `XXX/obj/Release/XXX.dll.mdb' does not match assembly `XXX/obj/Release/XXX.dll'
StackTrace:
at Mono.CompilerServices.SymbolWriter.MonoSymbolFile.CheckGuidMatch (Guid other, System.String filename, System.String assembly) [0x00000] in <filename unknown>:0
at Mono.CompilerServices.SymbolWriter.MonoSymbolFile..ctor (System.String filename, Mono.Cecil.ModuleDefinition module) [0x00000] in <filename unknown>:0
at Mono.CompilerServices.SymbolWriter.MonoSymbolFile.ReadSymbolFile (Mono.Cecil.ModuleDefinition module, System.String filename) [0x00000] in <filename unknown>:0
at Mono.Cecil.Mdb.MdbReaderProvider.GetSymbolReader (Mono.Cecil.ModuleDefinition module, System.String fileName) [0x00000] in <filename unknown>:0
at Mono.Cecil.ModuleReader.ReadSymbols (Mono.Cecil.ModuleDefinition module, Mono.Cecil.ReaderParameters parameters) [0x00000] in <filename unknown>:0
at Mono.Cecil.ModuleReader.CreateModuleFrom (Mono.Cecil.PE.Image image, Mono.Cecil.ReaderParameters parameters) [0x00000] in <filename unknown>:0
at Mono.Cecil.ModuleDefinition.ReadModule (System.IO.Stream stream, Mono.Cecil.ReaderParameters parameters) [0x00000] in <filename unknown>:0
at Mono.Cecil.ModuleDefinition.ReadModule (System.String fileName, Mono.Cecil.ReaderParameters parameters) [0x00000] in <filename unknown>:0
at InnerWeaver.ReadModule () [0x00000] in <filename unknown>:0
at InnerWeaver.Execute () [0x00000] in <filename unknown>:0
Source:
Mono.Cecil.Mdb
TargetSite:
Void CheckGuidMatch(System.Guid, System.String, System.String)
Fody needs the debug information (*.mdb file) associated with the outputted assembly to perform the weaving step. Release builds by default turn off the Debug Information field within Build -> Compiler in a projects settings.
Having this build option set to None disables debug symbolication and results in the mdb file getting out of sync, hence the Symbol file 'XXX/obj/Release/XXX.dll.mdb' does not match assembly XXX/obj/Release/XXX.dll exception.
Therefore you need to enable Symbols Only or Full when you build projects in release mode when Fody is integrated into the build process:
You may have already, but I'd start with this if it was me:
Right click on your solution
Properties
Configuration Properties / Configuration
In the "Configuration" drop down in the top left, check that the "Debug" configuration (re: Platform | Build | Deploy) matches "Release".
I am having problems with MVC4 on Mono 3. I am using the latest version in Xamarin Studio with the latest updates but when trying a HTTP POST to the web server it is returning the following error. I am using the DLL's for MVC4 from windows as the guides suggest and the Mono version of System.Web 4.0.0.0.
Any ideas how to resolve this issue or am I just better reverting to MVC3?
System.TypeLoadException
Could not load type 'System.Web.UnvalidatedRequestValuesBase' from assembly 'System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
Description: HTTP 500.Error processing request.
Details: Non-web exception. Exception origin (name of application or object): System.Web.Mvc.
Exception stack trace:
at System.Web.Mvc.UnvalidatedRequestValuesWrapper.get_Form () [0x00000] in <filename unknown>:0 at System.Web.Mvc.FormValueProvider..ctor (System.Web.Mvc.ControllerContext controllerContext, IUnvalidatedRequestValues unvalidatedValues) [0x00000] in <filename unknown>:0 at System.Web.Mvc.FormValueProviderFactory.GetValueProvider (System.Web.Mvc.ControllerContext controllerContext) [0x00000] in <filename unknown>:0 at System.Web.Mvc.ValueProviderFactoryCollection+<>c__DisplayClassc.<GetValueProvider>b__7 (System.Web.Mvc.ValueProviderFactory factory) [0x00000] in <filename unknown>:0 at System.Linq.Enumerable+<CreateSelectIterator>c__Iterator25`2[System.Web.Mvc.ValueProviderFactory,<>f__AnonymousType2`2[System.Web.Mvc.ValueProviderFactory,System.Web.Mvc.IValueProvider]].MoveNext () [0x00059] in /private/tmp/source/bockbuild-xamarin/profiles/mono-mac-xamarin/build-root/mono-3.2.3/mcs/class/System.Core/System.Linq/Enumerable.cs:2269 at System.Linq.Enumerable+<CreateWhereIterator>c__Iterator33`1[<>f__AnonymousType2`2[System.Web.Mvc.ValueProviderFactory,System.Web.Mvc.IValueProvider]].MoveNext () [0x0006f] in /private/tmp/source/bockbuild-xamarin/profiles/mono-mac-xamarin/build-root/mono-3.2.3/mcs/class/System.Core/System.Linq/Enumerable.cs:3120 at System.Linq.Enumerable+<CreateSelectIterator>c__Iterator25`2[<>f__AnonymousType2`2[System.Web.Mvc.ValueProviderFactory,System.Web.Mvc.IValueProvider],System.Web.Mvc.IValueProvider].MoveNext () [0x00059] in /private/tmp/source/bockbuild-xamarin/profiles/mono-mac-xamarin/build-root/mono-3.2.3/mcs/class/System.Core/System.Linq/Enumerable.cs:2269 at System.Collections.Generic.List`1[System.Web.Mvc.IValueProvider].AddEnumerable (IEnumerable`1 enumerable) [0x00013] in /private/tmp/source/bockbuild-xamarin/profiles/mono-mac-xamarin/build-root/mono-3.2.3/mcs/class/corlib/System.Collections.Generic/List.cs:134 at System.Collections.Generic.List`1[System.Web.Mvc.IValueProvider]..ctor (IEnumerable`1 collection) [0x0002f] in /private/tmp/source/bockbuild-xamarin/profiles/mono-mac-xamarin/build-root/mono-3.2.3/mcs/class/corlib/System.Collections.Generic/List.cs:69 at System.Linq.Enumerable.ToList[IValueProvider] (IEnumerable`1 source) [0x00006] in /private/tmp/source/bockbuild-xamarin/profiles/mono-mac-xamarin/build-root/mono-3.2.3/mcs/class/System.Core/System.Linq/Enumerable.cs:2951 at System.Web.Mvc.ValueProviderFactoryCollection.GetValueProvider (System.Web.Mvc.ControllerContext controllerContext) [0x00000] in <filename unknown>:0 at System.Web.Mvc.ControllerBase.get_ValueProvider () [0x00000] in <filename unknown>:0 at System.Web.Mvc.ControllerActionInvoker.GetParameterValue (System.Web.Mvc.ControllerContext controllerContext, System.Web.Mvc.ParameterDescriptor parameterDescriptor) [0x00000] in <filename unknown>:0 at System.Web.Mvc.ControllerActionInvoker.GetParameterValues (System.Web.Mvc.ControllerContext controllerContext, System.Web.Mvc.ActionDescriptor actionDescriptor) [0x00000] in <filename unknown>:0 at System.Web.Mvc.Async.AsyncControllerActionInvoker+<>c__DisplayClass25.<BeginInvokeAction>b__1e (System.AsyncCallback asyncCallback, System.Object asyncState) [0x00000] in <filename unknown>:0
Version Information: 3.2.3 ((no/8d3b4b7 Mon Sep 16 23:46:28 EDT 2013); ASP.NET Version: 4.0.30319.17020
Since I had the same error with MVC 3 Razor like you I solved my problem by
copying following DLL's from a MVC 3 Razor Visual Studio project to my mono project.
System.Web.Helpers.dll
System.Web.Mvc.dll
System.Web.Razor.dll
System.Web.WebPages.dll
System.Web.WebPages.Deployment.dll
System.Web.WebPages.Razor.dll
This might help as well:
http://blog.yojimbocorp.com/2012/08/27/asp-net-mvc3-with-razor-view-engine-using-monodevelop-and-ubuntu-12-04/
Is there any way to use Excel / Office libraries in Ubuntu?
I've developed a C# program that glues together an Excel spreadsheet and some VB macros. It uses the following.
Excel and Office libraries: Microsoft.Vbe.Interop.dll
Microsoft.Office.Interop.Excel.dll and Office.dll. It works perfectly fine in Windows but I can't manage to get it running on Ubuntu using Mono 3.2.
When I try to execute it (after adding the libraries that I explicitly imported using gacutil -l XXXX.dll)
the output is the following:
[ERROR] FATAL UNHANDLED EXCEPTION: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.DllNotFoundException: ole32.dll
at (wrapper managed-to-native) System.__ComObject:CoCreateInstance (System.Guid,intptr,uint,System.Guid,intptr&)
at System.__ComObject.Initialize (System.Type t) [0x00000] in <filename unknown>:0
at (wrapper remoting-invoke-with-check) System.__ComObject:Initialize (System.Type)
at Mono.Interop.ComInteropProxy.CreateProxy (System.Type t) [0x00000] in <filename unknown>:0
at System.Runtime.Remoting.RemotingServices.CreateClientProxyForComInterop (System.Type type) [0x00000] in <filename unknown>:0
at System.Runtime.Remoting.Activation.ActivationServices.CreateProxyForType (System.Type type) [0x00000] in <filename unknown>:0
at (wrapper managed-to-native) System.Reflection.MonoCMethod:InternalInvoke (System.Reflection.MonoCMethod,object,object[],System.Exception&)
at System.Reflection.MonoCMethod.InternalInvoke (System.Object obj, System.Object[] parameters) [0x00000] in <filename unknown>:0
--- End of inner exception stack trace ---
at System.Reflection.MonoCMethod.InternalInvoke (System.Object obj, System.Object[] parameters) [0x00000] in <filename unknown>:0
at System.Activator.CreateInstance (System.Type type, Boolean nonPublic) [0x00000] in <filename unknown>:0
at System.Activator.CreateInstance (System.Type type) [0x00000] in <filename unknown>:0
at MyProgram.Program.joinMacroAndExcel () [0x00000] in <filename unknown>:0
at MyProgram.Program.Main (System.String[] args) [0x00000] in <filename unknown>:0
Any help or direction would be highly appreciated. Thanks in advance.
Josh
The Excel / Office integration libraries require Office to already be installed to run - just copying the PIAs (e.g. Microsoft.Office.Interop.Excel.dll) is insufficient, as they are to act as the bridge to the COM layer exposed by Excel et al. Without the COM layer, there's nothign to perform the work you're asking of it.
I need help with this following exception. I am trying to consume a web WCF web service using basicHttpSecurity etc. I had a look at the Dev Pipe for Mono and what I am consuming is in the working section.
So the service im trying to consume is AccountService.svc. The proxy that is generated has a AccountServiceClient() object that I am using. On the line where you create the object it throws an exception and there is no way of debugging and stepping into that constructor.
The strange thing is that I can consume this service on my Windows Machine going though IIS. I can also consume with my Mac PC using the mod mono extension ect. But not on Ubuntu Linux machine. Can anyone shed some light on this? Can anyone explain why this is happening? How do I fix this?
Me creating a new instance of the client.
client = new AccountServiceClient ();
The AccountServiceClient() sniplet
public partial class AccountServiceClient : System.ServiceModel.ClientBase<EServicesAccountProxy.IAccountService>, EServicesAccountProxy.IAccountService
The exception that gets thrown.
System.Reflection.ReflectionTypeLoadException: The classes in the module cannot be loaded.
at (wrapper managed-to-native) System.Reflection.Assembly:GetTypes (System.Reflection.Assembly,bool)
at System.Reflection.Assembly.GetTypes () [0x00000] in <filename unknown>:0
at System.ServiceModel.Configuration.ConfigUtil.GetTypeFromConfigString (System.String name, NamedConfigCategory category) [0x00000] in <filename unknown>:0
at System.ServiceModel.ChannelFactory.ApplyConfiguration (System.String endpointConfig) [0x00000] in <filename unknown>:0
at System.ServiceModel.ChannelFactory.InitializeEndpoint (System.String endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) [0x00000] in <filename unknown>:0
at System.ServiceModel.ChannelFactory`1[EServicesAccountProxy.IAccountService]..ctor (System.String endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) [0x00000] in <filename unknown>:0
at System.ServiceModel.ClientBase`1[EServicesAccountProxy.IAccountService].Initialize (System.ServiceModel.InstanceContext instance, System.String endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) [0x00000] in <filename unknown>:0
at System.ServiceModel.ClientBase`1[EServicesAccountProxy.IAccountService]..ctor (System.ServiceModel.InstanceContext instance, System.String endpointConfigurationName) [0x00000] in <filename unknown>:0
at System.ServiceModel.ClientBase`1[EServicesAccountProxy.IAccountService]..ctor (System.ServiceModel.InstanceContext instance) [0x00000] in <filename unknown>:0
at System.ServiceModel.ClientBase`1[EServicesAccountProxy.IAccountService]..ctor () [0x00000] in <filename unknown>:0
at EServicesAccountProxy.AccountServiceClient..ctor () [0x00000] in <filename unknown>:0
at TCShared.TCInsuranceSystem_EGW.GetAccount (TCShared.TCInsuranceSystemAccount objInsuranceSystemAccount) [0x00000] in <filename unknown>:0
A Strange thing i have noticed also is that I get a LoaderException as well (System.TypeLoadException). I don't know if it is related because the message says that it could not load type 'Npgsql.VisualStudio.NpgsqlObjectSelector' from 'Npgsql.VisualStudio, vserion=2.0.2.1, culture-neutral, PublicKeyToken=null'. Im not even using VisualStudio, im using monodevelop and XamarinStudio on my windows machine.
She source in the exception message says if comes from "mscorelib"
Any help will be appreciated.
Turns out there was an inner load exception and I had a Npgsql.VisualStudio DLL in my bin. Once i have removed that everything worked. Reflections failed to load that DLL because of missing references.