[CSHARP-2133] Compilation Issues and Application Problems caused by C# Driver Created: 22/Dec/17  Updated: 15/Nov/21  Resolved: 09/Jan/18

Status: Closed
Project: C# Driver
Component/s: None
Affects Version/s: 2.5
Fix Version/s: None

Type: Bug Priority: Blocker - P1
Reporter: Vijay Devappa Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates CSHARP-2033 Update dependency on System.Runtime.I... Closed

 Description   

Details of the issue are in this link. I reported this issue, at this time, looks like this is happening because of MongoDB Dependencies.

https://developercommunity.visualstudio.com/content/problem/164184/publish-tools-are-failing-after-upgrade-to-vs-2017.html

Note that after trying everything mentioned there, eventually ended up with the below error. I tried everything for days & nights - reinstalled nuget packages over and over again. The only way to get it to work was to install VS 2017 on my Azure VM and then the error stopped happening.

I went through all the dependencies of the driver, found some documented ones missing - installed them manually - nothing worked.

Very hard to debug this issue and it does not say which file is missing. VS 2017 install fix indicates that the missing dll was probably in the GAC.

Note I even installed .NET 4.7.1 and latest .net core on that VM - even that did not get the below to work

Application: Locus.SqlServer.ChangeManagement.Worker.ServiceFabric.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.IO.FileNotFoundException

Exception Info: System.IO.FileNotFoundException
at MongoDB.Driver.Core.Connections.ClientDocumentHelper.CreateOSDocument()
at System.Lazy`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].CreateValue()
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Lazy`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].get_Value()
at MongoDB.Driver.Core.Connections.ClientDocumentHelper.CreateClientDocument(System.String)
at MongoDB.Driver.Core.Connections.BinaryConnectionFactory..ctor(MongoDB.Driver.Core.Configuration.ConnectionSettings, MongoDB.Driver.Core.Connections.IStreamFactory, MongoDB.Driver.Core.Events.IEventSubscriber)
at MongoDB.Driver.Core.Configuration.ClusterBuilder.BuildCluster()
at MongoDB.Driver.ClusterRegistry.CreateCluster(MongoDB.Driver.ClusterKey)
at MongoDB.Driver.ClusterRegistry.GetOrCreateCluster(MongoDB.Driver.ClusterKey)
at MongoDB.Driver.MongoClient..ctor(MongoDB.Driver.MongoClientSettings)
at Locus.MongoDB.Core.LocusMongoClient+DedicatedCluster.Initialize(System.String, System.String, System.String, System.String, System.String)
at Locus.MongoDB.Core.LocusMongoClient+DedicatedCluster.Get(System.String, System.String, System.String, System.String, System.String)
at Locus.MongoDB.Config.LocusConfigData.Database()
at Locus.Configuration.LocusCloudConfig.GetLoggingConfiguration()

Exception Info: System.AggregateException
at Locus.Core.Execute.InParallel(System.Collections.Generic.List`1<System.Collections.Generic.List`1<System.Action>>, System.Threading.Tasks.TaskCreationOptions)
at Locus.Core.Execute.InParallel[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]](System.Collections.Generic.ICollection`1<System._Canon>, System.Action`1<System._Canon>, Int32, System.Threading.Tasks.TaskCreationOptions)
at Locus.SqlServer.ChangeManagement.ChangeTrackingTimer.ExecuteTimer()
at Locus.Framework.ProtectedTimerMethod.Execute(System.Action)
at Locus.Core.Timers.BaseWorkTimer._timer_Elapsed(System.Object)
at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.TimerQueueTimer.CallCallback()
at System.Threading.TimerQueueTimer.Fire()
at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
at System.Threading.ThreadPoolWorkQueue.Dispatch()



 Comments   
Comment by Vijay Devappa [ 09/Jan/18 ]

Just note that the issue was finally resolved only after I installed VS 2017 community edition on the VM. Then it finally worked.

Comment by Robert Stam [ 09/Jan/18 ]

This appears to be a different manifestation of the same issue reported in CSHARP-2033.

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