Alexandru Alexandru - 1 year ago 171
C# Question

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

I have the following folder structure once I package my Service Fabric

project (written in
, using


I am trying to deploy this package using the following

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,
, with the following error:

New-ServiceFabricApplication : Application type and version not found

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

Edit: When I run the
command, I see:

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

Answer Source

(from discussion to answer)

  • After registering it, validate that your Application Type shows up when calling 'Get-ServiceFabricApplicationType'

  • Check your Application Type version 1.0.0?

  • Try using this command: New-ServiceFabricApplication fabric:/ MicroServicesTestType MicroServicesTestType 1.0.0

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download