Skip to content

Commit f73a582

Browse files
shimatclaude
andcommitted
Consolidate AI instructions into copilot-instructions.md
Merge the repository overview, versioning policy, WindowsLibraryLoader notes, and issue backlog pointer from CLAUDE.md into the existing .github/copilot-instructions.md to avoid maintaining two parallel files. Remove CLAUDE.md. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent 9a05373 commit f73a582

2 files changed

Lines changed: 28 additions & 39 deletions

File tree

.github/copilot-instructions.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,3 +184,31 @@ From `namespace OpenCvSharp.Internal`, types in `namespace OpenCvSharp` are dire
184184

185185
See `src/OpenCvSharpExtern/ximgproc_EdgeDrawing.h`, `src/OpenCvSharp/Modules/ximgproc/EdgeDrawing.cs` for a complete example covering: factory, OutputArray methods, std::vector methods, nested Params struct with bool fields, and VectorOfVec6d.
186186

187+
## Repository structure
188+
189+
OpenCvSharp has three layers:
190+
191+
- **`src/OpenCvSharp/`** — managed C# wrapper (P/Invoke, types, extension methods). Target frameworks: `netstandard2.0`, `netstandard2.1`, `net8.0`. Always verify that any change is consistent across all three.
192+
- **`src/OpenCvSharpExtern/`** — thin C++ bridge called by the C# side via P/Invoke.
193+
- **`nuget/`** — NuGet packaging projects (runtime packages that bundle the native DLLs).
194+
195+
## Versioning and release process
196+
197+
See `docs/release-process.md` for the full release workflow.
198+
199+
**Key rule: do not edit version numbers in source files for routine releases.** The NuGet package version is passed via `-p:Version=...` at pack time in CI. `AssemblyVersion` and `FileVersion` are hardcoded to `4.0.0.0` in `src/Directory.Build.props` and must not be changed for patch or minor OpenCV upgrades — only bump the major component on a breaking API change or OpenCV major-version upgrade. `InformationalVersion` is set automatically by the SDK to the full NuGet version string.
200+
201+
## Native DLL loading (Windows)
202+
203+
`WindowsLibraryLoader` (`src/OpenCvSharp/Internal/PInvoke/WindowsLibraryLoader.cs`) handles native DLL loading on Windows for .NET Framework targets:
204+
205+
- Uses `AppContext.BaseDirectory` (not `Assembly.Location`) to avoid IL3000 warnings in AoT/single-file apps.
206+
- For .NET Framework (net4x), looks for DLLs under `dll/x64/` relative to the base directory. The NuGet `.props` file copies DLLs there at build time.
207+
- For .NET 5+, returns early — the .NET runtime handles native loading via the `runtimes/` folder layout.
208+
209+
The NuGet runtime packages (`nuget/OpenCvSharp4.runtime.win.*`) include a `.targets` file that suppresses the redundant copy NuGet's PackageReference pipeline would otherwise make to the output root for net4x consumers.
210+
211+
## Issue backlog
212+
213+
`docs/issue-backlog.md` tracks actionable issues identified from closed/stale GitHub issues. Update the checkboxes as items are resolved.
214+

CLAUDE.md

Lines changed: 0 additions & 39 deletions
This file was deleted.

0 commit comments

Comments
 (0)