-
Notifications
You must be signed in to change notification settings - Fork 44
Adds documentation for Updateing MonoGame #46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 2 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
d8eb8eb
Steps for updating MonoGame
AristurtleDev 80e0ca9
Add Updating Version doc to toc
AristurtleDev 487f941
Fix dotnet spelling
AristurtleDev 1eb116a
Make heading more clear
AristurtleDev 77dab47
Correct spelling because I’m terrible
AristurtleDev 9917d6a
Update header to include VSCode/rider
AristurtleDev e5982b9
Use correct heading levels
AristurtleDev 201cfd1
Add note about existing projects
AristurtleDev bc4deba
Moved uninstall templates section to a notes section
AristurtleDev 4307d4f
Swap order of sections
AristurtleDev 409926d
Add section on target framework
AristurtleDev f8607fc
Add toc
AristurtleDev 63bcee6
Fix toc
AristurtleDev File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
--- | ||
title: Updating Versions | ||
description: A guide on updating MonoGame when a new release is pushed. | ||
--- | ||
|
||
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. | ||
|
||
# Update dotnet Templates | ||
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. | ||
AristurtleDev marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
## Visual Studio 2022 | ||
Develoeprs 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 | ||
|
||
1. Open Visual Studio 2022 | ||
2. In the lanuch window, choose the *Continue without code* option at the bottom on the right. | ||
3. From the top menu choose, *Extensions > Manage Extensions* to open the *Extension Manager* panel. | ||
4. Click the *Updates* tab and choose *MonoGame Framework C# project templates* and update it to the latest version. | ||
|
||
If prompted to close Visual Studio to finish the update, do so now to continue installing the update. | ||
|
||
## dotent CLI | ||
AristurtleDev marked this conversation as resolved.
Show resolved
Hide resolved
|
||
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 | ||
|
||
```sh | ||
dotnet new uninstall MonoGame.Templates.CSharp | ||
dotnet new install MonoGame.Templates.CSharp | ||
``` | ||
|
||
The templates must be uninstalled first before the updated tempaltes are installed; otherwise, you will see warnings about template naming conflicts between the two versions. | ||
AristurtleDev marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
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. | ||
|
||
# Update Existing Projects | ||
AristurtleDev marked this conversation as resolved.
Show resolved
Hide resolved
|
||
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 | ||
|
||
## Visual Studio 2022 | ||
Open your existing project in Visual Studio 2022 and perform the following | ||
1. Right-click on the project in the *Solution Explorer* panel and select *Manage NuGet Packages...". | ||
2. In the NuGet Packages Manager window, click the *Updates* tab. | ||
3. Select the MonoGame Framework packages in the list on the left, then click the *Update* button for each one on the right. | ||
|
||
## Manually Editing .csproj File | ||
Alternatively, regardless of the development environment, developers can manually edit the *.csproj* file for their project to update to the newest MonoGame release. To do this | ||
1. Open your project's *.csproj* file | ||
2. Locate the `<PacakgeReference>` elements for any MonoGame referenced packages. | ||
3. Change the `Version=` attribute for each one to the current version of MonoGame (currently this is `3.8.2.1105`) | ||
4. Save the *.csproj* file. | ||
|
||
Once these changes are made, open a command prompt or terminal at the root of the project directory and enter the following commands | ||
|
||
```sh | ||
dotnet clean | ||
dotnet restore | ||
``` | ||
|
||
## Update dotent tools Manifest File | ||
Regardless of the development environment, users will need to update the dotnet tools manifest file manually to use the newest versions. To do this: | ||
1. Open the *.config/dotent-tools.json* manifest file located in the project root directory | ||
AristurtleDev marked this conversation as resolved.
Show resolved
Hide resolved
|
||
2. Update the version specified for each tool to the current version of MonoGame (currently this is `3.8.2.1105`). | ||
3. Save the changes | ||
|
||
Once these changes are made, open a command prompt or terminal at the root of the project directory and enter the following commands | ||
|
||
```sh | ||
dotnet tool restore | ||
``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.