-
Notifications
You must be signed in to change notification settings - Fork 299
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upload source code for Microsoft.Data.SqlClient (#166)
- Loading branch information
1 parent
9048729
commit 2ddf3a3
Showing
1,161 changed files
with
493,137 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
############################################################################### | ||
# Set default behavior to automatically normalize line endings. | ||
############################################################################### | ||
* text=auto | ||
|
||
############################################################################### | ||
# Set default behavior for command prompt diff. | ||
# | ||
# This is need for earlier builds of msysgit that does not have it on by | ||
# default for csharp files. | ||
# Note: This is only used by command line | ||
############################################################################### | ||
#*.cs diff=csharp | ||
|
||
############################################################################### | ||
# Set the merge driver for project and solution files | ||
# | ||
# Merging from the command prompt will add diff markers to the files if there | ||
# are conflicts (Merging from VS is not affected by the settings below, in VS | ||
# the diff markers are never inserted). Diff markers may cause the following | ||
# file extensions to fail to load in VS. An alternative would be to treat | ||
# these files as binary and thus will always conflict and require user | ||
# intervention with every merge. To do so, just uncomment the entries below | ||
############################################################################### | ||
#*.sln merge=binary | ||
#*.csproj merge=binary | ||
#*.vbproj merge=binary | ||
#*.vcxproj merge=binary | ||
#*.vcproj merge=binary | ||
#*.dbproj merge=binary | ||
#*.fsproj merge=binary | ||
#*.lsproj merge=binary | ||
#*.wixproj merge=binary | ||
#*.modelproj merge=binary | ||
#*.sqlproj merge=binary | ||
#*.wwaproj merge=binary | ||
|
||
############################################################################### | ||
# behavior for image files | ||
# | ||
# image files are treated as binary by default. | ||
############################################################################### | ||
#*.jpg binary | ||
#*.png binary | ||
#*.gif binary | ||
|
||
############################################################################### | ||
# diff behavior for common document formats | ||
# | ||
# Convert binary document formats to text before diffing them. This feature | ||
# is only available from the command line. Turn it on by uncommenting the | ||
# entries below. | ||
############################################################################### | ||
#*.doc diff=astextplain | ||
#*.DOC diff=astextplain | ||
#*.docx diff=astextplain | ||
#*.DOCX diff=astextplain | ||
#*.dot diff=astextplain | ||
#*.DOT diff=astextplain | ||
#*.pdf diff=astextplain | ||
#*.PDF diff=astextplain | ||
#*.rtf diff=astextplain | ||
#*.RTF diff=astextplain |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,136 @@ | ||
# Guidelines for Building Microsoft.Data.SqlClient | ||
|
||
This document provides all the necessary details to build the driver and run tests present in the repository. | ||
|
||
## Visual Studio Pre-Requisites | ||
|
||
This project should be ideally built with Visual Studio 2017+ for the best compatibility. Use either of the two environments with their required set of compoenents as mentioned below: | ||
- **Visual Studio 2017** with imported components: [VS17Components](/tools/vsconfig/VS17Components.vsconfig) | ||
- **Visual Studio 2019** with imported components: [VS19Components](/tools/vsconfig/VS19Components.vsconfig) | ||
|
||
Once the environment is setup properly, execute the desired set of commands below from the _root_ folder to perform the respective operations: | ||
|
||
## Building the driver | ||
|
||
```bash | ||
# Default Build Configuration: | ||
|
||
> msbuild | ||
# Builds the driver for the Client OS in 'Debug' Configuration for 'AnyCPU' platform. | ||
# Both .Net Framework (NetFx) and .Net Core drivers are built by default (as supported by Client OS). | ||
``` | ||
|
||
```bash | ||
> msbuild /p:Configuration=Release | ||
# Builds the driver in 'Release' Configuration. | ||
``` | ||
|
||
```bash | ||
> msbuild /p:Platform=x86 | ||
# Builds the .Net Framework (NetFx) driver for Win32 (x86) platform on Windows. | ||
``` | ||
|
||
```bash | ||
> msbuild /t:clean | ||
# Cleans all build directories. | ||
``` | ||
|
||
```bash | ||
> msbuild /t:restore | ||
# Restores Nuget Packages. | ||
``` | ||
|
||
```bash | ||
> msbuild /t:BuildAllConfigurations | ||
# Builds the driver for all target OSes and supported platforms. | ||
``` | ||
|
||
```bash | ||
> msbuild /p:BuildNetFx=false | ||
# Skips building the .Net Framework (NetFx) Driver on Windows. | ||
# On Unix the netfx driver build is automatically skipped. | ||
``` | ||
|
||
```bash | ||
> msbuild /p:OSGroup=Unix | ||
# Builds the driver for the Unix platform. | ||
``` | ||
|
||
```bash | ||
> msbuild /t:BuildAllOSes | ||
# Builds the driver for all Operating Systems. | ||
``` | ||
|
||
## Building Tests | ||
|
||
```bash | ||
> msbuild /t:BuildTestsNetCore | ||
# Build tests for the .Net Core driver. | ||
``` | ||
|
||
```bash | ||
> msbuild /t:BuildTestsNetFx | ||
# Build tests for the .Net Framework (NetFx) driver. | ||
``` | ||
|
||
## Run Functional Tests | ||
|
||
Windows (`netcoreapp2.1`): | ||
```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" | ||
``` | ||
|
||
Windows (`net46 x86`): | ||
```bash | ||
> 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" | ||
``` | ||
|
||
Windows (`net46 x64`): | ||
```bash | ||
> 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" | ||
``` | ||
|
||
Unix (`netcoreapp2.1`): | ||
```bash | ||
> 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" | ||
``` | ||
|
||
## Run Manual Tests | ||
|
||
### Pre-Requisites for running Manual tests: | ||
Manual Tests require the below setup to run: | ||
* SQL Server with enabled Shared Memory, TCP and Named Pipes Protocols and access to the Client OS. | ||
* Databases "NORTHWIND" and "UdtTestDb" present in SQL Server, created using SQL scripts [createNorthwindDb.sql](tools\testsql\createNorthwindDb.sql) and [createUdtTestDb.sql](tools\testsql\createUdtTestDb.sql). | ||
* Environment variables configured on the Client OS: | ||
|
||
|Env Variable|Description|Value| | ||
|------|--------|-------------------| | ||
|TEST_NP_CONN_STR | Connection String for Named Pipes enabled SQL Server instance.| `Server=\\{servername}\pipe\sql\query;Database={Database_Name};Trusted_Connection=True;` <br/> OR <br/> `Data Source=np:{servername};Initial Catalog={Database_Name};Integrated Security=True;`| | ||
|TEST_TCP_CONN_STR | Connection String for TCP enabled SQL Server instance. | `Server={servername};Database={Database_Name};Trusted_Connection=True;` <br/> OR `Data Source={servername};Initial Catalog={Database_Name};Integrated Security=True;`| | ||
|AAD_PASSWORD_CONN_STR | (Optional) Connection String for testing Azure Active Directory Password Authentication. | `Data Source={server.database.windows.net}; Initial Catalog={Azure_DB_Name};Authentication=Active Directory Password; User ID={AAD_User}; Password={AAD_User_Password};`| | ||
|TEST_ACCESSTOKEN_SETUP| (Optional) Contains the Access Token to be used for tests.| _<OAuth 2.0 Access Token>_ | | ||
|TEST_LOCALDB_INSTALLED| (Optional) Whether or not a LocalDb instance of SQL Server is installed on the machine running the tests. |`1` OR `0`| | ||
|TEST_INTEGRATEDSECURITY_SETUP| (Optional) Whether or not the USER running tests has integrated security access to the target SQL Server.| `1` OR `0`| | ||
|TEST_FILESTREAM_SETUP| (Optional) Whether or not FileStream is enabled on SQL Server| `1` OR `0`| | ||
|
||
Commands to run tests: | ||
|
||
Windows (`netcoreapp2.1`): | ||
```bash | ||
> 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" | ||
``` | ||
|
||
Windows (`net46 x86`): | ||
```bash | ||
> 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" | ||
``` | ||
|
||
Windows (`net46 x64`): | ||
```bash | ||
> 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" | ||
``` | ||
|
||
Unix (`netcoreapp2.1`): | ||
```bash | ||
> 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" | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Changelog | ||
All notable changes to this project will be documented in this file. | ||
|
||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) | ||
|
||
## [Stable Release 1.0.19239.1] - 2019-08-27 | ||
|
||
Initial release. Release Notes uploaded in [1.0.md](release-notes\1.0\1.0.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"Projects": [ | ||
{ | ||
"LanguageSet": "AzureKatal_Languages", | ||
"LocItems": [ | ||
{ | ||
"SourceFile": "src\\Microsoft.Data.SqlClient\\netfx\\src\\Resources\\Strings.resx", | ||
"CopyOption": "LangIDOnName", | ||
"OutputPath": "src\\Microsoft.Data.SqlClient\\netfx\\src\\Resources" | ||
} | ||
] | ||
} | ||
] | ||
} |
Oops, something went wrong.