Skip to content

Commit 6de592d

Browse files
Merging main into darc-main-6a483e62-9a15-475d-a31b-7c7d1c96cb9f
2 parents 8500054 + 39c0328 commit 6de592d

File tree

12 files changed

+70
-47
lines changed

12 files changed

+70
-47
lines changed

Directory.Build.props

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@
2929

3030
<PropertyGroup>
3131
<SdkSrcRoot>$([MSBuild]::NormalizeDirectory('$(MSBuildThisFileDirectory)', 'src'))</SdkSrcRoot>
32+
<TestHostFolder>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'redist', '$(Configuration)'))</TestHostFolder>
33+
<TestHostDotNetRoot>$([MSBuild]::NormalizeDirectory('$(TestHostFolder)', 'dotnet'))</TestHostDotNetRoot>
34+
<TestHostDotNetTool>$(TestHostDotNetRoot)$([System.IO.Path]::GetFileName('$(DotNetTool)'))</TestHostDotNetTool>
35+
3236
<PackageProjectUrl>https://github.com/dotnet/sdk</PackageProjectUrl>
3337
<PackageLicenseExpression>MIT</PackageLicenseExpression>
3438
<LangVersion>Preview</LangVersion>

eng/Version.Details.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -546,13 +546,13 @@
546546
<Uri>https://github.com/dotnet/arcade-services</Uri>
547547
<Sha>b6c1947b3493a1ad3a1a87fa689128e1d73309ba</Sha>
548548
</Dependency>
549-
<Dependency Name="Microsoft.Testing.Platform" Version="1.8.0-preview.25270.10">
549+
<Dependency Name="Microsoft.Testing.Platform" Version="1.8.0-preview.25276.8">
550550
<Uri>https://github.com/microsoft/testfx</Uri>
551-
<Sha>ce77f199bc3f388f9526eec9b4ae19c8b99c568a</Sha>
551+
<Sha>65f8636524b4ffd6f7a6cd842714645f46905136</Sha>
552552
</Dependency>
553-
<Dependency Name="MSTest" Version="3.10.0-preview.25270.10">
553+
<Dependency Name="MSTest" Version="3.10.0-preview.25276.8">
554554
<Uri>https://github.com/microsoft/testfx</Uri>
555-
<Sha>ce77f199bc3f388f9526eec9b4ae19c8b99c568a</Sha>
555+
<Sha>65f8636524b4ffd6f7a6cd842714645f46905136</Sha>
556556
</Dependency>
557557
<Dependency Name="Microsoft.Extensions.Configuration.Ini" Version="10.0.0-preview.6.25276.103">
558558
<Uri>https://github.com/dotnet/dotnet</Uri>

eng/Versions.props

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
<UsingToolVSSDK>true</UsingToolVSSDK>
3131
<FlagNetStandard1XDependencies Condition="'$(DotNetBuildSourceOnly)' == 'true'">true</FlagNetStandard1XDependencies>
3232
<!-- This property is only used in the dotnet test integration tests. -->
33-
<MicrosoftTestingPlatformVersion>1.8.0-preview.25270.10</MicrosoftTestingPlatformVersion>
33+
<MicrosoftTestingPlatformVersion>1.8.0-preview.25276.8</MicrosoftTestingPlatformVersion>
3434
</PropertyGroup>
3535
<PropertyGroup Label="Servicing version information">
3636
<VersionFeature21>30</VersionFeature21>
@@ -322,7 +322,7 @@
322322
<AwesomeAssertionsVersion>8.0.2</AwesomeAssertionsVersion>
323323
<AwesomeAssertionsJsonVersion>8.0.0</AwesomeAssertionsJsonVersion>
324324
<MoqPackageVersion>4.18.4</MoqPackageVersion>
325-
<MSTestVersion>3.10.0-preview.25270.10</MSTestVersion>
325+
<MSTestVersion>3.10.0-preview.25276.8</MSTestVersion>
326326
<XunitCombinatorialVersion>1.3.2</XunitCombinatorialVersion>
327327
<MicrosoftDotNetInstallerWindowsSecurityTestDataPackageVersion>8.0.0-beta.23607.1</MicrosoftDotNetInstallerWindowsSecurityTestDataPackageVersion>
328328
</PropertyGroup>

