From f26f1a9bb2c8b5efcc5fb12bba6c36481e90830d Mon Sep 17 00:00:00 2001 From: 31 <31eee384@gmail.com> Date: Sat, 20 Jan 2024 23:24:52 -0800 Subject: [PATCH] Update compiling_with_dotnet.rst: clarify NuGet source creation --- .../compiling/compiling_with_dotnet.rst | 28 +++++++++++-------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/contributing/development/compiling/compiling_with_dotnet.rst b/contributing/development/compiling/compiling_with_dotnet.rst index d427e2c6796..dfbfcb51a96 100644 --- a/contributing/development/compiling/compiling_with_dotnet.rst +++ b/contributing/development/compiling/compiling_with_dotnet.rst @@ -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\\MyLocalNugetSource`` +- On Linux, \*BSD, etc., ``~/MyLocalNugetSource`` + +This path is referred to later as ````. - 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 --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 ```` 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 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 --precision=double Examples --------