diff --git a/.vscode/launch.json b/.vscode/launch.json index 310e6db0..3d5fc0f5 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -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/net7.0/MicrosoftSqlToolsServiceLayer.dll", + "program": "${workspaceFolder}/src/Microsoft.SqlTools.ServiceLayer/bin/Debug/net6.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/net7.0/MicrosoftKustoServiceLayer.dll", + "program": "${workspaceFolder}/src/Microsoft.Kusto.ServiceLayer/bin/Debug/net6.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 diff --git a/Directory.Build.props b/Directory.Build.props index 5f34946c..7a5a3434 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -2,7 +2,7 @@ true true - net7.0 + net6.0 $(MSBuildThisFileDirectory) @@ -29,9 +29,5 @@ true enable - - $(NoWarn);CS8600;CS8601;CS8602;CS8603;CS8604;CS8605;CS8618;CS8620;CS8622;CS8625;CS8629;CS8632;CS8769;CS8765 - $(NoWarn);CS1998;CS8597;CS8612;CS8767;CS0168;CS0169;SYSLIB0012;SYSLIB0013;NETSDK1187 - diff --git a/RefreshDllsForTestRun.cmd b/RefreshDllsForTestRun.cmd index f79896a0..3360ca20 100644 --- a/RefreshDllsForTestRun.cmd +++ b/RefreshDllsForTestRun.cmd @@ -5,8 +5,8 @@ IF [%_BuildConfiguration%] NEQ [] GOTO Start SET _BuildConfiguration=Debug :Start -SET _PerfTestSourceLocation="%WORKINGDIR%\test\Microsoft.SqlTools.ServiceLayer.PerfTests\bin\%_BuildConfiguration%\net7.0\win-x64\publish" -SET _ServiceSourceLocation="%WORKINGDIR%\src\Microsoft.SqlTools.ServiceLayer\bin\%_BuildConfiguration%\net7.0\win-x64\publish" +SET _PerfTestSourceLocation="%WORKINGDIR%\test\Microsoft.SqlTools.ServiceLayer.PerfTests\bin\%_BuildConfiguration%\net6.0\win-x64\publish" +SET _ServiceSourceLocation="%WORKINGDIR%\src\Microsoft.SqlTools.ServiceLayer\bin\%_BuildConfiguration%\net6.0\win-x64\publish" diff --git a/azure-pipelines/build.yml b/azure-pipelines/build.yml index f1684c5d..98dc5f71 100644 --- a/azure-pipelines/build.yml +++ b/azure-pipelines/build.yml @@ -1,11 +1,4 @@ steps: - -- task: UseDotNet@2 - displayName: 'Use .NET Core 2 sdk' - inputs: - useGlobalJson: false - version: 2.x - - task: UseDotNet@2 displayName: 'Use defined .NET Core sdk' inputs: @@ -209,54 +202,54 @@ steps: - task: ArchiveFiles@1 displayName: 'Archive osx build' inputs: - rootFolder: '$(Build.SourcesDirectory)/artifacts/publish/Microsoft.SqlTools.ServiceLayer/osx.10.11-x64/net7.0' + rootFolder: '$(Build.SourcesDirectory)/artifacts/publish/Microsoft.SqlTools.ServiceLayer/osx.10.11-x64/net6.0' includeRootFolder: false archiveType: tar - archiveFile: '$(Build.SourcesDirectory)/artifacts/package/Microsoft.SqlTools.ServiceLayer-osx-x64-net7.0.tar.gz' + archiveFile: '$(Build.SourcesDirectory)/artifacts/package/Microsoft.SqlTools.ServiceLayer-osx-x64-net6.0.tar.gz' - task: ArchiveFiles@1 displayName: 'Archive osx arm build' inputs: - rootFolder: '$(Build.SourcesDirectory)/artifacts/publish/Microsoft.SqlTools.ServiceLayer/osx-arm64/net7.0' + rootFolder: '$(Build.SourcesDirectory)/artifacts/publish/Microsoft.SqlTools.ServiceLayer/osx-arm64/net6.0' includeRootFolder: false archiveType: tar - archiveFile: '$(Build.SourcesDirectory)/artifacts/package/Microsoft.SqlTools.ServiceLayer-osx-arm64-net7.0.tar.gz' + archiveFile: '$(Build.SourcesDirectory)/artifacts/package/Microsoft.SqlTools.ServiceLayer-osx-arm64-net6.0.tar.gz' - task: ArchiveFiles@1 displayName: 'Archive rhel build' inputs: - rootFolder: '$(Build.SourcesDirectory)/artifacts/publish/Microsoft.SqlTools.ServiceLayer/rhel.7.2-x64/net7.0' + rootFolder: '$(Build.SourcesDirectory)/artifacts/publish/Microsoft.SqlTools.ServiceLayer/rhel.7.2-x64/net6.0' includeRootFolder: false archiveType: tar - archiveFile: '$(Build.SourcesDirectory)/artifacts/package/Microsoft.SqlTools.ServiceLayer-rhel-x64-net7.0.tar.gz' + archiveFile: '$(Build.SourcesDirectory)/artifacts/package/Microsoft.SqlTools.ServiceLayer-rhel-x64-net6.0.tar.gz' - task: ArchiveFiles@1 displayName: 'Archive windows 64 bit build' inputs: - rootFolder: '$(Build.SourcesDirectory)/artifacts/publish/Microsoft.SqlTools.ServiceLayer/win-x64/net7.0' + rootFolder: '$(Build.SourcesDirectory)/artifacts/publish/Microsoft.SqlTools.ServiceLayer/win-x64/net6.0' includeRootFolder: false - archiveFile: '$(Build.SourcesDirectory)/artifacts/package/Microsoft.SqlTools.ServiceLayer-win-x64-net7.0.zip' + archiveFile: '$(Build.SourcesDirectory)/artifacts/package/Microsoft.SqlTools.ServiceLayer-win-x64-net6.0.zip' - task: ArchiveFiles@1 displayName: 'Archive windows 32 bit build' inputs: - rootFolder: '$(Build.SourcesDirectory)/artifacts/publish/Microsoft.SqlTools.ServiceLayer/win-x86/net7.0' + rootFolder: '$(Build.SourcesDirectory)/artifacts/publish/Microsoft.SqlTools.ServiceLayer/win-x86/net6.0' includeRootFolder: false - archiveFile: '$(Build.SourcesDirectory)/artifacts/package/Microsoft.SqlTools.ServiceLayer-win-x86-net7.0.zip' + archiveFile: '$(Build.SourcesDirectory)/artifacts/package/Microsoft.SqlTools.ServiceLayer-win-x86-net6.0.zip' # - task: ArchiveFiles@1 # displayName: 'Archive windows10 arm 32 bit build' # inputs: -# rootFolder: '$(Build.SourcesDirectory)/artifacts/publish/Microsoft.SqlTools.ServiceLayer/win10-arm/net7.0' +# rootFolder: '$(Build.SourcesDirectory)/artifacts/publish/Microsoft.SqlTools.ServiceLayer/win10-arm/net6.0' # includeRootFolder: false -# archiveFile: '$(Build.SourcesDirectory)/artifacts/package/Microsoft.SqlTools.ServiceLayer-win10-arm-net7.0.zip' +# archiveFile: '$(Build.SourcesDirectory)/artifacts/package/Microsoft.SqlTools.ServiceLayer-win10-arm-net6.0.zip' # - task: ArchiveFiles@1 # displayName: 'Archive windows10 arm 64 bit build' # inputs: -# rootFolder: '$(Build.SourcesDirectory)/artifacts/publish/Microsoft.SqlTools.ServiceLayer/win10-arm64/net7.0' +# rootFolder: '$(Build.SourcesDirectory)/artifacts/publish/Microsoft.SqlTools.ServiceLayer/win10-arm64/net6.0' # includeRootFolder: false -# archiveFile: '$(Build.SourcesDirectory)/artifacts/package/Microsoft.SqlTools.ServiceLayer-win10-arm64-net7.0.zip' +# archiveFile: '$(Build.SourcesDirectory)/artifacts/package/Microsoft.SqlTools.ServiceLayer-win10-arm64-net6.0.zip' - task: PublishBuildArtifacts@1 displayName: 'Publish Artifact: build archives' diff --git a/azure-pipelines/createBuildDirectories.sh b/azure-pipelines/createBuildDirectories.sh index 11fcecd2..2a243100 100755 --- a/azure-pipelines/createBuildDirectories.sh +++ b/azure-pipelines/createBuildDirectories.sh @@ -13,7 +13,7 @@ # The script need to run from the repo root -net7projectArray=( +net6projectArray=( "./src/Microsoft.InsightsGenerator" "./src/Microsoft.Kusto.ServiceLayer" "./src/Microsoft.SqlTools.Credentials" @@ -40,7 +40,7 @@ netStandard2ProjectArray=( ) # Please update the framework vars when updating target framework for the projects -framework7="/bin/Debug/net7.0/" +framework6="/bin/Debug/net6.0/" framework2="/bin/Debug/netstandard2.1/" requiredLocDirectories=( @@ -75,13 +75,13 @@ requiredLocDirectories=( "zh-hant" ) -for i in "${net7projectArray[@]}" +for i in "${net6projectArray[@]}" do : for k in "${requiredLocDirectories[@]}" do : - output=`mkdir -v -p $i$framework7$k` + output=`mkdir -v -p $i$framework6$k` echo $output done done diff --git a/build.json b/build.json index 37a45309..ebe1eb05 100644 --- a/build.json +++ b/build.json @@ -9,24 +9,24 @@ "PackageName": "Microsoft.SqlTools.ServiceLayer", "TestProjects": { "Microsoft.SqlTools.ServiceLayer.UnitTests": [ - "net7.0" + "net6.0" ], "Microsoft.Kusto.ServiceLayer.UnitTests": [ - "net7.0" + "net6.0" ], "Microsoft.SqlTools.ServiceLayer.TestEnvConfig": [ - "net7.0" + "net6.0" ], "Microsoft.SqlTools.ServiceLayer.IntegrationTests": [ - "net7.0" + "net6.0" ] }, "Frameworks": [ - "net7.0" + "net6.0" ], "FxFrameworks":[ "net472", - "net7.0" + "net6.0" ], "MainProjects": [ "Microsoft.SqlTools.Credentials", diff --git a/global.json b/global.json index 60de2327..3e9daa9c 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "7.0.100", + "version": "6.0.403", "rollForward": "latestFeature" }, "msbuild-sdks": { diff --git a/packages/Microsoft.SqlTools.ManagedBatchParser/Microsoft.SqlTools.ManagedBatchParser.nuspec b/packages/Microsoft.SqlTools.ManagedBatchParser/Microsoft.SqlTools.ManagedBatchParser.nuspec index 4d8711eb..32bb2d46 100644 --- a/packages/Microsoft.SqlTools.ManagedBatchParser/Microsoft.SqlTools.ManagedBatchParser.nuspec +++ b/packages/Microsoft.SqlTools.ManagedBatchParser/Microsoft.SqlTools.ManagedBatchParser.nuspec @@ -18,7 +18,7 @@ - + @@ -42,19 +42,19 @@ - - - - - - - - - - + + + + + + + + + + - - - + + + \ No newline at end of file diff --git a/src/Microsoft.InsightsGenerator/DataTransformation.cs b/src/Microsoft.InsightsGenerator/DataTransformation.cs index b2da3902..1a68271e 100644 --- a/src/Microsoft.InsightsGenerator/DataTransformation.cs +++ b/src/Microsoft.InsightsGenerator/DataTransformation.cs @@ -34,8 +34,6 @@ namespace Microsoft.InsightsGenerator private string[] GetColumnLabels(DataArray array, out DataArray.DataType[] columnDataType) { - // turn off warning for using ContainsKey/Add vs. TryAdd with Dictionaries - #pragma warning disable CA1854 columnDataType = new DataArray.DataType[array.ColumnNames.Length]; int columnCount = array.Cells[0].Length; Dictionary> columnInfo = new Dictionary>(); @@ -118,7 +116,6 @@ namespace Microsoft.InsightsGenerator labels[numberColumns[i].ColumnIndex] = "output_" + i; } } - #pragma warning restore CA1854 return labels; } diff --git a/src/Microsoft.InsightsGenerator/RulesEngine.cs b/src/Microsoft.InsightsGenerator/RulesEngine.cs index 94d011dc..5a264e2a 100644 --- a/src/Microsoft.InsightsGenerator/RulesEngine.cs +++ b/src/Microsoft.InsightsGenerator/RulesEngine.cs @@ -26,10 +26,8 @@ namespace Microsoft.InsightsGenerator public static ColumnHeaders TemplateParser(string templateContent) { - ColumnHeaders ch = new ColumnHeaders(); - #pragma warning disable SYSLIB1045 + ColumnHeaders ch = new ColumnHeaders(); var processedText = Regex.Replace(templateContent, @",|\\n", ""); - #pragma warning restore SYSLIB1045 ch.Template = templateContent; List keyvalue = processedText.Split(' ').Select(s => s.Trim()).ToList(); @@ -76,7 +74,7 @@ namespace Microsoft.InsightsGenerator // all the values from template needs to be found in the input from SigGen foreach (var hashFromTemplate in singleHashFromTemplate) { - if (!headersWithSingleHash.Contains(hashFromTemplate.ToLowerInvariant())) + if (!headersWithSingleHash.Contains(hashFromTemplate.ToLower())) { isMatched = false; break; @@ -145,7 +143,7 @@ namespace Microsoft.InsightsGenerator var topHeaderList = new List(); foreach (var list in singleHashHeaders) { - topHeaderList.Add("#" + list.First().ToLowerInvariant()); + topHeaderList.Add("#" + list.First().ToLower()); } return topHeaderList; } diff --git a/src/Microsoft.Kusto.ServiceLayer/Localization/sr.cs b/src/Microsoft.Kusto.ServiceLayer/Localization/sr.cs index dbf4393f..4d947f7e 100644 --- a/src/Microsoft.Kusto.ServiceLayer/Localization/sr.cs +++ b/src/Microsoft.Kusto.ServiceLayer/Localization/sr.cs @@ -1,5 +1,5 @@ // WARNING: -// This file was generated by the Microsoft DataWarehouse String Resource Tool 7.0.0.0 +// This file was generated by the Microsoft DataWarehouse String Resource Tool 6.0.0.0 // from information in sr.strings // DO NOT MODIFY THIS FILE'S CONTENTS, THEY WILL BE OVERWRITTEN // diff --git a/src/Microsoft.Kusto.ServiceLayer/Microsoft.Kusto.ServiceLayer.csproj b/src/Microsoft.Kusto.ServiceLayer/Microsoft.Kusto.ServiceLayer.csproj index adc33335..d9b0daf0 100644 --- a/src/Microsoft.Kusto.ServiceLayer/Microsoft.Kusto.ServiceLayer.csproj +++ b/src/Microsoft.Kusto.ServiceLayer/Microsoft.Kusto.ServiceLayer.csproj @@ -14,9 +14,6 @@ true portable $(ToolsServiceTargetRuntimes) - $(NoWarn);SYSLIB1045 - $(NoWarn);CA1311 - $(NoWarn);CA1854 diff --git a/src/Microsoft.Kusto.ServiceLayer/QueryExecution/DataStorage/StorageDataReader.cs b/src/Microsoft.Kusto.ServiceLayer/QueryExecution/DataStorage/StorageDataReader.cs index f6c7ac3e..26a14755 100644 --- a/src/Microsoft.Kusto.ServiceLayer/QueryExecution/DataStorage/StorageDataReader.cs +++ b/src/Microsoft.Kusto.ServiceLayer/QueryExecution/DataStorage/StorageDataReader.cs @@ -73,7 +73,7 @@ namespace Microsoft.Kusto.ServiceLayer.QueryExecution.DataStorage /// public Task ReadAsync(CancellationToken cancellationToken) { - return Task.Run(DataReader.Read); + return Task.Run(() => DataReader.Read()); } /// diff --git a/src/Microsoft.SqlTools.Credentials/Credentials/Linux/Interop.Errors.cs b/src/Microsoft.SqlTools.Credentials/Credentials/Linux/Interop.Errors.cs index 5b38c11d..9e2029d4 100644 --- a/src/Microsoft.SqlTools.Credentials/Credentials/Linux/Interop.Errors.cs +++ b/src/Microsoft.SqlTools.Credentials/Credentials/Linux/Interop.Errors.cs @@ -22,7 +22,7 @@ namespace Microsoft.SqlTools.Credentials // which obtains the raw errno that varies between unixes. The strong typing as an enum is meant to // prevent confusing the two. Casting to or from int is suspect. Use GetLastErrorInfo() if you need to // correlate these to the underlying platform values or obtain the corresponding error message. - // + // SUCCESS = 0, @@ -183,7 +183,7 @@ namespace Microsoft.SqlTools.Credentials // so here in the future if necessary. message = buffer; } - + string returnMsg = Marshal.PtrToStringAnsi(message); return returnMsg; } diff --git a/src/Microsoft.SqlTools.Credentials/Credentials/Linux/Interop.Sys.cs b/src/Microsoft.SqlTools.Credentials/Credentials/Linux/Interop.Sys.cs index 12872eba..3f7a39b5 100644 --- a/src/Microsoft.SqlTools.Credentials/Credentials/Linux/Interop.Sys.cs +++ b/src/Microsoft.SqlTools.Credentials/Credentials/Linux/Interop.Sys.cs @@ -17,7 +17,7 @@ namespace Microsoft.SqlTools.Credentials { [DllImport(Libraries.SystemNative, EntryPoint = "SystemNative_ChMod", SetLastError = true)] internal static extern int ChMod(string path, int mode); - + internal struct Passwd { internal IntPtr Name; // char* diff --git a/src/Microsoft.SqlTools.Credentials/Credentials/OSX/Interop.CoreFoundation.cs b/src/Microsoft.SqlTools.Credentials/Credentials/OSX/Interop.CoreFoundation.cs index 5da3207f..8c71ee46 100644 --- a/src/Microsoft.SqlTools.Credentials/Credentials/OSX/Interop.CoreFoundation.cs +++ b/src/Microsoft.SqlTools.Credentials/Credentials/OSX/Interop.CoreFoundation.cs @@ -43,10 +43,10 @@ namespace Microsoft.SqlTools.Credentials /// For *nix systems, the CLR maps ANSI to UTF-8, so be explicit about that [DllImport(Interop.Libraries.CoreFoundationLibrary, CharSet = CharSet.Ansi)] private static extern SafeCreateHandle CFStringCreateWithCString( - IntPtr allocator, - string str, + IntPtr allocator, + string str, CFStringBuiltInEncodings encoding); - + /// /// Creates a CFStringRef from a 8-bit String object. Follows the "Create Rule" where if you create it, you delete it. /// @@ -86,7 +86,7 @@ namespace Microsoft.SqlTools.Credentials /// /// You should retain a Core Foundation object when you receive it from elsewhere - /// (that is, you did not create or copy it) and you want it to persist. If you + /// (that is, you did not create or copy it) and you want it to persist. If you /// retain a Core Foundation object you are responsible for releasing it /// /// The CFType object to retain. This value must not be NULL diff --git a/src/Microsoft.SqlTools.Credentials/Credentials/OSX/Interop.Security.cs b/src/Microsoft.SqlTools.Credentials/Credentials/OSX/Interop.Security.cs index 4fc74eca..f7afc98b 100644 --- a/src/Microsoft.SqlTools.Credentials/Credentials/OSX/Interop.Security.cs +++ b/src/Microsoft.SqlTools.Credentials/Credentials/OSX/Interop.Security.cs @@ -14,11 +14,11 @@ namespace Microsoft.SqlTools.Credentials { [DllImport(Libraries.SecurityLibrary, CharSet = CharSet.Unicode, SetLastError = true)] - internal static extern OSStatus SecKeychainAddGenericPassword(IntPtr keyChainRef, UInt32 serviceNameLength, string serviceName, + internal static extern OSStatus SecKeychainAddGenericPassword(IntPtr keyChainRef, UInt32 serviceNameLength, string serviceName, UInt32 accountNameLength, string accountName, UInt32 passwordLength, IntPtr password, [Out] IntPtr itemRef); - + /// - /// Find a generic password based on the attributes passed + /// Find a generic password based on the attributes passed /// /// /// A reference to an array of keychains to search, a single keychain, or NULL to search the user's default keychain search list. @@ -29,22 +29,22 @@ namespace Microsoft.SqlTools.Credentials /// A pointer to a string containing the account name. /// On return, the length of the buffer pointed to by passwordData. /// - /// On return, a pointer to a data buffer containing the password. - /// Your application must call SecKeychainItemFreeContent(NULL, passwordData) + /// On return, a pointer to a data buffer containing the password. + /// Your application must call SecKeychainItemFreeContent(NULL, passwordData) /// to release this data buffer when it is no longer needed.Pass NULL if you are not interested in retrieving the password data at /// this time, but simply want to find the item reference. /// /// On return, a reference to the keychain item which was found. /// A result code that should be in /// - /// The SecKeychainFindGenericPassword function finds the first generic password item which matches the attributes you provide. - /// Most attributes are optional; you should pass only as many as you need to narrow the search sufficiently for your application's intended use. + /// The SecKeychainFindGenericPassword function finds the first generic password item which matches the attributes you provide. + /// Most attributes are optional; you should pass only as many as you need to narrow the search sufficiently for your application's intended use. /// SecKeychainFindGenericPassword optionally returns a reference to the found item. /// [DllImport(Libraries.SecurityLibrary, CharSet = CharSet.Unicode, SetLastError = true)] - internal static extern OSStatus SecKeychainFindGenericPassword(IntPtr keyChainRef, UInt32 serviceNameLength, string serviceName, + internal static extern OSStatus SecKeychainFindGenericPassword(IntPtr keyChainRef, UInt32 serviceNameLength, string serviceName, UInt32 accountNameLength, string accountName, out UInt32 passwordLength, out IntPtr password, out IntPtr itemRef); - + /// /// Releases the memory used by the keychain attribute list and the keychain data retrieved in a previous call to SecKeychainItemCopyContent. /// @@ -53,15 +53,15 @@ namespace Microsoft.SqlTools.Credentials /// A result code that should be in [DllImport(Libraries.SecurityLibrary, SetLastError = true)] internal static extern OSStatus SecKeychainItemFreeContent([In] IntPtr attrList, [In] IntPtr data); - + /// /// Deletes a keychain item from the default keychain's permanent data store. /// /// A keychain item reference of the item to delete. /// A result code that should be in /// - /// If itemRef has not previously been added to the keychain, SecKeychainItemDelete does nothing and returns ErrSecSuccess. - /// IMPORTANT: SecKeychainItemDelete does not dispose the memory occupied by the item reference itself; + /// If itemRef has not previously been added to the keychain, SecKeychainItemDelete does nothing and returns ErrSecSuccess. + /// IMPORTANT: SecKeychainItemDelete does not dispose the memory occupied by the item reference itself; /// use the CFRelease function when you are completely * * finished with an item. /// [DllImport(Libraries.SecurityLibrary, SetLastError = true)] diff --git a/src/Microsoft.SqlTools.Credentials/Credentials/Win32/NativeMethods.cs b/src/Microsoft.SqlTools.Credentials/Credentials/Win32/NativeMethods.cs index 07a8e6db..20b0ed2f 100644 --- a/src/Microsoft.SqlTools.Credentials/Credentials/Win32/NativeMethods.cs +++ b/src/Microsoft.SqlTools.Credentials/Credentials/Win32/NativeMethods.cs @@ -1,6 +1,6 @@ // -// Code originally from http://credentialmanagement.codeplex.com/, -// Licensed under the Apache License 2.0 +// Code originally from http://credentialmanagement.codeplex.com/, +// Licensed under the Apache License 2.0 // using System; @@ -11,7 +11,7 @@ namespace Microsoft.SqlTools.Credentials.Win32 { internal class NativeMethods { - + [StructLayout(LayoutKind.Sequential)] internal struct CREDENTIAL { @@ -32,7 +32,7 @@ namespace Microsoft.SqlTools.Credentials.Win32 [MarshalAs(UnmanagedType.LPWStr)] public string UserName; } - + [DllImport("Advapi32.dll", EntryPoint = "CredReadW", CharSet = CharSet.Unicode, SetLastError = true)] internal static extern bool CredRead(string target, CredentialType type, int reservedFlag, out IntPtr CredentialPtr); @@ -47,7 +47,7 @@ namespace Microsoft.SqlTools.Credentials.Win32 [DllImport("advapi32.dll", SetLastError = true, CharSet = CharSet.Unicode)] internal static extern bool CredEnumerateW(string filter, int flag, out uint count, out IntPtr pCredentials); - + [DllImport("ole32.dll")] internal static extern void CoTaskMemFree(IntPtr ptr); @@ -86,7 +86,7 @@ namespace Microsoft.SqlTools.Credentials.Win32 } // Perform any specific actions to release the handle in the ReleaseHandle method. - // Often, you need to use Pinvoke to make a call into the Win32 API to release the + // Often, you need to use Pinvoke to make a call into the Win32 API to release the // handle. In this case, however, we can use the Marshal class to release the unmanaged memory. protected override bool ReleaseHandle() @@ -101,7 +101,7 @@ namespace Microsoft.SqlTools.Credentials.Win32 SetHandleAsInvalid(); return true; } - // Return false. + // Return false. return false; } } diff --git a/src/Microsoft.SqlTools.Credentials/Localization/sr.cs b/src/Microsoft.SqlTools.Credentials/Localization/sr.cs index fbe37677..bcd5a04a 100755 --- a/src/Microsoft.SqlTools.Credentials/Localization/sr.cs +++ b/src/Microsoft.SqlTools.Credentials/Localization/sr.cs @@ -1,5 +1,5 @@ // WARNING: -// This file was generated by the Microsoft DataWarehouse String Resource Tool 7.0.0.0 +// This file was generated by the Microsoft DataWarehouse String Resource Tool 6.0.0.0 // from information in sr.strings // DO NOT MODIFY THIS FILE'S CONTENTS, THEY WILL BE OVERWRITTEN // diff --git a/src/Microsoft.SqlTools.Credentials/Microsoft.SqlTools.Credentials.csproj b/src/Microsoft.SqlTools.Credentials/Microsoft.SqlTools.Credentials.csproj index 3a68936a..397d744f 100644 --- a/src/Microsoft.SqlTools.Credentials/Microsoft.SqlTools.Credentials.csproj +++ b/src/Microsoft.SqlTools.Credentials/Microsoft.SqlTools.Credentials.csproj @@ -13,7 +13,6 @@ true true $(ToolsServiceTargetRuntimes) - $(NoWarn);SYSLIB1054 diff --git a/src/Microsoft.SqlTools.Hosting/Extensibility/ExtensionServiceProvider.cs b/src/Microsoft.SqlTools.Hosting/Extensibility/ExtensionServiceProvider.cs index fc4c2bd8..d9c07ac5 100644 --- a/src/Microsoft.SqlTools.Hosting/Extensibility/ExtensionServiceProvider.cs +++ b/src/Microsoft.SqlTools.Hosting/Extensibility/ExtensionServiceProvider.cs @@ -112,7 +112,7 @@ namespace Microsoft.SqlTools.Extensibility if (!services.ContainsKey(typeof(T))) { ExtensionStore store = new ExtensionStore(typeof(T), config); - base.Register(store.GetExports); + base.Register(() => store.GetExports()); } } diff --git a/src/Microsoft.SqlTools.Hosting/Localization/sr.cs b/src/Microsoft.SqlTools.Hosting/Localization/sr.cs index ef9923d8..5e48d9fb 100755 --- a/src/Microsoft.SqlTools.Hosting/Localization/sr.cs +++ b/src/Microsoft.SqlTools.Hosting/Localization/sr.cs @@ -1,5 +1,5 @@ // WARNING: -// This file was generated by the Microsoft DataWarehouse String Resource Tool 7.0.0.0 +// This file was generated by the Microsoft DataWarehouse String Resource Tool 6.0.0.0 // from information in sr.strings // DO NOT MODIFY THIS FILE'S CONTENTS, THEY WILL BE OVERWRITTEN // diff --git a/src/Microsoft.SqlTools.Hosting/Utility/ConcurrentCache.cs b/src/Microsoft.SqlTools.Hosting/Utility/ConcurrentCache.cs index 90993acc..006b260c 100644 --- a/src/Microsoft.SqlTools.Hosting/Utility/ConcurrentCache.cs +++ b/src/Microsoft.SqlTools.Hosting/Utility/ConcurrentCache.cs @@ -23,7 +23,10 @@ namespace Microsoft.SqlTools.Utility { foreach (var key in keys) { - _cache.Remove(key); + if (_cache.ContainsKey(key)) + { + _cache.Remove(key); + } } } }, out exception); diff --git a/src/Microsoft.SqlTools.Hosting/Utility/GeneralRequestDetails.cs b/src/Microsoft.SqlTools.Hosting/Utility/GeneralRequestDetails.cs index eb14e77a..4f39e6fe 100644 --- a/src/Microsoft.SqlTools.Hosting/Utility/GeneralRequestDetails.cs +++ b/src/Microsoft.SqlTools.Hosting/Utility/GeneralRequestDetails.cs @@ -19,7 +19,6 @@ namespace Microsoft.SqlTools.Utility public T GetOptionValue(string name, T defaultValue = default(T)) { - #pragma warning disable CA1854 T result = defaultValue; if (Options != null && Options.ContainsKey(name)) { @@ -35,7 +34,6 @@ namespace Microsoft.SqlTools.Utility "Cannot convert option value {0}:{1} to {2}", name, value ?? "", typeof(T))); } } - #pragma warning restore CA1854 return result; } diff --git a/src/Microsoft.SqlTools.ManagedBatchParser/BatchParser/ExecutionEngineCode/BatchParserSqlCmd.cs b/src/Microsoft.SqlTools.ManagedBatchParser/BatchParser/ExecutionEngineCode/BatchParserSqlCmd.cs index 19edaf79..a07633bd 100644 --- a/src/Microsoft.SqlTools.ManagedBatchParser/BatchParser/ExecutionEngineCode/BatchParserSqlCmd.cs +++ b/src/Microsoft.SqlTools.ManagedBatchParser/BatchParser/ExecutionEngineCode/BatchParserSqlCmd.cs @@ -89,7 +89,10 @@ namespace Microsoft.SqlTools.ServiceLayer.BatchParser.ExecutionEngineCode if (value == null) { - internalVariables.Remove(name); + if (internalVariables.ContainsKey(name)) + { + internalVariables.Remove(name); + } } else { diff --git a/src/Microsoft.SqlTools.ManagedBatchParser/BatchParser/PositionStruct.cs b/src/Microsoft.SqlTools.ManagedBatchParser/BatchParser/PositionStruct.cs index fda9e3bb..25654eea 100644 --- a/src/Microsoft.SqlTools.ManagedBatchParser/BatchParser/PositionStruct.cs +++ b/src/Microsoft.SqlTools.ManagedBatchParser/BatchParser/PositionStruct.cs @@ -8,7 +8,7 @@ using System; namespace Microsoft.SqlTools.ServiceLayer.BatchParser { [Serializable] - public readonly struct PositionStruct + public struct PositionStruct { private readonly int line; private readonly int column; diff --git a/src/Microsoft.SqlTools.ManagedBatchParser/Localization/sr.cs b/src/Microsoft.SqlTools.ManagedBatchParser/Localization/sr.cs index 00c174cd..6d1940df 100644 --- a/src/Microsoft.SqlTools.ManagedBatchParser/Localization/sr.cs +++ b/src/Microsoft.SqlTools.ManagedBatchParser/Localization/sr.cs @@ -1,5 +1,5 @@ // WARNING: -// This file was generated by the Microsoft DataWarehouse String Resource Tool 7.0.0.0 +// This file was generated by the Microsoft DataWarehouse String Resource Tool 6.0.0.0 // from information in sr.strings // DO NOT MODIFY THIS FILE'S CONTENTS, THEY WILL BE OVERWRITTEN // diff --git a/src/Microsoft.SqlTools.ManagedBatchParser/Microsoft.SqlTools.ManagedBatchParser.csproj b/src/Microsoft.SqlTools.ManagedBatchParser/Microsoft.SqlTools.ManagedBatchParser.csproj index 1e39b555..3bcd270d 100644 --- a/src/Microsoft.SqlTools.ManagedBatchParser/Microsoft.SqlTools.ManagedBatchParser.csproj +++ b/src/Microsoft.SqlTools.ManagedBatchParser/Microsoft.SqlTools.ManagedBatchParser.csproj @@ -1,7 +1,7 @@  - - net7.0;net472 + + net6.0;net472 9.0 disable Microsoft.SqlTools.ManagedBatchParser @@ -13,7 +13,6 @@ false false Microsoft SqlTools Managed batch parser - $(NoWarn);CA1852 @@ -29,7 +28,7 @@ - + diff --git a/src/Microsoft.SqlTools.ResourceProvider.Core/Firewall/FirewallErrorParser.cs b/src/Microsoft.SqlTools.ResourceProvider.Core/Firewall/FirewallErrorParser.cs index 46f47e4e..c30e3279 100644 --- a/src/Microsoft.SqlTools.ResourceProvider.Core/Firewall/FirewallErrorParser.cs +++ b/src/Microsoft.SqlTools.ResourceProvider.Core/Firewall/FirewallErrorParser.cs @@ -69,12 +69,10 @@ namespace Microsoft.SqlTools.ResourceProvider.Core.Firewall clientIp = null; try { - #pragma warning disable SYSLIB1045 Regex regex = new Regex( @"\b(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\b", RegexOptions.IgnoreCase); - #pragma warning restore SYSLIB1045 Match match = regex.Match(message); if (match.Success) diff --git a/src/Microsoft.SqlTools.ResourceProvider.Core/Localization/sr.cs b/src/Microsoft.SqlTools.ResourceProvider.Core/Localization/sr.cs index 24fc4644..5b329b07 100644 --- a/src/Microsoft.SqlTools.ResourceProvider.Core/Localization/sr.cs +++ b/src/Microsoft.SqlTools.ResourceProvider.Core/Localization/sr.cs @@ -1,5 +1,5 @@ // WARNING: -// This file was generated by the Microsoft DataWarehouse String Resource Tool 7.0.0.0 +// This file was generated by the Microsoft DataWarehouse String Resource Tool 6.0.0.0 // from information in sr.strings // DO NOT MODIFY THIS FILE'S CONTENTS, THEY WILL BE OVERWRITTEN // diff --git a/src/Microsoft.SqlTools.ResourceProvider.DefaultImpl/Localization/sr.cs b/src/Microsoft.SqlTools.ResourceProvider.DefaultImpl/Localization/sr.cs index 791c7bc1..0198ea45 100644 --- a/src/Microsoft.SqlTools.ResourceProvider.DefaultImpl/Localization/sr.cs +++ b/src/Microsoft.SqlTools.ResourceProvider.DefaultImpl/Localization/sr.cs @@ -1,5 +1,5 @@ // WARNING: -// This file was generated by the Microsoft DataWarehouse String Resource Tool 7.0.0.0 +// This file was generated by the Microsoft DataWarehouse String Resource Tool 6.0.0.0 // from information in sr.strings // DO NOT MODIFY THIS FILE'S CONTENTS, THEY WILL BE OVERWRITTEN // diff --git a/src/Microsoft.SqlTools.ResourceProvider.DefaultImpl/Microsoft.SqlTools.ResourceProvider.DefaultImpl.csproj b/src/Microsoft.SqlTools.ResourceProvider.DefaultImpl/Microsoft.SqlTools.ResourceProvider.DefaultImpl.csproj index 1a8139eb..82d13939 100644 --- a/src/Microsoft.SqlTools.ResourceProvider.DefaultImpl/Microsoft.SqlTools.ResourceProvider.DefaultImpl.csproj +++ b/src/Microsoft.SqlTools.ResourceProvider.DefaultImpl/Microsoft.SqlTools.ResourceProvider.DefaultImpl.csproj @@ -10,7 +10,6 @@ Provides the default for SqlTools applications. � Microsoft Corporation. All rights reserved. - $(NoWarn);CA1852 diff --git a/src/Microsoft.SqlTools.ResourceProvider/Localization/sr.cs b/src/Microsoft.SqlTools.ResourceProvider/Localization/sr.cs index 4f55d4ab..bdf40374 100755 --- a/src/Microsoft.SqlTools.ResourceProvider/Localization/sr.cs +++ b/src/Microsoft.SqlTools.ResourceProvider/Localization/sr.cs @@ -1,5 +1,5 @@ // WARNING: -// This file was generated by the Microsoft DataWarehouse String Resource Tool 7.0.0.0 +// This file was generated by the Microsoft DataWarehouse String Resource Tool 6.0.0.0 // from information in sr.strings // DO NOT MODIFY THIS FILE'S CONTENTS, THEY WILL BE OVERWRITTEN // diff --git a/src/Microsoft.SqlTools.ResourceProvider/Microsoft.SqlTools.ResourceProvider.csproj b/src/Microsoft.SqlTools.ResourceProvider/Microsoft.SqlTools.ResourceProvider.csproj index 279783ed..66c1e656 100644 --- a/src/Microsoft.SqlTools.ResourceProvider/Microsoft.SqlTools.ResourceProvider.csproj +++ b/src/Microsoft.SqlTools.ResourceProvider/Microsoft.SqlTools.ResourceProvider.csproj @@ -12,7 +12,6 @@ false false $(ToolsServiceTargetRuntimes) - $(NoWarn);CA1852 TRACE;DEBUG;NETCOREAPP1_0;NETCOREAPP2_0 diff --git a/src/Microsoft.SqlTools.ServiceLayer/DacFx/GetObjectsFromTSqlModelOperation.cs b/src/Microsoft.SqlTools.ServiceLayer/DacFx/GetObjectsFromTSqlModelOperation.cs index 02596e65..d1d1697c 100644 --- a/src/Microsoft.SqlTools.ServiceLayer/DacFx/GetObjectsFromTSqlModelOperation.cs +++ b/src/Microsoft.SqlTools.ServiceLayer/DacFx/GetObjectsFromTSqlModelOperation.cs @@ -34,7 +34,7 @@ namespace Microsoft.SqlTools.ServiceLayer.DacFx { try { - var filters = Parameters.ObjectTypes.Select(MapType).ToArray(); + var filters = Parameters.ObjectTypes.Select(t => MapType(t)).ToArray(); var objects = Model.GetObjects(DacQueryScopes.UserDefined, filters).ToList(); return objects.Select(o => new TSqlObjectInfo diff --git a/src/Microsoft.SqlTools.ServiceLayer/ExecutionPlan/ExecutionPlanGraphUtils.cs b/src/Microsoft.SqlTools.ServiceLayer/ExecutionPlan/ExecutionPlanGraphUtils.cs index dfef03d3..4238c164 100644 --- a/src/Microsoft.SqlTools.ServiceLayer/ExecutionPlan/ExecutionPlanGraphUtils.cs +++ b/src/Microsoft.SqlTools.ServiceLayer/ExecutionPlan/ExecutionPlanGraphUtils.cs @@ -79,8 +79,8 @@ namespace Microsoft.SqlTools.ServiceLayer.ExecutionPlan Subtext = currentNode.GetDisplayLinesOfText(true), RelativeCost = currentNode.RelativeCost, Properties = GetProperties(currentNode.Properties), - Children = currentNode.Children.Select(ConvertShowPlanTreeToExecutionPlanTree).ToList(), - Edges = currentNode.Edges.Select(ConvertShowPlanEdgeToExecutionPlanEdge).ToList(), + Children = currentNode.Children.Select(x => ConvertShowPlanTreeToExecutionPlanTree(x)).ToList(), + Edges = currentNode.Edges.Select(x => ConvertShowPlanEdgeToExecutionPlanEdge(x)).ToList(), Badges = GenerateNodeOverlay(currentNode), Name = currentNode.DisplayName, ElapsedTimeInMs = currentNode.ElapsedTimeInMs, diff --git a/src/Microsoft.SqlTools.ServiceLayer/LanguageServices/AutoCompleteHelper.cs b/src/Microsoft.SqlTools.ServiceLayer/LanguageServices/AutoCompleteHelper.cs index c6f14c49..1ef620d0 100644 --- a/src/Microsoft.SqlTools.ServiceLayer/LanguageServices/AutoCompleteHelper.cs +++ b/src/Microsoft.SqlTools.ServiceLayer/LanguageServices/AutoCompleteHelper.cs @@ -597,7 +597,7 @@ namespace Microsoft.SqlTools.ServiceLayer.LanguageServices { if (currentList != null && token != null && !string.IsNullOrWhiteSpace(token.Text) && - token.Text.All(char.IsLetter) && + token.Text.All(ch => char.IsLetter(ch)) && currentList.All(x => string.Compare(x.Label, token.Text, true) != 0 )) { diff --git a/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.cs b/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.cs index 88dde587..14aff68d 100644 --- a/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.cs +++ b/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.cs @@ -1,5 +1,5 @@ // WARNING: -// This file was generated by the Microsoft DataWarehouse String Resource Tool 7.0.0.0 +// This file was generated by the Microsoft DataWarehouse String Resource Tool 6.0.0.0 // from information in sr.strings // DO NOT MODIFY THIS FILE'S CONTENTS, THEY WILL BE OVERWRITTEN // diff --git a/src/Microsoft.SqlTools.ServiceLayer/Microsoft.SqlTools.ServiceLayer.csproj b/src/Microsoft.SqlTools.ServiceLayer/Microsoft.SqlTools.ServiceLayer.csproj index 9f9f154d..3658ceed 100644 --- a/src/Microsoft.SqlTools.ServiceLayer/Microsoft.SqlTools.ServiceLayer.csproj +++ b/src/Microsoft.SqlTools.ServiceLayer/Microsoft.SqlTools.ServiceLayer.csproj @@ -13,10 +13,6 @@ true true $(ToolsServiceTargetRuntimes) - $(NoWarn);SYSLIB1045 - $(NoWarn);CA1311 - $(NoWarn);CA1854 - $(NoWarn);CS8600;CS8603;CS8625 diff --git a/src/Microsoft.SqlTools.ServiceLayer/ObjectExplorer/ObjectExplorerService.cs b/src/Microsoft.SqlTools.ServiceLayer/ObjectExplorer/ObjectExplorerService.cs index 835b4619..81015fd1 100644 --- a/src/Microsoft.SqlTools.ServiceLayer/ObjectExplorer/ObjectExplorerService.cs +++ b/src/Microsoft.SqlTools.ServiceLayer/ObjectExplorer/ObjectExplorerService.cs @@ -60,7 +60,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer public ObjectExplorerService() { sessionMap = new ConcurrentDictionary(); - applicableNodeChildFactories = new Lazy>>(PopulateFactories); + applicableNodeChildFactories = new Lazy>>(() => PopulateFactories()); NodePathGenerator.Initialize(); } diff --git a/src/Microsoft.SqlTools.ServiceLayer/ObjectExplorer/SmoModel/SmoChildFactoryBase.cs b/src/Microsoft.SqlTools.ServiceLayer/ObjectExplorer/SmoModel/SmoChildFactoryBase.cs index 38f2d050..3e97a374 100644 --- a/src/Microsoft.SqlTools.ServiceLayer/ObjectExplorer/SmoModel/SmoChildFactoryBase.cs +++ b/src/Microsoft.SqlTools.ServiceLayer/ObjectExplorer/SmoModel/SmoChildFactoryBase.cs @@ -116,7 +116,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel return; } - IEnumerable queriers = context.ServiceProvider.GetServices(IsCompatibleQuerier); + IEnumerable queriers = context.ServiceProvider.GetServices(q => IsCompatibleQuerier(q)); var filters = this.Filters.ToList(); var smoProperties = this.SmoProperties.Where(p => ServerVersionHelper.IsValidFor(serverValidFor, p.ValidFor)).Select(x => x.Name); if (!string.IsNullOrEmpty(name)) diff --git a/src/Microsoft.SqlTools.ServiceLayer/TaskServices/SqlTask.cs b/src/Microsoft.SqlTools.ServiceLayer/TaskServices/SqlTask.cs index 5cefab0d..f1bf573d 100644 --- a/src/Microsoft.SqlTools.ServiceLayer/TaskServices/SqlTask.cs +++ b/src/Microsoft.SqlTools.ServiceLayer/TaskServices/SqlTask.cs @@ -229,7 +229,7 @@ namespace Microsoft.SqlTools.ServiceLayer.TaskServices //Run Task synchronously public void Run() { - Task.Run(RunAsync); + Task.Run(() => RunAsync()); } /// diff --git a/test/Microsoft.SqlTools.ServiceLayer.IntegrationTests/Microsoft.SqlTools.ServiceLayer.IntegrationTests.csproj b/test/Microsoft.SqlTools.ServiceLayer.IntegrationTests/Microsoft.SqlTools.ServiceLayer.IntegrationTests.csproj index 633eb693..e0333102 100644 --- a/test/Microsoft.SqlTools.ServiceLayer.IntegrationTests/Microsoft.SqlTools.ServiceLayer.IntegrationTests.csproj +++ b/test/Microsoft.SqlTools.ServiceLayer.IntegrationTests/Microsoft.SqlTools.ServiceLayer.IntegrationTests.csproj @@ -6,12 +6,6 @@ Microsoft.SqlTools.ServiceLayer.IntegrationTests true $(DefineConstants);TRACE - $(NoWarn);SYSLIB1045 - $(NoWarn);IDE0200 - $(NoWarn);IDE0230 - $(NoWarn);CA1311 - $(NoWarn);CA1852 - $(NoWarn);CA1854 diff --git a/test/Microsoft.SqlTools.ServiceLayer.Test.Common/ComparisonFailureException.cs b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/ComparisonFailureException.cs index aa569b1b..f9981550 100644 --- a/test/Microsoft.SqlTools.ServiceLayer.Test.Common/ComparisonFailureException.cs +++ b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/ComparisonFailureException.cs @@ -7,7 +7,7 @@ using System; namespace Microsoft.SqlTools.ServiceLayer.Test.Common { - internal sealed class ComparisonFailureException : InvalidOperationException + internal class ComparisonFailureException : InvalidOperationException { internal string FullMessageWithDiff { get; private set; } internal string EditAndCopyMessage { get; private set; } diff --git a/test/Microsoft.SqlTools.ServiceLayer.Test.Common/RequestContextMocking/EventFlowValidator.cs b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/RequestContextMocking/EventFlowValidator.cs index c7e18de0..7de4732d 100644 --- a/test/Microsoft.SqlTools.ServiceLayer.Test.Common/RequestContextMocking/EventFlowValidator.cs +++ b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/RequestContextMocking/EventFlowValidator.cs @@ -178,14 +178,14 @@ namespace Microsoft.SqlTools.ServiceLayer.Test.Common.RequestContextMocking Event } - private sealed class ExpectedEvent + private class ExpectedEvent { public EventTypes EventType { get; set; } public Type ParamType { get; set; } public Delegate Validator { get; set; } } - private sealed class ReceivedEvent + private class ReceivedEvent { public object EventObject { get; set; } public EventTypes EventType { get; set; } diff --git a/test/Microsoft.SqlTools.ServiceLayer.TestDriver/Driver/ServiceTestDriver.cs b/test/Microsoft.SqlTools.ServiceLayer.TestDriver/Driver/ServiceTestDriver.cs index 95488416..1b1c050c 100644 --- a/test/Microsoft.SqlTools.ServiceLayer.TestDriver/Driver/ServiceTestDriver.cs +++ b/test/Microsoft.SqlTools.ServiceLayer.TestDriver/Driver/ServiceTestDriver.cs @@ -43,7 +43,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\net7.0\win-x64\MicrosoftSqlToolsServiceLayer.exe"; + @"..\..\..\..\..\src\Microsoft.SqlTools.ServiceLayer\bin\Debug\net6.0\win-x64\MicrosoftSqlToolsServiceLayer.exe"; if (!File.Exists(serviceHostExecutable)) { serviceHostExecutable = Path.Combine(Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location), "MicrosoftSqlToolsServiceLayer.exe"); diff --git a/test/Microsoft.SqlTools.ServiceLayer.TestEnvConfig/Program.cs b/test/Microsoft.SqlTools.ServiceLayer.TestEnvConfig/Program.cs index bf56dc50..4c9d91f6 100644 --- a/test/Microsoft.SqlTools.ServiceLayer.TestEnvConfig/Program.cs +++ b/test/Microsoft.SqlTools.ServiceLayer.TestEnvConfig/Program.cs @@ -11,7 +11,7 @@ using System.Collections.Generic; namespace Microsoft.SqlTools.ServiceLayer.TestEnvConfig { - sealed class Program + class Program { [System.Diagnostics.CodeAnalysis.SuppressMessage("Style", "IDE0210:Convert to top-level statements", Justification = "Structure retained for readability.")] static void Main(string[] args) diff --git a/test/Microsoft.SqlTools.ServiceLayer.UnitTests/Microsoft.SqlTools.ServiceLayer.UnitTests.csproj b/test/Microsoft.SqlTools.ServiceLayer.UnitTests/Microsoft.SqlTools.ServiceLayer.UnitTests.csproj index d966df5b..99a5d237 100644 --- a/test/Microsoft.SqlTools.ServiceLayer.UnitTests/Microsoft.SqlTools.ServiceLayer.UnitTests.csproj +++ b/test/Microsoft.SqlTools.ServiceLayer.UnitTests/Microsoft.SqlTools.ServiceLayer.UnitTests.csproj @@ -6,12 +6,6 @@ false - $(NoWarn);SYSLIB1045 - $(NoWarn);IDE0200 - $(NoWarn);IDE0230 - $(NoWarn);CA1311 - $(NoWarn);CA1852 - $(NoWarn);CA1854