title: Service fabric local cluster Manager: Failed to set up local Cluster
body: <p>I followed the instructions to build a basic Service fabric Application from:
      <a href="https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-get-started" rel="nofollow noreferrer">https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-get-started</a></p>
  
  <p>I created a Statefull/Stateless Service fabric application Using VS 2017. I have the latest Azure Service fabric SDK installed on my machine. When I run my application i.e. press (F5), I am getting the following error:</p>
  
  <pre><code>    1&gt;------ Build started: Project: MySericeFab1, Configuration: Debug x64 ------
  2&gt;------ Deploy started: Project: MySericeFab1, Configuration: Debug x64 ------
  2&gt;Started executing script 'GetApplicationExistence'.
  2&gt;Finished executing script 'GetApplicationExistence'.
  2&gt;Time elapsed: 00:00:00.3874969
  2&gt;Started executing script 'Set-LocalClusterReady'.
  2&gt;powershell -NonInteractive -NoProfile -WindowStyle Hidden -ExecutionPolicy Bypass -Command "Import-Module 'C:\Program Files\Microsoft SDKs\Service Fabric\Tools\Scripts\DefaultLocalClusterSetup.psm1'; Set-LocalClusterReady -createOneNodeCluster $true"
  2&gt;Get-Module : A parameter cannot be found that matches parameter name 'Refresh'.
  2&gt;At C:\Program Files\Microsoft SDKs\Service Fabric\Tools\Scripts\DefaultLocalClu
  2&gt;sterSetup.psm1:16 char:39
  2&gt;+     Get-Module -ListAvailable -Refresh &lt;&lt;&lt;&lt;  --quiet *&gt;$null
  2&gt;    + CategoryInfo          : InvalidArgument: (:) [Get-Module], ParameterBind 
  2&gt;   ingException
  2&gt;    + FullyQualifiedErrorId : NamedParameterNotFound,Microsoft.PowerShell.Comm 
  2&gt;   ands.GetModuleCommand
  2&gt; 
  2&gt;--------------------------------------------
  2&gt;Local Service Fabric Cluster is not setup...
  2&gt;Please wait while we setup the Local Service Fabric Cluster. This may take few minutes...
  2&gt;WARNING: System.Management.Automation.CommandNotFoundException: The term 
  2&gt;'Remove-ServiceFabricNodeConfiguration' is not recognized as the name of a 
  2&gt;cmdlet, function, script file, or operable program. Check the spelling of the 
  2&gt;name, or if a path was included, verify that the path is correct and try 
  2&gt;again.
  2&gt;
  2&gt;   at System.Management.Automation.CommandDiscovery.LookupCommandInfo(String 
  2&gt;commandName, CommandOrigin commandOrigin)
  2&gt;
  2&gt;   at 
  2&gt;System.Management.Automation.CommandDiscovery.LookupCommandProcessor(String 
  2&gt;commandName, CommandOrigin commandOrigin, Nullable`1 useLocalScope)
  2&gt;
  2&gt;   at System.Management.Automation.ExecutionContext.CreateCommand(String 
  2&gt;command)
  2&gt;
  2&gt;   at System.Management.Automation.CommandNode.CreateCommandProcessor(Int32&amp; 
  2&gt;index, ExecutionContext context)
  2&gt;
  2&gt;   at System.Management.Automation.CommandNode.AddToPipeline(PipelineProcessor 
  2&gt;pipeline, ExecutionContext context)
  2&gt;
  2&gt;   at System.Management.Automation.PipelineNode.Execute(Array input, Pipe 
  2&gt;outputPipe, ArrayList&amp; resultList, ExecutionContext context)
  2&gt;
  2&gt;   at 
  2&gt;System.Management.Automation.StatementListNode.ExecuteStatement(ParseTreeNode 
  2&gt;statement, Array input, Pipe outputPipe, ArrayList&amp; resultList, 
  2&gt;ExecutionContext context)
  2&gt;WARNING: Remove-ServiceFabricNodeConfiguration throws exceptions
  2&gt;Method invocation failed because [System.String] doesn't contain a method named
  2&gt; 'IsNullOrWhiteSpace'.
  2&gt;At C:\Program Files\Microsoft SDKs\Service Fabric\Tools\Scripts\ClusterSetupUti
  2&gt;lities.psm1:384 char:43
  2&gt;+     if([System.String]::IsNullOrWhiteSpace &lt;&lt;&lt;&lt; ($clusterDataRoot)){
  2&gt;    + CategoryInfo          : InvalidOperation: (IsNullOrWhiteSpace:String) [] 
  2&gt;   , RuntimeException
  2&gt;    + FullyQualifiedErrorId : MethodNotFound
  2&gt; 
  2&gt;Method invocation failed because [System.String] doesn't contain a method named
  2&gt; 'IsNullOrWhiteSpace'.
  2&gt;At C:\Program Files\Microsoft SDKs\Service Fabric\Tools\Scripts\ClusterSetupUti
  2&gt;lities.psm1:388 char:43
  2&gt;+     if([System.String]::IsNullOrWhiteSpace &lt;&lt;&lt;&lt; ($clusterLogRoot)){
  2&gt;    + CategoryInfo          : InvalidOperation: (IsNullOrWhiteSpace:String) [] 
  2&gt;   , RuntimeException
  2&gt;    + FullyQualifiedErrorId : MethodNotFound
  2&gt; 
  2&gt;Method invocation failed because [System.String] doesn't contain a method named
  2&gt; 'IsNullOrWhiteSpace'.
  2&gt;At C:\Program Files\Microsoft SDKs\Service Fabric\Tools\Scripts\ClusterSetupUti
  2&gt;lities.psm1:348 char:43
  2&gt;+     if([System.String]::IsNullOrWhiteSpace &lt;&lt;&lt;&lt; ($clusterRoot))
  2&gt;    + CategoryInfo          : InvalidOperation: (IsNullOrWhiteSpace:String) [] 
  2&gt;   , RuntimeException
  2&gt;    + FullyQualifiedErrorId : MethodNotFound
  2&gt; 
  2&gt;Method invocation failed because [System.String] doesn't contain a method named
  2&gt; 'IsNullOrWhiteSpace'.
  2&gt;At C:\Program Files\Microsoft SDKs\Service Fabric\Tools\Scripts\ClusterSetupUti
  2&gt;lities.psm1:348 char:43
  2&gt;+     if([System.String]::IsNullOrWhiteSpace &lt;&lt;&lt;&lt; ($clusterRoot))
  2&gt;    + CategoryInfo          : InvalidOperation: (IsNullOrWhiteSpace:String) [] 
  2&gt;   , RuntimeException
  2&gt;    + FullyQualifiedErrorId : MethodNotFound
  2&gt; 
  2&gt;
  2&gt;Using Cluster Data Root: 
  2&gt;Using Cluster Log Root: 
  2&gt;
  2&gt;Test-Path : Cannot bind argument to parameter 'Path' because it is an empty str
  2&gt;ing.
  2&gt;At C:\Program Files\Microsoft SDKs\Service Fabric\Tools\Scripts\ClusterSetupUti
  2&gt;lities.psm1:41 char:41
  2&gt;+         $isPathExists = (Test-Path -Path &lt;&lt;&lt;&lt;  $pathToTest -ErrorAction Silen
  2&gt;tlyContinue -ErrorVariable testErrors)
  2&gt;    + CategoryInfo          : InvalidData: (:) [Test-Path], ParameterBindingVa 
  2&gt;   lidationException
  2&gt;    + FullyQualifiedErrorId : ParameterArgumentValidationErrorEmptyStringNotAl 
  2&gt;   lowed,Microsoft.PowerShell.Commands.TestPathCommand
  2&gt; 
  2&gt;Test-Path : Cannot bind argument to parameter 'Path' because it is an empty str
  2&gt;ing.
  2&gt;At C:\Program Files\Microsoft SDKs\Service Fabric\Tools\Scripts\ClusterSetupUti
  2&gt;lities.psm1:41 char:41
  2&gt;+         $isPathExists = (Test-Path -Path &lt;&lt;&lt;&lt;  $pathToTest -ErrorAction Silen
  2&gt;tlyContinue -ErrorVariable testErrors)
  2&gt;    + CategoryInfo          : InvalidData: (:) [Test-Path], ParameterBindingVa 
  2&gt;   lidationException
  2&gt;    + FullyQualifiedErrorId : ParameterArgumentValidationErrorEmptyStringNotAl 
  2&gt;   lowed,Microsoft.PowerShell.Commands.TestPathCommand
  2&gt; 
  2&gt;The term 'ConvertFrom-Json' is not recognized as the name of a cmdlet, function
  2&gt;, script file, or operable program. Check the spelling of the name, or if a pat
  2&gt;h was included, verify that the path is correct and try again.
  2&gt;At C:\Program Files\Microsoft SDKs\Service Fabric\Tools\Scripts\ClusterSetupUti
  2&gt;lities.psm1:218 char:69
  2&gt;+     $configJson = Get-Content $jsonFileTemplate -Raw | ConvertFrom-Json &lt;&lt;&lt;&lt; 
  2&gt;    + CategoryInfo          : ObjectNotFound: (ConvertFrom-Json:String) [], Co 
  2&gt;   mmandNotFoundException
  2&gt;    + FullyQualifiedErrorId : CommandNotFoundException
  2&gt; 
  2&gt;Property 'fabricSettings' cannot be found on this object; make sure it exists a
  2&gt;nd is settable.
  2&gt;At C:\Program Files\Microsoft SDKs\Service Fabric\Tools\Scripts\ClusterSetupUti
  2&gt;lities.psm1:225 char:32
  2&gt;+         $configJson.properties. &lt;&lt;&lt;&lt; fabricSettings += $setupSetting
  2&gt;    + CategoryInfo          : InvalidOperation: (fabricSettings:String) [], Ru 
  2&gt;   ntimeException
  2&gt;    + FullyQualifiedErrorId : PropertyNotFound
  2&gt; 
  2&gt;The term 'ConvertTo-Json' is not recognized as the name of a cmdlet, function, 
  2&gt;script file, or operable program. Check the spelling of the name, or if a path 
  2&gt;was included, verify that the path is correct and try again.
  2&gt;At C:\Program Files\Microsoft SDKs\Service Fabric\Tools\Scripts\ClusterSetupUti
  2&gt;lities.psm1:274 char:30
  2&gt;+     $jsonObject = ConvertTo-Json &lt;&lt;&lt;&lt;  $configJson -Depth 10
  2&gt;    + CategoryInfo          : ObjectNotFound: (ConvertTo-Json:String) [], Comm 
  2&gt;   andNotFoundException
  2&gt;    + FullyQualifiedErrorId : CommandNotFoundException
  2&gt; 
  2&gt;The generated json path is C:\Users\kmayank\AppData\Local\Temp\tmp5B12.tmp.json
  2&gt;Exception calling "LoadFrom" with "1" argument(s): "Could not load file or asse
  2&gt;mbly 'file:///C:\Program Files\Microsoft Service Fabric\bin\Fabric\Fabric.Code\
  2&gt;Microsoft.ServiceFabric.DeploymentManager.dll' or one of its dependencies. This
  2&gt; assembly is built by a runtime newer than the currently loaded runtime and can
  2&gt;not be loaded."
  2&gt;At C:\Program Files\Microsoft SDKs\Service Fabric\Tools\Scripts\ClusterSetupUti
  2&gt;lities.psm1:171 char:33
  2&gt;+     [Reflection.Assembly]::LoadFrom &lt;&lt;&lt;&lt; ($deploymentmangager) &gt; $null
  2&gt;    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
  2&gt;    + FullyQualifiedErrorId : DotNetMethodException
  2&gt; 
  2&gt;Unable to find type [Microsoft.ServiceFabric.DeploymentManager.Common.Standalon
  2&gt;eUtility]: make sure that the assembly containing this type is loaded.
  2&gt;At C:\Program Files\Microsoft SDKs\Service Fabric\Tools\Scripts\ClusterSetupUti
  2&gt;lities.psm1:172 char:94
  2&gt;+     $manifestFileTemplate = [Microsoft.ServiceFabric.DeploymentManager.Common
  2&gt;.StandaloneUtility] &lt;&lt;&lt;&lt; ::GetClusterManifestFromJsonConfig($jsonTemplate, "", 
  2&gt;"")
  2&gt;    + CategoryInfo          : InvalidOperation: (Microsoft.Servi...andaloneUti 
  2&gt;   lity:String) [], RuntimeException
  2&gt;    + FullyQualifiedErrorId : TypeNotFound
  2&gt; 
  2&gt;Join-Path : Cannot bind argument to parameter 'Path' because it is an empty str
  2&gt;ing.
  2&gt;At C:\Program Files\Microsoft SDKs\Service Fabric\Tools\Scripts\ClusterSetupUti
  2&gt;lities.psm1:431 char:43
  2&gt;+         $ImageStoreShare = Join-Path -Path &lt;&lt;&lt;&lt;  $clusterDataRoot -ChildPath 
  2&gt;"ImageStoreShare"
  2&gt;    + CategoryInfo          : InvalidData: (:) [Join-Path], ParameterBindingVa 
  2&gt;   lidationException
  2&gt;    + FullyQualifiedErrorId : ParameterArgumentValidationErrorEmptyStringNotAl 
  2&gt;   lowed,Microsoft.PowerShell.Commands.JoinPathCommand
  2&gt; 
  2&gt;New-Item : Cannot bind argument to parameter 'Path' because it is an empty stri
  2&gt;ng.
  2&gt;At C:\Program Files\Microsoft SDKs\Service Fabric\Tools\Scripts\ClusterSetupUti
  2&gt;lities.psm1:433 char:17
  2&gt;+         New-Item &lt;&lt;&lt;&lt;  "$ImageStoreShare" -type directory -force &gt; $null
  2&gt;    + CategoryInfo          : InvalidData: (:) [New-Item], ParameterBindingVal 
  2&gt;   idationException
  2&gt;    + FullyQualifiedErrorId : ParameterArgumentValidationErrorEmptyStringNotAl 
  2&gt;   lowed,Microsoft.PowerShell.Commands.NewItemCommand
  2&gt; 
  2&gt;Get-Acl : Cannot validate argument on parameter 'Path'. The argument is null or
  2&gt; empty. Supply an argument that is not null or empty and then try the command a
  2&gt;gain.
  2&gt;At C:\Program Files\Microsoft SDKs\Service Fabric\Tools\Scripts\ClusterSetupUti
  2&gt;lities.psm1:25 char:23
  2&gt;+     $currAcl = Get-Acl &lt;&lt;&lt;&lt;  "$folderPath"
  2&gt;    + CategoryInfo          : InvalidData: (:) [Get-Acl], ParameterBindingVali 
  2&gt;   dationException
  2&gt;    + FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.Power 
  2&gt;   Shell.Commands.GetAclCommand
  2&gt; 
  2&gt;You cannot call a method on a null-valued expression.
  2&gt;At C:\Program Files\Microsoft SDKs\Service Fabric\Tools\Scripts\ClusterSetupUti
  2&gt;lities.psm1:29 char:27
  2&gt;+     $currAcl.SetAccessRule &lt;&lt;&lt;&lt; ($accessRuleWinFabAdmin)
  2&gt;    + CategoryInfo          : InvalidOperation: (SetAccessRule:String) [], Run 
  2&gt;   timeException
  2&gt;    + FullyQualifiedErrorId : InvokeMethodOnNull
  2&gt; 
  2&gt;Set-Acl : Cannot bind argument to parameter 'Path' because it is an empty strin
  2&gt;g.
  2&gt;At C:\Program Files\Microsoft SDKs\Service Fabric\Tools\Scripts\ClusterSetupUti
  2&gt;lities.psm1:31 char:12
  2&gt;+     Set-Acl &lt;&lt;&lt;&lt;  "$folderPath" $currAcl
  2&gt;    + CategoryInfo          : InvalidData: (:) [Set-Acl], ParameterBindingVali 
  2&gt;   dationException
  2&gt;    + FullyQualifiedErrorId : ParameterArgumentValidationErrorEmptyStringNotAl 
  2&gt;   lowed,Microsoft.PowerShell.Commands.SetAclCommand
  2&gt; 
  2&gt;Copy-Item : Cannot bind argument to parameter 'Path' because it is an empty str
  2&gt;ing.
  2&gt;At C:\Program Files\Microsoft SDKs\Service Fabric\Tools\Scripts\ClusterSetupUti
  2&gt;lities.psm1:486 char:14
  2&gt;+     Copy-Item &lt;&lt;&lt;&lt;  $manifestFileTemplate $manifestFile -Force
  2&gt;    + CategoryInfo          : InvalidData: (:) [Copy-Item], ParameterBindingVa 
  2&gt;   lidationException
  2&gt;    + FullyQualifiedErrorId : ParameterArgumentValidationErrorEmptyStringNotAl 
  2&gt;   lowed,Microsoft.PowerShell.Commands.CopyItemCommand
  2&gt; 
  2&gt;Get-Content : Cannot find path 'C:\Users\kmayank\AppData\Local\Temp\VBS-CHD-FLT
  2&gt;-T02-Server-ScaleMin.xml' because it does not exist.
  2&gt;At C:\Program Files\Microsoft SDKs\Service Fabric\Tools\Scripts\ClusterSetupUti
  2&gt;lities.psm1:456 char:17
  2&gt;+     (Get-Content &lt;&lt;&lt;&lt;  $filePath) | ForEach-Object {$_ -replace $toReplace, $
  2&gt;newString } | Set-Content $filePath
  2&gt;    + CategoryInfo          : ObjectNotFound: (C:\Users\kmayan...er-ScaleMin.x 
  2&gt;   ml:String) [Get-Content], ItemNotFoundException
  2&gt;    + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetCo 
  2&gt;   ntentCommand
  2&gt; 
  2&gt;Get-Content : Cannot find path 'C:\Users\kmayank\AppData\Local\Temp\VBS-CHD-FLT
  2&gt;-T02-Server-ScaleMin.xml' because it does not exist.
  2&gt;At C:\Program Files\Microsoft SDKs\Service Fabric\Tools\Scripts\ClusterSetupUti
  2&gt;lities.psm1:456 char:17
  2&gt;+     (Get-Content &lt;&lt;&lt;&lt;  $filePath) | ForEach-Object {$_ -replace $toReplace, $
  2&gt;newString } | Set-Content $filePath
  2&gt;    + CategoryInfo          : ObjectNotFound: (C:\Users\kmayan...er-ScaleMin.x 
  2&gt;   ml:String) [Get-Content], ItemNotFoundException
  2&gt;    + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetCo 
  2&gt;   ntentCommand
  2&gt; 
  2&gt;The term 'Test-ServiceFabricClusterManifest' is not recognized as the name of a
  2&gt; cmdlet, function, script file, or operable program. Check the spelling of the 
  2&gt;name, or if a path was included, verify that the path is correct and try again.
  2&gt;At C:\Program Files\Microsoft SDKs\Service Fabric\Tools\Scripts\ClusterSetupUti
  2&gt;lities.psm1:504 char:38
  2&gt;+     Test-ServiceFabricClusterManifest &lt;&lt;&lt;&lt;  -ClusterManifestPath "$manifestFi
  2&gt;le" &gt; $null
  2&gt;    + CategoryInfo          : ObjectNotFound: (Test-ServiceFabricClusterManife 
  2&gt;   st:String) [], CommandNotFoundException
  2&gt;    + FullyQualifiedErrorId : CommandNotFoundException
  2&gt; 
  2&gt;PrepareClusterManifest : Could not validate cluster manifest 'C:\Users\kmayank\
  2&gt;AppData\Local\Temp\VBS-CHD-FLT-T02-Server-ScaleMin.xml'
  2&gt;At C:\Program Files\Microsoft SDKs\Service Fabric\Tools\Scripts\ClusterSetupUti
  2&gt;lities.psm1:530 char:43
  2&gt;+     $manifestFile = PrepareClusterManifest &lt;&lt;&lt;&lt;  $manifestFileTemplate $image
  2&gt;StoreConnectionString $machineName $isSecure
  2&gt;    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorExcep 
  2&gt;   tion
  2&gt;    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorExceptio 
  2&gt;   n,PrepareClusterManifest
  2&gt; 
  2&gt;ScriptHalted
  2&gt;At C:\Program Files\Microsoft SDKs\Service Fabric\Tools\Scripts\ClusterSetupUti
  2&gt;lities.psm1:508 char:14
  2&gt;+         throw &lt;&lt;&lt;&lt; 
  2&gt;    + CategoryInfo          : OperationStopped: (:) [], RuntimeException
  2&gt;    + FullyQualifiedErrorId : ScriptHalted
  2&gt; 
  2&gt;Finished executing script 'Set-LocalClusterReady'.
  2&gt;Time elapsed: 00:00:01.0454352
  2&gt;The PowerShell script failed to execute.
  ========== Build: 1 succeeded, 0 failed, 1 up-to-date, 0 skipped ==========
  ========== Deploy: 0 succeeded, 1 failed, 0 skipped ==========
  </code></pre>
  
  <ul>
  <li>Power Shell Failed to Execute Message is displayed in Error List.</li>
  <li>I have opened VS as well as Power Shell in Administrator mode.</li>
  <li>I followed few links which states to run CleanCluster.ps1 , run DevClusterSetup or Uninstall and reinstall SDK, but didn't worked. <a href="https://i.stack.imgur.com/bl32A.png" rel="nofollow noreferrer">RemoveServicefabricnodeConfigutation is not recognized</a></li>
  <li>I tried clicking up the tray Icon Fabric Manager > Set up local Cluster > Node 1, but it fails again.<a href="https://i.stack.imgur.com/xukHo.png" rel="nofollow noreferrer">Fabric Service Manager tray</a></li>
  </ul>
  
  <p>Pleas assist as I am stuck here.</p>