[CSHARP-2462] MongoDB.Driver.Core errors in .netStandard 2.0 Created: 23/Dec/18  Updated: 07/Jan/19  Resolved: 07/Jan/19

Status: Closed
Project: C# Driver
Component/s: Configuration, Feature Request, Setup
Affects Version/s: 2.7.2
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Lucas Pallarés Assignee: Robert Stam
Resolution: Cannot Reproduce Votes: 0
Labels: Bug, driver
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows 10 x64
Unity 2018.3.0f2
Visual Studio 2017


Issue Links:
Related
related to CSHARP-2453 Latest DnsClient breaks API compatibi... Closed

 Description   

Hi,

The library MongoDB.Driver.Core

Has errors when try to use in Unity 3D like:

"Unable to resolve reference 'DnsClient'. Is the assembly missing or incompatible with the current platform?"

And i open the source code in Visual Studio then change target framework to netStandard 2.0 but i have the same problem, too much dependencys missed, i try to solve it but i some cases can't because miss some functions an variables.

Any suggestion?

 

Regards.-



 Comments   
Comment by Robert Stam [ 07/Jan/19 ]

Closing since you solved your problem by rebuilding your source code.

Also linking as possibly related to CSHARP-2453 since you mention DnsClient.

Comment by Lucas Pallarés [ 31/Dec/18 ]

Fixed rebuilding the Source code

Comment by Lucas Pallarés [ 31/Dec/18 ]

I resolved the problem with the missed DnsClient.

 

But now i have this problem:

 

 

Error formatting macro: code: java.lang.StackOverflowError

"{ ClusterId : \"1\", ConnectionMode : \"Automatic\", Type : \"Unknown\", State : \"Disconnected\", Servers : [{ ServerId: \"

{ ClusterId : 1, EndPoint : \"Unspecified/localhost:27017\" }

\", EndPoint: \"Unspecified/localhost:27017\", State: \"Disconnected\", Type: \"Unknown\", HeartbeatException: \"MongoDB.Driver.MongoConnectionException: An exception occurred while opening a connection to the server. -> System.Net.Sockets.SocketException: An address incompatible with the requested protocol was used.\r\n\r\n at System.Net.Sockets.SocketAsyncResult.CheckIfThrowDelayedException () [0x00014] in <ac210d81537245bc838518cc8e845861>:0 \r\n at System.Net.Sockets.Socket.EndConnect (System.IAsyncResult asyncResult) [0x0002c] in <ac210d81537245bc838518cc8e845861>:0 \r\n at System.Threading.Tasks.TaskFactory`1[TResult].FromAsyncCoreLogic (System.IAsyncResult iar, System.Func`2[T,TResult] endFunction, System.Action`1[T] endAction, System.Threading.Tasks.Task`1[TResult] promise, System.Boolean requiresSynchronization) [0x00019] in <f2e6809acb14476a81f399aeb800f8f2>:0 \r\n- End of stack trace from previous location where exception was thrown -\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <f2e6809acb14476a81f399aeb800f8f2>:0 \r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <f2e6809acb14476a81f399aeb800f8f2>:0 \r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <f2e6809acb14476a81f399aeb800f8f2>:0 \r\n at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <f2e6809acb14476a81f399aeb800f8f2>:0 \r\n at System.Runtime.CompilerServices.ConfiguredTaskAwaitable+ConfiguredTaskAwaiter.GetResult () [0x00000] in <f2e6809acb14476a81f399aeb800f8f2>:0 \r\n at MongoDB.Driver.Core.Connections.TcpStreamFactory+<ConnectAsync>d_7.MoveNext () [0x00245] in <a619ae72525a4b10a92770b42fd370d8>:0 \r\n- End of stack trace from previous location where exception was thrown -\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <f2e6809acb14476a81f399aeb800f8f2>:0 \r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <f2e6809acb14476a81f399aeb800f8f2>:0 \r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <f2e6809acb14476a81f399aeb800f8f2>:0 \r\n at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <f2e6809acb14476a81f399aeb800f8f2>:0 \r\n at System.Runtime.CompilerServices.ConfiguredTaskAwaitable+ConfiguredTaskAwaiter.GetResult () [0x00000] in <f2e6809acb14476a81f399aeb800f8f2>:0 \r\n at MongoDB.Driver.Core.Connections.TcpStreamFactory+<CreateStreamAsync>d4.MoveNext () [0x00090] in <a619ae72525a4b10a92770b42fd370d8>:0 \r\n- End of stack trace from previous location where exception was thrown -\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <f2e6809acb14476a81f399aeb800f8f2>:0 \r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <f2e6809acb14476a81f399aeb800f8f2>:0 \r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <f2e6809acb14476a81f399aeb800f8f2>:0 \r\n at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <f2e6809acb14476a81f399aeb800f8f2>:0 \r\n at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[TResult].GetResult () [0x00000] in <f2e6809acb14476a81f399aeb800f8f2>:0 \r\n at MongoDB.Driver.Core.Connections.BinaryConnection+<OpenHelperAsync>d48.MoveNext () [0x000a3] in <a619ae72525a4b10a92770b42fd370d8>:0 \r\n — End of inner exception stack trace --\r\n at MongoDB.Driver.Core.Connections.BinaryConnection+<OpenHelperAsync>d48.MoveNext () [0x00166] in <a619ae72525a4b10a92770b42fd370d8>:0 \r\n End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <f2e6809acb14476a81f399aeb800f8f2>:0 \r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <f2e6809acb14476a81f399aeb800f8f2>:0 \r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <f2e6809acb14476a81f399aeb800f8f2>:0 \r\n at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <f2e6809acb14476a81f399aeb800f8f2>:0 \r\n at System.Runtime.CompilerServices.ConfiguredTaskAwaitable+ConfiguredTaskAwaiter.GetResult () [0x00000] in <f2e6809acb14476a81f399aeb800f8f2>:0 \r\n at MongoDB.Driver.Core.Servers.ServerMonitor+<HeartbeatAsync>d_28.MoveNext () [0x000d4] in <a619ae72525a4b10a92770b42fd370d8>:0 \" }] }"

 

Generated at Wed Feb 07 21:42:37 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.