服务结构部署错误:服务缺少ServiceManifest.xml [英] Service Fabric Deployment Error: ServiceManifest.xml is missing for service

查看:127
本文介绍了服务结构部署错误:服务缺少ServiceManifest.xml的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在解决方案中添加了Stateless Service Fabric项目,并将其设置为Web Api自托管主机. 在Visual Studio添加的任何文件中,我都没有碰过任何东西.唯一略有错误的是解决方案文件上的Git合并错误,这使我不得不手动再次添加项目.

I have added a Stateless Service Fabric project to my solution and set it up as a Web Api self host. I have touched nothing in any of the files added by Visual Studio. The only thing that went slightly wrong was a Git merge error on the solution file, causing me to have to add the projects again manually.

项目的命名如下:

  • 项目名称/sfproj:ClientCore.CommandStackApi.Deploy
  • 服务名称/csproj:ClientCore.CommandStackApi

当我尝试部署时,出现以下错误:

When I try to deploy, I get the following error:

该应用程序的BuildLayout C:\ SfDevCluster \ Data \ ImageBuilderProxy \ AppType \ ClientCore.CommandStackApi.DeployType 是无效的.服务缺少ServiceManifest.xml ClientCore.CommandStackApiPkg.

The BuildLayout of the application in C:\SfDevCluster\Data\ImageBuilderProxy\AppType\ClientCore.CommandStackApi.DeployType is invalid. ServiceManifest.xml is missing for service ClientCore.CommandStackApiPkg.

当我比较文件和所有可以想到的项目设置时,对于我的其他Service Fabric项目来说,一切看起来都很好,但是它总是抱怨缺少Service Manifest.我唯一注意到的是SF项目缺少对CommandStackApi项目的依赖,但这没有任何改变.

When I compare files, and all the project settings I can think off, with my other Service Fabric projects everything looks fine, but it keeps complaining that the Service Manifest is missing. The only thing I noticed, was the SF project missing a dependency to the CommandStackApi project, but this didn't change anything.

我在两台不同的计算机上进行了尝试,其中最后一台计算机全新安装了Service Fabric SDK等.

I've tried on two different computers, the last of which had a fresh install of the Service Fabric SDK etc.

我猜想如果我删除所有项目并再次设置所有内容,它将起作用,但是这也发生在较早的时候,当时我尝试完全根据MSDN指南构建deploy软件包和powershell脚本,所以我真的很喜欢洞悉我可能做错了什么.如果这发生在一个更成熟的项目上,我将无法选择从头开始重新创建解决方案并使用Visual Studio黑盒魔术设置,因为它必须在幕后进行.任何想法,可能有什么不对,将不胜感激.

I'm guessing it would work if I remove all projects and set everything up again, but this also happened earlier, when I tried to construct the deploy package and powershell script exactly from the MSDN guide, so I would really like some insight into what I might be doing wrong. If this happens to a more mature project, I won't have the option to recreate the solution from scratch and tap into the Visual Studio blackbox magic setup, that it must be doing behind the scenes. Any ideas, for what might be wrong, would be appreciated.

推荐答案

所以我终于弄清楚出了什么问题.

So I finally figured out what was wrong.

我正在查看文件和项目依赖项,但是错过了缺少的服务依赖项.当通过合并将两个项目从解决方案中删除时,SF项目必须丢失了服务引用.重新添加此功能可以解决问题.

I was looking at the files and project dependencies, but missed a missing service dependency. When the two projects were removed from the solution by the merge, the SF project must have lost the service reference. Adding this back in fixed the problem.

这篇关于服务结构部署错误:服务缺少ServiceManifest.xml的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