2
votes

We got a Azure Service Fabric solution in VS2015 including a number of statefull actors and a website.

As the website is interacting with the actors, the entire local cluster needs to be started before I can run (and debug) the website. I takes about 4 minutes to get everything running!! Most of my changes are performed in the website and I rarely alter the code behind the actors.

Question: Is there a way to run (and debug) the website without rebuilding the entire local serviceFabric cluster?

If I set the web project as startup-project and hit f5 i get a "ReflectionTypeLoadException" when running. If I disable the code which interact with the actors, it runs fine.

4

4 Answers

3
votes

Unfortunately, the deployment times for ASP.NET Core services (aka ASP.NET 5) are currently quite long due to the large number of NuGet packages involved and the fact that they need to be repackaged and redeployed to the cluster for every change. We are working with the ASP.NET team on ways to speed up this debug cycle.

In the interim, if you expect to need to do a lot of iteration on your web project, you could do that work outside the context of a Service Fabric application - that is, create a standalone ASP.NET project - then pull it into the Service Fabric application once things have stabilized.

1
votes

I agree that the slow debug cycle is very annoying and I am looking forward to something better soon.

I have reduced the wait time in the Web App service by separating my back end services in one Service Fabric Application and my Web App in another Service Fabric Application. This means when I am working solely on the Web App, all I need to do is deploy the Application containing the one Web App service. It does help a bit but still far from ideal.

Hope it helps

0
votes

Have you considered doing an upgrade instead of a full deploy? Remember that F5 will delete the whole app and re-install, but if you do an upgrade, it will only re-deploy the service that has changed (in which the website is running).

https://azure.microsoft.com/en-gb/documentation/articles/service-fabric-visualstudio-configure-upgrade/

I appreciate that this is not as smooth as pressing F5, but you could probably automate the process to make it a bit less sucky.

0
votes

The latest update to the Service Fabric SDK supports keeping the cluster & service fabric application alive after you have stopped debugging (See release notes .docx in the SDK download)

There is also a 1-node local cluster configuration available which really speeds up registering & deploying the application during the development process.

"We have also introduced a third "Application Debug Mode" option to support a scenario, where you want your application to remain running in your cluster, after the debugging session has ended. This mode is called "Keep Application". "Application Debug Mode" is a property on the Service Fabric Application project in Visual Studio."

https://blogs.msdn.microsoft.com/azureservicefabric/2016/09/13/release-of-service-fabric-sdk-2-2-207-and-runtime-5-2-207/