From 1a9f152e7dbbb9d7cca8883fc3ac6f5e2c02d35e Mon Sep 17 00:00:00 2001 From: Jon Sequeira Date: Fri, 17 Jan 2025 15:09:50 -0800 Subject: [PATCH 1/7] update to net9.0 --- global.json | 4 ++-- .../Microsoft.TryDotNet.IntegrationTests.csproj | 2 +- .../Microsoft.TryDotNet.SimulatorGenerator.csproj | 2 +- .../Microsoft.TryDotNet.Tests.csproj | 2 +- .../Microsoft.TryDotNet.WasmRunner.csproj | 2 +- src/Microsoft.TryDotNet/Microsoft.TryDotNet.csproj | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/global.json b/global.json index 392634d4e..a6cbda35c 100644 --- a/global.json +++ b/global.json @@ -1,11 +1,11 @@ { "sdk": { - "version": "8.0.204", + "version": "9.0.100", "allowPrerelease": true, "rollForward": "latestMinor" }, "tools": { - "dotnet": "8.0.204", + "dotnet": "9.0.100", "rollForward": "latestMinor" }, "msbuild-sdks": { diff --git a/src/Microsoft.TryDotNet.IntegrationTests/Microsoft.TryDotNet.IntegrationTests.csproj b/src/Microsoft.TryDotNet.IntegrationTests/Microsoft.TryDotNet.IntegrationTests.csproj index aa8fda100..dd09f85f8 100644 --- a/src/Microsoft.TryDotNet.IntegrationTests/Microsoft.TryDotNet.IntegrationTests.csproj +++ b/src/Microsoft.TryDotNet.IntegrationTests/Microsoft.TryDotNet.IntegrationTests.csproj @@ -1,7 +1,7 @@  - net8.0 + net9.0 enable false GeneratedLocation.cs diff --git a/src/Microsoft.TryDotNet.SimulatorGenerator/Microsoft.TryDotNet.SimulatorGenerator.csproj b/src/Microsoft.TryDotNet.SimulatorGenerator/Microsoft.TryDotNet.SimulatorGenerator.csproj index 94565ca19..9a1817f23 100644 --- a/src/Microsoft.TryDotNet.SimulatorGenerator/Microsoft.TryDotNet.SimulatorGenerator.csproj +++ b/src/Microsoft.TryDotNet.SimulatorGenerator/Microsoft.TryDotNet.SimulatorGenerator.csproj @@ -2,7 +2,7 @@ Exe - net8.0 + net9.0 enable enable embedded diff --git a/src/Microsoft.TryDotNet.Tests/Microsoft.TryDotNet.Tests.csproj b/src/Microsoft.TryDotNet.Tests/Microsoft.TryDotNet.Tests.csproj index d88e88435..4c27adbed 100644 --- a/src/Microsoft.TryDotNet.Tests/Microsoft.TryDotNet.Tests.csproj +++ b/src/Microsoft.TryDotNet.Tests/Microsoft.TryDotNet.Tests.csproj @@ -1,7 +1,7 @@  - net8.0 + net9.0 enable enable all diff --git a/src/Microsoft.TryDotNet.WasmRunner/Microsoft.TryDotNet.WasmRunner.csproj b/src/Microsoft.TryDotNet.WasmRunner/Microsoft.TryDotNet.WasmRunner.csproj index 46aa42a78..d675be24e 100644 --- a/src/Microsoft.TryDotNet.WasmRunner/Microsoft.TryDotNet.WasmRunner.csproj +++ b/src/Microsoft.TryDotNet.WasmRunner/Microsoft.TryDotNet.WasmRunner.csproj @@ -1,7 +1,7 @@  - net8.0 + net9.0 enable enable wasmrunner diff --git a/src/Microsoft.TryDotNet/Microsoft.TryDotNet.csproj b/src/Microsoft.TryDotNet/Microsoft.TryDotNet.csproj index 658a058b0..5c6a3e467 100644 --- a/src/Microsoft.TryDotNet/Microsoft.TryDotNet.csproj +++ b/src/Microsoft.TryDotNet/Microsoft.TryDotNet.csproj @@ -1,7 +1,7 @@  - net8.0 + net9.0 enable enable true From 67e420974d6aa618ec6d6657a34b88cec46da182 Mon Sep 17 00:00:00 2001 From: Jon Sequeira Date: Fri, 17 Jan 2025 15:18:44 -0800 Subject: [PATCH 2/7] update package versions --- Directory.Packages.props | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index a7991b6ff..eacbf7baf 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -7,11 +7,11 @@ - - - - - + + + + + @@ -20,11 +20,11 @@ - + - + From c3ab8933dfa559c7f12651dfa4f34adf614b03be Mon Sep 17 00:00:00 2001 From: Jon Sequeira Date: Fri, 17 Jan 2025 17:23:36 -0800 Subject: [PATCH 3/7] update path in script file for new TFM --- eng/build.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/build.ps1 b/eng/build.ps1 index d1ae7b747..fbfe4e521 100644 --- a/eng/build.ps1 +++ b/eng/build.ps1 @@ -48,7 +48,7 @@ try { # playwright if ($test) { - & $repoRoot\artifacts\bin\Microsoft.TryDotNet.IntegrationTests\$configuration\net8.0\playwright.ps1 install chromium + & $repoRoot\artifacts\bin\Microsoft.TryDotNet.IntegrationTests\$configuration\net9.0\playwright.ps1 install chromium } } } From 62fd0eac0dde80e9e2c80e3f4cda3b83c843db26 Mon Sep 17 00:00:00 2001 From: Jon Sequeira Date: Thu, 23 Jan 2025 10:44:57 -0800 Subject: [PATCH 4/7] update azure-pipelines YAMLs to install .NET 9 --- azure-pipelines-CI.yml | 5 ++++- azure-pipelines.yml | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/azure-pipelines-CI.yml b/azure-pipelines-CI.yml index 02c38d579..fe32c762b 100644 --- a/azure-pipelines-CI.yml +++ b/azure-pipelines-CI.yml @@ -132,7 +132,10 @@ extends: skipTests: $(SkipTests) buildArgs: $(_BuildArgs) additionalArgs: $(additionalWindowsArgs) - + - task: UseDotNet@2 + inputs: + packageType: sdk + useGlobalJson: true - template: /eng/common/templates-official/jobs/jobs.yml@self parameters: enableMicrobuild: true diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 68b623ff4..e48eb4f8f 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -83,7 +83,10 @@ stages: skipTests: $(SkipTests) buildArgs: $(_BuildArgs) additionalArgs: $(additionalWindowsArgs) - + - task: UseDotNet@2 + inputs: + packageType: sdk + useGlobalJson: true - task: PublishBuildArtifacts@1 displayName: Publish Windows artifacts inputs: From 12f16ca39981b46b7aaad6e485e683269ff03fb0 Mon Sep 17 00:00:00 2001 From: Osvaldo Calles Date: Thu, 23 Jan 2025 12:56:27 -0800 Subject: [PATCH 5/7] Install .Net Sdk before running tests --- azure-pipelines-CI.yml | 9 +++++---- azure-pipelines.yml | 9 +++++---- global.json | 4 ++-- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/azure-pipelines-CI.yml b/azure-pipelines-CI.yml index fe32c762b..9e0b238dc 100644 --- a/azure-pipelines-CI.yml +++ b/azure-pipelines-CI.yml @@ -126,16 +126,17 @@ extends: - name: _BuildArgs value: /p:SignType=$(_SignType) steps: + - task: UseDotNet@2 + displayName: Install SDK 9.0.102 + inputs: + packageType: sdk + version: 9.0.102 - template: /eng/templates/build-and-test-job-windows-templates.yml@self parameters: buildConfig: $(_BuildConfig) skipTests: $(SkipTests) buildArgs: $(_BuildArgs) additionalArgs: $(additionalWindowsArgs) - - task: UseDotNet@2 - inputs: - packageType: sdk - useGlobalJson: true - template: /eng/common/templates-official/jobs/jobs.yml@self parameters: enableMicrobuild: true diff --git a/azure-pipelines.yml b/azure-pipelines.yml index e48eb4f8f..a9019d975 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -77,16 +77,17 @@ stages: - name: _BuildArgs value: /p:SignType=$(_SignType) steps: + - task: UseDotNet@2 + displayName: Install SDK 9.0.102 + inputs: + packageType: sdk + version: 9.0.102 - template: /eng/templates/build-and-test-job-windows-templates.yml@self parameters: buildConfig: $(_BuildConfig) skipTests: $(SkipTests) buildArgs: $(_BuildArgs) additionalArgs: $(additionalWindowsArgs) - - task: UseDotNet@2 - inputs: - packageType: sdk - useGlobalJson: true - task: PublishBuildArtifacts@1 displayName: Publish Windows artifacts inputs: diff --git a/global.json b/global.json index a6cbda35c..09e8c2ab5 100644 --- a/global.json +++ b/global.json @@ -1,11 +1,11 @@ { "sdk": { - "version": "9.0.100", + "version": "9.0.102", "allowPrerelease": true, "rollForward": "latestMinor" }, "tools": { - "dotnet": "9.0.100", + "dotnet": "9.0.102", "rollForward": "latestMinor" }, "msbuild-sdks": { From ae420e1d5c1aa1db15e7a7a97196db282ab74b90 Mon Sep 17 00:00:00 2001 From: Jon Sequeira Date: Mon, 3 Feb 2025 11:58:08 -0800 Subject: [PATCH 6/7] update developer guide --- Developer-guide.ipynb | 54 +++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 52 insertions(+), 2 deletions(-) diff --git a/Developer-guide.ipynb b/Developer-guide.ipynb index 71315bab6..41ff3c797 100644 --- a/Developer-guide.ipynb +++ b/Developer-guide.ipynb @@ -8,7 +8,7 @@ "\n", "In order to build Try .NET, you'll need the following installed:\n", "\n", - "* The [.NET 8 SDK](https://learn.microsoft.com/en-us/dotnet/core/install/).\n", + "* The [.NET 9 SDK](https://learn.microsoft.com/en-us/dotnet/core/install/).\n", "* The LTS version of [Node.js](https://nodejs.org/en/download)." ] }, @@ -282,6 +282,56 @@ "Start-Process pwsh -ArgumentList \"-c dotnet run --no-build --project ${tryDotNetProjectFilePath} --launch-profile TryDotNet-Development\"" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "* _Note: If the above crashes with an error that looks like the following, the issue is hardcoded paths in the `Prebuild` folder. If you delete them, they will be regenerated on startup._\n", + "\n", + " ```console\n", + " Logging to: c:\\temp\n", + " Unhandled exception. System.IO.FileNotFoundException: Could not find a part of the path 'C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\8.0.8\\ref\\net8.0\\Microsoft.CSharp.dll'.\n", + " File name: 'C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\8.0.8\\ref\\net8.0\\Microsoft.CSharp.dll'\n", + " ---> System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\8.0.8\\ref\\net8.0\\Microsoft.CSharp.dll'.\n", + " ```\n", + "\n", + " _The following cell will tell you where the prebuilds are located on your machine. You can delete this directory entirely to allow the prebuilds to be rebuilt when the Try .NET service starts._" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "dotnet_interactive": { + "language": "csharp" + }, + "polyglot_notebook": { + "kernelName": "csharp" + } + }, + "outputs": [], + "source": [ + "using System.IO;\n", + "\n", + "string PrebuildPathEnvironmentVariableName = \"TRYDOTNET_PREBUILDS_PATH\";\n", + "\n", + "var environmentVariable = Environment.GetEnvironmentVariable(PrebuildPathEnvironmentVariableName);\n", + "\n", + "var prebuildsLocation =\n", + " environmentVariable is not null\n", + " ? new DirectoryInfo(environmentVariable)\n", + " : new DirectoryInfo(\n", + " Path.Combine(\n", + " Environment.GetFolderPath(Environment.SpecialFolder.UserProfile),\n", + " \".trydotnet\",\n", + " \"prebuilds\"));\n", + "\n", + "prebuildsLocation.ToString().Display();\n", + "\n", + "// UNCOMMENT TO DELETE THIS FOLDER AND RESET\n", + "// prebuildsLocation.Delete(recursive: true);" + ] + }, { "cell_type": "markdown", "metadata": {}, @@ -325,7 +375,7 @@ "\n", "var peakyClient = new PeakyClient(new Uri(\"https://localhost:7061/tests\"));\n", "\n", - "var tests = (await peakyClient.GetTestsAsync()).Where(t => t.Tags.Any(tag => tag == \"self\"));\n", + "var tests = (await peakyClient.GetTestsAsync()).Where(t => t.Tags.Any(tag => tag is \"self\"));\n", "\n", "foreach (var test in tests)\n", "{\n", From 51d90df31a86555550bac923b75e260a94bdea0b Mon Sep 17 00:00:00 2001 From: Jon Sequeira Date: Mon, 3 Feb 2025 13:40:15 -0800 Subject: [PATCH 7/7] update test to reflect .NET 9 API --- src/Microsoft.TryDotNet.IntegrationTests/EditorTests.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Microsoft.TryDotNet.IntegrationTests/EditorTests.cs b/src/Microsoft.TryDotNet.IntegrationTests/EditorTests.cs index e29454f2c..acd19df65 100644 --- a/src/Microsoft.TryDotNet.IntegrationTests/EditorTests.cs +++ b/src/Microsoft.TryDotNet.IntegrationTests/EditorTests.cs @@ -534,7 +534,7 @@ static void Main() {{ signatureHelpDisplayText = signatureHelpDisplayText.Replace("\r", ""); signatureHelpDisplayText.Should().Be(@" -01/18 +01/19 void Console.WriteLine() Writes the current line terminator to the standard output stream.