Watch
2
0
Fork
You've already forked raylib-cs
0

Rename msbuild prop UseRaylibCsPackage to RaylibCsForceLocalNuget

This commit is contained in:
Rgebee 2026-08-13 20:02:06 +01:00
commit 9073448241
4 changed files with 11 additions and 11 deletions

View file

@ -53,13 +53,13 @@
<Using Include="System.Numerics"/>
</ItemGroup>
<ItemGroup Condition="'$(UseRaylibCsPackage)' != 'true'">
<ItemGroup Condition="'$(RaylibCsForceLocalNuget)' != 'true'">
<ProjectReference Include="..\Raylib-cs\Raylib-cs.csproj"/>
</ItemGroup>
<Import Project="..\Raylib-cs\Raylib-cs.targets" Condition="'$(UseRaylibCsPackage)' != 'true'"/>
<Import Project="..\Raylib-cs\Raylib-cs.targets" Condition="'$(RaylibCsForceLocalNuget)' != 'true'"/>
<ItemGroup Condition="'$(UseRaylibCsPackage)' == 'true'">
<ItemGroup Condition="'$(RaylibCsForceLocalNuget)' == 'true'">
<PackageReference Include="Raylib-cs" Version="$(RaylibCsVersion)"/>
</ItemGroup>

View file

@ -12,7 +12,7 @@ The browser-wasm configuration only activates when publishing with
- .NET 10 SDK
- `dotnet workload install wasm-tools`
- Raylib-cs (works with the local project, or nuget if MSBuild property `<UseRaylibCsPackage>` is `true`
- Raylib-cs (works with the local project, or nuget if MSBuild property `<RaylibCsForceLocalNuget>` is `true`
## Build

View file

@ -117,17 +117,17 @@ dotnet test
Both projects can also consume the binding as a NuGet package but the in-repo version may not be published on
nuget.org yet. Pack it once into the local feed before the first build. Then to run against the Raylib-cs NuGet
package (the version set by `RaylibCsVersion` in [Directory.Build.props](Directory.Build.props)), set
`UseRaylibCsPackage`:
`RaylibCsForceLocalNuget`:
```sh
dotnet pack Raylib-cs -c Release -o nuget
dotnet build
```
```sh
dotnet run --project Examples -p:UseRaylibCsPackage=true
dotnet run --project Examples -p:RaylibCsForceLocalNuget=true
```
```sh
dotnet test -p:UseRaylibCsPackage=true
dotnet test -p:RaylibCsForceLocalNuget=true
```
Note that `NuGet.config` points restore at the local `./nuget` feed, so both projects pick up the freshly packed

View file

@ -15,13 +15,13 @@
</PackageReference>
</ItemGroup>
<ItemGroup Condition="'$(UseRaylibCsPackage)' != 'true'">
<ItemGroup Condition="'$(RaylibCsForceLocalNuget)' != 'true'">
<ProjectReference Include="..\Raylib-cs\Raylib-cs.csproj"/>
</ItemGroup>
<Import Project="..\Raylib-cs\Raylib-cs.targets" Condition="'$(UseRaylibCsPackage)' != 'true'"/>
<Import Project="..\Raylib-cs\Raylib-cs.targets" Condition="'$(RaylibCsForceLocalNuget)' != 'true'"/>
<ItemGroup Condition="'$(UseRaylibCsPackage)' == 'true'">
<ItemGroup Condition="'$(RaylibCsForceLocalNuget)' == 'true'">
<PackageReference Include="Raylib-cs" Version="$(RaylibCsVersion)"/>
</ItemGroup>
</Project>