gpt4 book ai didi

azure - 您可以在 Azure Service Fabric 项目中使用 project.json 吗?

转载 作者:行者123 更新时间:2023-12-02 04:42:15 25 4
gpt4 key购买 nike

我正在尝试使用 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.

最佳答案

这是 dotnet cli 处理 nuget 包中未列出的程序集的方式的重大更改。对于“旧式”项目,VS2015 会将此程序集复制到项目输出,但 dotnet cli 不会。

在修复之前,您可以打包程序集或在发布后步骤中将其复制到输出。程序集下载到:%userprofile%.nuget\packages\Microsoft.ServiceFabric.Services\2.0.135\lib\net45

关于azure - 您可以在 Azure Service Fabric 项目中使用 project.json 吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36432091/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com