Commit d972f2e
authored
Fix native library copying from NuGet package (v0.4.4) (#57)
* fix: Package native library in runtimes/{rid}/native/ for NuGet auto-copy (v0.4.4)
Fixes d2wrapper native library not being copied to consuming projects.
Changes:
- Modified IncludeNativeLibrary target in D2Sharp.csproj to copy built native library to runtimes/{rid}/native/ during local builds
- Added CopyD2SharpNativeLibrary target to D2Sharp.targets to copy native library from package to consuming project's bin/
- Targets file uses relative paths (../runtimes/{rid}/native/) to locate library in NuGet package cache
- Package now includes native library in both lib/net8.0/ (backwards compat) and runtimes/{rid}/native/ (auto-copy)
- Updated CHANGELOG.md with v0.4.4 release notes
- Bumped version to 0.4.4 in D2Sharp.csproj
- Updated NuGetExample to reference D2Sharp v0.4.4
- Verified rendering works: all 5 examples run successfully
Resolves issue where v0.4.3 copied Worker files but not the native library.
* chore: Ignore generated SVG files in NuGetExample
* fix: Make native library copy conditional to prevent CI build failures
The Copy task in IncludeNativeLibrary target now checks if the source file exists before attempting to copy. This prevents MSB3030 errors in CI builds where the native library may not be built yet.
The CI workflow already handles native library placement by downloading artifacts from all platforms and manually copying them to runtimes/{rid}/native/, so this local copy is optional for CI builds.1 parent b3d1952 commit d972f2e
File tree
5 files changed
+74
-6
lines changed- examples/D2Sharp.NuGetExample
- src/D2Sharp
5 files changed
+74
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
| 105 | + | |
| 106 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
10 | 23 | | |
11 | 24 | | |
12 | 25 | | |
| |||
15 | 28 | | |
16 | 29 | | |
17 | 30 | | |
18 | | - | |
| 31 | + | |
19 | 32 | | |
20 | 33 | | |
21 | 34 | | |
| |||
388 | 401 | | |
389 | 402 | | |
390 | 403 | | |
391 | | - | |
| 404 | + | |
| 405 | + | |
392 | 406 | | |
393 | 407 | | |
394 | 408 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | | - | |
21 | | - | |
| 20 | + | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
80 | 94 | | |
| 95 | + | |
81 | 96 | | |
82 | 97 | | |
83 | 98 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
38 | 75 | | |
0 commit comments