Skip to content

Commit 1fdb35f

Browse files
authored
CSHARP-5182: Provide Strong-Named Assembly of libmongocrypt (#864)
1 parent 239aae0 commit 1fdb35f

File tree

7 files changed

+13
-6
lines changed

7 files changed

+13
-6
lines changed

.evergreen/config.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1093,7 +1093,7 @@ buildvariants:
10931093
- build-and-test-and-upload
10941094
- build-and-test-shared-bson
10951095
- build-and-test-asan-mac
1096-
- build-and-test-csharp
1096+
# - build-and-test-csharp // temporary removed to make strong named release.
10971097
- test-java
10981098
- name: rhel72-zseries-test
10991099
display_name: "RHEL 7.2 on zSeries"
@@ -1134,7 +1134,7 @@ buildvariants:
11341134
tasks:
11351135
- build-and-test-and-upload
11361136
- build-and-test-shared-bson
1137-
- build-and-test-csharp
1137+
# - build-and-test-csharp // temporary removed to make strong named release.
11381138
- test-java
11391139
- name: windows-test-python
11401140
display_name: "Windows Python"
@@ -1447,7 +1447,7 @@ buildvariants:
14471447
- build-and-test-and-upload
14481448
- build-and-test-shared-bson
14491449
- build-and-test-asan
1450-
- build-and-test-csharp
1450+
# - build-and-test-csharp // temporary removed to make strong named release.
14511451
- test-java
14521452
- name: publish-packages
14531453
distros:
@@ -1489,7 +1489,7 @@ buildvariants:
14891489
- build-and-test-and-upload
14901490
- build-and-test-shared-bson
14911491
- build-and-test-asan
1492-
- build-and-test-csharp
1492+
# - build-and-test-csharp // temporary removed to make strong named release.
14931493
- test-java
14941494
- upload-java
14951495
- publish-packages

bindings/cs/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11

22
configure_file(cs.sln cs.sln COPYONLY)
3+
configure_file(MongoDB.Driver.snk MongoDB.Driver.snk COPYONLY)
34

45
configure_file(MongoDB.Libmongocrypt/MongoDB.Libmongocrypt.csproj MongoDB.Libmongocrypt/MongoDB.Libmongocrypt.csproj COPYONLY)
56
configure_file(MongoDB.Libmongocrypt/Package.include.template.csproj MongoDB.Libmongocrypt/Package.csproj.include)

bindings/cs/MongoDB.Driver.snk

596 Bytes
Binary file not shown.

bindings/cs/MongoDB.Libmongocrypt.Test/MongoDB.Libmongocrypt.Test.csproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66

77
<Platforms>AnyCPU</Platforms>
88
<IsPackable>false</IsPackable>
9+
<SignAssembly>true</SignAssembly>
10+
<AssemblyOriginatorKeyFile>..\MongoDB.Driver.snk</AssemblyOriginatorKeyFile>
911
</PropertyGroup>
1012

1113
<ItemGroup>

bindings/cs/MongoDB.Libmongocrypt.Test32/MongoDB.Libmongocrypt.Test32.csproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
<TargetFrameworks>net472;netcoreapp2.1;netcoreapp3.0</TargetFrameworks>
55
<TargetFrameworks Condition="'$(OS)' != 'Windows_NT'">netcoreapp2.1;netcoreapp3.0</TargetFrameworks>
66
<IsPackable>false</IsPackable>
7+
<SignAssembly>true</SignAssembly>
8+
<AssemblyOriginatorKeyFile>..\MongoDB.Driver.snk</AssemblyOriginatorKeyFile>
79
</PropertyGroup>
810

911
<ItemGroup>
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
using System.Runtime.CompilerServices;
22

3-
[assembly: InternalsVisibleTo("MongoDB.Libmongocrypt.Test")]
4-
[assembly: InternalsVisibleTo("MongoDB.Libmongocrypt.Test32")]
3+
[assembly: InternalsVisibleTo("MongoDB.Libmongocrypt.Test, PublicKey=002400000480000094000000060200000024000052534131000400000100010035287f0d3883c0a075c88e0cda3ce93b621003ecbd5e920d4a8c7238564f4d2f4f68116aca28c9b21341dc3a877679c14556192b2b2f5fe2c11d624e0894d308ff7b94bf6fd72aef1b41017ffe2572e99019d1c61963e68cd0ed67734a42cb333b808e3867cbe631937214e32e409fb1fa62fdb69d494c2530e64a40e417d6ee")]
4+
[assembly: InternalsVisibleTo("MongoDB.Libmongocrypt.Test32, PublicKey=002400000480000094000000060200000024000052534131000400000100010035287f0d3883c0a075c88e0cda3ce93b621003ecbd5e920d4a8c7238564f4d2f4f68116aca28c9b21341dc3a877679c14556192b2b2f5fe2c11d624e0894d308ff7b94bf6fd72aef1b41017ffe2572e99019d1c61963e68cd0ed67734a42cb333b808e3867cbe631937214e32e409fb1fa62fdb69d494c2530e64a40e417d6ee")]

bindings/cs/MongoDB.Libmongocrypt/MongoDB.Libmongocrypt.csproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424
<PackageTags>mongodb;mongo;nosql</PackageTags>
2525
<PackageLanguage>en-US</PackageLanguage>
2626
<IncludeSymbols>true</IncludeSymbols>
27+
<SignAssembly>true</SignAssembly>
28+
<AssemblyOriginatorKeyFile>..\MongoDB.Driver.snk</AssemblyOriginatorKeyFile>
2729
</PropertyGroup>
2830

2931
<PropertyGroup>

0 commit comments

Comments
 (0)