Skip to content

Commit bf84827

Browse files
committed
Update the docs
1 parent 9b5d16a commit bf84827

File tree

4 files changed

+101
-94
lines changed

4 files changed

+101
-94
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# Changelog
44
- v5.2.0
5-
- Added multi-targeting support to eliminate prerelease Mono.Unix dependency on Windows .NET 5+.
5+
- Added multi-targeting support. The appropriate build is selected by NuGet based on target framework and OS.
66
- Fixed CRL validation to reject newly downloaded CRLs if their NextUpdate has already expired.
77
- v5.1.0
88
- Added `APPLICATION_PATH` to `CLIENT_ENVIRONMENT` sent during authentication to identify the application connecting to Snowflake.

README.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,17 @@ Starting from version **5.2.0**, the Snowflake .NET connector uses multi-targeti
2424

2525
| Target Framework | Platform | Description |
2626
|------------------|----------|-------------------------------------------------------------|
27-
| `net5.0-windows` | Windows (.NET 5+) | Optimized build for Windows without Mono.Unix |
28-
| `net5.0` | Linux, macOS (.NET 5+) | Full Unix file system support with Mono.Unix |
27+
| `net481` | Windows (.NET Framework 4.8.1) | Optimized build for Windows .NET Framework without Mono.Unix |
28+
| `net8.0-windows` | Windows (.NET 8+) | Optimized build for Windows .NET 8+ without Mono.Unix |
29+
| `net8.0` | Linux, macOS (.NET 8+) | Full Unix file system support with Mono.Unix |
2930
| `netstandard2.0` | All platforms | Backward compatibility for older .NET versions |
3031

3132
**What this means for you:**
3233

33-
- **Windows users** on .NET 5 or higher will automatically receive a build without the prerelease `Mono.Unix` dependency, resulting in a cleaner dependency tree.
34-
- **Linux and macOS users** on .NET 5 or higher will receive a build with full Unix file permissions support through `Mono.Unix`.
35-
- **Older .NET versions** will continue to use the `netstandard2.0` build for maximum compatibility.
34+
- **Windows users** on .NET Framework 4.8.1 will receive the `net481` build without the `Mono.Unix` dependency.
35+
- **Windows users** on .NET 8 or higher will receive the `net8.0-windows` build without the `Mono.Unix` dependency.
36+
- **Linux and macOS users** on .NET 8 or higher will receive the `net8.0`.
37+
- **Older .NET versions** (including older .NET Framework and .NET versions) will use the `netstandard2.0` build for backward compatibility.
3638

3739
The appropriate build is automatically selected by NuGet based on your application's target framework and operating system.
3840

