mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-13 17:23:02 -05:00
Updating to dotnet 5.0 (#1218)
* adding network file validator contract * updating to dotnet 5 * reverting change in pipeline * updating target framework to 5.0 * updating srgen and using target framework var * reverting srgen back to 3.1 * Adding dotnet 3.1 to build * Fixing task def * removing global json * updating other 3.1 refs to 5.0 * removing netcore folder from build.cake * Moving and renaming dotnet 3.1 task
This commit is contained in:
@@ -7,7 +7,7 @@ os:
|
||||
# - osx
|
||||
|
||||
mono: none
|
||||
dotnet: 3.1
|
||||
dotnet: 5.0
|
||||
|
||||
# safelist
|
||||
branches:
|
||||
@@ -25,7 +25,7 @@ env:
|
||||
before_install:
|
||||
- if [ $TRAVIS_OS_NAME == "linux" ]; then
|
||||
sudo apt-get update;
|
||||
sudo apt-get install dotnet-sdk-3.1;
|
||||
sudo apt-get install dotnet-sdk-5.0;
|
||||
else
|
||||
brew update;
|
||||
fi
|
||||
|
||||
4
.vscode/launch.json
vendored
4
.vscode/launch.json
vendored
@@ -10,7 +10,7 @@
|
||||
"request": "launch",
|
||||
"preLaunchTask": "build",
|
||||
// If you have changed target frameworks, make sure to update the program path.
|
||||
"program": "${workspaceFolder}/src/Microsoft.SqlTools.ServiceLayer/bin/Debug/netcoreapp3.1/MicrosoftSqlToolsServiceLayer.dll",
|
||||
"program": "${workspaceFolder}/src/Microsoft.SqlTools.ServiceLayer/bin/Debug/net5.0/MicrosoftSqlToolsServiceLayer.dll",
|
||||
"args": [],
|
||||
"cwd": "${workspaceFolder}/src/Microsoft.SqlTools.ServiceLayer",
|
||||
// For more information about the 'console' field, see https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md#console-terminal-window
|
||||
@@ -24,7 +24,7 @@
|
||||
"request": "launch",
|
||||
"preLaunchTask": "build",
|
||||
// If you have changed target frameworks, make sure to update the program path.
|
||||
"program": "${workspaceFolder}/src/Microsoft.Kusto.ServiceLayer/bin/Debug/netcoreapp3.1/MicrosoftKustoServiceLayer.dll",
|
||||
"program": "${workspaceFolder}/src/Microsoft.Kusto.ServiceLayer/bin/Debug/net5.0/MicrosoftKustoServiceLayer.dll",
|
||||
"args": [],
|
||||
"cwd": "${workspaceFolder}/src/Microsoft.Kusto.ServiceLayer",
|
||||
// For more information about the 'console' field, see https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md#console-terminal-window
|
||||
|
||||
@@ -5,8 +5,8 @@ IF [%_BuildConfiguration%] NEQ [] GOTO Start
|
||||
SET _BuildConfiguration=Debug
|
||||
|
||||
:Start
|
||||
SET _PerfTestSourceLocation="%WORKINGDIR%\test\Microsoft.SqlTools.ServiceLayer.PerfTests\bin\%_BuildConfiguration%\netcoreapp3.1\win7-x64\publish"
|
||||
SET _ServiceSourceLocation="%WORKINGDIR%\src\Microsoft.SqlTools.ServiceLayer\bin\%_BuildConfiguration%\netcoreapp3.1\win7-x64\publish"
|
||||
SET _PerfTestSourceLocation="%WORKINGDIR%\test\Microsoft.SqlTools.ServiceLayer.PerfTests\bin\%_BuildConfiguration%\net5.0\win7-x64\publish"
|
||||
SET _ServiceSourceLocation="%WORKINGDIR%\src\Microsoft.SqlTools.ServiceLayer\bin\%_BuildConfiguration%\net5.0\win7-x64\publish"
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -43,6 +43,11 @@ steps:
|
||||
projects: '$(Build.SourcesDirectory)/src/Microsoft.Kusto.ServiceLayer'
|
||||
arguments: '--configuration Release'
|
||||
|
||||
- task: UseDotNet@2
|
||||
displayName: 'Installing dotnet 3.1 to run srgen (To be removed after srgen is updated)'
|
||||
inputs:
|
||||
version: 3.1.406
|
||||
|
||||
- task: BatchScript@1
|
||||
displayName: 'Run script build.cmd'
|
||||
inputs:
|
||||
@@ -152,46 +157,46 @@ steps:
|
||||
- task: ArchiveFiles@1
|
||||
displayName: 'Archive osx build'
|
||||
inputs:
|
||||
rootFolder: '$(Build.SourcesDirectory)/artifacts/publish/Microsoft.SqlTools.ServiceLayer/osx.10.11-x64/netcoreapp3.1'
|
||||
rootFolder: '$(Build.SourcesDirectory)/artifacts/publish/Microsoft.SqlTools.ServiceLayer/osx.10.11-x64/net5.0'
|
||||
includeRootFolder: false
|
||||
archiveType: tar
|
||||
archiveFile: '$(Build.SourcesDirectory)/artifacts/package/Microsoft.SqlTools.ServiceLayer-osx-x64-netcoreapp3.1.tar.gz'
|
||||
archiveFile: '$(Build.SourcesDirectory)/artifacts/package/Microsoft.SqlTools.ServiceLayer-osx-x64-net5.0.tar.gz'
|
||||
|
||||
- task: ArchiveFiles@1
|
||||
displayName: 'Archive rhel build'
|
||||
inputs:
|
||||
rootFolder: '$(Build.SourcesDirectory)/artifacts/publish/Microsoft.SqlTools.ServiceLayer/rhel.7.2-x64/netcoreapp3.1'
|
||||
rootFolder: '$(Build.SourcesDirectory)/artifacts/publish/Microsoft.SqlTools.ServiceLayer/rhel.7.2-x64/net5.0'
|
||||
includeRootFolder: false
|
||||
archiveType: tar
|
||||
archiveFile: '$(Build.SourcesDirectory)/artifacts/package/Microsoft.SqlTools.ServiceLayer-rhel-x64-netcoreapp3.1.tar.gz'
|
||||
archiveFile: '$(Build.SourcesDirectory)/artifacts/package/Microsoft.SqlTools.ServiceLayer-rhel-x64-net5.0.tar.gz'
|
||||
|
||||
- task: ArchiveFiles@1
|
||||
displayName: 'Archive windows 64 bit build'
|
||||
inputs:
|
||||
rootFolder: '$(Build.SourcesDirectory)/artifacts/publish/Microsoft.SqlTools.ServiceLayer/win7-x64/netcoreapp3.1'
|
||||
rootFolder: '$(Build.SourcesDirectory)/artifacts/publish/Microsoft.SqlTools.ServiceLayer/win7-x64/net5.0'
|
||||
includeRootFolder: false
|
||||
archiveFile: '$(Build.SourcesDirectory)/artifacts/package/Microsoft.SqlTools.ServiceLayer-win-x64-netcoreapp3.1.zip'
|
||||
archiveFile: '$(Build.SourcesDirectory)/artifacts/package/Microsoft.SqlTools.ServiceLayer-win-x64-net5.0.zip'
|
||||
|
||||
- task: ArchiveFiles@1
|
||||
displayName: 'Archive windows 32 bit build'
|
||||
inputs:
|
||||
rootFolder: '$(Build.SourcesDirectory)/artifacts/publish/Microsoft.SqlTools.ServiceLayer/win7-x86/netcoreapp3.1'
|
||||
rootFolder: '$(Build.SourcesDirectory)/artifacts/publish/Microsoft.SqlTools.ServiceLayer/win7-x86/net5.0'
|
||||
includeRootFolder: false
|
||||
archiveFile: '$(Build.SourcesDirectory)/artifacts/package/Microsoft.SqlTools.ServiceLayer-win-x86-netcoreapp3.1.zip'
|
||||
archiveFile: '$(Build.SourcesDirectory)/artifacts/package/Microsoft.SqlTools.ServiceLayer-win-x86-net5.0.zip'
|
||||
|
||||
- task: ArchiveFiles@1
|
||||
displayName: 'Archive windows10 arm 32 bit build'
|
||||
inputs:
|
||||
rootFolder: '$(Build.SourcesDirectory)/artifacts/publish/Microsoft.SqlTools.ServiceLayer/win10-arm/netcoreapp3.1'
|
||||
rootFolder: '$(Build.SourcesDirectory)/artifacts/publish/Microsoft.SqlTools.ServiceLayer/win10-arm/net5.0'
|
||||
includeRootFolder: false
|
||||
archiveFile: '$(Build.SourcesDirectory)/artifacts/package/Microsoft.SqlTools.ServiceLayer-win10-arm-netcoreapp3.1.zip'
|
||||
archiveFile: '$(Build.SourcesDirectory)/artifacts/package/Microsoft.SqlTools.ServiceLayer-win10-arm-net5.0.zip'
|
||||
|
||||
- task: ArchiveFiles@1
|
||||
displayName: 'Archive windows10 arm 64 bit build'
|
||||
inputs:
|
||||
rootFolder: '$(Build.SourcesDirectory)/artifacts/publish/Microsoft.SqlTools.ServiceLayer/win10-arm64/netcoreapp3.1'
|
||||
rootFolder: '$(Build.SourcesDirectory)/artifacts/publish/Microsoft.SqlTools.ServiceLayer/win10-arm64/net5.0'
|
||||
includeRootFolder: false
|
||||
archiveFile: '$(Build.SourcesDirectory)/artifacts/package/Microsoft.SqlTools.ServiceLayer-win10-arm64-netcoreapp3.1.zip'
|
||||
archiveFile: '$(Build.SourcesDirectory)/artifacts/package/Microsoft.SqlTools.ServiceLayer-win10-arm64-net5.0.zip'
|
||||
|
||||
- task: PublishBuildArtifacts@1
|
||||
displayName: 'Publish Artifact: drop'
|
||||
|
||||
@@ -31,7 +31,7 @@ steps:
|
||||
inputs:
|
||||
SourceFolder: '$(Agent.TempDirectory)'
|
||||
Contents: '**\testsettings.json'
|
||||
TargetFolder: '$(Build.SourcesDirectory)\test\Microsoft.SqlTools.ServiceLayer.IntegrationTests\bin\Debug\netcoreapp3.1'
|
||||
TargetFolder: '$(Build.SourcesDirectory)\test\Microsoft.SqlTools.ServiceLayer.IntegrationTests\bin\Debug\net5.0'
|
||||
|
||||
- task: DotNetCoreCLI@2
|
||||
displayName: 'Run integration tests'
|
||||
|
||||
@@ -271,7 +271,7 @@ Task("TestCore")
|
||||
.Does(() =>
|
||||
{
|
||||
var testProjects = buildPlan.TestProjects
|
||||
.Where(pair => pair.Value.Any(framework => framework.Contains("netcoreapp")))
|
||||
.Where(pair => pair.Value.Any(framework => framework.Contains("net")))
|
||||
.Select(pair => pair.Key)
|
||||
.ToList();
|
||||
|
||||
@@ -299,7 +299,7 @@ Task("Test")
|
||||
foreach (var framework in pair.Value)
|
||||
{
|
||||
// Testing against core happens in TestCore
|
||||
if (framework.Contains("netcoreapp"))
|
||||
if (framework.Contains("net"))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -3,20 +3,20 @@
|
||||
"DotNetFolder": ".dotnet",
|
||||
"DotNetInstallScriptURL": "https://dotnet.microsoft.com/download/dotnet-core/scripts/v1/",
|
||||
"DotNetChannel": "preview",
|
||||
"DotNetVersion": "3.1.202",
|
||||
"DotNetVersion": "5.0.301",
|
||||
"BuildToolsFolder": ".tools",
|
||||
"ArtifactsFolder": "artifacts",
|
||||
"PackageName": "Microsoft.SqlTools.ServiceLayer",
|
||||
"TestProjects": {
|
||||
"Microsoft.SqlTools.ServiceLayer.UnitTests": [
|
||||
"netcoreapp3.1"
|
||||
"net5.0"
|
||||
],
|
||||
"Microsoft.Kusto.ServiceLayer.UnitTests": [
|
||||
"netcoreapp3.1"
|
||||
"net5.0"
|
||||
]
|
||||
},
|
||||
"Frameworks": [
|
||||
"netcoreapp3.1"
|
||||
"net5.0"
|
||||
],
|
||||
"MainProjects": [
|
||||
"Microsoft.SqlTools.Credentials",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
<OutputType>Exe</OutputType>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"sdk": {
|
||||
"version": "3.1.406"
|
||||
"version": "5.0.301"
|
||||
}
|
||||
}
|
||||
@@ -2,7 +2,7 @@
|
||||
<packages>
|
||||
<package id="Cake" version="0.37.0" />
|
||||
<package id="Newtonsoft.Json" version="12.0.3" />
|
||||
<package id="Microsoft.Data.Tools.StringResourceTool" version="3.0.1" />
|
||||
<package id="Microsoft.Data.Tools.StringResourceTool" version="3.1.0" />
|
||||
<package id="Mono.TextTransform" version="1.0.0" />
|
||||
<package id="mssql.XliffParser" version="0.5.3" />
|
||||
<package id="mssql.ResX" version="0.2.0" />
|
||||
|
||||
@@ -19,9 +19,9 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<CredentialsTargetFramework>netcoreapp3.1</CredentialsTargetFramework>
|
||||
<ServiceLayerTargetFramework>netcoreapp3.1</ServiceLayerTargetFramework>
|
||||
<ResourceProviderTargetFramework>netcoreapp3.1</ResourceProviderTargetFramework>
|
||||
<CredentialsTargetFramework>net5.0</CredentialsTargetFramework>
|
||||
<ServiceLayerTargetFramework>net5.0</ServiceLayerTargetFramework>
|
||||
<ResourceProviderTargetFramework>net5.0</ResourceProviderTargetFramework>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<DebugType>portable</DebugType>
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
<AssemblyName>MicrosoftKustoServiceLayer</AssemblyName>
|
||||
<OutputType>Exe</OutputType>
|
||||
<EnableDefaultItems>false</EnableDefaultItems>
|
||||
<ValidateExecutableReferencesMatchSelfContained>false</ValidateExecutableReferencesMatchSelfContained>
|
||||
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
|
||||
<EnableDefaultEmbeddedResourceItems>false</EnableDefaultEmbeddedResourceItems>
|
||||
<EnableDefaultNoneItems>false</EnableDefaultNoneItems>
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
<AssemblyName>MicrosoftSqlToolsCredentials</AssemblyName>
|
||||
<OutputType>Exe</OutputType>
|
||||
<EnableDefaultItems>false</EnableDefaultItems>
|
||||
<ValidateExecutableReferencesMatchSelfContained>false</ValidateExecutableReferencesMatchSelfContained>
|
||||
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
|
||||
<EnableDefaultEmbeddedResourceItems>false</EnableDefaultEmbeddedResourceItems>
|
||||
<EmbeddedResourceUseDependentUponConvention>false</EmbeddedResourceUseDependentUponConvention>
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<TargetFramework>$(ServiceLayerTargetFramework)</TargetFramework>
|
||||
<AssemblyName>MicrosoftSqlToolsServiceLayer</AssemblyName>
|
||||
<OutputType>Exe</OutputType>
|
||||
<ValidateExecutableReferencesMatchSelfContained>false</ValidateExecutableReferencesMatchSelfContained>
|
||||
<EnableDefaultItems>false</EnableDefaultItems>
|
||||
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
|
||||
<EnableDefaultEmbeddedResourceItems>false</EnableDefaultEmbeddedResourceItems>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
SET WORKINGDIR=%~dp0
|
||||
SET REPOROOT=%WORKINGDIR%..\..
|
||||
SET NETCOREAPP3DIR=netcoreapp3.1
|
||||
SET SQLTOOLSSERVICE_EXE=%REPOROOT%\src\Microsoft.SqlTools.ServiceLayer\bin\Integration\%NETCOREAPP3DIR%\win7-x64\MicrosoftSqlToolsServiceLayer.exe
|
||||
SET NET5DIR=net5.0
|
||||
SET SQLTOOLSSERVICE_EXE=%REPOROOT%\src\Microsoft.SqlTools.ServiceLayer\bin\Integration\%NET5DIR%\win7-x64\MicrosoftSqlToolsServiceLayer.exe
|
||||
|
||||
|
||||
REM clean-up results from previous run
|
||||
@@ -69,13 +69,13 @@ REM dotnet.exe test %REPOROOT%\test\Microsoft.SqlTools.ServiceLayer.TestDriver.T
|
||||
|
||||
SET SERVICECODECOVERAGE=FALSE
|
||||
|
||||
%CODECOVERAGETOOL% -mergeoutput -register:user -target:dotnet.exe -targetargs:"test %REPOROOT%\test\Microsoft.SqlTools.ServiceLayer.TestDriver.Tests\Microsoft.SqlTools.ServiceLayer.TestDriver.Tests.csproj %DOTNETCONFIG%" -oldstyle -filter:"+[Microsoft.SqlTools.*]* +[MicrosoftSqlToolsServiceLayer*]* +[MicrosoftSqlToolsCredentials*]* -[xunit*]* -[Microsoft.SqlTools.ServiceLayer.Test*]* -[Microsoft.SqlTools.ServiceLayer.*Test*]* -[MicrosoftSqlToolsServiceLayer]Microsoft.SqlTools.ServiceLayer.Agent.* -[MicrosoftSqlToolsServiceLayer]Microsoft.SqlTools.ServiceLayer.DisasterRecovery.* -[MicrosoftSqlToolsServiceLayer]Microsoft.SqlTools.ServiceLayer.Profiler.* -[MicrosoftSqlToolsServiceLayer]Microsoft.SqlTools.ServiceLayer.Admin.* -[MicrosoftSqlToolsServiceLayer]Microsoft.SqlTools.ServiceLayer.Management.*" -output:coverage.xml -hideskipped:All -searchdirs:%REPOROOT%\test\Microsoft.SqlTools.ServiceLayer.TestDriver.Tests\bin\Debug\%NETCOREAPP3DIR%
|
||||
%CODECOVERAGETOOL% -mergeoutput -register:user -target:dotnet.exe -targetargs:"test %REPOROOT%\test\Microsoft.SqlTools.ServiceLayer.TestDriver.Tests\Microsoft.SqlTools.ServiceLayer.TestDriver.Tests.csproj %DOTNETCONFIG%" -oldstyle -filter:"+[Microsoft.SqlTools.*]* +[MicrosoftSqlToolsServiceLayer*]* +[MicrosoftSqlToolsCredentials*]* -[xunit*]* -[Microsoft.SqlTools.ServiceLayer.Test*]* -[Microsoft.SqlTools.ServiceLayer.*Test*]* -[MicrosoftSqlToolsServiceLayer]Microsoft.SqlTools.ServiceLayer.Agent.* -[MicrosoftSqlToolsServiceLayer]Microsoft.SqlTools.ServiceLayer.DisasterRecovery.* -[MicrosoftSqlToolsServiceLayer]Microsoft.SqlTools.ServiceLayer.Profiler.* -[MicrosoftSqlToolsServiceLayer]Microsoft.SqlTools.ServiceLayer.Admin.* -[MicrosoftSqlToolsServiceLayer]Microsoft.SqlTools.ServiceLayer.Management.*" -output:coverage.xml -hideskipped:All -searchdirs:%REPOROOT%\test\Microsoft.SqlTools.ServiceLayer.TestDriver.Tests\bin\Debug\%NET5DIR%
|
||||
|
||||
%CODECOVERAGETOOL% -mergeoutput -register:user -target:dotnet.exe -targetargs:"test %REPOROOT%\test\Microsoft.SqlTools.ServiceLayer.UnitTests\Microsoft.SqlTools.ServiceLayer.UnitTests.csproj %DOTNETCONFIG%" -oldstyle -filter:"+[Microsoft.SqlTools.*]* +[MicrosoftSqlToolsServiceLayer*]* +[MicrosoftSqlToolsCredentials*]* -[xunit*]* -[Microsoft.SqlTools.ServiceLayer.Test*]* -[Microsoft.SqlTools.ServiceLayer.*Test*]* -[MicrosoftSqlToolsServiceLayer]Microsoft.SqlTools.ServiceLayer.Agent.* -[MicrosoftSqlToolsServiceLayer]Microsoft.SqlTools.ServiceLayer.DisasterRecovery.* -[MicrosoftSqlToolsServiceLayer]Microsoft.SqlTools.ServiceLayer.Profiler.* -[MicrosoftSqlToolsServiceLayer]Microsoft.SqlTools.ServiceLayer.Admin.* -[MicrosoftSqlToolsServiceLayer]Microsoft.SqlTools.ServiceLayer.Management.*" -output:coverage.xml -hideskipped:All -searchdirs:%REPOROOT%\test\Microsoft.SqlTools.ServiceLayer.UnitTests\bin\Debug\%NETCOREAPP3DIR%
|
||||
%CODECOVERAGETOOL% -mergeoutput -register:user -target:dotnet.exe -targetargs:"test %REPOROOT%\test\Microsoft.SqlTools.ServiceLayer.UnitTests\Microsoft.SqlTools.ServiceLayer.UnitTests.csproj %DOTNETCONFIG%" -oldstyle -filter:"+[Microsoft.SqlTools.*]* +[MicrosoftSqlToolsServiceLayer*]* +[MicrosoftSqlToolsCredentials*]* -[xunit*]* -[Microsoft.SqlTools.ServiceLayer.Test*]* -[Microsoft.SqlTools.ServiceLayer.*Test*]* -[MicrosoftSqlToolsServiceLayer]Microsoft.SqlTools.ServiceLayer.Agent.* -[MicrosoftSqlToolsServiceLayer]Microsoft.SqlTools.ServiceLayer.DisasterRecovery.* -[MicrosoftSqlToolsServiceLayer]Microsoft.SqlTools.ServiceLayer.Profiler.* -[MicrosoftSqlToolsServiceLayer]Microsoft.SqlTools.ServiceLayer.Admin.* -[MicrosoftSqlToolsServiceLayer]Microsoft.SqlTools.ServiceLayer.Management.*" -output:coverage.xml -hideskipped:All -searchdirs:%REPOROOT%\test\Microsoft.SqlTools.ServiceLayer.UnitTests\bin\Debug\%NET5DIR%
|
||||
|
||||
%CODECOVERAGETOOL% -mergeoutput -register:user -target:dotnet.exe -targetargs:"test %REPOROOT%\test\Microsoft.SqlTools.ServiceLayer.IntegrationTests\Microsoft.SqlTools.ServiceLayer.IntegrationTests.csproj %DOTNETCONFIG%" -oldstyle -filter:"+[Microsoft.SqlTools.*]* +[MicrosoftSqlToolsServiceLayer*]* +[MicrosoftSqlToolsCredentials*]* -[xunit*]* -[Microsoft.SqlTools.ServiceLayer.Test*]* -[Microsoft.SqlTools.ServiceLayer.*Test*]* -[MicrosoftSqlToolsServiceLayer]Microsoft.SqlTools.ServiceLayer.Agent.* -[MicrosoftSqlToolsServiceLayer]Microsoft.SqlTools.ServiceLayer.DisasterRecovery.* -[MicrosoftSqlToolsServiceLayer]Microsoft.SqlTools.ServiceLayer.Profiler.* -[MicrosoftSqlToolsServiceLayer]Microsoft.SqlTools.ServiceLayer.Admin.* -[MicrosoftSqlToolsServiceLayer]Microsoft.SqlTools.ServiceLayer.Management.*" -output:coverage.xml -hideskipped:All -searchdirs:%REPOROOT%\test\Microsoft.SqlTools.ServiceLayer.IntegrationTests\bin\Debug\%NETCOREAPP3DIR%
|
||||
%CODECOVERAGETOOL% -mergeoutput -register:user -target:dotnet.exe -targetargs:"test %REPOROOT%\test\Microsoft.SqlTools.ServiceLayer.IntegrationTests\Microsoft.SqlTools.ServiceLayer.IntegrationTests.csproj %DOTNETCONFIG%" -oldstyle -filter:"+[Microsoft.SqlTools.*]* +[MicrosoftSqlToolsServiceLayer*]* +[MicrosoftSqlToolsCredentials*]* -[xunit*]* -[Microsoft.SqlTools.ServiceLayer.Test*]* -[Microsoft.SqlTools.ServiceLayer.*Test*]* -[MicrosoftSqlToolsServiceLayer]Microsoft.SqlTools.ServiceLayer.Agent.* -[MicrosoftSqlToolsServiceLayer]Microsoft.SqlTools.ServiceLayer.DisasterRecovery.* -[MicrosoftSqlToolsServiceLayer]Microsoft.SqlTools.ServiceLayer.Profiler.* -[MicrosoftSqlToolsServiceLayer]Microsoft.SqlTools.ServiceLayer.Admin.* -[MicrosoftSqlToolsServiceLayer]Microsoft.SqlTools.ServiceLayer.Management.*" -output:coverage.xml -hideskipped:All -searchdirs:%REPOROOT%\test\Microsoft.SqlTools.ServiceLayer.IntegrationTests\bin\Debug\%NET5DIR%
|
||||
|
||||
%CODECOVERAGETOOL% -mergeoutput -register:user -target:dotnet.exe -targetargs:"test %REPOROOT%\test\Microsoft.SqlTools.ManagedBatchParser.IntegrationTests\Microsoft.SqlTools.ManagedBatchParser.IntegrationTests.csproj %DOTNETCONFIG%" -oldstyle -filter:"+[Microsoft.SqlTools.*]* +[MicrosoftSqlToolsServiceLayer*]* +[MicrosoftSqlToolsCredentials*]* -[xunit*]* -[Microsoft.SqlTools.ServiceLayer.Test*]* -[Microsoft.SqlTools.ServiceLayer.*Test*]* -[MicrosoftSqlToolsServiceLayer]Microsoft.SqlTools.ServiceLayer.Agent.* -[MicrosoftSqlToolsServiceLayer]Microsoft.SqlTools.ServiceLayer.DisasterRecovery.* -[MicrosoftSqlToolsServiceLayer]Microsoft.SqlTools.ServiceLayer.Profiler.* -[MicrosoftSqlToolsServiceLayer]Microsoft.SqlTools.ServiceLayer.Admin.* -[MicrosoftSqlToolsServiceLayer]Microsoft.SqlTools.ServiceLayer.Management.*" -output:coverage.xml -hideskipped:All -searchdirs:%REPOROOT%\test\Microsoft.SqlTools.ManagedBatchParser.IntegrationTests\bin\Debug\%NETCOREAPP3DIR%
|
||||
%CODECOVERAGETOOL% -mergeoutput -register:user -target:dotnet.exe -targetargs:"test %REPOROOT%\test\Microsoft.SqlTools.ManagedBatchParser.IntegrationTests\Microsoft.SqlTools.ManagedBatchParser.IntegrationTests.csproj %DOTNETCONFIG%" -oldstyle -filter:"+[Microsoft.SqlTools.*]* +[MicrosoftSqlToolsServiceLayer*]* +[MicrosoftSqlToolsCredentials*]* -[xunit*]* -[Microsoft.SqlTools.ServiceLayer.Test*]* -[Microsoft.SqlTools.ServiceLayer.*Test*]* -[MicrosoftSqlToolsServiceLayer]Microsoft.SqlTools.ServiceLayer.Agent.* -[MicrosoftSqlToolsServiceLayer]Microsoft.SqlTools.ServiceLayer.DisasterRecovery.* -[MicrosoftSqlToolsServiceLayer]Microsoft.SqlTools.ServiceLayer.Profiler.* -[MicrosoftSqlToolsServiceLayer]Microsoft.SqlTools.ServiceLayer.Admin.* -[MicrosoftSqlToolsServiceLayer]Microsoft.SqlTools.ServiceLayer.Management.*" -output:coverage.xml -hideskipped:All -searchdirs:%REPOROOT%\test\Microsoft.SqlTools.ManagedBatchParser.IntegrationTests\bin\Debug\%NET5DIR%
|
||||
|
||||
REM Generate the report
|
||||
"%WORKINGDIR%packages\OpenCoverToCoberturaConverter.0.2.4.0\tools\OpenCoverToCoberturaConverter.exe" -input:coverage.xml -output:outputCobertura.xml -sources:%REPOROOT%\src\Microsoft.SqlTools.ServiceLayer
|
||||
|
||||
@@ -2,6 +2,6 @@
|
||||
<Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)../'))" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TestProjectsTargetFramework>netcoreapp3.1</TestProjectsTargetFramework>
|
||||
<TestProjectsTargetFramework>net5.0</TestProjectsTargetFramework>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -1,8 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||
|
||||
<TargetFramework>$(TestProjectsTargetFramework)</TargetFramework>
|
||||
<IsPackable>false</IsPackable>
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ namespace Microsoft.SqlTools.ServiceLayer.TestDriver.Driver
|
||||
|
||||
// Include a fallback value to for running tests within visual studio
|
||||
serviceHostExecutable =
|
||||
@"..\..\..\..\..\src\Microsoft.SqlTools.ServiceLayer\bin\Debug\netcoreapp3.1\win7-x64\MicrosoftSqlToolsServiceLayer.exe";
|
||||
@"..\..\..\..\..\src\Microsoft.SqlTools.ServiceLayer\bin\Debug\net5.0\win7-x64\MicrosoftSqlToolsServiceLayer.exe";
|
||||
if (!File.Exists(serviceHostExecutable))
|
||||
{
|
||||
serviceHostExecutable = Path.Combine(Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location), "MicrosoftSqlToolsServiceLayer.exe");
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
<PropertyGroup>
|
||||
<TargetFramework>$(TestProjectsTargetFramework)</TargetFramework>
|
||||
<EnableDefaultEmbeddedResourceItems>false</EnableDefaultEmbeddedResourceItems>
|
||||
<ValidateExecutableReferencesMatchSelfContained>false</ValidateExecutableReferencesMatchSelfContained>
|
||||
<EnableDefaultNoneItems>false</EnableDefaultNoneItems>
|
||||
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
|
||||
<DefineConstants>$(DefineConstants);NETCOREAPP1_0</DefineConstants>
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<TargetFramework>$(TestProjectsTargetFramework)</TargetFramework>
|
||||
<AssemblyName>Microsoft.SqlTools.ServiceLayer.TestEnvConfig</AssemblyName>
|
||||
<OutputType>Exe</OutputType>
|
||||
<ValidateExecutableReferencesMatchSelfContained>false</ValidateExecutableReferencesMatchSelfContained>
|
||||
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
|
||||
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
|
||||
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
|
||||
|
||||
@@ -64,7 +64,7 @@ namespace Microsoft.SqlTools.ServiceLayer.UnitTests.Connection
|
||||
|
||||
// Given a connection that times out and responds to cancellation
|
||||
var mockConnection = new Mock<DbConnection> { CallBase = true };
|
||||
CancellationToken token;
|
||||
CancellationToken token = new CancellationToken();
|
||||
bool ready = false;
|
||||
mockConnection.Setup(x => x.OpenAsync(It.IsAny<CancellationToken>()))
|
||||
.Callback<CancellationToken>(t =>
|
||||
@@ -125,7 +125,7 @@ namespace Microsoft.SqlTools.ServiceLayer.UnitTests.Connection
|
||||
|
||||
// Given a connection that times out and responds to cancellation
|
||||
var mockConnection = new Mock<DbConnection> { CallBase = true };
|
||||
CancellationToken token;
|
||||
CancellationToken token = new CancellationToken();
|
||||
bool ready = false;
|
||||
mockConnection.Setup(x => x.OpenAsync(It.IsAny<CancellationToken>()))
|
||||
.Callback<CancellationToken>(t =>
|
||||
@@ -193,7 +193,7 @@ namespace Microsoft.SqlTools.ServiceLayer.UnitTests.Connection
|
||||
|
||||
// Given a connection that times out and responds to cancellation
|
||||
var mockConnection = new Mock<DbConnection> { CallBase = true };
|
||||
CancellationToken token;
|
||||
CancellationToken token = new CancellationToken();
|
||||
bool ready = false;
|
||||
mockConnection.Setup(x => x.OpenAsync(It.IsAny<CancellationToken>()))
|
||||
.Callback<CancellationToken>(t =>
|
||||
|
||||
Reference in New Issue
Block a user