Skip to content

Commit 70ab4b1

Browse files
authored
[automated] Merge branch 'release/10.0.2xx' => 'main' (#51958)
2 parents 389a8a9 + 82cd8fb commit 70ab4b1

File tree

54 files changed

+1046
-426
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+1046
-426
lines changed

Directory.Packages.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@
114114
<PackageVersion Include="runtime.linux-musl-x64.Microsoft.NETCore.DotNetHostResolver" Version="$(MicrosoftNETCoreDotNetHostResolverPackageVersion)" />
115115
<PackageVersion Include="runtime.linux-x64.Microsoft.NETCore.DotNetHostResolver" Version="$(MicrosoftNETCoreDotNetHostResolverPackageVersion)" />
116116
<PackageVersion Include="runtime.osx-x64.Microsoft.NETCore.DotNetHostResolver" Version="$(MicrosoftNETCoreDotNetHostResolverPackageVersion)" />
117-
<PackageVersion Include="Spectre.Console" Version="0.52.0" />
117+
<PackageVersion Include="Spectre.Console" Version="0.54.0" />
118118
<PackageVersion Include="StyleCop.Analyzers" Version="$(StyleCopAnalyzersPackageVersion)" />
119119
<PackageVersion Include="System.CodeDom" Version="$(SystemCodeDomPackageVersion)" />
120120
<PackageVersion Include="System.CommandLine" Version="$(SystemCommandLineVersion)" />

sdk.slnx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
<File Path="test.sh" />
2424
</Folder>
2525
<Folder Name="/src/">
26+
<Project Path="src/Microsoft.DotNet.ProjectTools/Microsoft.DotNet.ProjectTools.csproj" />
2627
<Project Path="src/Microsoft.DotNet.TemplateLocator/Microsoft.DotNet.TemplateLocator.csproj" />
2728
<Project Path="src/Microsoft.Net.Sdk.Compilers.Toolset/Microsoft.Net.Sdk.Compilers.Toolset.csproj" />
2829
<Project Path="src/Microsoft.Win32.Msi/Microsoft.Win32.Msi.csproj" />
@@ -57,10 +58,10 @@
5758
<Project Path="src/BuiltInTools/HotReloadAgent/Microsoft.DotNet.HotReload.Agent.shproj" />
5859
<Project Path="src/BuiltInTools/HotReloadClient/Microsoft.DotNet.HotReload.Client.Package.csproj" />
5960
<Project Path="src/BuiltInTools/HotReloadClient/Microsoft.DotNet.HotReload.Client.shproj" />
60-
<Project Path="src/BuiltInTools/Web.Middleware/Microsoft.DotNet.HotReload.Web.Middleware.Package.csproj" />
61-
<Project Path="src/BuiltInTools/Web.Middleware/Microsoft.DotNet.HotReload.Web.Middleware.shproj" />
6261
<Project Path="src/BuiltInTools/Watch.Aspire/Microsoft.DotNet.HotReload.Watch.Aspire.csproj" />
6362
<Project Path="src/BuiltInTools/Watch/Microsoft.DotNet.HotReload.Watch.csproj" />
63+
<Project Path="src/BuiltInTools/Web.Middleware/Microsoft.DotNet.HotReload.Web.Middleware.Package.csproj" />
64+
<Project Path="src/BuiltInTools/Web.Middleware/Microsoft.DotNet.HotReload.Web.Middleware.shproj" />
6465
</Folder>
6566
<Folder Name="/src/Cli/">
6667
<Project Path="src/Cli/dotnet/dotnet.csproj" />

src/BuiltInTools/Watch/Microsoft.DotNet.HotReload.Watch.csproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,8 @@
3636
<Compile Include="$(RepoRoot)src\Common\PathUtilities.cs" LinkBase="Utilities" />
3737
</ItemGroup>
3838

39+
<ItemGroup>
40+
<ProjectReference Include="..\..\Microsoft.DotNet.ProjectTools\Microsoft.DotNet.ProjectTools.csproj" />
41+
</ItemGroup>
42+
3943
</Project>

src/BuiltInTools/Watch/Process/LaunchSettingsProfile.cs

Lines changed: 11 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the MIT license.
33

4-
5-
using System.Diagnostics;
64
using System.Text.Json;
75
using System.Text.Json.Serialization;
6+
using Microsoft.DotNet.ProjectTools;
87
using Microsoft.Extensions.Logging;
98

109
namespace Microsoft.DotNet.Watch
@@ -26,28 +25,19 @@ internal sealed class LaunchSettingsProfile
2625

2726
internal static LaunchSettingsProfile? ReadLaunchProfile(string projectPath, string? launchProfileName, ILogger logger)
2827
{
29-
var projectDirectory = Path.GetDirectoryName(projectPath);
30-
Debug.Assert(projectDirectory != null);
31-
32-
var launchSettingsPath = GetPropertiesLaunchSettingsPath(projectDirectory, "Properties");
33-
bool hasLaunchSettings = File.Exists(launchSettingsPath);
34-
35-
var projectNameWithoutExtension = Path.GetFileNameWithoutExtension(projectPath);
36-
var runJsonPath = GetFlatLaunchSettingsPath(projectDirectory, projectNameWithoutExtension);
37-
bool hasRunJson = File.Exists(runJsonPath);
38-
39-
if (hasLaunchSettings)
28+
var launchSettingsPath = LaunchSettingsLocator.TryFindLaunchSettings(projectPath, launchProfileName, (message, isError) =>
4029
{
41-
if (hasRunJson)
30+
if (isError)
4231
{
43-
logger.LogWarning("Warning: Settings from '{JsonPath}' are not used because '{LaunchSettingsPath}' has precedence.", runJsonPath, launchSettingsPath);
32+
logger.LogError(message);
4433
}
45-
}
46-
else if (hasRunJson)
47-
{
48-
launchSettingsPath = runJsonPath;
49-
}
50-
else
34+
else
35+
{
36+
logger.LogWarning(message);
37+
}
38+
});
39+
40+
if (launchSettingsPath == null)
5141
{
5242
return null;
5343
}
@@ -96,12 +86,6 @@ internal sealed class LaunchSettingsProfile
9686
return namedProfile;
9787
}
9888

