Skip to content

Commit 8202539

Browse files
authored
Merge branch 'release/10.0.2xx' into darc-release/10.0.2xx-251686ac-7cef-4c48-a65b-32c3d9e8702f
2 parents e46074b + 861d938 commit 8202539

File tree

30 files changed

+302
-21
lines changed

30 files changed

+302
-21
lines changed

src/Cli/dotnet/Commands/Run/CSharpCompilerCommand.cs

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
using Microsoft.DotNet.Cli.Utils.Extensions;
1313
using Microsoft.NET.HostModel.AppHost;
1414
using NuGet.Configuration;
15+
using NuGet.Versioning;
1516

1617
namespace Microsoft.DotNet.Cli.Commands.Run;
1718

@@ -44,6 +45,7 @@ internal sealed partial class CSharpCompilerCommand
4445
private static string ClientDirectory => field ??= Path.Combine(SdkPath, "Roslyn", "bincore");
4546
private static string NuGetCachePath => field ??= SettingsUtility.GetGlobalPackagesFolder(Settings.LoadDefaultSettings(null));
4647
internal static string RuntimeVersion => field ??= RuntimeInformation.FrameworkDescription.Split(' ').Last();
48+
private static string DefaultRuntimeVersion => field ??= GetDefaultRuntimeVersion();
4749
private static string TargetFrameworkVersion => Product.TargetFrameworkVersion;
4850

4951
public required string EntryPointFileFullPath { get; init; }
@@ -315,7 +317,7 @@ private void PrepareAuxiliaryFiles(out string rspPath)
315317
"tfm": "net{{TargetFrameworkVersion}}",
316318
"framework": {
317319
"name": "Microsoft.NETCore.App",
318-
"version": {{JsonSerializer.Serialize(RuntimeVersion)}}
320+
"version": {{JsonSerializer.Serialize(DefaultRuntimeVersion)}}
319321
},
320322
"configProperties": {
321323
"EntryPointFilePath": {{JsonSerializer.Serialize(EntryPointFileFullPath)}},
@@ -417,4 +419,19 @@ public static bool IsPathOption(string arg, out int colonIndex)
417419
colonIndex = -1;
418420
return false;
419421
}
422+
423+
/// <summary>
424+
/// See <c>GenerateDefaultRuntimeFrameworkVersion</c>.
425+
/// </summary>
426+
private static string GetDefaultRuntimeVersion()
427+
{
428+
if (NuGetVersion.TryParse(RuntimeVersion, out var version))
429+
{
430+
return version.IsPrerelease && version.Patch == 0 ?
431+
RuntimeVersion :
432+
new NuGetVersion(version.Major, version.Minor, 0).ToFullString();
433+
}
434+
435+
return RuntimeVersion;
436+
}
420437
}

src/Cli/dotnet/Commands/Test/MTP/Terminal/TerminalTestReporter.cs

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
22

33
using System.Collections.Concurrent;
4-
using Microsoft.TemplateEngine.Cli.Help;
54
using System.Globalization;
65
using System.Text.RegularExpressions;
76
using Microsoft.CodeAnalysis;
8-
using Microsoft.Testing.Platform.OutputDevice.Terminal;
97
using Microsoft.DotNet.Cli.Commands.Test.IPC.Models;
8+
using Microsoft.TemplateEngine.Cli.Help;
9+
using Microsoft.Testing.Platform.OutputDevice.Terminal;
1010

1111
namespace Microsoft.DotNet.Cli.Commands.Test.Terminal;
1212

