Skip to content

Commit 0bff54c

Browse files
authored
feat(csharp): align project structures and output locations to other drivers (#115)
## What's Changed - aligns the project structure and output location (artifacts) with the other ADBC drivers - added Directory.Build.props file Co-authored-by: David Coe <>
1 parent 88c1341 commit 0bff54c

File tree

4 files changed

+61
-17
lines changed

4 files changed

+61
-17
lines changed

csharp/Directory.Build.props

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
<!--
2+
3+
Copyright (c) 2025 ADBC Drivers Contributors
4+
5+
Licensed under the Apache License, Version 2.0 (the "License");
6+
you may not use this file except in compliance with the License.
7+
You may obtain a copy of the License at
8+
9+
http://www.apache.org/licenses/LICENSE-2.0
10+
11+
Unless required by applicable law or agreed to in writing, software
12+
distributed under the License is distributed on an "AS IS" BASIS,
13+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
See the License for the specific language governing permissions and
15+
limitations under the License.
16+
17+
-->
18+
19+
20+
<Project>
21+
22+
<!-- Common repo directories -->
23+
<PropertyGroup>
24+
<RepoRoot>$(MSBuildThisFileDirectory)../</RepoRoot>
25+
<CSharpDir>$(MSBuildThisFileDirectory)</CSharpDir>
26+
<BaseOutputPath>$(CSharpDir)/artifacts/$(MSBuildProjectName)</BaseOutputPath>
27+
</PropertyGroup>
28+
29+
<!-- AssemblyInfo properties -->
30+
<PropertyGroup>
31+
<Product>ADBC Driver for Databricks</Product>
32+
<Copyright>Copyright 2025 ADBC Drivers Contributors</Copyright>
33+
<VersionPrefix>0.22.0</VersionPrefix>
34+
<VersionSuffix>SNAPSHOT</VersionSuffix>
35+
</PropertyGroup>
36+
37+
<PropertyGroup>
38+
<EmbedUntrackedSources>true</EmbedUntrackedSources>
39+
<LangVersion>latest</LangVersion>
40+
<SignAssembly>true</SignAssembly>
41+
<AssemblyOriginatorKeyFile>$(CSharpDir)AdbcDrivers.snk</AssemblyOriginatorKeyFile>
42+
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
43+
<Nullable>enable</Nullable>
44+
<NoWarn>CS8600;CS8601;CS8602;CS8604;CS8618</NoWarn>
45+
<ImplicitUsings>disable</ImplicitUsings>
46+
<IsWindows Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Windows)))' == 'true'">true</IsWindows>
47+
</PropertyGroup>
48+
49+
<ItemGroup Condition="!$([MSBuild]::IsTargetFrameworkCompatible($(TargetFramework), 'net8.0'))">
50+
<PackageReference Include="Microsoft.SourceLink.GitHub">
51+
<PrivateAssets>All</PrivateAssets>
52+
</PackageReference>
53+
</ItemGroup>
54+
55+
</Project>

csharp/Directory.Packages.props

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,8 @@
1919
</PropertyGroup>
2020
<ItemGroup>
2121
<!-- Compression -->
22-
<PackageVersion Include="coverlet.collector" Version="6.0.4">
23-
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
24-
<PrivateAssets>all</PrivateAssets>
25-
</PackageVersion>
26-
<PackageVersion Include="coverlet.msbuild" Version="6.0.4">
27-
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
28-
<PrivateAssets>all</PrivateAssets>
29-
</PackageVersion>
22+
<PackageVersion Include="coverlet.collector" Version="6.0.4" />
23+
<PackageVersion Include="coverlet.msbuild" Version="6.0.4" />
3024
<PackageVersion Include="K4os.Compression.LZ4" Version="1.3.8" />
3125
<PackageVersion Include="K4os.Compression.LZ4.Streams" Version="1.3.8" />
3226
<PackageVersion Include="Microsoft.IO.RecyclableMemoryStream" Version="3.0.1" />
@@ -39,5 +33,7 @@
3933
<PackageVersion Include="BenchmarkDotNet" Version="0.14.0" />
4034
<!-- System -->
4135
<PackageVersion Include="System.Net.Http" Version="4.3.4" />
36+
<!-- Source Link -->
37+
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="8.0.0" />
4238
</ItemGroup>
4339
</Project>

csharp/src/AdbcDrivers.Databricks.csproj

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFrameworks>netstandard2.0;net472;net8.0</TargetFrameworks>
3+
<TargetFrameworks Condition="'$(IsWindows)'=='true'">netstandard2.0;net472;net8.0</TargetFrameworks>
4+
<TargetFrameworks Condition="'$(TargetFrameworks)'==''">netstandard2.0;net8.0</TargetFrameworks>
45
<PackageReadmeFile>readme.md</PackageReadmeFile>
5-
<LangVersion>latest</LangVersion>
6-
<SignAssembly>true</SignAssembly>
7-
<AssemblyOriginatorKeyFile>..\AdbcDrivers.snk</AssemblyOriginatorKeyFile>
8-
<Nullable>enable</Nullable>
96
</PropertyGroup>
107
<ItemGroup>
118
<PackageReference Include="K4os.Compression.LZ4" />

csharp/test/AdbcDrivers.Databricks.Tests.csproj

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,6 @@
33
<PropertyGroup>
44
<TargetFrameworks Condition="'$(IsWindows)'=='true'">net8.0;net472</TargetFrameworks>
55
<TargetFrameworks Condition="'$(TargetFrameworks)'==''">net8.0</TargetFrameworks>
6-
<LangVersion>latest</LangVersion>
7-
<SignAssembly>true</SignAssembly>
8-
<AssemblyOriginatorKeyFile>..\AdbcDrivers.snk</AssemblyOriginatorKeyFile>
9-
<Nullable>enable</Nullable>
106
</PropertyGroup>
117

128
<ItemGroup>

0 commit comments

Comments
 (0)