mirror of
https://github.com/godotengine/godot-docs.git
synced 2026-01-03 05:48:42 +03:00
Update compiling_with_dotnet.rst: clarify NuGet source creation
This commit is contained in:
@@ -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>``.
|
||||
|
||||
After picking a directory, run this .NET CLI command to configure NuGet to use
|
||||
your local source:
|
||||
|
||||
::
|
||||
|
||||
dotnet nuget add source ~/MyLocalNugetSource --name MyLocalNugetSource
|
||||
dotnet nuget add source <my_local_source> --name MyLocalNugetSource
|
||||
|
||||
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.
|
||||
|
||||
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
|
||||
@@ -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
|
||||
--------
|
||||
|
||||
Reference in New Issue
Block a user