Skip to content

Commit 8ebe213

Browse files
authored
Update using_development_nuget_packages.md
1 parent e895537 commit 8ebe213

File tree

1 file changed

+22
-18
lines changed

1 file changed

+22
-18
lines changed

articles/getting_started/using_development_nuget_packages.md

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Using the Development Nuget Packages
22

3-
When the MonoGame develop branch builds it publishes development NuGet packages to the
3+
When the MonoGame develop branch builds, it publishes development NuGet packages to the
44
MonoGame NuGet Feed on GitHub. If you want to test a new feature or just be on the
55
very latest code you can use this Feed to do that.
66

@@ -19,7 +19,7 @@ Then add the following content.
1919
</configuration>
2020
```
2121

22-
Next again in the root or top level directory create a `Directory.Build.props` file and add the following content.
22+
Next, again in the root or top level directory, create a `Directory.Build.props` file and add the following content.
2323

2424
```xml
2525
<Project>
@@ -28,10 +28,10 @@ Next again in the root or top level directory create a `Directory.Build.props` f
2828
</PropertyGroup>
2929
</Project>
3030
```
31-
`Directory.Build.props` is a MSBuild file which will be imported by all projects in your game.
32-
Its like a file to contain global variables. In this case the version of MonoGame we want to use.
31+
`Directory.Build.props` is an MSBuild file which will be imported by all projects in your game.
32+
It is like a file that contains global variables. In this case the version of MonoGame we want to use.
3333

34-
To get the latest version you can look at one of the packages at [https://github.com/orgs/MonoGame/packages?repo_name=MonoGame](https://github.com/orgs/MonoGame/packages?repo_name=MonoGame). To get the information from the GitHub feed by doing a command line search with the following
34+
To find out the latest version number, you can look at one of the packages at [https://github.com/orgs/MonoGame/packages?repo_name=MonoGame](https://github.com/orgs/MonoGame/packages?repo_name=MonoGame). Or to get the information from the GitHub feed, you can run the following command.
3535

3636
```CLI
3737
nuget search "MonoGame.Framework" -PreRelease -Source MonoGameGitHub
@@ -67,31 +67,35 @@ Source: MonoGameGitHub
6767
```
6868

6969
The version number you want to use is listed in the output.
70-
Note: As builds are done the version number will always be changing. Unfortunately due to limitations in the way NuGet works we cannot
71-
use a wildcard with a prerelease package (so you cannot do `1.0.0.*-develop`). So this is the best way to find the latest verion you want to use.
7270

73-
Next update all the `PackageReference` entires in your csprojs which use MonoGame to use `$(MonoGamePackageVersion)` MSBuild property.
74-
For example
71+
> [!IMPORTANT]
72+
> As packages are published, the version number will always change. Unfortunately, due to limitations in the way NuGet works, we cannot
73+
> use a wildcard with a pre-release package (so you cannot do `1.0.0.*-develop`). So this is the best way to find the latest verion you want to use.
74+
75+
Next update all the `PackageReference` entries in your csproj's which use MonoGame to use `$(MonoGamePackageVersion)` MSBuild property.
76+
For example:
7577

7678
```xml
7779
<ItemGroup>
7880
<PackageReference Include="MonoGame.Framework.DesktopGL" Version="$(MonoGamePackageVersion)" />
7981
<PackageReference Include="MonoGame.Content.Builder.Task" Version="$(MonoGamePackageVersion)" />
80-
</ItemGroup>
82+
</ItemGroup>
8183
```
8284

83-
If you try to build now you will get an error. This is because the NuGet feeds on GitHub are not open. You need
85+
If you try to build now you will get an error. This is because the NuGet feeds on GitHub are not public. You need
8486
to be a valid GitHub user to use them.
8587

8688
## Authentication
8789

88-
You need to create an Personal Access Token (PAT) on your GitHub account in order to use the NuGet feed.
90+
You need to create a Personal Access Token (PAT) on your GitHub account in order to use the NuGet feed.
8991
See the following documentation on how to create your PAT.
9092
[managing-your-personal-access-tokens](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens)
91-
Note: You need to create a "PAT (Classic)" token in order for it to work with the Nuget feed. See [creating-a-personal-access-token-classic](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-personal-access-token-classic) for details.
9293

93-
Once you have your PAT you can create a new `NuGet.config` file in the directory ABOVE your game project directory.
94-
To be clean this file should NOT be in your source tree. It should be outside of any directory which is under source control.
94+
> [!IMPORTANT]
95+
> You need to create a "PAT (Classic)" token in order for it to work with the Nuget feed. See [creating-a-personal-access-token-classic](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-personal-access-token-classic) for details.
96+
97+
Once you have your PAT, you can create a new `NuGet.config` file in the directory ABOVE your game project directory.
98+
To be clear, this file should NOT be in your source tree. It should be outside of any directory which is under source control.
9599

96100
```
97101
Projects
@@ -122,6 +126,6 @@ The contents of the file are as follows, replace `%GITHUB_USER%` with your GitHu
122126
</configuration>
123127
```
124128

125-
The really good thing about placing these credentials outside of source control is they are safe, but also any
126-
new projects you create under that folder can also make use of these createntials. So its a good idea to keep them in one place.
127-
For more information to you read [consuming-packages-authenticated-feeds](https://learn.microsoft.com/en-us/nuget/consume-packages/consuming-packages-authenticated-feeds#credentials-in-nugetconfig-files).
129+
The really good thing about placing these credentials outside of source control is that they are safe. But also any
130+
new projects you create under that folder can also make use of these createntials. So it is a good idea to keep them in one place.
131+
For more information, you can read [consuming-packages-authenticated-feeds](https://learn.microsoft.com/en-us/nuget/consume-packages/consuming-packages-authenticated-feeds#credentials-in-nugetconfig-files).

0 commit comments

Comments
 (0)