【问题标题】:Service Fabric: The EntryPoint Blah.exe is not foundService Fabric:找不到入口点 Blah.exe
【发布时间】:2018-04-27 16:33:50
【问题描述】:

我进行了一些项目重命名并更改了文件夹结构,现在我无法将我的 Service Fabric 应用程序部署到我的本地 Service Fabric 集群。

Register-ServiceFabricApplicationType : 未找到 EntryPoint IdentityService.exe。

  • 应用程序被称为IdentityApp,现在是TheProject.Identity.App
  • 服务被称为IdentityWeb,现在是TheProject.Identity.Service

更多日志详情

开始执行脚本“Deploy-FabricApplication.ps1”。

。 'C:\Users\mdepouw\source\repos\TheProject\TheProject.IdentityDomain\TheProject.Identity.App\Scripts\Deploy-FabricApplication.ps1'-ApplicationPackagePath 'C:\Users\mdepouw\source\repos\TheProject\TheProject. IdentityDomain\TheProject.Identity.App\pkg\Debug'-PublishProfileFile'C:\Users\mdepouw\source\repos\TheProject\TheProject.IdentityDomain\TheProject.Identity.App\PublishProfiles\Local.5Node.xml'-DeployOnly:$ true -ApplicationParameter:@{} -UnregisterUnusedApplicationVersionsAfterUpgrade $false -OverrideUpgradeBehavior 'None' -OverwriteBehavior 'Always' -SkipPackageValidation:$true -ErrorAction Stop

正在将应用程序复制到图像存储...

上传到图片存储成功

正在注册应用程序类型...

Register-ServiceFabricApplicationType : 未找到 EntryPoint IdentityService.exe。

文件名:C:\SfDevCluster\Data\ImageBuilderProxy\AppType\IdentityAppType\IdentityServicePkg\ServiceManifest.xml

在 C:\Program Files\Microsoft SDKs\Service

Fabric\Tools\PSModule\ServiceFabricSDK\Publish-NewServiceFabricApplication.ps1:251 char:9

  • Register-ServiceFabricApplicationType -ApplicationPathInImage ...

  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~

    • CategoryInfo : InvalidOperation: (Microsoft.Servi...usterConnection:ClusterConnection) [Register-Servic

    eFabricApplicationType], FabricException

    • FullyQualifiedErrorId : RegisterApplicationTypeErrorId,Microsoft.ServiceFabric.Powershell.RegisterApplicationType

已完成执行脚本“Deploy-FabricApplication.ps1”。

经过时间:00:00:26.1378123

PowerShell 脚本执行失败。

【问题讨论】:

    标签: azure-service-fabric


    【解决方案1】:

    TheProject.Identity.Service\PackageRoot\ServiceManifest.xml 中,我必须更改<Program> 以匹配新的exe 名称

    <!-- Code package is your service executable. -->
    <CodePackage Name="Code" Version="1.0.0">
        <EntryPoint>
          <ExeHost>
            <Program>TheProject.Identity.Service.exe</Program>
            <WorkingFolder>CodePackage</WorkingFolder>
          </ExeHost>
        </EntryPoint>
    </CodePackage>
    

    【讨论】:

      【解决方案2】:

      我没有在我的项目中重命名服务,但几天前我遇到了同样的错误。经过大量时间深入研究这个问题,我终于明白了它的原因。

      我在服务的 *.csproj 文件中有这一行:

      <SelfContained>false</SelfContained>
      

      删除此字符串后,一切都开始工作了。我不确定为什么 Azure 的团队在这种情况下没有提供更明显的错误。

      也许它可能对其他人有帮助。

      【讨论】:

      【解决方案3】:

      在我的情况下构建配置错误,它被设置为发布调试。

      右击解决方案->配置管理器,改为调试你的项目

      【讨论】:

        【解决方案4】:

        我也遇到过这个问题,我得到以下两个参数在 *.csproj 文件中是不同的。

        <AssemblyName>servicename</AssemblyName>
        <RootNamespace>servicename</RootNamespace>
        

        也许它可能对其他人有帮助。

        【讨论】:

          【解决方案5】:

          即使我也面临同样的问题。我如下更新了 serviceManifest.xml 并解决了问题

          <CodePackage Name="Code" Version="1.0.0">
            <SetupEntryPoint>
                <ExeHost>
                  <Program>SetupEntryPointTasks.exe</Program>
                  <ConsoleRedirection FileRetentionCount="5" FileMaxSizeInKb="20480"/>
                </ExeHost>
              </SetupEntryPoint>
              <EntryPoint>
                <ExeHost>
                  <Program>aaa.exe</Program>
                  <ConsoleRedirection FileRetentionCount="5" FileMaxSizeInKb="20480" />
                </ExeHost>
              </EntryPoint>
            </CodePackage>
          

          【讨论】:

            猜你喜欢
            • 1970-01-01
            • 2016-02-22
            • 2021-04-12
            • 2019-07-02
            • 1970-01-01
            • 2019-11-07
            • 2020-06-02
            • 2017-06-12
            • 2017-06-23
            相关资源
            最近更新 更多