Watch
2
0
Fork
You've already forked raylib-cs
0
raylib-cs/Directory.Build.targets
2026-07-07 23:29:25 +02:00

26 lines
1.6 KiB
XML

<Project>
<!-- The net8-era wasm workload (Microsoft.NET.Runtime.WebAssembly.Sdk 8.0.x, imported for
RID browser-wasm) unconditionally sets OutputType=Exe after project evaluation, which
breaks the net8.0 classlib build with CS5001. Pin it back to Library here: this file is
imported after the workload props, so the assignment wins. (net10's wasm SDK leaves
OutputType alone; Examples stays an Exe and is excluded.) -->
<PropertyGroup Condition="'$(MSBuildProjectName)' == 'Raylib-cs' And '$(RuntimeIdentifier)' == 'browser-wasm'">
<OutputType>Library</OutputType>
</PropertyGroup>
<!-- Raylib-cs 8.1.0 is not on nuget.org yet; pack locally so Examples and tests resolve the package with native runtimes. -->
<Target Name="_EnsureLocalRaylibCsPackage"
BeforeTargets="Restore"
Condition="'$(MSBuildProjectName)' != 'Raylib-cs' And Exists('$(MSBuildThisFileDirectory)Raylib-cs/Raylib-cs.csproj')">
<PropertyGroup>
<_LocalNuGetDir>$(MSBuildThisFileDirectory)nuget</_LocalNuGetDir>
<_LocalRaylibCsNupkg>$(_LocalNuGetDir)/Raylib-cs.$(RaylibCsVersion).nupkg</_LocalRaylibCsNupkg>
</PropertyGroup>
<MakeDir Directories="$(_LocalNuGetDir)" Condition="!Exists('$(_LocalNuGetDir)')"/>
<MSBuild Projects="$(MSBuildThisFileDirectory)Raylib-cs/Raylib-cs.csproj"
Targets="Restore;Pack"
Properties="Configuration=Release;PackageOutputPath=$(_LocalNuGetDir)"
RemoveProperties="RuntimeIdentifier;RuntimeIdentifiers;SelfContained;_IsPublishing"
Condition="!Exists('$(_LocalRaylibCsNupkg)') Or '$(ForceRaylibCsPack)' == 'true'"/>
</Target>
</Project>