Skip to content

Commit 4307d4f

Browse files
Swap order of sections
1 parent bc4deba commit 4307d4f

File tree

1 file changed

+35
-32
lines changed

1 file changed

+35
-32
lines changed

articles/migration/updating_versions.md

Lines changed: 35 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -5,38 +5,6 @@ description: A guide on updating MonoGame when a new release is pushed.
55

66
When a new release of MonoGame is pushed, developers will need to manually update their development environment and/or existing project to make use of the new version. This guide is intended to walk you through the steps of performing these updates.
77

8-
## Update dotnet Templates
9-
Developers will need to update the MonoGame C# Templates used to create new projects. Doing this depends on if you are using Visual Studio 2022 or through the dotnet cli.
10-
11-
> [!NOTE]
12-
> Updating the templates will not affect existing projects. if developers wish to update existing project, see the info in the [Update Existing Projects](#update-existing-projects) section.
13-
14-
### Visual Studio 2022
15-
Developers using Visual Studio 2022 should be using the [MonoGame C# Project Templates](https://marketplace.visualstudio.com/items?itemName=MonoGame.MonoGame-Templates-VSExtension) extension. This provides not only the tempaltes but also the functinality to open the *MonoGame Content Builder Editor* (MGCB Editor) within Visual Studio. You can update the extension by performing the following
16-
17-
1. Open Visual Studio 2022
18-
2. In the lanuch window, choose the *Continue without code* option at the bottom on the right.
19-
3. From the top menu choose, *Extensions > Manage Extensions* to open the *Extension Manager* panel.
20-
4. Click the *Updates* tab and choose *MonoGame Framework C# project templates* and update it to the latest version.
21-
22-
If prompted to close Visual Studio to finish the update, do so now to continue installing the update.
23-
24-
### dotnet CLI (VSCode/Rider)
25-
Develoeprs using the dotnet CLI with environments such as Visual Studio Code, JetBrains Rider, or other editors, can exceute the following command in a command prompt/terminal to update the templates
26-
27-
```sh
28-
dotnet new install MonoGame.Templates.CSharp
29-
```
30-
31-
> [!TIP]
32-
> If you receive a an error or warning stating there are naming conflicts in the templates, you may need to uninstall the templates first with the following command and then install them:
33-
>
34-
> ```sh
35-
> dotnet new uninstall MonoGame.Templates.CSharp
36-
> ```
37-
38-
Alternatively, you can perform `dotnet new update` which will update all templates installed to their most current version avaialble. However, this may affect other templates you have installed that you may not wish to update, it's an all or nothing command.
39-
408
## Update Existing Projects
419
Developers wishing to update their current project to use a new release version only need to update the *target framework*, *NuGet package verions*, and *dotnet tools* version. Doing this dpeends on if you are using Visual Studio 2022 or another development environment
4210

@@ -71,3 +39,38 @@ Once these changes are made, open a command prompt or terminal at the root of th
7139
```sh
7240
dotnet tool restore
7341
```
42+
43+
## Updating Environment for New Projects
44+
The following sections will cover updating your development environment for new projects.
45+
46+
### Update dotnet Templates
47+
Developers will need to update the MonoGame C# Templates used to create new projects. Doing this depends on if you are using Visual Studio 2022 or through the dotnet cli.
48+
49+
> [!NOTE]
50+
> Updating the templates will not affect existing projects. if developers wish to update existing project, see the info in the [Update Existing Projects](#update-existing-projects) section.
51+
52+
#### Visual Studio 2022
53+
Developers using Visual Studio 2022 should be using the [MonoGame C# Project Templates](https://marketplace.visualstudio.com/items?itemName=MonoGame.MonoGame-Templates-VSExtension) extension. This provides not only the tempaltes but also the functinality to open the *MonoGame Content Builder Editor* (MGCB Editor) within Visual Studio. You can update the extension by performing the following
54+
55+
1. Open Visual Studio 2022
56+
2. In the lanuch window, choose the *Continue without code* option at the bottom on the right.
57+
3. From the top menu choose, *Extensions > Manage Extensions* to open the *Extension Manager* panel.
58+
4. Click the *Updates* tab and choose *MonoGame Framework C# project templates* and update it to the latest version.
59+
60+
If prompted to close Visual Studio to finish the update, do so now to continue installing the update.
61+
62+
#### dotnet CLI (VSCode/Rider)
63+
Develoeprs using the dotnet CLI with environments such as Visual Studio Code, JetBrains Rider, or other editors, can exceute the following command in a command prompt/terminal to update the templates
64+
65+
```sh
66+
dotnet new install MonoGame.Templates.CSharp
67+
```
68+
69+
> [!TIP]
70+
> If you receive a an error or warning stating there are naming conflicts in the templates, you may need to uninstall the templates first with the following command and then install them:
71+
>
72+
> ```sh
73+
> dotnet new uninstall MonoGame.Templates.CSharp
74+
> ```
75+
76+
Alternatively, you can perform `dotnet new update` which will update all templates installed to their most current version avaialble. However, this may affect other templates you have installed that you may not wish to update, it's an all or nothing command.

0 commit comments

Comments
 (0)