Skip to content

Commit d7d127f

Browse files
authored
Merge pull request godotengine#8805 from 31/dev/31/build-net-win-path
Update compiling_with_dotnet.rst: clarify NuGet source creation
2 parents 9d5fc90 + f26f1a9 commit d7d127f

File tree

1 file changed

+17
-11
lines changed

1 file changed

+17
-11
lines changed

contributing/development/compiling/compiling_with_dotnet.rst

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -100,23 +100,29 @@ distributed as NuGet packages. This is all transparent to the user, but it can
100100
make things complicated during development.
101101

102102
In order to use Godot with a development version of those packages, a local
103-
NuGet source must be created where MSBuild can find them. This can be done with
104-
the .NET CLI:
103+
NuGet source must be created where MSBuild can find them.
105104

106-
::
105+
First, pick a location for the local NuGet source. If you don't have a
106+
preference, create an empty directory at one of these recommended locations:
107+
108+
- On Windows, ``C:\Users\<username>\MyLocalNugetSource``
109+
- On Linux, \*BSD, etc., ``~/MyLocalNugetSource``
110+
111+
This path is referred to later as ``<my_local_source>``.
107112

108-
dotnet nuget add source ~/MyLocalNugetSource --name MyLocalNugetSource
113+
After picking a directory, run this .NET CLI command to configure NuGet to use
114+
your local source:
115+
116+
::
109117

110-
The Godot NuGet packages must be added to that local source. Additionally, we
111-
must make sure there are no other versions of the package in the NuGet cache, as
112-
MSBuild may pick one of those instead.
118+
dotnet nuget add source <my_local_source> --name MyLocalNugetSource
113119

114-
In order to simplify this process, the ``build_assemblies.py`` script provides
115-
the following ``--push-nupkgs-local`` option:
120+
When you run the ``build_assemblies.py`` script, pass ``<my_local_source>`` to
121+
the ``--push-nupkgs-local`` option:
116122

117123
::
118124

119-
./modules/mono/build_scripts/build_assemblies.py --godot-output-dir ./bin --push-nupkgs-local ~/MyLocalNugetSource
125+
./modules/mono/build_scripts/build_assemblies.py --godot-output-dir ./bin --push-nupkgs-local <my_local_source>
120126

121127
This option ensures the packages will be added to the specified local NuGet
122128
source and that conflicting versions of the package are removed from the NuGet
@@ -132,7 +138,7 @@ the ``--precision=double`` argument:
132138

133139
::
134140

135-
./modules/mono/build_scripts/build_assemblies.py --godot-output-dir ./bin --push-nupkgs-local ~/MyLocalNugetSource --precision=double
141+
./modules/mono/build_scripts/build_assemblies.py --godot-output-dir ./bin --push-nupkgs-local <my_local_source> --precision=double
136142

137143
Examples
138144
--------

0 commit comments

Comments
 (0)