3
votes

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.

5

5 Answers

8
votes

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
votes

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.

1
votes

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.

0
votes

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

0
votes

Even I faced the same problem . I updated the serviceManifest.xml as below and got the issue resolved

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