From 6c496b67b81fe5557848f26c469896206ffdecfb Mon Sep 17 00:00:00 2001 From: tiger tiger tiger Date: Tue, 7 Jul 2026 21:52:01 +0200 Subject: [PATCH] chg: simplifying build logic - a simple line in the documentation should save us the code here --- Directory.Build.targets | 16 ---------------- README.md | 19 +++++++++++++++++++ 2 files changed, 19 insertions(+), 16 deletions(-) diff --git a/Directory.Build.targets b/Directory.Build.targets index 8584d9b..bc743c2 100644 --- a/Directory.Build.targets +++ b/Directory.Build.targets @@ -7,20 +7,4 @@ Library - - - - - <_LocalNuGetDir>$(MSBuildThisFileDirectory)nuget - <_LocalRaylibCsNupkg>$(_LocalNuGetDir)/Raylib-cs.$(RaylibCsVersion).nupkg - - - - diff --git a/README.md b/README.md index 642a38a..6e555f0 100644 --- a/README.md +++ b/README.md @@ -65,6 +65,25 @@ otherwise the command won't work. 5. Start coding! +## Building from source + +The `Examples` and `Raylib-cs.Tests` projects consume the binding as a NuGet package, and the in-repo +version may not be published on nuget.org yet. Pack it once into the local feed before the first build: + +``` +dotnet pack Raylib-cs -c Release -o nuget +dotnet build +``` + +`NuGet.config` points restore at the local `./nuget` feed, so both projects pick up the freshly packed +package. If you skip the pack step on a fresh clone, restore fails with NU1301 (the `./nuget` source +doesn't exist) or NU1102 (Raylib-cs not found) — running the pack command fixes both. + +When iterating on the binding itself, note that NuGet caches the extracted package by version and +ignores repacks of the same version. After repacking, delete the old package from `./nuget` and clear +the cached copy (`dotnet nuget locals global-packages --clear`, or delete +`~/.nuget/packages/raylib-cs/`) before restoring again. + ## Hello, World! ```csharp