From 97ee8bec99b812b51e081384289ebcff56537b1a Mon Sep 17 00:00:00 2001 From: Joey Robichaud Date: Mon, 8 Nov 2021 14:50:32 -0800 Subject: [PATCH 1/4] Use the .NET 6.0 SDK for building --- ...uilding, Debugging, and Testing on Unix.md | 24 +++++++++---------- ...ding, Debugging, and Testing on Windows.md | 2 +- global.json | 4 ++-- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/docs/contributing/Building, Debugging, and Testing on Unix.md b/docs/contributing/Building, Debugging, and Testing on Unix.md index e43907e61f155..0c254cc298f9c 100644 --- a/docs/contributing/Building, Debugging, and Testing on Unix.md +++ b/docs/contributing/Building, Debugging, and Testing on Unix.md @@ -1,6 +1,6 @@ # Building, Debugging and Testing on Unix -This guide is meant to help developers setup an environment for debugging / contributing to Roslyn from Linux. -Particularly for developers who aren't experienced with .NET Core development on Linux. +This guide is meant to help developers setup an environment for debugging / contributing to Roslyn from Linux. +Particularly for developers who aren't experienced with .NET Core development on Linux. ## Working with the code 1. Ensure the commands `git` and `curl` are available @@ -12,7 +12,7 @@ Particularly for developers who aren't experienced with .NET Core development on 1. Install [VS Code](https://code.visualstudio.com/Download) - After you install VS Code, install the [C# extension](https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.csharp) - Important tip: You can look up editor commands by name by hitting *Ctrl+Shift+P*, or by hitting *Ctrl+P* and typing a `>` character. This will help you get familiar with editor commands mentioned below. On a Mac, use *⌘* instead of *Ctrl*. -2. Install the [.NET 6.0 RC 2 SDK](https://dotnet.microsoft.com/download/dotnet-core/6.0). +2. Install the [.NET 6.0 SDK](https://dotnet.microsoft.com/download/dotnet-core/6.0). 3. You can build from VS Code by running the *Run Build Task* command, then selecting an appropriate task such as *build* or *build current project* (the latter builds the containing project for the current file you're viewing in the editor). 4. You can run tests from VS Code by opening a test class in the editor, then using the *Run Tests in Context* and *Debug Tests in Context* editor commands. You may want to bind these commands to keyboard shortcuts that match their Visual Studio equivalents (**Ctrl+R, T** for *Run Tests in Context* and **Ctrl+R, Ctrl+T** for *Debug Tests in Context*). @@ -23,14 +23,14 @@ To run all tests in a single project, it's recommended to use the `dotnet test p ## GitHub The best way to clone and push is to use SSH. On Windows you typically use HTTPS and this is not directly compatible -with two factor authentication (requires a PAT). The SSH setup is much simpler and GitHub has a great HOWTO for +with two factor authentication (requires a PAT). The SSH setup is much simpler and GitHub has a great HOWTO for getting this setup. https://help.github.com/articles/connecting-to-github-with-ssh/ ## Debugging test failures The best way to debug is using lldb with the SOS plugin. This is the same SOS as used in WinDbg and if you're familiar -with it then lldb debugging will be pretty straight forward. +with it then lldb debugging will be pretty straight forward. The [dotnet/diagnostics](https://github.com/dotnet/diagnostics) repo has more information: @@ -45,10 +45,10 @@ CoreCLR also has some guidelines for specific Linux debugging scenarios: Corrections: - LLDB and createdump must be run as root -- `dotnet tool install -g dotnet-symbol` must be run from `$HOME` +- `dotnet tool install -g dotnet-symbol` must be run from `$HOME` ### Core Dumps -The CoreClr does not used the standard core dumping mechanisms on Linux. Instead you must specify via +The CoreClr does not used the standard core dumping mechanisms on Linux. Instead you must specify via environment variables that you want a core dump to be produced. The simplest setup is to do the following: ``` @@ -79,12 +79,12 @@ indeed crashing in the GC. Note: this variables can also be used on Windows as well. ## Ubuntu 18.04 -The recommended OS for developing Roslyn is Ubuntu 18.04. This guide was written using Ubuntu 18.04 but should be +The recommended OS for developing Roslyn is Ubuntu 18.04. This guide was written using Ubuntu 18.04 but should be applicable to most Linux environments. Ubuntu 18.04 was chosen here due to it's support for enhanced VMs in Hyper-V. This makes it easier to use from a Windows machine: full screen, copy / paste, etc ... ### Hyper-V -Hyper-V has a builtin Ubuntu 18.04 image which supports enhanced mode. Here is a tutorial for creating +Hyper-V has a builtin Ubuntu 18.04 image which supports enhanced mode. Here is a tutorial for creating such an image: https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/quick-start/quick-create-virtual-machine @@ -93,10 +93,10 @@ When following this make sure to: 1. Click Installation Source and uncheck "Windows Secure Boot" 1. Complete the Ubuntu installation wizard. Full screen mode won't be available until this is done. -Overall this takes about 5-10 minutes to complete. +Overall this takes about 5-10 minutes to complete. ### Source Link -Many of the repositories that need to be built use source link and it crashes on Ubuntu 18.04 due to dependency changes. +Many of the repositories that need to be built use source link and it crashes on Ubuntu 18.04 due to dependency changes. To disable source link add the following to the `Directory.Build.props` file in the root of the repository. ``` xml @@ -109,6 +109,6 @@ To disable source link add the following to the `Directory.Build.props` file in Make sure to install the following via `apt install` - clang -- lldb +- lldb - cmake - xrdp diff --git a/docs/contributing/Building, Debugging, and Testing on Windows.md b/docs/contributing/Building, Debugging, and Testing on Windows.md index d31b865082921..25003217ea1a8 100644 --- a/docs/contributing/Building, Debugging, and Testing on Windows.md +++ b/docs/contributing/Building, Debugging, and Testing on Windows.md @@ -20,7 +20,7 @@ The minimal required version of .NET Framework is 4.7.2. - Ensure Visual Studio is on Version "17.0" or greater - Ensure "Use previews of the .NET Core SDK" is checked in Tools -> Options -> Environment -> Preview Features - Restart Visual Studio -1. [.NET 6.0 RC 2 SDK](https://dotnet.microsoft.com/download/dotnet-core/6.0) [Windows x64 installer](https://dotnet.microsoft.com/download/dotnet/thank-you/sdk-6.0.100-rc.2-windows-x64-installer) +1. [.NET 6.0 SDK](https://dotnet.microsoft.com/download/dotnet-core/6.0) [Windows x64 installer](https://dotnet.microsoft.com/download/dotnet/thank-you/sdk-6.0.100-windows-x64-installer) 1. [PowerShell 5.0 or newer](https://docs.microsoft.com/en-us/powershell/scripting/setup/installing-windows-powershell). If you are on Windows 10, you are fine; you'll only need to upgrade if you're on earlier versions of Windows. The download link is under the ["Upgrading existing Windows PowerShell"](https://docs.microsoft.com/en-us/powershell/scripting/install/installing-windows-powershell?view=powershell-6#upgrading-existing-windows-powershell) heading. 1. Run Restore.cmd 1. Open Roslyn.sln diff --git a/global.json b/global.json index afe1b1f9b53f0..595c4cfe745aa 100644 --- a/global.json +++ b/global.json @@ -1,11 +1,11 @@ { "sdk": { - "version": "6.0.100-rc.2.21505.57", + "version": "6.0.100", "allowPrerelease": true, "rollForward": "disable" }, "tools": { - "dotnet": "6.0.100-rc.2.21505.57", + "dotnet": "6.0.100", "vs": { "version": "16.10" }, From 9b40312752a28f81dc43d4736a8831d1aef913e5 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Tue, 16 Nov 2021 19:16:36 +0000 Subject: [PATCH 2/4] Update dependencies from https://github.com/dotnet/arcade build 20211109.3 Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Helix.Sdk From Version 7.0.0-beta.21474.2 -> To Version 7.0.0-beta.21559.3 --- eng/Version.Details.xml | 8 +- eng/common/msbuild.ps1 | 1 + eng/common/native/init-compiler.sh | 22 +++-- .../post-build/sourcelink-validation.ps1 | 5 + eng/common/post-build/symbols-validation.ps1 | 95 ++++++++++++------- eng/common/sdl/configure-sdl-tool.ps1 | 6 +- eng/common/templates/job/execute-sdl.yml | 6 +- eng/common/templates/job/onelocbuild.yml | 5 +- eng/common/templates/job/source-build.yml | 15 +-- .../templates/job/source-index-stage1.yml | 10 +- eng/common/templates/jobs/jobs.yml | 4 +- eng/common/templates/steps/send-to-helix.yml | 3 - global.json | 4 +- 13 files changed, 109 insertions(+), 75 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 9ac64a192283c..9ff225fbc446f 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -13,18 +13,18 @@ - + https://github.com/dotnet/arcade - 3ea0d860c6973f2cbadc9e895c7ec2cbdaec4ad5 + fecf65bedcee9036b8ba9d8d7feef5413f294914 https://github.com/dotnet/roslyn c1d8c6f043bc80425c6828455eb57f8a404759c6 - + https://github.com/dotnet/arcade - 3ea0d860c6973f2cbadc9e895c7ec2cbdaec4ad5 + fecf65bedcee9036b8ba9d8d7feef5413f294914 diff --git a/eng/common/msbuild.ps1 b/eng/common/msbuild.ps1 index eea19cd8452fd..f041e5ddd9589 100644 --- a/eng/common/msbuild.ps1 +++ b/eng/common/msbuild.ps1 @@ -6,6 +6,7 @@ Param( [switch] $ci, [switch] $prepareMachine, [switch] $excludePrereleaseVS, + [string] $msbuildEngine = $null, [Parameter(ValueFromRemainingArguments=$true)][String[]]$extraArgs ) diff --git a/eng/common/native/init-compiler.sh b/eng/common/native/init-compiler.sh index 1daadf32a524f..8c944f30b2864 100644 --- a/eng/common/native/init-compiler.sh +++ b/eng/common/native/init-compiler.sh @@ -3,9 +3,10 @@ # This file detects the C/C++ compiler and exports it to the CC/CXX environment variables # -if [[ "$#" -lt 2 ]]; then +if [[ "$#" -lt 3 ]]; then echo "Usage..." - echo "init-compiler.sh " + echo "init-compiler.sh