2

I am working on Service Fabric (my first service fabric project). And I get this strange error that says Microsoft.ServiceFabric.Data.Impl.pdb not loaded. I am sure its not mistake in my code because I tried to comment parts of my code and that error always shows up. As I understood it by now its not some part of my code that is a problem its more in witch point of time is happening in some background thread that is not my doing but Service Fabric thread. That is just my current conclusion, it could be totally wrong.

But when I debug my project without an breakpoints my application just exits (same effect as someone press stop debugging button).

enter image description here

In Diagnostic Events Window there is this enter image description here

Does anyone know why is this happening or what does it mean. Or how can i get some more information about the bug I getting.

EDIT

Program.cs

 try
        {
            // The ServiceManifest.XML file defines one or more service type names.
            // Registering a service maps a service type name to a .NET type.
            // When Service Fabric creates an instance of this service type,
            // an instance of the class is created in this host process.

            ServiceRuntime.RegisterServiceAsync("CECacheMicroserviceType",
                context => new CECacheMicroservice(context)).GetAwaiter().GetResult();

            ServiceEventSource.Current.ServiceTypeRegistered(Process.GetCurrentProcess().Id, typeof(CECacheMicroservice).Name);

            // Prevents this host process from terminating so services keep running.
            Thread.Sleep(Timeout.Infinite);
        }
        catch (Exception e)
        {
            ServiceEventSource.Current.ServiceHostInitializationFailed(e.ToString());
            throw;
        }
Filip Filipovic
  • 410
  • 3
  • 13

1 Answers1

1

Can you run Install-Package Microsoft.ServiceFabric.Data.Impl -Version 0.10.0-preview-01 in package manager console for your solution and check if this issue still persists?

Harshita Singh
  • 4,590
  • 1
  • 10
  • 13
  • Can you check if any Nuget package is referencing `Microsoft.ServiceFabric.Data.Impl.pdb` and if yes, what version does it require in Nuget explorer? – Harshita Singh Sep 03 '20 at 06:05
  • I dont see Microsoft.ServiceFabric.Data.Impl.pdb, but i have Microsoft.ServiceFabric.Data and Microsoft.ServiceFabric.Data.Extensions on version 4.1.428 – Filip Filipovic Sep 03 '20 at 08:59
  • Great, can you go to Nuget Explorer and see if there is a reference of `Microsoft.ServiceFabric.Data.Impl.pdb` in any of these nugets? What I am anticipating is - There is some nuget which is expecting another version of `Microsoft.ServiceFabric.Data.Impl.pdb` and you have some other version installed, so pls check and let me know. – Harshita Singh Sep 03 '20 at 16:20
  • I removed all Nuget packages that I installed so far and installed them again after that it start working. So it was probably different version in one of my microservices. – Filip Filipovic Sep 03 '20 at 16:55