fix: let the binding build for browser-wasm on both net8.0 and net10.0
The net8-era wasm workload (Microsoft.NET.Runtime.WebAssembly.Sdk 8.0.x, auto-imported for RID browser-wasm) treats every browser-wasm project as a wasm app: it forces OutputType=Exe after project evaluation (CS5001 for a classlib) and hooks its app-bundle build after Build, which errors because a library has no assemblies to bundle. Opt Raylib-cs out via DisableAutoWasmBuildApp (props time, before the workload defaults its trigger) and pin OutputType back to Library in Directory.Build.targets (evaluated after the workload props, so the assignment wins). net10's wasm SDK needs neither workaround.
This commit is contained in:
parent
99cfdae6ed
commit
3c08139d91
2 changed files with 17 additions and 0 deletions
|
|
@ -3,4 +3,12 @@
|
|||
<PropertyGroup>
|
||||
<RaylibCsVersion>8.1.0</RaylibCsVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- The net8-era wasm workload treats any browser-wasm project as a wasm *app* and hooks
|
||||
its app-bundle build after Build, which fails for a plain classlib. Opt the binding out
|
||||
(must happen at props time, before the workload defaults WasmBuildAppAfterThisTarget).
|
||||
The matching OutputType pin lives in Directory.Build.targets. -->
|
||||
<PropertyGroup Condition="'$(MSBuildProjectName)' == 'Raylib-cs' And '$(RuntimeIdentifier)' == 'browser-wasm'">
|
||||
<DisableAutoWasmBuildApp>true</DisableAutoWasmBuildApp>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
|
|
|
|||
Loading…
Reference in a new issue