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/Examples/Examples.csproj b/Examples/Examples.csproj index e0b6f89..d4ab282 100644 --- a/Examples/Examples.csproj +++ b/Examples/Examples.csproj @@ -59,6 +59,10 @@ + + + + @@ -66,7 +70,7 @@ + so examples loading from "resources/..." work unchanged. --> diff --git a/README.md b/README.md index 34b73d0..e2457c2 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