I am testing Service Fabric along with a friend. We started with a .Net Core ASP MVC site Service (scaffolded out of the box). Then we added this .gitignore file.
I built/deployed and tested the solution on my PC and everything is ok. Then I pushed it, my friend cloned the repository and did a git clean -xfd
on it. He proceded to Reset his Local Cluster.
To our surprise, he has the following error:
Creating application...New-ServiceFabricApplication : Application type and version not foundAt C:\Program Files\Microsoft SDKs\Service Fabric\Tools\PSModule\ServiceFabricSDK\Publish-NewServiceFabricApplication.ps1:279 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:00.8107824
I tried to replicate by doing: `git clean -xfd/reset cluster/rebuild/deploy but it works on my PC. So we thought it might be a problem on our .gitignore file.
I commented out the entire .gitignore file and pushed the code. He re-downloaded the branch and again, the same problem.
He has a working PC where he is capable of deploying a new solution created by him. Following the same steps I did on my PC for my own version of the solution. The problem is when we checkout each others branches from git that these problems happen.
You can see our code in here.
Is there any particular configuration to add in the .gitignore file that we don't know about?
Thanks for your help!
I have found the source of my problem. The solution has a build definition for Any CPU. The machine that creates first the project form the Visual Studio template will always build first. However, when you share it, the recipient PC won't build unless you delete the Any CPU definition from the solution and set it to build only in x64. We have taken as practice to delete the Any CPU definition from the .sln file for any project before commiting our code and sharing it. I hope it works for you guys!