I have Visual Studio 2017 and I about to start working with Azure-Service-Fabric (C#).
Just created an Azure Service Fabric application, with stateless service and try to run it. Empty project. No changes on the code-template.
I'm getting this message on the output window:
Creating application...
New-ServiceFabricApplication : Application type and version not found
At C:\Program Files\Microsoft SDKs\Service
Fabric\Tools\PSModule\ServiceFabricSDK\Publish-NewServiceFabricApplication.ps1:358 char:9
+ New-ServiceFabricApplication -ApplicationName $ApplicationNam ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (Microsoft.Servi...usterConnection:ClusterConnection) [New-ServiceFabr
icApplication], FabricElementNotFoundException
+ FullyQualifiedErrorId : CreateApplicationInstanceErrorId,Microsoft.ServiceFabric.Powershell.NewApplication
Finished executing script 'Publish-NewServiceFabricApplication'.
Time elapsed: 00:00:07.4935602
The projects build is passed successfully. Starting to run and then stopped. No other indication to problem except the output window.
What I missing? How to fix?
Found the problem.
Just change the Azure-Service-Project configuration from "Any CPU" to "x64". Now it's working!
(Don't forget to run it in "Administrator" mode)
Publish-NewServiceFabricApplication.ps1
script takes the application type and version from the ApplicationManifest.xml
of your service fabric application. Please check if you have this file and if the second line has ApplicationTypeVersion
and ApplicationTypeName
specified. It should look similar to this:
<ApplicationManifest xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ApplicationTypeName="MyAppType" ApplicationTypeVersion="1.0.0" xmlns="http://schemas.microsoft.com/2011/01/fabric">
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With