@@ -20,80 +20,80 @@ msbuild
20
20
```
21
21
22
22
``` bash
23
- msbuild / p:Configuration=Release
23
+ msbuild - p:Configuration=Release
24
24
# Builds the driver in 'Release' Configuration for `AnyCPU` platform.
25
25
```
26
26
27
27
``` bash
28
- msbuild / p:Platform=Win32
28
+ msbuild - p:Platform=Win32
29
29
# Builds the .NET Framework (NetFx) driver for Win32 (x86) platform on Windows in 'Debug' Configuration.
30
30
```
31
31
32
32
``` bash
33
- msbuild / t:clean
33
+ msbuild - t:clean
34
34
# Cleans all build directories.
35
35
```
36
36
37
37
``` bash
38
- msbuild / t:restore
38
+ msbuild - t:restore
39
39
# Restores Nuget Packages.
40
40
```
41
41
42
42
``` bash
43
- msbuild / t:BuildAllConfigurations
43
+ msbuild - t:BuildAllConfigurations
44
44
# Builds the driver for all target OSes and supported platforms.
45
45
```
46
46
47
47
``` bash
48
- msbuild / p:BuildNetFx=false
48
+ msbuild - p:BuildNetFx=false
49
49
# Skips building the .NET Framework (NetFx) Driver on Windows.
50
50
# On Unix the netfx driver build is automatically skipped.
51
51
```
52
52
53
53
``` bash
54
- msbuild / p:OSGroup=Unix
54
+ msbuild - p:OSGroup=Unix
55
55
# Builds the driver for the Unix platform.
56
56
```
57
57
58
58
``` bash
59
- msbuild / t:BuildNetCoreAllOS
59
+ msbuild - t:BuildNetCoreAllOS
60
60
# Builds the .NET Core driver for all Operating Systems.
61
61
```
62
62
63
63
## Building Tests
64
64
65
65
``` bash
66
- msbuild / t:BuildTestsNetCore
66
+ msbuild - t:BuildTestsNetCore
67
67
# Build the tests for the .NET Core driver in 'Debug' Configuration. Default .NET Core version is 2.1.
68
68
```
69
69
70
70
``` bash
71
- msbuild / t:BuildTestsNetFx
71
+ msbuild - t:BuildTestsNetFx
72
72
# Build the tests for the .NET Framework (NetFx) driver in 'Debug' Configuration. Default .NET Framework version is 4.6.1.
73
73
```
74
74
75
75
## Run Functional Tests
76
76
77
77
- Windows (` netfx x86 ` ):
78
78
``` bash
79
- dotnet test " src\Microsoft.Data.SqlClient\tests\FunctionalTests\Microsoft.Data.SqlClient.Tests.csproj" / p:Platform=" Win32" / p:Configuration=" Release" / p:TestTargetOS=" Windowsnetfx" --no-build -v n --filter " category!=nonnetfxtests&category!=failing&category!=nonwindowstests"
79
+ dotnet test " src\Microsoft.Data.SqlClient\tests\FunctionalTests\Microsoft.Data.SqlClient.Tests.csproj" - p:Platform=" Win32" - p:Configuration=" Release" - p:TestTargetOS=" Windowsnetfx" --no-build -v n --filter " category!=nonnetfxtests&category!=failing&category!=nonwindowstests"
80
80
```
81
81
82
82
- Windows (` netfx x64 ` ):
83
83
``` bash
84
- dotnet test " src\Microsoft.Data.SqlClient\tests\FunctionalTests\Microsoft.Data.SqlClient.Tests.csproj" / p:Platform=" x64" / p:Configuration=" Release" / p:TestTargetOS=" Windowsnetfx" --no-build -v n --filter " category!=nonnetfxtests&category!=failing&category!=nonwindowstests"
84
+ dotnet test " src\Microsoft.Data.SqlClient\tests\FunctionalTests\Microsoft.Data.SqlClient.Tests.csproj" - p:Platform=" x64" - p:Configuration=" Release" - p:TestTargetOS=" Windowsnetfx" --no-build -v n --filter " category!=nonnetfxtests&category!=failing&category!=nonwindowstests"
85
85
```
86
86
87
87
- AnyCPU:
88
88
89
89
Windows (` netcoreapp ` ):
90
90
``` bash
91
- dotnet test " src\Microsoft.Data.SqlClient\tests\FunctionalTests\Microsoft.Data.SqlClient.Tests.csproj" / p:Platform=" AnyCPU" / p:Configuration=" Release" / p:TestTargetOS=" Windowsnetcoreapp" --no-build -v n --filter " category!=nonnetcoreapptests&category!=failing&category!=nonwindowstests"
91
+ dotnet test " src\Microsoft.Data.SqlClient\tests\FunctionalTests\Microsoft.Data.SqlClient.Tests.csproj" - p:Platform=" AnyCPU" - p:Configuration=" Release" - p:TestTargetOS=" Windowsnetcoreapp" --no-build -v n --filter " category!=nonnetcoreapptests&category!=failing&category!=nonwindowstests"
92
92
```
93
93
94
94
Unix (` netcoreapp ` ):
95
95
``` bash
96
- dotnet test " src/Microsoft.Data.SqlClient/tests/FunctionalTests/Microsoft.Data.SqlClient.Tests.csproj" / p:Platform=" AnyCPU" / p:Configuration=" Release" / p:TestTargetOS=" Unixnetcoreapp" --no-build -v n --filter " category!=nonnetcoreapptests&category!=failing&category!=nonlinuxtests&category!=nonuaptests"
96
+ dotnet test " src/Microsoft.Data.SqlClient/tests/FunctionalTests/Microsoft.Data.SqlClient.Tests.csproj" - p:Platform=" AnyCPU" - p:Configuration=" Release" - p:TestTargetOS=" Unixnetcoreapp" --no-build -v n --filter " category!=nonnetcoreapptests&category!=failing&category!=nonlinuxtests&category!=nonuaptests"
97
97
```
98
98
99
99
## Run Manual Tests
@@ -127,34 +127,34 @@ Manual Tests require the below setup to run:
127
127
128
128
- Windows (` netfx x86 ` ):
129
129
``` bash
130
- dotnet test " src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" / p:Platform=" Win32" / p:Configuration=" Release" / p:TestTargetOS=" Windowsnetfx" --no-build -v n --filter " category!=nonnetfxtests&category!=failing&category!=nonwindowstests"
130
+ dotnet test " src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" - p:Platform=" Win32" - p:Configuration=" Release" - p:TestTargetOS=" Windowsnetfx" --no-build -v n --filter " category!=nonnetfxtests&category!=failing&category!=nonwindowstests"
131
131
```
132
132
133
133
- Windows (` netfx x64 ` ):
134
134
``` bash
135
- dotnet test " src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" / p:Platform=" x64" / p:Configuration=" Release" / p:TestTargetOS=" Windowsnetfx" --no-build -v n --filter " category!=nonnetfxtests&category!=failing&category!=nonwindowstests"
135
+ dotnet test " src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" - p:Platform=" x64" - p:Configuration=" Release" - p:TestTargetOS=" Windowsnetfx" --no-build -v n --filter " category!=nonnetfxtests&category!=failing&category!=nonwindowstests"
136
136
```
137
137
138
138
- AnyCPU:
139
139
140
140
Windows (` netfx ` ):
141
141
``` bash
142
- dotnet test " src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" / p:Platform=" AnyCPU" / p:Configuration=" Release" / p:TestTargetOS=" Windowsnetfx" --no-build -v n --filter " category!=nonnetfxtests&category!=failing&category!=nonwindowstests"
142
+ dotnet test " src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" - p:Platform=" AnyCPU" - p:Configuration=" Release" - p:TestTargetOS=" Windowsnetfx" --no-build -v n --filter " category!=nonnetfxtests&category!=failing&category!=nonwindowstests"
143
143
```
144
144
145
145
Windows (`netcoreapp`):
146
146
``` bash
147
- dotnet test " src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" / p:Platform=" AnyCPU" / p:Configuration=" Release" / p:TestTargetOS=" Windowsnetcoreapp" --no-build -v n --filter " category!=nonnetcoreapptests&category!=failing&category!=nonwindowstests"
147
+ dotnet test " src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" - p:Platform=" AnyCPU" - p:Configuration=" Release" - p:TestTargetOS=" Windowsnetcoreapp" --no-build -v n --filter " category!=nonnetcoreapptests&category!=failing&category!=nonwindowstests"
148
148
```
149
149
150
150
Unix (`netcoreapp`):
151
151
``` bash
152
- dotnet test " src/Microsoft.Data.SqlClient/tests/ManualTests/Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" / p:Platform=" AnyCPU" / p:Configuration=" Release" / p:TestTargetOS=" Unixnetcoreapp" --no-build -v n --filter " category!=nonnetcoreapptests&category!=failing&category!=nonlinuxtests&category!=nonuaptests"
152
+ dotnet test " src/Microsoft.Data.SqlClient/tests/ManualTests/Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" - p:Platform=" AnyCPU" - p:Configuration=" Release" - p:TestTargetOS=" Unixnetcoreapp" --no-build -v n --filter " category!=nonnetcoreapptests&category!=failing&category!=nonlinuxtests&category!=nonuaptests"
153
153
```
154
154
155
155
## Run A Single Test
156
156
``` bash
157
- dotnet test " src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" / p:Platform=" AnyCPU" / p:Configuration=" Release" / p:TestTargetOS=" Windowsnetcoreapp" --no-build -v n --filter " FullyQualifiedName=Microsoft.Data.SqlClient.ManualTesting.Tests.AlwaysEncrypted.CspProviderExt.TestKeysFromCertificatesCreatedWithMultipleCryptoProviders"
157
+ dotnet test " src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" - p:Platform=" AnyCPU" - p:Configuration=" Release" - p:TestTargetOS=" Windowsnetcoreapp" --no-build -v n --filter " FullyQualifiedName=Microsoft.Data.SqlClient.ManualTesting.Tests.AlwaysEncrypted.CspProviderExt.TestKeysFromCertificatesCreatedWithMultipleCryptoProviders"
158
158
```
159
159
160
160
## Testing with Custom ReferenceType
@@ -169,38 +169,38 @@ Tests can be built and run with custom "Reference Type" property that enables di
169
169
> ************* * IMPORTANT NOTE BEFORE PROCEEDING WITH "PACKAGE" AND "NETSTANDARDPACKAGE" REFERENCE TYPES ************** *
170
170
> CREATE A NUGET PACKAGE WITH BELOW COMMAND AND ADD TO LOCAL FOLDER + UPDATE NUGET CONFIG FILE TO READ FROM THAT LOCATION
171
171
> ```
172
- > msbuild / p:configuration=Release
172
+ > msbuild - p:configuration=Release
173
173
> ```
174
174
175
175
### Building Tests:
176
176
177
177
For .NET Core, all 4 reference types are supported:
178
178
179
179
```bash
180
- msbuild / t:BuildTestsNetCore / p:ReferenceType=Project
180
+ msbuild - t:BuildTestsNetCore - p:ReferenceType=Project
181
181
# Default setting uses Project Reference.
182
182
183
- msbuild / t:BuildTestsNetCore / p:ReferenceType=Package
183
+ msbuild - t:BuildTestsNetCore - p:ReferenceType=Package
184
184
185
- msbuild / t:BuildTestsNetCore / p:ReferenceType=NetStandard
185
+ msbuild - t:BuildTestsNetCore - p:ReferenceType=NetStandard
186
186
187
- msbuild / t:BuildTestsNetCore / p:ReferenceType=NetStandardPackage
187
+ msbuild - t:BuildTestsNetCore - p:ReferenceType=NetStandardPackage
188
188
```
189
189
190
190
For .NET Framework, below reference types are supported:
191
191
192
192
``` bash
193
- msbuild / t:BuildTestsNetFx / p:ReferenceType=Project
193
+ msbuild - t:BuildTestsNetFx - p:ReferenceType=Project
194
194
# Default setting uses Project Reference.
195
195
196
- msbuild / t:BuildTestsNetFx / p:ReferenceType=Package
196
+ msbuild - t:BuildTestsNetFx - p:ReferenceType=Package
197
197
```
198
198
199
199
### Running Tests:
200
200
201
201
Provide property to ` dotnet test ` commands for testing desired reference type.
202
202
```
203
- dotnet test / p:ReferenceType=Project ...
203
+ dotnet test - p:ReferenceType=Project ...
204
204
```
205
205
206
206
## Testing with Custom TargetFramework
@@ -210,25 +210,25 @@ Tests can be built and run with custom Target Frameworks. See the below examples
210
210
### Building Tests:
211
211
212
212
``` bash
213
- msbuild / t:BuildTestsNetFx / p:TargetNetFxVersion=net462
213
+ msbuild - t:BuildTestsNetFx - p:TargetNetFxVersion=net462
214
214
# Build the tests for custom TargetFramework (.NET Framework)
215
215
# Applicable values: net461 (Default) | net462 | net47 | net471 net472 | net48
216
216
```
217
217
218
218
``` bash
219
- msbuild / t:BuildTestsNetCore / p:TargetNetCoreVersion=netcoreapp3.1
219
+ msbuild - t:BuildTestsNetCore - p:TargetNetCoreVersion=netcoreapp3.1
220
220
# Build the tests for custom TargetFramework (.NET Core)
221
221
# Applicable values: netcoreapp2.1 | netcoreapp2.2 | netcoreapp3.1 | net5.0
222
222
```
223
223
224
224
### Running Tests:
225
225
226
226
``` bash
227
- dotnet test / p:TargetNetFxVersion=net462 ...
227
+ dotnet test - p:TargetNetFxVersion=net462 ...
228
228
# Use above property to run Functional Tests with custom TargetFramework (.NET Framework)
229
229
# Applicable values: net461 (Default) | net462 | net47 | net471 net472 | net48
230
230
231
- dotnet test / p:TargetNetCoreVersion=netcoreapp3.1 ...
231
+ dotnet test - p:TargetNetCoreVersion=netcoreapp3.1 ...
232
232
# Use above property to run Functional Tests with custom TargetFramework (.NET Core)
233
233
# Applicable values: netcoreapp2.1 | netcoreapp2.2 | netcoreapp3.1 | net5.0
234
234
```
0 commit comments