99-
private static string GetPropertiesLaunchSettingsPath(string directoryPath, string propertiesDirectoryName)
100-
=> Path.Combine(directoryPath, propertiesDirectoryName, "launchSettings.json");
101-
102-
private static string GetFlatLaunchSettingsPath(string directoryPath, string projectNameWithoutExtension)
103-
=> Path.Join(directoryPath, $"{projectNameWithoutExtension}.run.json");
104-
10589
private static LaunchSettingsProfile? ReadDefaultLaunchProfile(LaunchSettingsJson? launchSettings, ILogger logger)
10690
{
10791
if (launchSettings is null || launchSettings.Profiles is null)

src/BuiltInTools/dotnet-watch.slnf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
"src\\BuiltInTools\\Watch.Aspire\\Microsoft.DotNet.HotReload.Watch.Aspire.csproj",
2424
"src\\BuiltInTools\\Watch\\Microsoft.DotNet.HotReload.Watch.csproj",
2525
"src\\BuiltInTools\\dotnet-watch\\dotnet-watch.csproj",
26+
"src\\Microsoft.DotNet.ProjectTools\\Microsoft.DotNet.ProjectTools.csproj",
2627
"test\\Microsoft.AspNetCore.Watch.BrowserRefresh.Tests\\Microsoft.AspNetCore.Watch.BrowserRefresh.Tests.csproj",
2728
"test\\Microsoft.DotNet.HotReload.Client.Tests\\Microsoft.DotNet.HotReload.Client.Tests.csproj",
2829
"test\\Microsoft.Extensions.DotNetDeltaApplier.Tests\\Microsoft.Extensions.DotNetDeltaApplier.Tests.csproj",

src/Cli/Microsoft.DotNet.Cli.CommandLine/xlf/CliResources.cs.xlf

Lines changed: 19 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Cli/Microsoft.DotNet.Cli.CommandLine/xlf/CliResources.de.xlf

Lines changed: 19 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Cli/Microsoft.DotNet.Cli.CommandLine/xlf/CliResources.es.xlf

Lines changed: 19 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Cli/Microsoft.DotNet.Cli.CommandLine/xlf/CliResources.fr.xlf

Lines changed: 19 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Cli/Microsoft.DotNet.Cli.CommandLine/xlf/CliResources.it.xlf

Lines changed: 19 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)