Search code examples
azure-service-fabric

Service Fabric: The EntryPoint Blah.exe is not found


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.


Solution

  • 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>