【发布时间】:2016-07-25 17:34:32
【问题描述】:
我正在尝试使用 project.json 来更轻松地在 Service Fabric 项目中管理包。
但是它失败了,我认为这是由于服务中没有包含 ServiceFabricServiceModel.dll。我可以在 C:\Users\nick.nuget\packages\Microsoft.ServiceFabric.Actors\2.0.135\lib\net45 的 nuget 包中看到 dll,但 nuspec 文件没有引用它。
尝试部署时出现不少错误。
例如
Exception thrown during async task execution
System.IO.FileNotFoundException: Could not load file or assembly 'ServiceFabricServiceModel, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
File name: 'ServiceFabricServiceModel, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
at Microsoft.ServiceFabric.Services.Common.FabricServiceConfigSection.Initialize()
at Microsoft.ServiceFabric.Services.Remoting.FabricTransport.FabricTransportServiceRemotingProviderAttribute.CreateServiceRemotingListener(ServiceContext serviceContext, IService service)
at Microsoft.ServiceFabric.Services.Runtime.StatefulServiceReplicaAdapter.<OpenCommunicationListenersAsync>d__1b.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.ServiceFabric.Services.Runtime.StatefulServiceReplicaAdapter.<System.Fabric.IStatefulServiceReplica.ChangeRoleAsync>d__5.MoveNext()
=== Pre-bind state information ===
LOG: DisplayName = ServiceFabricServiceModel, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
(Fully-specified)
LOG: Appbase = file:///C:/SfDevCluster/Data/_App/_Node_1/SceneSkopePlatformType_App0/ServiceRegistrationServicePkg.Code.1.1.13 (2016-04-05 16.10.16Z)/
LOG: Initial PrivatePath = NULL
Calling assembly : Microsoft.ServiceFabric.Services, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35.
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\SfDevCluster\Data\_App\_Node_1\SceneSkopePlatformType_App0\ServiceRegistrationServicePkg.Code.1.1.13 (2016-04-05 16.10.16Z)\ServiceRegistrationService.exe.Config
LOG: Using host configuration file:
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config.
LOG: Post-policy reference: ServiceFabricServiceModel, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
LOG: The same bind was seen before, and was failed with hr = 0x80070002.
【问题讨论】:
-
您是否尝试从非服务结构应用程序访问 Service Fabric Reliable Actor/Service?
-
不 - 我正在尝试编写一个服务结构参与者,但作为一个新的 dotnet 项目而不是 csproj。这可能与 project.json 明显消失不再相关
-
在stackoverflow.com/questions/35656598/…链接上查看Azhar的答案
-
那条评论是关于 x64 的。这个问题是关于使用 project.json 而不是 csproj
标签: azure asp.net-core azure-service-fabric