src/BuiltInTools/dotnet-watch/dotnet-watch.csproj

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,4 +54,33 @@
5454
<ProjectReference Include="..\DotNetWatchTasks\DotNetWatchTasks.csproj" PrivateAssets="All" ReferenceOutputAssembly="false" SkipGetTargetFrameworkProperties="true" UndefineProperties="TargetFramework;TargetFrameworks" OutputItemType="Content" CopyToOutputDirectory="PreserveNewest" />
5555
</ItemGroup>
5656

57+
<!-- Publish dotnet-watch files to the redist testhost folder so that in innerloop, redist doesn't need to be built again. -->
58+
<Target Name="PublishDotnetWatchToTestHost" BeforeTargets="AfterBuild">
59+
<ItemGroup>
60+
<!--
61+
To reduce the size of the SDK, we use the compiler dependencies that are located in the `Roslyn/bincore` location
62+
instead of shipping our own copies in the dotnet-watch tool. These assemblies will be resolved by path in the
63+
dotnet-watch executable.
64+
65+
We make an exception for the Microsoft.CodeAnalysis binaries deployed with the MSBuildWorkspace BuildHosts, since those don't
66+
have any logic to pick up Roslyn from another location. Those can be addressed a different way which tracked in
67+
https://github.com/dotnet/roslyn/issues/70945.
68+
69+
Keep excluded files in sync with the list in GenerateLayout.targets.
70+
-->
71+
<_DotnetWatchInputFile Include="$(TargetDir)**"
72+
Condition="('%(Filename)' != 'Microsoft.CodeAnalysis' and
73+
'%(Filename)' != 'Microsoft.CodeAnalysis.resources' and
74+
'%(Filename)' != 'Microsoft.CodeAnalysis.CSharp' and
75+
'%(Filename)' != 'Microsoft.CodeAnalysis.CSharp.resources') or
76+
$([MSBuild]::ValueOrDefault('%(FullPath)', '').Contains('BuildHost'))" />
77+
</ItemGroup>
78+
79+
<Copy SourceFiles="@(_DotnetWatchInputFile)"
80+
DestinationFiles="@(_DotnetWatchInputFile->'$(TestHostDotNetRoot)sdk\$(Version)\DotnetTools\dotnet-watch\$(Version)\tools\$(SdkTargetFramework)\any\%(RecursiveDir)%(Filename)%(Extension)')"
81+
SkipUnchangedFiles="true">
82+
<Output TaskParameter="CopiedFiles" ItemName="FileWrites" />
83+
</Copy>
84+
</Target>
85+
5786
</Project>

src/Cli/Microsoft.TemplateEngine.Cli/TemplateSearch/CliTemplateSearchCoordinator.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ private static void DisplayResultsForPack(
191191
.ThenBy(d => d.TemplateGroupInfo.Name, StringComparer.CurrentCultureIgnoreCase))
192192
.DefineColumn(r => r.TemplateGroupInfo.Name, out object? nameColumn, LocalizableStrings.ColumnNameTemplateName, showAlways: true, shrinkIfNeeded: true, minWidth: 15)
193193
.DefineColumn(r => r.TemplateGroupInfo.ShortNames, LocalizableStrings.ColumnNameShortName, showAlways: true)
194-
.DefineColumn(r => r.TemplateGroupInfo.Author, LocalizableStrings.ColumnNameAuthor, TabularOutputSettings.ColumnNames.Author, defaultColumn: false, shrinkIfNeeded: true, minWidth: 10)
194+
.DefineColumn(r => r.TemplateGroupInfo.Author, LocalizableStrings.ColumnNameAuthor, TabularOutputSettings.ColumnNames.Author, defaultColumn: false, shrinkIfNeeded: true, minWidth: 12)
195195
.DefineColumn(r => r.TemplateGroupInfo.Languages, LocalizableStrings.ColumnNameLanguage, TabularOutputSettings.ColumnNames.Language, defaultColumn: true)
196196
.DefineColumn(r => r.TemplateGroupInfo.Type, LocalizableStrings.ColumnNameType, TabularOutputSettings.ColumnNames.Type, defaultColumn: false)
197197
.DefineColumn(r => r.TemplateGroupInfo.Classifications, LocalizableStrings.ColumnNameTags, TabularOutputSettings.ColumnNames.Tags, defaultColumn: false, shrinkIfNeeded: true, minWidth: 10)

