build: exclude nested test artifacts from parent projects

This commit is contained in:
soarqin committed 2026-10-11 03:13:07 +08:00
1 parent 307bb4740d
commit 476c193aa2
3 files changed
+3 -2

No files matched your search

+1 -1
View File
@@ -20,7 +20,7 @@
## Build
- `Directory.Build.props` supplies common frameworks, BepInEx packages, game references, warning policy, and the `UpdateGameDlls` dependency. `Directory.Build.targets` defines `ZipMod` and `CopyToParentPackage`.
- `Directory.Build.props` supplies common frameworks, BepInEx packages, game references, warning policy, and the `UpdateGameDlls` dependency. `Directory.Build.targets` defines `ZipMod` and `CopyToParentPackage`. Exclude nested test-tool `bin` and `obj` artifacts from parent-mod item globs, including explicit `None` includes, while keeping test sources visible.
- Normal validation: `dotnet build <project>/<project>.csproj -c Release --no-restore`. If NuGet assets are missing, run `dotnet restore <project>/<project>.csproj` before retrying the build.
- Keep temporary verification projects under the mod's excluded root `obj/` directory. Remove abandoned generated outputs when their source project is gone so the SDK source glob cannot compile them into the mod.
- Refresh game references explicitly with `dotnet build UpdateGameDlls/UpdateGameDlls.csproj`; the script publicizes installed DLLs in staging and compares generated content hashes so checkout timestamps cannot hide game updates. Missing DSP or the publicizer is a warning, not a build failure. If `assembly-publicizer` requires an unavailable .NET runtime, retry with process-local `DOTNET_ROLL_FORWARD=Major` rather than changing global runtime settings. Verify discovery warnings against the actual configured library directories and original managed DLLs; absence from the VDF `apps` list alone does not establish that DSP is uninstalled.
+1
View File
@@ -11,6 +11,7 @@
<NoWarn>0618</NoWarn>
<AnalysisLevel>none</AnalysisLevel>
<EnforceCodeStyleInBuild>false</EnforceCodeStyleInBuild>
<DefaultItemExcludesInProjectFolder>$(DefaultItemExcludesInProjectFolder);tools/**/bin/**;tools/**/obj/**</DefaultItemExcludesInProjectFolder>
<RestoreAdditionalProjectSources>https://nuget.bepinex.dev/v3/index.json</RestoreAdditionalProjectSources>
<!-- Set to true in projects that include a CHANGELOG.md in the package -->
<PackHasChangelog>false</PackHasChangelog>
+1 -1
View File
@@ -19,7 +19,7 @@
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="System.Net.WebSockets.WebSocketProtocol" Version="5.1.3" />
<Compile Remove="tools\**" />
<None Include="tools\**" />
<None Include="tools\**" Exclude="tools\**\bin\**;tools\**\obj\**" />
</ItemGroup>
<ItemGroup>
<WebSocketRuntimeDll Include="$(TargetDir)Microsoft.AspNetCore.Connections.Abstractions.dll" />