Skip to content

Commit

Permalink
Update SDK to preview 1 release (#98476)
Browse files Browse the repository at this point in the history
* Update SDK to preview 1 release

* Update runtime-prereqs.proj

* Update runtime-prereqs.proj

* Update global-build.yml

* Update global-build.yml

* Update DotNetBuild.props

* Fix getting test list from "dotnet test"

Due to the new vstest terminal logger we didn't get the test list anymore from stdout. Fix by reverting back to the old logger.

* Update PackageInstaller.cs

React to breaking change in NuGet/NuGet.Client@c9b81ab

---------

Co-authored-by: Viktor Hofer <[email protected]>
Co-authored-by: Alexander Köplinger <[email protected]>
  • Loading branch information
3 people authored Feb 28, 2024
1 parent e101ae2 commit 8303e25
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 11 deletions.
4 changes: 4 additions & 0 deletions eng/DotNetBuild.props
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@
<_hostArch>$(_hostRid.Substring($(_hostRidPlatformIndex)).TrimStart('-'))</_hostArch>

<LogVerbosity Condition="'$(LogVerbosity)' == ''">minimal</LogVerbosity>

<!-- When using the inner clone functionality in the repo build, copy the sources
directly as source-link doesn't support local path clones anymore. -->
<CopySrcInsteadOfClone>true</CopySrcInsteadOfClone>
</PropertyGroup>

<PropertyGroup Label="ShortStacks">
Expand Down
4 changes: 2 additions & 2 deletions global.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"sdk": {
"version": "9.0.100-alpha.1.23615.4",
"version": "9.0.100-preview.1.24101.2",
"allowPrerelease": true,
"rollForward": "major"
},
"tools": {
"dotnet": "9.0.100-alpha.1.23615.4"
"dotnet": "9.0.100-preview.1.24101.2"
},
"msbuild-sdks": {
"Microsoft.DotNet.Arcade.Sdk": "9.0.0-beta.24112.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,20 +81,23 @@
BeforeTargets="CopyTestZipForHelix"
DependsOnTargets="_GenerateRunSettingsFile">

<Exec Command="&quot;$(DotNetTool)&quot; test --no-build -s $(RunSettingsFilePath) -t --nologo -v:q" ConsoleToMSBuild="true">
<Exec Command="&quot;$(DotNetTool)&quot; test --no-build -s $(RunSettingsFilePath) -t --nologo -v:q -p:VsTestUseMSBuildOutput=false" ConsoleToMSBuild="true">
<Output TaskParameter="ConsoleOutput" ItemName="_ListOfTestsLines" />
</Exec>

<PropertyGroup>
<_Regex>^ *(DebuggerTests[^\($]+)</_Regex>
</PropertyGroup>
<ItemGroup>
<_TestLines0 Include="$([System.Text.RegularExpressions.Regex]::Match('%(_ListOfTestsLines.Identity)', $(_Regex)))" />
<TestClassName Include="$([System.IO.Path]::GetFileNameWithoutExtension(%(_TestLines0.Identity)))" />
<_TestLines0 Include="$([System.Text.RegularExpressions.Regex]::Match('%(_ListOfTestsLines.Identity)', '$(_Regex)'))" />
<TestClassName Include="$([System.IO.Path]::GetFileNameWithoutExtension('%(_TestLines0.Identity)'))" />
</ItemGroup>

<Error Text="No DebuggerTests test classes found!" Condition="'@(TestClassName)' == ''" />

<WriteLinesToFile File="$(TestArchiveTestsDir)$(MSBuildProjectName).tests.list"
Lines="@(TestClassName->Distinct())" />
Lines="@(TestClassName->Distinct())"
Overwrite="true" />
</Target>

<!-- Copy of `GenerateRunSettingsFile` from eng/testing/runsettings.targets -->
Expand Down
4 changes: 2 additions & 2 deletions src/mono/sample/wasm/blazor-frame/blazor.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@

<ItemGroup>
<!-- TODO un-pin this when it's possible -->
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="9.0.0-alpha.1.24061.8" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="9.0.0-alpha.1.24061.8" PrivateAssets="all" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="9.0.0-preview.1.24081.5" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="9.0.0-preview.1.24081.5" PrivateAssets="all" />
</ItemGroup>

</Project>
15 changes: 12 additions & 3 deletions src/tasks/WorkloadBuildTasks/PackageInstaller.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,18 @@ private bool InstallActual(PackageReference[] references, bool stopOnMissing)

Directory.CreateDirectory(projecDir);

File.WriteAllText(Path.Combine(projecDir, "Directory.Build.props"), "<Project />");
File.WriteAllText(Path.Combine(projecDir, "Directory.Packages.props"), "<Project />");
File.WriteAllText(Path.Combine(projecDir, "Directory.Build.targets"), "<Project />");
File.WriteAllText(Path.Combine(projecDir, "Directory.Build.props"), """
<Project>

<!-- This is an empty Directory.Build.props file to prevent projects which reside
under this directory to use any of the repository local settings. -->
<PropertyGroup>
<ImportDirectoryPackagesProps>false</ImportDirectoryPackagesProps>
<ImportDirectoryBuildTargets>false</ImportDirectoryBuildTargets>
</PropertyGroup>

</Project>
""");
File.WriteAllText(projectPath, GenerateProject(references));
File.WriteAllText(Path.Combine(projecDir, "nuget.config"), _nugetConfigContents);

Expand Down

0 comments on commit 8303e25

Please sign in to comment.