Is there a way to get a Service fabric project template for Stateless ASP.Net Core 2.1


Is there a way to get a Service fabric project template for Stateless ASP.Net Core 2.1



After installing .net core 2.1 sdk. When I created Service Fabric Stateless Service with .net Core it create a project with .net core 2.1. For the same when I create Stateless Asp.net Core > API the project created is for .net core 2.0. Is there a way to get the latest template for Stateless ASP.net Core 2.1 fore service fabric?





did you update to the latest vssdk?
– 4c74356b41
Jul 1 at 9:27






yes VS 15.7.4 an installed dotnet-sdk-2.1.301-win-x64.exe. from command prompt dotnet --version 2.1.301
– kumar
Jul 2 at 12:54





1 Answer
1



Is there a way to get the latest template for Stateless ASP.net Core 2.1 fore service fabric?



As you mentioned It seems that there is no default .net core 2.1 service fabric template currently.



I also find the similar issue from github.



But we coud migrate from ASP.NET Core 2.0 to 2.1 mannually. I did a demo following this tutorial. The following is the detail steps:



1.Create a Asp.net core 2.0 stateless service



2.Change the framework from 2.0 to 2.1



enter image description here



3.Edit the .csproj file with following code


<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp2.1</TargetFramework>
<IsServiceFabricServiceProject>True</IsServiceFabricServiceProject>
<RuntimeIdentifier>win7-x64</RuntimeIdentifier>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.App" Version="2.1.1" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="2.1.1" PrivateAssets="All" />
<PackageReference Include="Microsoft.ServiceFabric.AspNetCore.Kestrel" Version="3.1.301" />
</ItemGroup>
</Project>



3.Change the startup.cs file following this tutorial






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

List of Kim Possible characters

Audio Livestreaming with Python & Flask

NSwag: Generate C# Client from multiple Versions of an API