c# - Microsoft.ServiceFabric.Data.Impl.pdb 未加载

标签 c# azure azure-service-fabric service-fabric-stateful service-fabric-stateless

我正在研究 Service Fabric(我的第一个 Service Fabric 项目)。我收到这个奇怪的错误,提示 Microsoft.ServiceFabric.Data.Impl.pdb 未加载。我确信我的代码中没有错误,因为我尝试注释部分代码,并且该错误总是出现。 据我所知,现在问题不在于代码的某些部分,而在于某个时间点发生在某个后台线程中,这不是我做的,而是 Service Fabric 线程。这只是我目前的结论,可能是完全错误的。

但是当我在没有断点的情况下调试项目时,我的应用程序就会退出(与有人按下停止调试按钮的效果相同)。

enter image description here

在诊断事件窗口中有这个 enter image description here

有谁知道为什么会发生这种情况或者这意味着什么。或者我怎样才能获得有关我遇到的错误的更多信息。

编辑

程序.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;
        }

最佳答案

您能否在包管理器控制台中为您的解决方案运行 Install-Package Microsoft.ServiceFabric.Data.Impl -Version 0.10.0-preview-01 并检查此问题是否仍然存在?

关于c# - Microsoft.ServiceFabric.Data.Impl.pdb 未加载,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63696283/

相关文章:

c# - Django Like 用于 C# MVC 的管理项目

java - 清除内存中的图像流

azure - 在 AzureAD B2C 中使用 "forceChangePasswordNextLogin"创建的本地帐户在初始密码更改后无法再登录

azure-service-fabric - "Partition is below target replica or instance count"将服务结构应用程序部署到公共(public)服务结构集群后出错

azure - 数百个 Service Fabric 证书错误

azure - 部署到 Service Fabric 时,如何在 docker-compose 文件中设置有效的 ServiceDnsName?

c# - ToolStripMenuItem 添加到几个地方?

c# - 将变量分配给表达式是否更节省内存?

azure - 寻找替代解决方案来处理从 Azure Blob 到 Azure SQL DB 的数万个 JSON

c# - Azure共享访问签名创建