Skip to content

Commit 68fc259

Browse files
author
Javad
authored
commit (#1166)
1 parent 23fcd00 commit 68fc259

File tree

5 files changed

+193
-193
lines changed

5 files changed

+193
-193
lines changed

BUILDGUIDE.md

+32-32
Original file line numberDiff line numberDiff line change
@@ -20,80 +20,80 @@ msbuild
2020
```
2121

2222
```bash
23-
msbuild /p:Configuration=Release
23+
msbuild -p:Configuration=Release
2424
# Builds the driver in 'Release' Configuration for `AnyCPU` platform.
2525
```
2626

2727
```bash
28-
msbuild /p:Platform=Win32
28+
msbuild -p:Platform=Win32
2929
# Builds the .NET Framework (NetFx) driver for Win32 (x86) platform on Windows in 'Debug' Configuration.
3030
```
3131

3232
```bash
33-
msbuild /t:clean
33+
msbuild -t:clean
3434
# Cleans all build directories.
3535
```
3636

3737
```bash
38-
msbuild /t:restore
38+
msbuild -t:restore
3939
# Restores Nuget Packages.
4040
```
4141

4242
```bash
43-
msbuild /t:BuildAllConfigurations
43+
msbuild -t:BuildAllConfigurations
4444
# Builds the driver for all target OSes and supported platforms.
4545
```
4646

4747
```bash
48-
msbuild /p:BuildNetFx=false
48+
msbuild -p:BuildNetFx=false
4949
# Skips building the .NET Framework (NetFx) Driver on Windows.
5050
# On Unix the netfx driver build is automatically skipped.
5151
```
5252

5353
```bash
54-
msbuild /p:OSGroup=Unix
54+
msbuild -p:OSGroup=Unix
5555
# Builds the driver for the Unix platform.
5656
```
5757

5858
```bash
59-
msbuild /t:BuildNetCoreAllOS
59+
msbuild -t:BuildNetCoreAllOS
6060
# Builds the .NET Core driver for all Operating Systems.
6161
```
6262

6363
## Building Tests
6464

6565
```bash
66-
msbuild /t:BuildTestsNetCore
66+
msbuild -t:BuildTestsNetCore
6767
# Build the tests for the .NET Core driver in 'Debug' Configuration. Default .NET Core version is 2.1.
6868
```
6969

7070
```bash
71-
msbuild /t:BuildTestsNetFx
71+
msbuild -t:BuildTestsNetFx
7272
# Build the tests for the .NET Framework (NetFx) driver in 'Debug' Configuration. Default .NET Framework version is 4.6.1.
7373
```
7474

7575
## Run Functional Tests
7676

7777
- Windows (`netfx x86`):
7878
```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"
8080
```
8181

8282
- Windows (`netfx x64`):
8383
```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"
8585
```
8686

8787
- AnyCPU:
8888

8989
Windows (`netcoreapp`):
9090
```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"
9292
```
9393

9494
Unix (`netcoreapp`):
9595
```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"
9797
```
9898

9999
## Run Manual Tests
@@ -127,34 +127,34 @@ Manual Tests require the below setup to run:
127127

128128
- Windows (`netfx x86`):
129129
```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"
131131
```
132132

133133
- Windows (`netfx x64`):
134134
```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"
136136
```
137137

138138
- AnyCPU:
139139

140140
Windows (`netfx`):
141141
```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"
143143
```
144144

145145
Windows (`netcoreapp`):
146146
```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"
148148
```
149149

150150
Unix (`netcoreapp`):
151151
```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"
153153
```
154154

155155
## Run A Single Test
156156
```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"
158158
```
159159

160160
## Testing with Custom ReferenceType
@@ -169,38 +169,38 @@ Tests can be built and run with custom "Reference Type" property that enables di
169169
> ************** IMPORTANT NOTE BEFORE PROCEEDING WITH "PACKAGE" AND "NETSTANDARDPACKAGE" REFERENCE TYPES ***************
170170
> CREATE A NUGET PACKAGE WITH BELOW COMMAND AND ADD TO LOCAL FOLDER + UPDATE NUGET CONFIG FILE TO READ FROM THAT LOCATION
171171
> ```
172-
> msbuild /p:configuration=Release
172+
> msbuild -p:configuration=Release
173173
> ```
174174
175175
### Building Tests:
176176
177177
For .NET Core, all 4 reference types are supported:
178178
179179
```bash
180-
msbuild /t:BuildTestsNetCore /p:ReferenceType=Project
180+
msbuild -t:BuildTestsNetCore -p:ReferenceType=Project
181181
# Default setting uses Project Reference.
182182
183-
msbuild /t:BuildTestsNetCore /p:ReferenceType=Package
183+
msbuild -t:BuildTestsNetCore -p:ReferenceType=Package
184184
185-
msbuild /t:BuildTestsNetCore /p:ReferenceType=NetStandard
185+
msbuild -t:BuildTestsNetCore -p:ReferenceType=NetStandard
186186
187-
msbuild /t:BuildTestsNetCore /p:ReferenceType=NetStandardPackage
187+
msbuild -t:BuildTestsNetCore -p:ReferenceType=NetStandardPackage
188188
```
189189
190190
For .NET Framework, below reference types are supported:
191191

192192
```bash
193-
msbuild /t:BuildTestsNetFx /p:ReferenceType=Project
193+
msbuild -t:BuildTestsNetFx -p:ReferenceType=Project
194194
# Default setting uses Project Reference.
195195

196-
msbuild /t:BuildTestsNetFx /p:ReferenceType=Package
196+
msbuild -t:BuildTestsNetFx -p:ReferenceType=Package
197197
```
198198

199199
### Running Tests:
200200

201201
Provide property to `dotnet test` commands for testing desired reference type.
202202
```
203-
dotnet test /p:ReferenceType=Project ...
203+
dotnet test -p:ReferenceType=Project ...
204204
```
205205

206206
## Testing with Custom TargetFramework
@@ -210,25 +210,25 @@ Tests can be built and run with custom Target Frameworks. See the below examples
210210
### Building Tests:
211211

212212
```bash
213-
msbuild /t:BuildTestsNetFx /p:TargetNetFxVersion=net462
213+
msbuild -t:BuildTestsNetFx -p:TargetNetFxVersion=net462
214214
# Build the tests for custom TargetFramework (.NET Framework)
215215
# Applicable values: net461 (Default) | net462 | net47 | net471 net472 | net48
216216
```
217217

218218
```bash
219-
msbuild /t:BuildTestsNetCore /p:TargetNetCoreVersion=netcoreapp3.1
219+
msbuild -t:BuildTestsNetCore -p:TargetNetCoreVersion=netcoreapp3.1
220220
# Build the tests for custom TargetFramework (.NET Core)
221221
# Applicable values: netcoreapp2.1 | netcoreapp2.2 | netcoreapp3.1 | net5.0
222222
```
223223

224224
### Running Tests:
225225

226226
```bash
227-
dotnet test /p:TargetNetFxVersion=net462 ...
227+
dotnet test -p:TargetNetFxVersion=net462 ...
228228
# Use above property to run Functional Tests with custom TargetFramework (.NET Framework)
229229
# Applicable values: net461 (Default) | net462 | net47 | net471 net472 | net48
230230

231-
dotnet test /p:TargetNetCoreVersion=netcoreapp3.1 ...
231+
dotnet test -p:TargetNetCoreVersion=netcoreapp3.1 ...
232232
# Use above property to run Functional Tests with custom TargetFramework (.NET Core)
233233
# Applicable values: netcoreapp2.1 | netcoreapp2.2 | netcoreapp3.1 | net5.0
234234
```

0 commit comments

Comments
 (0)