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

@@ -34,7 +34,7 @@ namespace Microsoft.SqlTools.ServiceLayer.DacFx
{
try
{
var filters = Parameters.ObjectTypes.Select(t => MapType(t)).ToArray();
var filters = Parameters.ObjectTypes.Select(MapType).ToArray();
var objects = Model.GetObjects(DacQueryScopes.UserDefined, filters).ToList();
return objects.Select(o => new TSqlObjectInfo

View File

@@ -79,8 +79,8 @@ namespace Microsoft.SqlTools.ServiceLayer.ExecutionPlan
Subtext = currentNode.GetDisplayLinesOfText(true),
RelativeCost = currentNode.RelativeCost,
Properties = GetProperties(currentNode.Properties),
Children = currentNode.Children.Select(x => ConvertShowPlanTreeToExecutionPlanTree(x)).ToList(),
Edges = currentNode.Edges.Select(x => ConvertShowPlanEdgeToExecutionPlanEdge(x)).ToList(),
Children = currentNode.Children.Select(ConvertShowPlanTreeToExecutionPlanTree).ToList(),
Edges = currentNode.Edges.Select(ConvertShowPlanEdgeToExecutionPlanEdge).ToList(),
Badges = GenerateNodeOverlay(currentNode),
Name = currentNode.DisplayName,
ElapsedTimeInMs = currentNode.ElapsedTimeInMs,

View File

@@ -597,7 +597,7 @@ namespace Microsoft.SqlTools.ServiceLayer.LanguageServices
{
if (currentList != null &&
token != null && !string.IsNullOrWhiteSpace(token.Text) &&
token.Text.All(ch => char.IsLetter(ch)) &&
token.Text.All(char.IsLetter) &&
currentList.All(x => string.Compare(x.Label, token.Text, true) != 0
))
{

View File

@@ -1,5 +1,5 @@
// WARNING:
// This file was generated by the Microsoft DataWarehouse String Resource Tool 6.0.0.0
// This file was generated by the Microsoft DataWarehouse String Resource Tool 7.0.0.0
// from information in sr.strings
// DO NOT MODIFY THIS FILE'S CONTENTS, THEY WILL BE OVERWRITTEN
//

View File

@@ -13,6 +13,10 @@
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<PreserveCompilationContext>true</PreserveCompilationContext>
<RuntimeIdentifiers>$(ToolsServiceTargetRuntimes)</RuntimeIdentifiers>
<NoWarn>$(NoWarn);SYSLIB1045</NoWarn>
<NoWarn>$(NoWarn);CA1311</NoWarn>
<NoWarn>$(NoWarn);CA1854</NoWarn>
<NoWarn>$(NoWarn);CS8600;CS8603;CS8625</NoWarn>
</PropertyGroup>
<PropertyGroup>

View File

@@ -60,7 +60,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer
public ObjectExplorerService()
{
sessionMap = new ConcurrentDictionary<string, ObjectExplorerSession>();
applicableNodeChildFactories = new Lazy<Dictionary<string, HashSet<ChildFactory>>>(() => PopulateFactories());
applicableNodeChildFactories = new Lazy<Dictionary<string, HashSet<ChildFactory>>>(PopulateFactories);
NodePathGenerator.Initialize();
}

View File

@@ -116,7 +116,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
return;
}
IEnumerable<SmoQuerier> queriers = context.ServiceProvider.GetServices<SmoQuerier>(q => IsCompatibleQuerier(q));
IEnumerable<SmoQuerier> queriers = context.ServiceProvider.GetServices<SmoQuerier>(IsCompatibleQuerier);
var filters = this.Filters.ToList();
var smoProperties = this.SmoProperties.Where(p => ServerVersionHelper.IsValidFor(serverValidFor, p.ValidFor)).Select(x => x.Name);
if (!string.IsNullOrEmpty(name))

View File

@@ -229,7 +229,7 @@ namespace Microsoft.SqlTools.ServiceLayer.TaskServices
//Run Task synchronously
public void Run()
{
Task.Run(() => RunAsync());
Task.Run(RunAsync);
}
/// <summary>