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.
14 lines
741 B
XML
14 lines
741 B
XML
<Project>
|
|
<!-- Auto-imported by every project in the repo; referenced via $(RaylibCsVersion). -->
|
|
<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>
|