Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 17 additions & 11 deletions contributing/development/compiling/compiling_with_dotnet.rst
Original file line number Diff line number Diff line change
Expand Up @@ -100,23 +100,29 @@ distributed as NuGet packages. This is all transparent to the user, but it can
make things complicated during development.

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

::
First, pick a location for the local NuGet source. If you don't have a
preference, create an empty directory at one of these recommended locations:

- On Windows, ``C:\Users\<username>\MyLocalNugetSource``
- On Linux, \*BSD, etc., ``~/MyLocalNugetSource``

This path is referred to later as ``<my_local_source>``.

dotnet nuget add source ~/MyLocalNugetSource --name MyLocalNugetSource
After picking a directory, run this .NET CLI command to configure NuGet to use
your local source:

::

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

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

::

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

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

::

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

Examples
--------
Expand Down