Search code examples
c#azurevisual-studio-2022azure-service-fabric

Azure Service Fabric + VS 2022 + .NET 7


I want to create Azure Service Fabric App working with .NET 7. From what I understood from https://learn.microsoft.com/en-us/azure/service-fabric/service-fabric-versions that latest version supports up to .NET 7. I am working with Visual Studio Professional 2022 (v. 17.8.0) and installed:

  • Azure Service Fabric SDK 7.0.1949.9590
  • Azure Service Fabric Runtime 10.0.1949.9590

While creating a new project in VS (File > New > Project) and choosing Service Fabric Application, the latest framework option is .NET Framework 4.8 (as shown below) enter image description here

I followed official article https://learn.microsoft.com/en-us/azure/service-fabric/service-fabric-get-started but it mentions VS 2017 and 2019. Is there anything else that I need to support .NET 7 in Azure Service Fabric template?

Thanks for any hints!


Solution

  • the latest framework option is .NET Framework 4.8

    In Visual Studio Installer, click on Modify option to check the Runtime versions.

    enter image description here

    • Install the required CORE Versions.

    enter image description here

    • Yes, when you check the Service Fabric Application, in the first template it shows only the framework version.

    • Select any of the framework and click on any service under .NET Core.

    enter image description here

    • Click on Create, here you will get an option to select the .NET Core Version along with the template.

    enter image description here

    • You can also check the version of CORE in .csproj file of the Web App.

    enter image description here

    Refer this blog by Mike Rousos for more details.