src/Layout/redist/targets/OverlaySdkOnLKG.targets

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
<Project>
22

3-
<PropertyGroup>
4-
<TestHostFolder>$(ArtifactsBinDir)redist\$(Configuration)\dotnet\</TestHostFolder>
5-
</PropertyGroup>
6-
73
<Target Name="OverlaySdkOnLKG" AfterTargets="AfterBuild" DependsOnTargets="GenerateInstallerLayout">
84
<PropertyGroup>
95
<_DotNetHiveRoot>$(DOTNET_INSTALL_DIR)</_DotNetHiveRoot>
@@ -18,12 +14,12 @@
1814
Exclude="$(_DotNetHiveRoot)sdk\**\*;
1915
$(_DotNetHiveRoot)templates\**\*;
2016
$(_DotNetHiveRoot)host\**\*"/>
21-
<OverlaySDKFile Include="@(_OverlaySDKFile->'$(TestHostFolder)%(RecursiveDir)%(Filename)%(Extension)')" Source="%(Identity)" />
17+
<OverlaySDKFile Include="@(_OverlaySDKFile->'$(TestHostDotNetRoot)%(RecursiveDir)%(Filename)%(Extension)')" Source="%(Identity)" />
2218
</ItemGroup>
2319

2420
<ItemGroup>
2521
<_InstallerOutputFile Include="$(RedistInstallerLayoutPath)**\*" />
26-
<InstallerOutputFile Include="@(_InstallerOutputFile->'$(TestHostFolder)%(RecursiveDir)%(Filename)%(Extension)')" Source="%(Identity)" />
22+
<InstallerOutputFile Include="@(_InstallerOutputFile->'$(TestHostDotNetRoot)%(RecursiveDir)%(Filename)%(Extension)')" Source="%(Identity)" />
2723
<!-- Use available live built artifacts instead of stage0 files. -->
2824
<InstallerOutputFile Include="@(OverlaySDKFile)" Exclude="@(InstallerOutputFile)" />
2925
</ItemGroup>
@@ -53,10 +49,10 @@
5349
</ItemGroup>
5450

5551
<Copy SourceFiles="@(WorkloadManifestContent)"
56-
DestinationFiles="@(WorkloadManifestContent->'$(TestHostFolder)sdk-manifests\$(VersionBand)\%(RecursiveDir)%(Filename)%(Extension)')" />
52+
DestinationFiles="@(WorkloadManifestContent->'$(TestHostDotNetRoot)sdk-manifests\$(VersionBand)\%(RecursiveDir)%(Filename)%(Extension)')" />
5753

5854
<Copy SourceFiles="@(WorkloadPackContent)"
59-
DestinationFiles="@(WorkloadPackContent->'$(TestHostFolder)packs\%(RecursiveDir)%(Filename)%(Extension)')" />
55+
DestinationFiles="@(WorkloadPackContent->'$(TestHostDotNetRoot)packs\%(RecursiveDir)%(Filename)%(Extension)')" />
6056
</Target>
6157

6258
</Project>

test/Directory.Build.targets

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
<ResultsStdOutPath>@(TestToRun->'%(ResultsStdOutPath)')</ResultsStdOutPath>
6262

6363
<TestArgs>-noautoreporters -noRepoInference</TestArgs>
64-
<TestArgs>$(TestArgs) -dotnetPath $(ArtifactsBinDir)redist\$(Configuration)\dotnet\dotnet</TestArgs>
64+
<TestArgs>$(TestArgs) -dotnetPath $(TestHostDotNetTool)</TestArgs>
6565
<TestArgs>$(TestArgs) -xml "$(ResultsXmlPath)"</TestArgs>
6666
<TestArgs>$(TestArgs) -html "$(ResultsHtmlPath)" $(TestRunnerAdditionalArguments)</TestArgs>
6767
<TestArgs>$(TestArgs) &gt; $(ResultsStdOutPath)</TestArgs>
@@ -70,7 +70,7 @@
7070

