We've updated our Visual Studio 2017 Service Fabric Tools Preview to make deploying and debugging containerized applications on Service Fabric easier than ever before. To get the latest tools preview, install the Visual Studio Service Fabric Tools Preview extension for Visual Studio 2017.
Containerize .NET Framework projects and run them on Service Fabric
Service Fabric is a general container orchestration platform, so we've made it incredibly easy to take any .NET Framework console or ASP.NET application, and with a few clicks make it a containerized service that runs on Service Fabric. By right clicking on your project and selecting Add --> Docker Support for Service Fabric, this will create a Docker file in your project and a Service Fabric package root directory that you would see with typical Service Fabric Service projects. If your project is part of a solution with an existing Service Fabric application, it will be added to that application automatically, otherwise a new Service Fabric application will be created automatically for you.
Debug containers running on Service Fabric
Not only can you easily containerize existing .NET projects and run them on Service Fabric with just a few clicks, but now you can also debug the code running inside the container instance as it runs on Service Fabric. Just hit F5 to get full debugging support within VS as your application runs in a container on Service Fabric!
Note that debugging is currently only supported on Windows Server 2016 at this time.
Publish your containerized application to Service Fabric
When it's time to publish your application to Azure the Publish dialog in Visual Studio will prompt you for an Azure Container Registry to push your image to. We have also added support to the Visual Studio Team Services (VSTS) deployment task to handle these containerized applications.