Skip to content

Commit 8b245ce

Browse files
authored
Merge pull request #77660 from peterpogorski/deploy-linux-vs-sf
Deploy linux vs sf
2 parents dfef487 + d82fb4b commit 8b245ce

File tree

7 files changed

+75
-0
lines changed

7 files changed

+75
-0
lines changed
18.6 KB
Loading
42.7 KB
Loading
26.1 KB
Loading
21.6 KB
Loading
21.4 KB
Loading
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
---
2+
title: Learn about creating and publishing .Net Core applications to a remote Azure Service Fabric Linux cluster | Microsoft Docs
3+
description: Create and publish .Net Core apps targeting a remote Linux cluster from Visual Studio
4+
services: service-fabric
5+
documentationcenter: .net
6+
author: peterpogorski
7+
manager: chackdan
8+
editor:
9+
10+
ms.assetid:
11+
ms.service: service-fabric
12+
ms.devlang: dotnet
13+
ms.topic: troubleshooting
14+
ms.tgt_pltfrm: NA
15+
ms.workload: NA
16+
ms.date: 5/20/2019
17+
ms.author: pepogors
18+
19+
---
20+
# Use Visual Studio to create and and publish .Net Core applications targeting a remote Linux Service Fabric cluster
21+
With Visual Studio tooling you can develop and publish Service Fabric .Net Core applications targeting a Linux Service Fabric cluster. The SDK version must be 3.4 or above to deploy a .Net Core application targeting Linux Service Fabric clusters from Visual Studio.
22+
23+
> [!Note]
24+
> Visual Studio doesn't support debugging Service Fabric applications which target Linux.
25+
>
26+
27+
## Create a Service Fabric application targeting .Net Core
28+
1. Launch Visual Studio as an **administrator**.
29+
2. Create a project with **File->New->Project**.
30+
3. In the **New Project** dialog, choose **Cloud -> Service Fabric Application**.
31+
![create-application]
32+
4. Name the application and click **Ok**.
33+
5. On the **New Service Fabric Service** page, select the type of service you would like to create under the **.Net Core Section**.
34+
![create-service]
35+
36+
## Deploy to a remote Linux cluster
37+
1. In the solution explorer, right click on the application and select **Build**.
38+
![build-application]
39+
2. Once the build process for the application has completed, right click on the service and select edit the **csproj file**.
40+
![edit-csproj]
41+
3. Edit the UpdateServiceFabricManifestEnabled property from True to **False** if the service is an **actor project type**. If your application does not have an actor service, skip to step 4.
42+
```xml
43+
<UpdateServiceFabricManifestEnabled>False</UpdateServiceFabricManifestEnabled>
44+
```
45+
> [!Note]
46+
> Setting UpdateServiceFabricManifestEnabled to false, will disable updates to the ServiceManifest.xml during a build. Any change such as add, remove, or rename to the service will not be reflected in the ServiceManifest.xml. If any changes are made you must either update the ServiceManifest manually or temporarily set UpdateServiceFabricManifestEnabled to true and build the service that will update the ServiceManifest.xml and then revert it back to false.
47+
>
48+
49+
4. Update the RuntimeIndetifier from win7-x64 to the target platform in the service project.
50+
```xml
51+
<RuntimeIdentifier>ubuntu.16.04-x64</RuntimeIdentifier>
52+
```
53+
5. In the ServiceManifest, update the entrypoint program to remove .exe.
54+
```xml
55+
<EntryPoint>
56+
<ExeHost>
57+
<Program>Actor1</Program>
58+
</ExeHost>
59+
</EntryPoint>
60+
```
61+
6. In Solution Explorer, right-click on the application and select **Publish**. The **Publish** dialog box appears.
62+
7. In **Connection Endpoint**, select the endpoint for the remote Service Fabric Linux cluster that you would like to target.
63+
![publish-application]
64+
65+
<!--Image references-->
66+
[create-application]:./media/service-fabric-how-to-vs-remote-linux-cluster/create-application-remote-linux.png
67+
[create-service]:./media/service-fabric-how-to-vs-remote-linux-cluster/create-service-remote-linux.png
68+
[build-application]:./media/service-fabric-how-to-vs-remote-linux-cluster/build-application-remote-linux.png
69+
[edit-csproj]:./media/service-fabric-how-to-vs-remote-linux-cluster/edit-csproj-remote-linux.png
70+
[publish-application]:./media/service-fabric-how-to-vs-remote-linux-cluster/publish-remote-linux.png
71+
72+
## Next steps
73+
* Learn about [Getting started with Service Fabric with .Net Core](https://azure.microsoft.com/resources/samples/service-fabric-dotnet-core-getting-started/)

articles/service-fabric/toc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -517,6 +517,8 @@
517517
href: service-fabric-diagnostics-how-to-monitor-and-diagnose-services-locally.md
518518
- name: Set up a Linux cluster on Windows
519519
href: service-fabric-local-linux-cluster-windows.md
520+
- name: Deploy a .NET Core app to a remote Linux cluster from VS
521+
href: service-fabric-how-to-publish-linux-app-vs.md
520522
- name: Work in a Linux/Eclipse dev environment
521523
items:
522524
- name: Get started with Eclipse plugin for Java development

0 commit comments

Comments
 (0)