|
1 | 1 | import Admonition from '@theme/Admonition'; |
2 | 2 |
|
3 | | -<FancyStep step={6}> |
4 | | - <details> |
5 | | - <summary> |
6 | | - <strong>Publish App</strong> |
7 | | - </summary> |
8 | | - |
9 | | - Before building a Velopack release, you must first build your application and publish it to a directory. |
10 | | - |
11 | | - For simplicity, we recommend publishing it as a [self-contained application](https://learn.microsoft.com/en-us/dotnet/core/deploying/#publish-self-contained). |
12 | | - |
13 | | - {!props.showMultipleTfmSuggestion && ( |
14 | | - <> |
15 | | - <p> |
16 | | - <code className="language-bash"> |
17 | | - dotnet publish yourApp.csproj -c Release --self-contained -r win-x64 -o .\publish |
18 | | - </code> |
19 | | - </p> |
20 | | - </> |
21 | | - )} |
22 | | - |
23 | | - |
24 | | - {props.showMultipleTfmSuggestion && ( |
25 | | - <> |
26 | | - <p> |
27 | | - <code className="language-cmd"> |
28 | | - dotnet publish -f net8.0-desktop -p:Version=1.0.0 -o .\publish |
29 | | - </code> |
30 | | - </p> |
31 | | - <p> |
32 | | - This will create the artifacts to be installed inside of the <code>publish</code> directory. If you are targeting multiple platforms this process will need to be repeated for each of those platforms replacing the <code>-f</code> option with the appropriate target framework moniker (TFM) for each platform, such as <code>net8.0-windows</code> or <code>net8.0-maccatalyst</code>. |
33 | | - </p> |
34 | | - </> |
35 | | - )} |
36 | | - |
37 | | - {props.suffix && ( |
38 | | - <p> |
39 | | - <span dangerouslySetInnerHTML={{ __html: props.suffix }} /> |
40 | | - </p> |
41 | | - )} |
42 | | - |
43 | | - <Admonition type="tip"> |
44 | | - Starting with .NET 7, the `-o`/`--output` option [can no longer be used with a solution file](https://learn.microsoft.com/en-us/dotnet/core/compatibility/sdk/7.0/solution-level-output-no-longer-valid?WT.mc_id=DT-MVP-5003472). |
45 | | - |
46 | | - Starting with .NET 8 and later, the `dotnet publish` command defaults to the Release configuration, so you can omit the `-c Release` option. |
47 | | - For more details see https://learn.microsoft.com/en-us/dotnet/core/compatibility/sdk/8.0/dotnet-publish-config. |
48 | | - |
49 | | - If you execute the dotnet publish command from within the same directory as the .csproj file, you can omit the project argument. You can find more details on the [dotnet publish documentation](https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-publish?WT.mc_id=DT-MVP-5003472#arguments). |
50 | | - </Admonition> |
51 | | - |
52 | | - </details> |
53 | | -</FancyStep> |
| 3 | +Before building a Velopack release, you must first build your application and publish it to a directory. |
| 4 | + |
| 5 | + |
| 6 | +{!props.showMultipleTfmSuggestion && ( |
| 7 | + <> |
| 8 | + <p> |
| 9 | + For simplicity, we recommend publishing it as a <a href="https://learn.microsoft.com/dotnet/core/deploying/#publish-self-contained">self-contained application</a>. |
| 10 | + </p> |
| 11 | + <p> |
| 12 | + <code className="language-bash"> |
| 13 | + dotnet publish yourApp.csproj -c Release --self-contained -r win-x64 -o .\publish |
| 14 | + </code> |
| 15 | + </p> |
| 16 | + </> |
| 17 | +)} |
| 18 | + |
| 19 | + |
| 20 | +{props.showMultipleTfmSuggestion && ( |
| 21 | + <> |
| 22 | + <p> |
| 23 | + <code className="language-cmd"> |
| 24 | + dotnet publish -f net8.0-desktop -p:Version=1.0.0 -o .\publish |
| 25 | + </code> |
| 26 | + </p> |
| 27 | + <p> |
| 28 | + This will create the artifacts to be installed inside of the <code>publish</code> directory. If you are targeting multiple platforms this process will need to be repeated for each of those platforms replacing the <code>-f</code> option with the appropriate target framework moniker (TFM) for each platform, such as <code>net8.0-windows</code> or <code>net8.0-maccatalyst</code>. |
| 29 | + </p> |
| 30 | + </> |
| 31 | +)} |
| 32 | + |
| 33 | +{props.suffix && ( |
| 34 | + <p> |
| 35 | + <span dangerouslySetInnerHTML={{ __html: props.suffix }} /> |
| 36 | + </p> |
| 37 | +)} |
| 38 | + |
| 39 | +<Admonition type="tip"> |
| 40 | + Starting with .NET 7, the `-o`/`--output` option [can no longer be used with a solution file][def]. |
| 41 | + |
| 42 | + Starting with .NET 8 and later, the `dotnet publish` command defaults to the Release configuration, so you can omit the `-c Release` option. |
| 43 | + For more details see https://learn.microsoft.com/en-us/dotnet/core/compatibility/sdk/8.0/dotnet-publish-config. |
| 44 | + |
| 45 | + If you execute the dotnet publish command from within the same directory as the .csproj file, you can omit the project argument. You can find more details on the [dotnet publish documentation](https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-publish?WT.mc_id=DT-MVP-5003472#arguments). |
| 46 | +</Admonition> |
0 commit comments