@@ -397,7 +397,7 @@ internal void TestCompleted(
397397
string displayName,
398398
string? informativeMessage,
399399
TestOutcome outcome,
400-
TimeSpan duration,
400+
TimeSpan? duration,
401401
FlatException[]? exceptions,
402402
string? expected,
403403
string? actual,
@@ -458,7 +458,7 @@ internal void TestCompleted(
458458
string displayName,
459459
string? informativeMessage,
460460
TestOutcome outcome,
461-
TimeSpan duration,
461+
TimeSpan? duration,
462462
FlatException[]? flatExceptions,
463463
string? expected,
464464
string? actual,
@@ -496,9 +496,12 @@ internal void TestCompleted(
496496
terminal.ResetColor();
497497
terminal.Append(' ');
498498
terminal.Append(displayName);
499-
terminal.SetColor(TerminalColor.DarkGray);
500-
terminal.Append(' ');
501-
AppendLongDuration(terminal, duration);
499+
500+
if (duration.HasValue)
501+
{
502+
terminal.Append(' ');
503+
AppendLongDuration(terminal, duration.Value);
504+
}
502505

503506
if (!string.IsNullOrEmpty(informativeMessage))
504507
{

src/Cli/dotnet/Commands/Test/MTP/TestApplicationHandler.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ internal void OnTestResultsReceived(TestResultMessages testResultMessage)
143143
testResult.DisplayName!,
144144
testResult.Reason,
145145
ToOutcome(testResult.State),
146-
TimeSpan.FromTicks(testResult.Duration ?? 0),
146+
testResult.Duration.HasValue ? TimeSpan.FromTicks(testResult.Duration.Value) : null,
147147
exceptions: null,
148148
expected: null,
149149
actual: null,
@@ -158,7 +158,7 @@ internal void OnTestResultsReceived(TestResultMessages testResultMessage)
158158
testResult.DisplayName!,
159159
testResult.Reason,
160160
ToOutcome(testResult.State),
161-
TimeSpan.FromTicks(testResult.Duration ?? 0),
161+
testResult.Duration.HasValue ? TimeSpan.FromTicks(testResult.Duration.Value) : null,
162162
exceptions: [.. testResult.Exceptions!.Select(fe => new Terminal.FlatException(fe.ErrorMessage, fe.ErrorType, fe.StackTrace))],
163163
expected: null,
164164
actual: null,
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>com.apple.security.cs.allow-jit</key>
6+
<true/>
7+
<key>com.apple.security.cs.allow-dyld-environment-variables</key>
8+
<true/>
9+
<key>com.apple.security.cs.disable-library-validation</key>
10+
<true/>
11+
<key>com.apple.security.cs.debugger</key>
12+
<true/>
13+
<key>com.apple.security.get-task-allow</key>
14+
<true/>
15+
</dict>
16+
</plist>

src/Layout/redist/targets/GenerateLayout.targets

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,9 @@
6565
AppBinaryName="%(_RoslynAppHost.Filename)%(_RoslynAppHost.Extension)"
6666
IntermediateAssembly="%(_RoslynAppHost.FullPath)"
6767
EnableMacOSCodeSign="$(SharedFrameworkRid.StartsWith('osx'))" />
68+
69+
<Exec Command="codesign --sign - --force --entitlements '$(MSBuildProjectDirectory)/roslyn-entitlements.plist' %(_RoslynAppHost.RootDir)%(_RoslynAppHost.Directory)%(_RoslynAppHost.Filename)$(ExeExtension)"
70+
Condition="$(SharedFrameworkRid.StartsWith('osx'))" />
6871
</Target>
6972

7073
<Target Name="PublishNETAnalyzers">

src/Tasks/Common/Resources/Strings.resx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1010,5 +1010,9 @@ You may need to build the project on another operating system or architecture, o
10101010
<value>NETSDK1233: Targeting .NET 10.0 or higher in Visual Studio 2022 17.14 is not supported.</value>
10111011
<comment>{StrBegins="NETSDK1233: "}</comment>
10121012
</data>
1013-
<!-- The latest message added is Net10NotCompatibleWithVS17. Please update this value with each PR to catch parallel PRs both adding a new message -->
1013+
<data name="RoslynCompilerTypeFrameworkIsDeprecated" xml:space="preserve">
1014+
<value>NETSDK1234: RoslynCompilerType 'Framework' is deprecated and will be removed in a future version. Please refer to {0} for more information.</value>
1015+
<comment>{StrBegins="NETSDK1234: "}{Locked="RoslynCompilerType"}{Locked="Framework"}{Locked="{0}"}</comment>
1016+
</data>
1017+
<!-- The latest message added is RoslynCompilerTypeFrameworkIsDeprecated. Please update this value with each PR to catch parallel PRs both adding a new message -->
10141018
</root>

src/Tasks/Common/Resources/xlf/Strings.cs.xlf

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

src/Tasks/Common/Resources/xlf/Strings.de.xlf

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

src/Tasks/Common/Resources/xlf/Strings.es.xlf

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

src/Tasks/Common/Resources/xlf/Strings.fr.xlf

Lines changed: 5 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)