Snowflake.Data/PlatformShims/MonoUnixWindowsShim.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
namespace Mono.Unix
1212
{
1313
[Flags]
14-
internal enum FileAccessPermissions
14+
public enum FileAccessPermissions
1515
{
1616
None = 0,
1717
OtherExecute = 1,
@@ -162,6 +162,9 @@ internal static class Syscall
162162
public static int mkdir(string path, FilePermissions permissions)
163163
=> throw new PlatformNotSupportedException(ErrorMessage);
164164

165+
public static int creat(string path, FilePermissions permissions)
166+
=> throw new PlatformNotSupportedException(ErrorMessage);
167+
165168
public static long chown(string path, int userId, int groupId)
166169
=> throw new PlatformNotSupportedException(ErrorMessage);
167170

Lines changed: 89 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -1,87 +1,89 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
2-
<PropertyGroup>
3-
<!-- net481 for Windows .NET Framework 4.8.1, net8.0-windows for Windows .NET 8+ -->
4-
<!-- netstandard2.0/net8.0 for Unix/Linux platforms -->
5-
<TargetFrameworks>netstandard2.0;net481;net8.0;net8.0-windows</TargetFrameworks>
6-
<Title>Snowflake.Data</Title>
7-
<PackageId>Snowflake.Data</PackageId>
8-
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
9-
<PackageProjectUrl>https://github.com/snowflakedb/snowflake-connector-net</PackageProjectUrl>
10-
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
11-
<PackageIconUrl>https://raw.githubusercontent.com/snowflakedb/snowflake-connector-net/master/Snowflake.Data/snowflake.ico</PackageIconUrl>
12-
<RepositoryUrl>https://github.com/snowflakedb/snowflake-connector-net</RepositoryUrl>
13-
<RepositoryType>git</RepositoryType>
14-
<Description>Snowflake Connector for .NET</Description>
15-
<Company>Snowflake Computing, Inc</Company>
16-
<Product>Snowflake Connector for .NET</Product>
17-
<Authors>Snowflake</Authors>
18-
<Version>5.1.0</Version>
19-
<DebugType>Full</DebugType>
20-
<LangVersion>8</LangVersion>
21-
</PropertyGroup>
22-
23-
<!-- Define WINDOWS_BUILD for all Windows-specific targets -->
24-
<PropertyGroup Condition="'$(TargetFramework)' == 'net481' OR '$(TargetFramework)' == 'net8.0-windows'">
25-
<DefineConstants>$(DefineConstants);WINDOWS_BUILD</DefineConstants>
26-
</PropertyGroup>
27-
28-
<ItemGroup>
29-
<PackageReference Include="Apache.Arrow" Version="14.0.2" />
30-
<PackageReference Include="AWSSDK.S3" Version="4.0.4" />
31-
<PackageReference Include="Google.Cloud.Storage.V1" Version="4.10.0" />
32-
<PackageReference Include="Azure.Storage.Blobs" Version="12.13.0" />
33-
<PackageReference Include="Azure.Storage.Common" Version="12.12.0" />
34-
<PackageReference Include="Microsoft.Extensions.Logging" Version="9.0.5" />
35-
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
36-
<PackageReference Include="BouncyCastle.Cryptography" Version="2.3.1" />
37-
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="6.34.0" />
38-
<PackageReference Include="System.Text.RegularExpressions" Version="4.3.1" />
39-
<PackageReference Include="Tomlyn.Signed" Version="0.17.0" />
40-
</ItemGroup>
41-
42-
<!-- Mono.Unix dependency ONLY for Unix/Linux platforms (netstandard2.0 and net8.0) -->
43-
<!-- NOT included for Windows targets: net481, net8.0-windows -->
44-
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0' OR '$(TargetFramework)' == 'net8.0'">
45-
<PackageReference Include="Mono.Unix" Version="7.1.0-final.1.21458.1" />
46-
</ItemGroup>
47-
48-
<!-- Exclude platform shims from all targets by default (SDK auto-includes all .cs files) -->
49-
<ItemGroup>
50-
<Compile Remove="PlatformShims\**\*.cs" />
51-
</ItemGroup>
52-
53-
<!-- Include Mono.Unix Windows shim for all Windows targets -->
54-
<ItemGroup Condition="'$(TargetFramework)' == 'net481' OR '$(TargetFramework)' == 'net8.0-windows'">
55-
<Compile Include="PlatformShims\MonoUnixWindowsShim.cs" />
56-
</ItemGroup>
57-
58-
<ItemGroup Condition="'$(Configuration)' != 'Release'">
59-
<InternalsVisibleTo Include="Snowflake.Data.Tests" />
60-
<!--needed by Moq to be able to mock internal interfaces-->
61-
<InternalsVisibleTo Include="DynamicProxyGenAssembly2" />
62-
</ItemGroup>
63-
64-
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
65-
<DebugType>full</DebugType>
66-
<DebugSymbols>True</DebugSymbols>
67-
</PropertyGroup>
68-
69-
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
70-
<DebugType>full</DebugType>
71-
<DebugSymbols>True</DebugSymbols>
72-
</PropertyGroup>
73-
74-
<PropertyGroup>
75-
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
76-
<GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
77-
<AssemblyVersion>$(Version)</AssemblyVersion>
78-
</PropertyGroup>
79-
80-
<PropertyGroup>
81-
<DefineConstants Condition="'$(DefineAdditionalConstants)' != ''">$(DefineConstants);$(DefineAdditionalConstants)</DefineConstants>
82-
</PropertyGroup>
83-
84-
<ItemGroup>
85-
<Folder Include="Properties\" />
86-
</ItemGroup>
87-
</Project>
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
<PropertyGroup>
3+
<TargetFrameworks>netstandard2.0;net481;net8.0;net8.0-windows</TargetFrameworks>
4+
<Title>Snowflake.Data</Title>
5+
<PackageId>Snowflake.Data</PackageId>
6+
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
7+
<PackageProjectUrl>https://github.com/snowflakedb/snowflake-connector-net</PackageProjectUrl>
8+
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
9+
<PackageIconUrl>https://raw.githubusercontent.com/snowflakedb/snowflake-connector-net/master/Snowflake.Data/snowflake.ico</PackageIconUrl>
10+
<RepositoryUrl>https://github.com/snowflakedb/snowflake-connector-net</RepositoryUrl>
11+
<RepositoryType>git</RepositoryType>
12+
<Description>Snowflake Connector for .NET</Description>
13+
<Company>Snowflake Computing, Inc</Company>
14+
<Product>Snowflake Connector for .NET</Product>
15+
<Authors>Snowflake</Authors>
16+
<Version>5.1.0</Version>
17+
<DebugType>Full</DebugType>
18+
<LangVersion>8</LangVersion>
19+
</PropertyGroup>
20+
21+
<!-- Define WINDOWS_BUILD for all Windows-specific targets -->
22+
<PropertyGroup Condition="'$(TargetFramework)' == 'net481' OR '$(TargetFramework)' == 'net8.0-windows'">
23+
<DefineConstants>$(DefineConstants);WINDOWS_BUILD</DefineConstants>
24+
</PropertyGroup>
25+
26+
<ItemGroup>
27+
<PackageReference Include="Apache.Arrow" Version="14.0.2" />
28+
<PackageReference Include="AWSSDK.S3" Version="4.0.4" />
29+
<PackageReference Include="Google.Cloud.Storage.V1" Version="4.10.0" />
30+
<PackageReference Include="Azure.Storage.Blobs" Version="12.13.0" />
31+
<PackageReference Include="Azure.Storage.Common" Version="12.12.0" />
32+
<PackageReference Include="Microsoft.Extensions.Logging" Version="9.0.5" />
33+
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
34+
<PackageReference Include="BouncyCastle.Cryptography" Version="2.3.1" />
35+
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="6.34.0" />
36+
<PackageReference Include="System.Text.RegularExpressions" Version="4.3.1" />
37+
<PackageReference Include="Tomlyn.Signed" Version="0.17.0" />
38+
</ItemGroup>
39+
40+
<!-- Mono.Unix dependency ONLY for Unix/Linux platforms (netstandard2.0 and net8.0) -->
41+
<!-- NOT included for Windows targets: net481, net8.0-windows -->
42+
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0' OR '$(TargetFramework)' == 'net8.0'">
43+
<PackageReference Include="Mono.Unix" Version="7.1.0-final.1.21458.1" />
44+
</ItemGroup>
45+
46+
<!-- Exclude platform shims from all targets by default (SDK auto-includes all .cs files) -->
47+
<ItemGroup>
48+
<Compile Remove="PlatformShims\**\*.cs" />
49+
</ItemGroup>
50+
51+
<!-- Include Mono.Unix Windows shim for all Windows targets -->
52+
<ItemGroup Condition="'$(TargetFramework)' == 'net481' OR '$(TargetFramework)' == 'net8.0-windows'">
53+
<Compile Include="PlatformShims\MonoUnixWindowsShim.cs" />
54+
</ItemGroup>
55+
56+
<ItemGroup Condition="'$(Configuration)' != 'Release'">
57+
<InternalsVisibleTo Include="Snowflake.Data.Tests" />
58+
<!--needed by Moq to be able to mock internal interfaces-->
59+
<InternalsVisibleTo Include="DynamicProxyGenAssembly2" />
60+
</ItemGroup>
61+
62+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
63+
<DebugType>full</DebugType>
64+
<DebugSymbols>True</DebugSymbols>
65+
</PropertyGroup>
66+
67+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
68+
<DebugType>full</DebugType>
69+
<DebugSymbols>True</DebugSymbols>
70+
</PropertyGroup>
71+
72+
<PropertyGroup>
73+
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
74+
<GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
75+
<AssemblyVersion>$(Version)</AssemblyVersion>
76+
</PropertyGroup>
77+
78+
<PropertyGroup>
79+
<DefineConstants Condition="'$(DefineAdditionalConstants)' != ''">$(DefineConstants);$(DefineAdditionalConstants)</DefineConstants>
80+
</PropertyGroup>
81+
82+
<ItemGroup>
83+
<Folder Include="Properties\" />
84+
</ItemGroup>
85+
86+
<ItemGroup Condition="'$(TargetFramework)' == 'net481'">
87+
<Reference Include="System.Web" />
88+
</ItemGroup>
89+
</Project>

0 commit comments

Comments
 (0)