Service Fabric App部署不创建服务

时间:2017-11-14 18:04:48

标签: azure-service-fabric

当我通过Visual Studio 2017将我的服务架构应用程序部署到本地群集时,我的服务 创建。我必须手动进入Service Fabric Explorer点击创建。为什么呢?

cluster management screenshot

后台:我做了一些项目重新命名和移动文件夹。我认为这打破了以往的工作。

Service Fabric Tools的

输出窗口

Started executing script 'Publish-NewServiceFabricApplication'.
[void](Connect-ServiceFabricCluster); Import-Module 'C:\Program Files\Microsoft SDKs\Service Fabric\Tools\PSModule\ServiceFabricSDK\ServiceFabricSDK.psm1'; Publish-NewServiceFabricApplication -ApplicationPackagePath 'C:\Users\mdepouw\source\repos\The Repo\TheProject.IdentityDomain\TheProject.Identity.App\pkg\Debug' -ApplicationParameterFilePath 'C:\Users\mdepouw\source\repos\The Repo\TheProject.IdentityDomain\TheProject.Identity.App\PublishProfiles\..\ApplicationParameters\Local.5Node.xml' -ApplicationParameter @{_WFDebugParams_='[{"""CodePackageName""":"""Code""","""CodePackageLinkFolder""":null,"""ConfigPackageName""":null,"""ConfigPackageLinkFolder""":null,"""DataPackageName""":null,"""DataPackageLinkFolder""":null,"""LockFile""":null,"""WorkingFolder""":null,"""ServiceManifestName""":"""IdentityServicePkg""","""EntryPointType""":"""Main""","""DebugExePath""":"""C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Enterprise\\Common7\\Packages\\Debugger\\VsDebugLaunchNotify.exe""","""DebugArguments""":""" {83288f71-0cb5-49bc-b56b-f212d6fc8486} -p [ProcessId] -tid [ThreadId]""","""DebugParametersFile""":null}]'} -Action Create -SkipPackageValidation:$true -ErrorAction Stop
Creating application...


ApplicationName        : fabric:/IdentityApp
ApplicationTypeName    : IdentityAppType
ApplicationTypeVersion : 1.0.0
ApplicationParameters  : { "_WFDebugParams_" = "[{"CodePackageName":"Code","CodePackageLinkFolder":null,"ConfigPackageN
                         ame":null,"ConfigPackageLinkFolder":null,"DataPackageName":null,"DataPackageLinkFolder":null,"
                         LockFile":null,"WorkingFolder":null,"ServiceManifestName":"IdentityServicePkg","EntryPointType
                         ":"Main","DebugExePath":"C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Enterprise\\C
                         ommon7\\Packages\\Debugger\\VsDebugLaunchNotify.exe","DebugArguments":" 
                         {83288f71-0cb5-49bc-b56b-f212d6fc8486} -p [ProcessId] -tid 
                         [ThreadId]","DebugParametersFile":null}]" }

Create application succeeded.


Finished executing script 'Publish-NewServiceFabricApplication'.
Time elapsed: 00:00:07.2779519
Started executing script 'Get-ServiceFabricApplicationStatus'.
[void](Connect-ServiceFabricCluster); Import-Module 'C:\Program Files\Microsoft SDKs\Service Fabric\Tools\PSModule\ServiceFabricSDK\ServiceFabricSDK.psm1'; Get-ServiceFabricApplicationStatus -ApplicationName 'fabric:/IdentityApp' -ErrorAction Stop
The application has started.
Service Status:

The application is ready.
Finished executing script 'Get-ServiceFabricApplicationStatus'.
Time elapsed: 00:00:04.7490158
Launching the browser with URL https://localhost:44300/ to open the application.Started executing script 'Unpublish-ServiceFabricApplication'.
[void](Connect-ServiceFabricCluster); Import-Module 'C:\Program Files\Microsoft SDKs\Service Fabric\Tools\PSModule\ServiceFabricSDK\ServiceFabricSDK.psm1'; Unpublish-ServiceFabricApplication -ApplicationName 'fabric:/IdentityApp' -ErrorAction Stop
Removing application...
Remove application instance succeeded
Finished executing script 'Unpublish-ServiceFabricApplication'.
Time elapsed: 00:00:08.9813491
Started executing script 'UnregisterApplicationType'.
[void](Connect-ServiceFabricCluster); Import-Module 'C:\Program Files\Microsoft SDKs\Service Fabric\Tools\PSModule\ServiceFabricSDK\ServiceFabricSDK.psm1'; if (Get-ServiceFabricApplicationType -ApplicationTypeName 'IdentityAppType' | Where-Object { $_.ApplicationTypeVersion -eq '1.0.0' }) { Unregister-ServiceFabricApplicationType -ApplicationTypeName 'IdentityAppType' -ApplicationTypeVersion '1.0.0' -ErrorAction Stop -Force }
Unregister application type succeeded.
Finished executing script 'UnregisterApplicationType'.
Time elapsed: 00:00:07.9996788
Launching the browser with URL https://localhost:44300/ to open the application.

1 个答案:

答案 0 :(得分:0)

ApplicationManifest.xml我必须定义我想要的<DefaultServices>

<DefaultServices>
    <!-- The section below creates instances of service types, when an instance of this 
         application type is created. You can also create one or more instances of service type using the 
         ServiceFabric PowerShell module.

         The attribute ServiceTypeName below must match the name defined in the imported ServiceManifest.xml file. -->
    <Service Name="Identity">
      <StatelessService ServiceTypeName="IdentityService" InstanceCount="[Identity_InstanceCount]">
        <SingletonPartition />
      </StatelessService>
    </Service>
</DefaultServices>