Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .config/CredScanSuppressions.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"tool": "Credential Scanner",
"suppressions": [
"suppressions":
[
{
"file": "src/Microsoft.Data.SqlClient/tests/Docker/DockerLinuxTest/Program.cs",
"justification": "Test projects should be skipped"
Expand Down
30 changes: 7 additions & 23 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ root = true
[*]
insert_final_newline = true
indent_style = space
indent_size = 4

[project.json]
indent_size = 2

# C# files
[*.cs]

indent_size = 4

# New line preferences
csharp_new_line_before_open_brace = all
csharp_new_line_before_else = true
Expand Down Expand Up @@ -66,7 +66,7 @@ dotnet_naming_symbols.static_fields.applicable_kinds = field
dotnet_naming_symbols.static_fields.required_modifiers = static

dotnet_naming_style.static_prefix_style.required_prefix = s_
dotnet_naming_style.static_prefix_style.capitalization = camel_case
dotnet_naming_style.static_prefix_style.capitalization = camel_case

# internal and private fields should be _camelCase
dotnet_naming_rule.camel_case_for_private_internal_fields.severity = suggestion
Expand All @@ -77,7 +77,7 @@ dotnet_naming_symbols.private_internal_fields.applicable_kinds = field
dotnet_naming_symbols.private_internal_fields.applicable_accessibilities = private, internal

dotnet_naming_style.camel_case_underscore_style.required_prefix = _
dotnet_naming_style.camel_case_underscore_style.capitalization = camel_case
dotnet_naming_style.camel_case_underscore_style.capitalization = camel_case

# Code style defaults
dotnet_sort_system_directives_first = true
Expand Down Expand Up @@ -143,25 +143,11 @@ dotnet_diagnostic.CA2100.severity = silent
# CA1416: Validate platform compatibility
dotnet_diagnostic.CA1416.severity = silent

[*.{csproj,vcxproj,vcxproj.filters,proj,nativeproj,locproj}]
indent_size = 2

# Xml build files
[*.builds]
indent_size = 2

# Xml files
[*.{xml,stylecop,resx,ruleset}]
indent_size = 2

# Xml config files
[*.{props,targets,config,nuspec}]
indent_size = 2

# Shell scripts
[*.sh]
end_of_line = lf
[*.{cmd, bat}]

[*.{bat,cmd,ps1}]
end_of_line = crlf

# Analyzers
Expand All @@ -171,5 +157,3 @@ dotnet_code_quality.ca1802.api_surface = private, internal
dotnet_code_quality.CA2100.excluded_type_names_with_derived_types = Microsoft.Data.SqlClient.ManualTesting.Tests.*
dotnet_diagnostic.xUnit1031.severity=none
dotnet_diagnostic.xUnit1030.severity=none


17 changes: 13 additions & 4 deletions BUILDGUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@

This document provides all the necessary details to build the driver and run tests present in the repository.

## .NET SDK

The projects in this repo require the .NET 9.0 SDK to build. Please ensure you
have the latest version of that SDK installed.

Tests and tools may require different .NET Runtimes that may be installed
independently. For example, tests targeting .NET 8.0 will need that runtime
installed.

## Visual Studio Pre-Requisites

This project should be built with Visual Studio 2019+ for the best compatibility. The required set of components are provided in the below file:
Expand Down Expand Up @@ -111,7 +120,7 @@ Manual Tests require the below setup to run:
|AADSecurePrincipalSecret | (Optional) A Secret defined for a registered application which has been granted permission to the database defined in the AADPasswordConnectionString. | {Secret} |
|AzureKeyVaultURL | (Optional) Azure Key Vault Identifier URL | `https://{keyvaultname}.vault.azure.net/` |
|AzureKeyVaultTenantId | (Optional) The Azure Active Directory tenant (directory) Id of the service principal. | _{Tenant ID of Active Directory}_ |
|SupportsIntegratedSecurity | (Optional) Whether or not the USER running tests has integrated security access to the target SQL Server.| `true` OR `false`|
|SupportsIntegratedSecurity | (Optional) Whether or not the USER running tests has integrated security access to the target SQL Server.| `true` OR `false`|
|LocalDbAppName | (Optional) If Local Db Testing is supported, this property configures the name of Local DB App instance available in client environment. Empty string value disables Local Db testing. | Name of Local Db App to connect to.|
|LocalDbSharedInstanceName | (Optional) If LocalDB testing is supported and the instance is shared, this property configures the name of the shared instance of LocalDB to connect to. | Name of shared instance of LocalDB. |
|FileStreamDirectory | (Optional) If File Stream is enabled on SQL Server, pass local directory path to be used for setting up File Stream enabled database. | `D:\\escaped\\absolute\\path\\to\\directory\\` |
Expand All @@ -130,7 +139,7 @@ Manual Tests require the below setup to run:
- Windows (`netfx x86`):

```bash
msbuild
msbuild
dotnet test "src\Microsoft.Data.SqlClient\tests\FunctionalTests\Microsoft.Data.SqlClient.Tests.csproj" -p:Platform="x86" -p:Configuration="Release" -p:TestTargetOS="Windowsnetfx" --no-build -v n --filter "category!=nonnetfxtests&category!=failing&category!=nonwindowstests"
```

Expand All @@ -141,11 +150,11 @@ dotnet test "src\Microsoft.Data.SqlClient\tests\FunctionalTests\Microsoft.Data.S
```

- AnyCPU:

Project reference only builds Driver with `AnyCPU` platform, and underlying process decides to run the tests with a compatible architecture (x64, x86, ARM64).

Windows (`netcoreapp`):

```bash
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"
```
Expand Down
Loading
Loading