7171
<!-- Run "dotnet new" (which will just display usage and available templates) in order to print first time
7272
use message so that it doesn't interfere with tests which check the output of commands. -->
73-
<Exec Command="$(ArtifactsBinDir)redist\$(Configuration)\dotnet\dotnet new" />
73+
<Exec Command="$(TestHostDotNetTool) new" />
7474

7575
<Exec Command="dotnet tool run $(ToolCommandName) -- $(TestArgs)"
7676
WorkingDirectory="$(TestLocalToolFolder)"

test/Microsoft.NET.TestFramework/Commands/NuGetExeRestoreCommand.cs

Lines changed: 15 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,6 @@ public NuGetExeRestoreCommand(ITestOutputHelper log, string projectRootPath, str
2424

2525
protected override SdkCommandSpec CreateCommand(IEnumerable<string> args)
2626
{
27-
var newArgs = new List<string>();
28-
29-
newArgs.Add("restore");
30-
31-
newArgs.Add(FullPathProjectFile);
32-
33-
newArgs.Add("-PackagesDirectory");
34-
newArgs.Add(PackagesDirectory ?? TestContext.Current.NuGetCachePath ?? string.Empty);
35-
36-
newArgs.AddRange(args);
37-
3827
if (string.IsNullOrEmpty(TestContext.Current.NuGetExePath))
3928
{
4029
throw new InvalidOperationException("Path to nuget.exe not set");
@@ -58,20 +47,28 @@ protected override SdkCommandSpec CreateCommand(IEnumerable<string> args)
5847
"https://dist.nuget.org/win-x86-commandline/latest/nuget.exe" :
5948
$"https://dist.nuget.org/win-x86-commandline/v{NuGetExeVersion}/nuget.exe";
6049

61-
using (var client = new System.Net.Http.HttpClient())
62-
using (var response = client.GetAsync(url).ConfigureAwait(false).GetAwaiter().GetResult())
63-
using (var fs = new FileStream(nugetExePath, FileMode.CreateNew))
50+
DownloadNuGetAsync().ConfigureAwait(false).GetAwaiter().GetResult();
51+
52+
async Task DownloadNuGetAsync()
6453
{
65-
#pragma warning disable CA2025 // we force synchronous so sourceCacheContext can't be disposed early
66-
response.Content.CopyToAsync(fs).ConfigureAwait(false).GetAwaiter().GetResult();
67-
#pragma warning restore CA2025
54+
using var client = new System.Net.Http.HttpClient();
55+
using var response = await client.GetAsync(url).ConfigureAwait(false);
56+
using var fs = new FileStream(nugetExePath, FileMode.CreateNew);
57+
await response.Content.CopyToAsync(fs).ConfigureAwait(false);
6858
}
6959
}
7060

7161
var ret = new SdkCommandSpec()
7262
{
7363
FileName = nugetExePath,
74-
Arguments = newArgs
64+
Arguments =
65+
[
66+
"restore",
67+
FullPathProjectFile,
68+
"-PackagesDirectory",
69+
PackagesDirectory ?? TestContext.Current.NuGetCachePath ?? string.Empty,
70+
.. args
71+
]
7572
};
7673

7774
TestContext.Current.AddTestEnvironmentVariables(ret.Environment);

test/UnitTests.proj

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,6 @@
135135
<HelixPostCommands Condition="!$(IsPosixShell)">PowerShell -ExecutionPolicy ByPass "dotnet nuget locals all -l | ForEach-Object { $_.Split(' ')[1]} | Where-Object{$_ -like '*cache'} | Get-ChildItem -Recurse -File -Filter '*.dat' | Measure";$(HelixPostCommands)</HelixPostCommands>
136136
<HelixPostCommands Condition="!$(IsPosixShell)">PowerShell -ExecutionPolicy ByPass "Get-ChildItem -Recurse -File -Filter '*hangdump.dmp' | Copy-Item -Destination $env:HELIX_WORKITEM_UPLOAD_ROOT";$(HelixPostCommands)</HelixPostCommands>
137137
<HelixPostCommands Condition="$(IsPosixShell)">find "$HELIX_WORKITEM_UPLOAD_ROOT/../../.." -name '*hangdump.dmp' -exec cp {} "$HELIX_WORKITEM_UPLOAD_ROOT" \%3B;$(HelixPostCommands)</HelixPostCommands>
138-
<TestDotnetRoot>$(RepoRoot)artifacts\bin\redist\$(Configuration)\dotnet</TestDotnetRoot>
139138
<TestDotnetVersion>$(Version)</TestDotnetVersion>
140139
<MSBuildSdkResolverDir>$(RepoRoot)artifacts\bin\Microsoft.DotNet.MSBuildSdkResolver</MSBuildSdkResolverDir>
141140
<HelixStage0Targz>$(RepoRoot)artifacts\tmp\HelixStage0.tar.gz</HelixStage0Targz>
@@ -144,7 +143,7 @@
144143

145144
<TarGzFileCreateFromDirectory
146145
Condition=" '$([MSBuild]::IsOSPlatform(`Windows`))' == 'false' "
147-
SourceDirectory="$(TestDotnetRoot)"
146+
SourceDirectory="$(TestHostDotNetRoot)"
148147
DestinationArchive="$(HelixStage0Targz)"
149148
OverwriteDestination="true" />
150149

@@ -158,8 +157,8 @@
158157
<Destination>d</Destination>
159158
</HelixCorrelationPayload>
160159

161-
<HelixCorrelationPayload Condition="$([MSBuild]::IsOSPlatform(`Windows`))" Include="$(TestDotnetRoot)">
162-
<PayloadDirectory>$(TestDotnetRoot)</PayloadDirectory>
160+
<HelixCorrelationPayload Condition="$([MSBuild]::IsOSPlatform(`Windows`))" Include="$(TestHostDotNetRoot)">
161+
<PayloadDirectory>$(TestHostDotNetRoot)</PayloadDirectory>
163162
<Destination>d</Destination>
164163
</HelixCorrelationPayload>
165164

@@ -174,13 +173,13 @@
174173
</HelixCorrelationPayload>
175174

176175
<HelixCorrelationPayload Include="SDKTestRunPackages.zip">
177-
<PayloadDirectory>$(TestDotnetRoot)</PayloadDirectory>
176+
<PayloadDirectory>$(TestHostDotNetRoot)</PayloadDirectory>
178177
<Destination>d/.nuget</Destination>
179178
<Uri>https://netcorenativeassets.blob.core.windows.net/resource-packages/external/any/sdk-test-assets/SDKTestRunPackages.zip</Uri>
180179
</HelixCorrelationPayload>
181180

182181
<HelixCorrelationPayload Include="SDKTestRunPackages2.zip">
183-
<PayloadDirectory>$(TestDotnetRoot)</PayloadDirectory>
182+
<PayloadDirectory>$(TestHostDotNetRoot)</PayloadDirectory>
184183
<Destination>d/.nuget</Destination>
185184
<Uri>https://netcorenativeassets.blob.core.windows.net/resource-packages/external/any/sdk-test-assets/SDKTestRunPackages2.zip</Uri>
186185
</HelixCorrelationPayload>

test/dotnet-new.IntegrationTests/DotnetNewSearchTests.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -220,9 +220,7 @@ public void CanFilterAuthor(string testCase)
220220
Assert.True(AtLeastOneRowIsNotEmpty(tableOutput, "Downloads"), "'Downloads' column contains empty values");
221221
}
222222

223-
#pragma warning disable xUnit1004
224-
[Theory(Skip = "https://github.com/dotnet/sdk/issues/49123")]
225-
#pragma warning restore xUnit1004
223+
[Theory]
226224
[InlineData("--search --columns author --author micro")]
227225
[InlineData("search --columns author --author micro")]
228226
public void CanFilterAuthor_WithoutName(string testCase)

0 commit comments

Comments
 (0)