.NET Driver Creating MongoClient throws a System.IO.FileNotFoundException for System.Runtime.InteropServices.RuntimeInformation exception

1,069 views
Skip to first unread message

Bruno Di Giuseppe

unread,
Oct 21, 2016, 6:36:07 PM10/21/16
to mongodb-user

Hi guys!


I'm trying to use MongoDB Driver on .Net.

Below is a screenshot of the error I'm getting  when trying to instantiate the connection client. It's in portuguese, but it jsut says that it could not load the file or assembly System.Runtime.InteropServices.RuntimeInformation exception


This is a blank console application project, nothing besides ta file calling this Constructor.


The versions I tried were: 

  • 2.2 
  • 2.2.2 
  • 2.2.3 
  • 2.3 
  • 2.4-beta01
My friend tried doing the exact same and he actually succeeded. We're both using Visual Studio 2015.

So..... what could it possiblu be? Seems ike something on my PC is broken.


Cheers!



Robert Stam

unread,
Oct 21, 2016, 9:50:15 PM10/21/16
to mongod...@googlegroups.com
Thank you for reporting this. The Nuget packages for 2.4.0-beta1 are missing a required dependency on the System.Runtime.InteropServices.RuntimeInformation Nuget package.

I've created a JIRA ticket to track this:

https://jira.mongodb.org/browse/CSHARP-1807

You can work around this bug by manually adding a dependency to the System.Runtime.InteropServices.RuntimeInformation Nuget package to your own project.

--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.
 
For other MongoDB technical support options, see: https://docs.mongodb.com/manual/support/
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user+unsubscribe@googlegroups.com.
To post to this group, send email to mongod...@googlegroups.com.
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/035a7dac-7faa-4f61-8f48-6a34cdc83114%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

sudha.upadr...@gmail.com

unread,
Dec 28, 2017, 3:14:01 PM12/28/17
to mongodb-user
Hello guys!


Is this resolved? I am still having issues with same mentioned above.  I tried using latest version of MongoDB installed via Nuget Package manager. Using VS 2015 4.5. MongoDB Driver V2.5.0. Windows 10

Error thrown while making a connection to client.

Could not load file or assembly 'System.Runtime.InteropServices.RuntimeInformation, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

For interop I used for 4.0.0 and 4.3.0

Thanks,
Sudha
Reply all
Reply to author
Forward
0 new messages