build: fix csproj (remove NuGet deps, add 0Harmony ref) + improved build script
csproj: removed Lib.Harmony and System.Text.Json NuGet packages (game bundles these), added 0Harmony.dll reference from game directory, LangVersion=latest build_mod.sh: auto-detect Managed/ subdirectory, support Linux/macOS/Windows paths, better error messages, install instructions C# code verification: 0 syntax errors, 8 missing-reference-only errors (expected)
This commit is contained in:
@ -2,31 +2,15 @@
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net471</TargetFramework>
|
||||
<AssemblyName>ONIAgentBridge</AssemblyName>
|
||||
<Version>1.0.0</Version>
|
||||
<RootNamespace>ONIAgentBridge</RootNamespace>
|
||||
<LangVersion>7</LangVersion>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<Nullable>disable</Nullable>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Lib.Harmony" Version="2.2.2" />
|
||||
<PackageReference Include="System.Text.Json" Version="6.0.0" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<!-- Point these to your ONI installation directory -->
|
||||
<Reference Include="Assembly-CSharp">
|
||||
<HintPath>$(ONI_Path)/Assembly-CSharp.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="Assembly-CSharp-firstpass">
|
||||
<HintPath>$(ONI_Path)/Assembly-CSharp-firstpass.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="UnityEngine">
|
||||
<HintPath>$(ONI_Path)/UnityEngine.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="UnityEngine.CoreModule">
|
||||
<HintPath>$(ONI_Path)/UnityEngine.CoreModule.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="0Harmony" HintPath="$(ONI_Path)\0Harmony.dll" Private="False" />
|
||||
<Reference Include="Assembly-CSharp" HintPath="$(ONI_Path)\Assembly-CSharp.dll" Private="False" />
|
||||
<Reference Include="Assembly-CSharp-firstpass" HintPath="$(ONI_Path)\Assembly-CSharp-firstpass.dll" Private="False" />
|
||||
<Reference Include="UnityEngine" HintPath="$(ONI_Path)\UnityEngine.dll" Private="False" />
|
||||
<Reference Include="UnityEngine.CoreModule" HintPath="$(ONI_Path)\UnityEngine.CoreModule.dll" Private="False" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
||||
Reference in New Issue
Block a user