Update to latest .Net SDK 7.0 (#1760)

* Bump to SDK 7.0 and related updates

* More net 7 updates

* Install SDK 2.0 for ESRP

* Fix typo

* Address comment and update integration test script

* Disable new warnings from SDK update
This commit is contained in:
Karl Burtram
2022-11-14 20:24:25 -08:00
committed by GitHub
parent 79a214527f
commit 71cda5bbdc
48 changed files with 144 additions and 107 deletions

View File

@@ -6,6 +6,12 @@
<PackageId>Microsoft.SqlTools.ServiceLayer.IntegrationTests</PackageId>
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
<DefineConstants>$(DefineConstants);TRACE</DefineConstants>
<NoWarn>$(NoWarn);SYSLIB1045</NoWarn>
<NoWarn>$(NoWarn);IDE0200</NoWarn>
<NoWarn>$(NoWarn);IDE0230</NoWarn>
<NoWarn>$(NoWarn);CA1311</NoWarn>
<NoWarn>$(NoWarn);CA1852</NoWarn>
<NoWarn>$(NoWarn);CA1854</NoWarn>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="../../src/Microsoft.SqlTools.Hosting/Microsoft.SqlTools.Hosting.csproj" />

View File

@@ -7,7 +7,7 @@ using System;
namespace Microsoft.SqlTools.ServiceLayer.Test.Common
{
internal class ComparisonFailureException : InvalidOperationException
internal sealed class ComparisonFailureException : InvalidOperationException
{
internal string FullMessageWithDiff { get; private set; }
internal string EditAndCopyMessage { get; private set; }

View File

@@ -178,14 +178,14 @@ namespace Microsoft.SqlTools.ServiceLayer.Test.Common.RequestContextMocking
Event
}
private class ExpectedEvent
private sealed class ExpectedEvent
{
public EventTypes EventType { get; set; }
public Type ParamType { get; set; }
public Delegate Validator { get; set; }
}
private class ReceivedEvent
private sealed class ReceivedEvent
{
public object EventObject { get; set; }
public EventTypes EventType { get; set; }

View File

@@ -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\net6.0\win-x64\MicrosoftSqlToolsServiceLayer.exe";
@"..\..\..\..\..\src\Microsoft.SqlTools.ServiceLayer\bin\Debug\net7.0\win-x64\MicrosoftSqlToolsServiceLayer.exe";
if (!File.Exists(serviceHostExecutable))
{
serviceHostExecutable = Path.Combine(Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location), "MicrosoftSqlToolsServiceLayer.exe");

View File

@@ -11,7 +11,7 @@ using System.Collections.Generic;
namespace Microsoft.SqlTools.ServiceLayer.TestEnvConfig
{
class Program
sealed class Program
{
[System.Diagnostics.CodeAnalysis.SuppressMessage("Style", "IDE0210:Convert to top-level statements", Justification = "Structure retained for readability.")]
static void Main(string[] args)

View File

@@ -6,6 +6,12 @@
<IsPackable>false</IsPackable>
<ApplicationIcon />
<StartupObject />
<NoWarn>$(NoWarn);SYSLIB1045</NoWarn>
<NoWarn>$(NoWarn);IDE0200</NoWarn>
<NoWarn>$(NoWarn);IDE0230</NoWarn>
<NoWarn>$(NoWarn);CA1311</NoWarn>
<NoWarn>$(NoWarn);CA1852</NoWarn>
<NoWarn>$(NoWarn);CA1854</NoWarn>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="System.Text.Encoding.CodePages" />