Service Fabric: The EntryPoint Blah.exe is not found

落花浮王杯 提交于 2019-12-11 02:06:39

问题


I did some project renaming and changed the folder structure and now I can't deploy my service fabric app to my local service fabric cluster.

Register-ServiceFabricApplicationType : The EntryPoint IdentityService.exe is not found.

  • The app was called IdentityApp and is now TheProject.Identity.App
  • The service was called IdentityWeb and is now TheProject.Identity.Service

More Log Details

Started executing script '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

Copying application to image store...

Upload to Image Store succeeded

Registering application type...

Register-ServiceFabricApplicationType : The EntryPoint IdentityService.exe is not found.

FileName: C:\SfDevCluster\Data\ImageBuilderProxy\AppType\IdentityAppType\IdentityServicePkg\ServiceManifest.xml

At 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

Finished executing script 'Deploy-FabricApplication.ps1'.

Time elapsed: 00:00:26.1378123

The PowerShell script failed to execute.


回答1:


In TheProject.Identity.Service\PackageRoot\ServiceManifest.xml I had to change the <Program> to match the new exe name

<!-- 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:


I didn't rename services in my project, but I faced the same error couple of days ago. After a lot of time of deep into the issue, I got its reason finally.

I had this line in service's *.csproj file:

<SelfContained>false</SelfContained>

And after removing this string everything started working. I'm not sure why Azure's team didn't provide the much more obvious error in this case.

Maybe it might be helpful for somebody else.




回答3:


Build configuration was wrong in my case, it was set to release for Debug.

Right click on the solution -> Configuration Manager, change to debug for your project




回答4:


I have also encounter this issue, i got the below two parameters was different in *.csproj file.

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

Maybe it might be helpful for somebody else.



来源:https://stackoverflow.com/questions/47290671/service-fabric-the-entrypoint-blah-exe-is-not-found

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!