|
1 | 1 | <Project Sdk="Microsoft.NET.Sdk"> |
2 | 2 |
|
3 | 3 | <PropertyGroup> |
| 4 | + <!-- Library targets --> |
4 | 5 | <OutputType>Library</OutputType> |
5 | 6 | <TargetFramework>netstandard2.0</TargetFramework> |
| 7 | + |
| 8 | + <!-- Build & pack for these RIDs; the build matrix selects one per job --> |
| 9 | + <RuntimeIdentifiers>win-x64;linux-x64</RuntimeIdentifiers> |
| 10 | + |
| 11 | + <!-- Misc project metadata --> |
6 | 12 | <Platforms>x64</Platforms> |
7 | 13 | <PlatformTarget>x64</PlatformTarget> |
8 | 14 | <LangVersion>latest</LangVersion> |
9 | 15 | <AnalysisMode>AllEnabledByDefault</AnalysisMode> |
10 | 16 | <GeneratePackageOnBuild>true</GeneratePackageOnBuild> |
11 | | - <Nullable>Enable</Nullable> |
| 17 | + <Nullable>enable</Nullable> |
12 | 18 | <NoWarn>1701;1702;NU5100</NoWarn> |
| 19 | + |
| 20 | + <!-- NuGet info --> |
13 | 21 | <Version>2.0.2</Version> |
14 | 22 | <Authors>Chiel ten Brinke</Authors> |
15 | 23 | <Company>Rubjerg</Company> |
16 | 24 | <Description>Lean wrapper around Graphviz for building graphs, reading/writing dot files, exporting images, or reading out layout parameters.</Description> |
17 | | - <Copyright>Copyright 2020</Copyright> |
| 25 | + <Copyright>Copyright 2020</Copyright> |
18 | 26 | <PackageTags>graphviz dotnet graphdrawing</PackageTags> |
19 | 27 | <RepositoryUrl>https://github.com/Rubjerg/Graphviz.NetWrapper</RepositoryUrl> |
20 | 28 | <PackageProjectUrl>https://github.com/Rubjerg/Graphviz.NetWrapper</PackageProjectUrl> |
21 | | - <PackageLicenseExpression></PackageLicenseExpression> |
22 | 29 | <PackageLicenseFile>LICENSE</PackageLicenseFile> |
23 | 30 | </PropertyGroup> |
24 | | - |
| 31 | + |
| 32 | + <!-- Platform‑specific compilation constant for Windows code paths --> |
25 | 33 | <PropertyGroup Condition=" '$(OS)' == 'Windows_NT' "> |
26 | 34 | <DefineConstants>_WINDOWS</DefineConstants> |
27 | 35 | </PropertyGroup> |
28 | 36 |
|
29 | | - <PropertyGroup Condition="'$(Configuration)'=='Release'"> |
| 37 | + <PropertyGroup Condition=" '$(Configuration)' == 'Release' "> |
30 | 38 | <TreatWarningsAsErrors>true</TreatWarningsAsErrors> |
31 | 39 | </PropertyGroup> |
32 | 40 |
|
|
36 | 44 | </ProjectReference> |
37 | 45 | </ItemGroup> |
38 | 46 |
|
| 47 | + <!-- |
| 48 | + ***** Native assets ***** |
| 49 | + All files under Resources/ are copied to bin/ at build time *and* packed into |
| 50 | + runtimes/<rid>/native so consumers only get the bits for their platform. |
| 51 | + --> |
| 52 | + |
39 | 53 | <ItemGroup> |
40 | | - <!-- Include all files in the Resources folder but copy them directly to the output directory --> |
41 | | - <None Update="Resources/*"> |
42 | | - <CopyToOutputDirectory>Always</CopyToOutputDirectory> |
43 | | - <Link>%(RecursiveDir)/../%(Filename)%(Extension)</Link> |
| 54 | + <!-- Top‑level executables / libraries --> |
| 55 | + <None Include="Resources/*" Exclude="Resources/graphviz/**"> |
| 56 | + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |
| 57 | + <Link>%(RecursiveDir)/%(Filename)%(Extension)</Link> |
44 | 58 | <Pack>true</Pack> |
45 | | - <PackageCopyToOutput>true</PackageCopyToOutput> |
| 59 | + <PackagePath>runtimes/linux-x64/native/</PackagePath> |
46 | 60 | </None> |
47 | | - <!-- The graphviz subfolder is only present and relevant on linux --> |
48 | | - <None Update="Resources/graphviz/*"> |
49 | | - <CopyToOutputDirectory>Always</CopyToOutputDirectory> |
50 | | - <Link>%(RecursiveDir)/../../graphviz/%(Filename)%(Extension)</Link> |
| 61 | + <!-- Graphviz plug‑ins & sub‑folder --> |
| 62 | + <None Include="Resources/graphviz/**"> |
| 63 | + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |
| 64 | + <Link>%(RecursiveDir)/graphviz/%(Filename)%(Extension)</Link> |
51 | 65 | <Pack>true</Pack> |
52 | | - <PackageCopyToOutput>true</PackageCopyToOutput> |
| 66 | + <PackagePath>runtimes/linux-x64/native/graphviz/%(RecursiveDir)</PackagePath> |
53 | 67 | </None> |
54 | 68 | </ItemGroup> |
55 | 69 |
|
| 70 | + <!-- Shared assets such as the licence file --> |
56 | 71 | <ItemGroup> |
57 | 72 | <None Include="..\LICENSE"> |
58 | 73 | <Pack>true</Pack> |
|
0 commit comments