简体   繁体   English

如何使用PowerShell安装此服务结构项目?

[英]How can I use PowerShell to install this service fabric project?

I have the following folder structure once I package my Service Fabric NS1.NS2.MicroServicesTest project (written in C# , using .NET ): 打包Service Fabric NS1.NS2.MicroServicesTest项目(使用C#编写,使用.NET )后,便具有以下文件夹结构:

pkg
 |-NS1.NS2.MicroServicesTest.MicroServiceA
 |-NS1.NS2.MicroServicesTest.MicroServiceB
 |-NS1.NS2.MicroServicesTest.MicroServiceC
 |-NS1.NS2.MicroServicesTest.MicroServiceD
 |-ApplicationManifest.xml

I am trying to deploy this package using the following PowerShell script: 我正在尝试使用以下PowerShell脚本部署此程序包:

Copy-ServiceFabricApplicationPackage pkg -ImageStoreConnectionString file:C:\SfDevCluster\Data\ImageStoreShare -ApplicationPackagePathInImageStore NS1.NS2.MicroServicesTest
Register-ServiceFabricApplicationType NS1.NS2.MicroServicesTest
New-ServiceFabricApplication fabric:/NS1.NS2.MicroServicesTest NS1.NS2.MicroServicesTest 1.0.0

It fails on the last command, New-ServiceFabricApplication , with the following error: 它在最后一个命令New-ServiceFabricApplication上失败,并显示以下错误:

New-ServiceFabricApplication : Application type and version not found New-ServiceFabricApplication:找不到应用程序类型和版本

Where have I gone wrong? 我哪里出问题了? I have tried to follow this tutorial , albeit it kind of uses a base case in its example, whereas my project has 4 microservices as part of it, and an odd naming convention, which makes it even more confusing... 我尝试按照本教程进行操作 ,尽管在示例中使用了基本案例,而我的项目中包含4个微服务,并且使用了一个奇怪的命名约定,这使它更加令人困惑。

Edit : When I run the Get-ServiceFabricApplicationType command, I see: 编辑 :当我运行Get-ServiceFabricApplicationType命令时,我看到:

ApplicationTypeName    : MicroServicesTestType
ApplicationTypeVersion : 1.0.0
DefaultParameters      : { "MicroServiceA_InstanceCount" = "-1";
                         "MicroServiceB_InstanceCount" = "-1";
                         "MicroServiceC_Endpoint" = "defaultValue";
                         "MicroServiceC_InstanceCount" = "-1";
                         "MicroServiceC_MaxRecords" = "100";
                         "MicroServiceD_InstanceCount" = "-1" }

(from discussion to answer) (从讨论到回答)

  • After registering it, validate that your Application Type shows up when calling 'Get-ServiceFabricApplicationType' 注册后,请在调用“ Get-ServiceFabricApplicationType”时验证您的应用程序类型是否显示

  • Check your Application Type version 1.0.0? 检查您的应用程序类型1.0.0版本?

  • Try using this command: New-ServiceFabricApplication fabric:/ MicroServicesTestType MicroServicesTestType 1.0.0 尝试使用此命令: New-ServiceFabricApplication fabric:/ MicroServicesTestType MicroServicesTestType 1.0.0

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何获取当前Service Fabric应用程序的名称? - How can I get the name of the name of the current Service Fabric application? 如何使用 c# 以编程方式安装系统服务以使用组托管服务帐户 (gMSA)? - How can I programmatically install a system service using c# to use a Group Managed Service Account (gMSA)? 我如何安装Shield项目 - how can i install shield project 如何从C#执行Service Fabric Powershell命令? - How to Execute Service Fabric Powershell commands from c#? ASP.NET MVC + WF + WCF + SERVICE LAYER我如何在一个项目中使用它们? - ASP.NET MVC + WF + WCF + SERVICE LAYER how i can use thats all in one project? 我们如何在服务结构(无状态服务)上执行集成测试? - How we can perform integration test on service fabric (stateless service)? 天蓝色结构服务之外的客户端如何使用WCF服务 - How can the WCF service be consumed by a client that is outside the azure fabric service 如何从Microsoft Azure的Service Fabric中获取资源组名称 - How can I get the resource group name from within Service Fabric on Microsoft Azure 如何配置.NET Core 2.1服务结构服务以在应用程序洞察中自动使用请求和依赖关系跟踪 - How do I configure a .NET Core 2.1 service fabric service to automatically use request and dependency tracking in application insights 我可以使用.Net标准库中的PowerShell类在.Net Framework项目(exe)中使用吗 - Can I use PowerShell class in .Net Standard library to use in .Net Framework project (exe)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM