Files
necromants-tome-7d2d-3-2/TEPersistenceSrc/NecromancerTEPersistence.csproj
T
Alex CubeandClaude Opus 5 e8f064f5ec Книга некроманта 1.0 — первая публичная версия
Мод для 7 Days to Die 3.2: навык «Некромантия», растущий от счётчика убитых
зомби, тёмное оружие с шестью собственными модами, призывная нежить, пирамида
духов и сюжетный финал через Чёрный портал. Локализация на 13 языках.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MaNro5hAGTzcQ7rJNN2tCX
2026-09-09 21:13:03 +03:00

53 lines
3.3 KiB
XML

<Project Sdk="Microsoft.NET.Sdk">
<!-- Tiny satellite assembly, separate from NecromancerHarmony.csproj on purpose - see
PyramidWardWriteHelper.cs's own doc comment for the full reasoning. In short: calling
PooledBinaryWriter.Write(bool) (or any of its overloads) from the main project fails to
compile with CS7069 ("Reference to type 'ReadOnlySpan<>' requires it be defined in
'mscorlib', but it could not be found") - Assembly-CSharp.dll's own ReadOnlySpan<char> usage
resolves against Unity/Mono's own mscorlib.dll, not the modern .NET SDK's corlib the main
project's plain netstandard2.1 setup implicitly references, and the compiler needs to fully
resolve BinaryWriter.Write's entire overload set (including its ReadOnlySpan<byte> overload)
just to pick the bool one. Confirmed via an isolated throwaway repro (multiple configurations
tried - NoStdLib+explicit mscorlib.dll DOES fix it, but ALSO referencing UnityEngine's own
DLLs alongside that setup breaks on UnityEngine.Vector3/Color/etc. needing `System.ValueType`
from netstandard instead, and referencing BOTH mscorlib and netstandard together in the same
project makes ReadOnlySpan<T> itself ambiguous and breaks System.Object/System.String
resolution entirely) - there is no single project-wide combination of references that
satisfies both "call BinaryWriter.Write" and "use UnityEngine types" at once. Rather than
risk that fragility across this mod's ENTIRE existing, working codebase (every other
HarmonySrc file uses UnityEngine types constantly), this one tiny helper - which needs
NOTHING but PooledBinaryWriter/bool - gets its own project with the NoStdLib+mscorlib-only
setup that specifically fixes it, compiled to its own small DLL dropped into the mod root
alongside NecromancerHarmony.dll (the game scans every assembly in a mod's folder, not just
one - confirmed by ModEntry.cs's own doc comment on how IModApi is discovered). The main
project calls into this DLL instead of calling PooledBinaryWriter.Write directly. -->
<PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework>
<AssemblyName>NecromancerTEPersistence</AssemblyName>
<RootNamespace>NecromancerTome</RootNamespace>
<LangVersion>latest</LangVersion>
<Nullable>disable</Nullable>
<GenerateDependencyFile>false</GenerateDependencyFile>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<OutputPath>bin\</OutputPath>
<DisableImplicitFrameworkReferences>true</DisableImplicitFrameworkReferences>
<NoStdLib>true</NoStdLib>
</PropertyGroup>
<ItemGroup>
<!-- The game's OWN mscorlib (Mono/IL2CPP's backport, where Assembly-CSharp.dll's
ReadOnlySpan<char> actually lives) instead of the .NET SDK's implicit one - this is the
one substitution that actually fixes the overload-resolution error, confirmed empirically. -->
<Reference Include="mscorlib">
<HintPath>..\..\..\7DaysToDie_Data\Managed\mscorlib.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="Assembly-CSharp">
<HintPath>..\..\..\7DaysToDie_Data\Managed\Assembly-CSharp.dll</HintPath>
<Private>false</Private>
</Reference>
</ItemGroup>
</Project>