diff --git a/.azure-ci.yml b/.azure-ci.yml
index c8bc8691826f..2e16a0989fe5 100644
--- a/.azure-ci.yml
+++ b/.azure-ci.yml
@@ -8,10 +8,20 @@ trigger:
include:
- master
- release/3.0
+ paths:
+ exclude:
+ - Documentation/*
+ - /*.md
pr:
-- master
-- release/3.0
+ branches:
+ include:
+ - master
+ - release/3.0
+ paths:
+ exclude:
+ - Documentation/*
+ - /*.md
resources:
containers:
@@ -36,31 +46,36 @@ resources:
jobs:
# Windows legs
- template: /eng/pipelines/windows.yml
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notIn(variables['Build.Reason'], 'PullRequest')) }}:
- parameters:
- isOfficialBuild: true
+ parameters:
+ isOfficialBuild: ${{ and(ne(variables['System.TeamProject'], 'public'), notIn(variables['Build.Reason'], 'PullRequest')) }}
+ fullMatrix: ${{ notIn(variables['Build.Reason'], 'PullRequest') }}
# Linux legs
- template: /eng/pipelines/linux.yml
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notIn(variables['Build.Reason'], 'PullRequest')) }}:
- parameters:
- isOfficialBuild: true
+ parameters:
+ isOfficialBuild: ${{ and(ne(variables['System.TeamProject'], 'public'), notIn(variables['Build.Reason'], 'PullRequest')) }}
+ fullMatrix: ${{ notIn(variables['Build.Reason'], 'PullRequest') }}
# MacOS legs
- template: /eng/pipelines/macos.yml
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notIn(variables['Build.Reason'], 'PullRequest')) }}:
- parameters:
- isOfficialBuild: true
+ parameters:
+ isOfficialBuild: ${{ and(ne(variables['System.TeamProject'], 'public'), notIn(variables['Build.Reason'], 'PullRequest')) }}
+ fullMatrix: ${{ notIn(variables['Build.Reason'], 'PullRequest') }}
- # Only run in official builds
- - ${{ if and(ne(variables['System.TeamProject'], 'public'), notIn(variables['Build.Reason'], 'PullRequest')) }}:
- # Redhat6 leg is only for official builds
- - template: /eng/pipelines/redhat6.yml
+ # RedHat6 leg
+ - template: /eng/pipelines/redhat6.yml
+ parameters:
+ isOfficialBuild: ${{ and(ne(variables['System.TeamProject'], 'public'), notIn(variables['Build.Reason'], 'PullRequest')) }}
+ fullMatrix: ${{ notIn(variables['Build.Reason'], 'PullRequest') }}
# FreeBSD leg is only for official builds
# - template: /eng/pipelines/freebsd.yml
+ # parameters:
+ # isOfficialBuild: ${{ and(ne(variables['System.TeamProject'], 'public'), notIn(variables['Build.Reason'], 'PullRequest')) }}
+ # fullMatrix: ${{ notIn(variables['Build.Reason'], 'PullRequest') }}
- # Publish step
+ # Publish step. Only run in official builds
+ - ${{ if and(ne(variables['System.TeamProject'], 'public'), notIn(variables['Build.Reason'], 'PullRequest')) }}:
- template: /eng/pipelines/publish.yml
parameters:
dependsOn:
diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json
new file mode 100644
index 000000000000..63401b98a8ba
--- /dev/null
+++ b/.config/dotnet-tools.json
@@ -0,0 +1,18 @@
+{
+ "version": 1,
+ "isRoot": true,
+ "tools": {
+ "coverlet.console": {
+ "version": "1.5.1",
+ "commands": [
+ "coverlet"
+ ]
+ },
+ "dotnet-reportgenerator-globaltool": {
+ "version": "4.1.6",
+ "commands": [
+ "reportgenerator"
+ ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/.gitattributes b/.gitattributes
index 9ae9a523dc8c..b73e97feb3d2 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -10,14 +10,14 @@
# default for csharp files.
# Note: This is only used by command line
###############################################################################
-#*.cs diff=csharp
+*.cs diff=csharp
###############################################################################
# Set the merge driver for project and solution files
#
# Merging from the command prompt will add diff markers to the files if there
# are conflicts (Merging from VS is not affected by the settings below, in VS
-# the diff markers are never inserted). Diff markers may cause the following
+# the diff markers are never inserted). Diff markers may cause the following
# file extensions to fail to load in VS. An alternative would be to treat
# these files as binary and thus will always conflict and require user
# intervention with every merge. To do so, just uncomment the entries below
@@ -46,9 +46,9 @@
###############################################################################
# diff behavior for common document formats
-#
+#
# Convert binary document formats to text before diffing them. This feature
-# is only available from the command line. Turn it on by uncommenting the
+# is only available from the command line. Turn it on by uncommenting the
# entries below.
###############################################################################
#*.doc diff=astextplain
diff --git a/Directory.Build.props b/Directory.Build.props
index c804e8f4766a..cd0a0b004f12 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -18,7 +18,7 @@
true$(MSBuildThisFileDirectory)artifacts\toolset\Common\
- true
+ $([System.Text.RegularExpressions.Regex]::IsMatch($(MSBuildProjectDirectory), 'src%24'))
@@ -114,25 +114,6 @@
$([MSBuild]::NormalizeDirectory('$(RepoRoot)', 'src'))
-
-
- $(DotNetRestorePackagesPath)
- $([MSBuild]::EnsureTrailingSlash('$(NuGetPackageRoot)'))
- $(RepoRoot).packages/
-
- $(DOTNET_INSTALL_DIR)
- $(RepoRoot).dotnet\
- $(DotNetRoot)\
- $(DotNetRoot)
- "$(DotNetRoot)dotnet"
- $(DotNetRoot)dotnet
- $(DotNetCmd).exe
-
-
-
-
- $(MSBuildToolsPath)\Microsoft.Common.targets
@@ -167,7 +148,8 @@
LibraryOpen
- true
+ $(IsSourceProject)
+ $(IsSourceProject)$(RepositoryEngineeringDir)DefaultGenApiDocIds.txttrue
@@ -267,7 +249,7 @@
- true
+ trueoptimization.windows_nt-x64.IBC.CoreFx$(optimizationwindows_ntx64IBCCoreFxPackageVersion)
@@ -315,9 +297,7 @@
strict4true
-
-
- false
+ truefalse
@@ -329,8 +309,8 @@
truetrue
-
- $(NoWarn);BCL0020
+
+ $(NoWarn);CS8609;CS8610
@@ -360,8 +340,6 @@
$(RefRootPath)netstandard/$(RefRootPath)netstandard2.1/$(RefRootPath)netfx/
-
- $([MSBuild]::NormalizeDirectory('$(RepoRoot)', '.tools', 'globaltools'))$([MSBuild]::NormalizeDirectory('$(ArtifactsDir)', 'ibc'))$([MSBuild]::NormalizeDirectory('$(ArtifactsToolsetDir)', 'ilasm'))$([MSBuild]::NormalizeDirectory('$(ArtifactsToolsetDir)', 'ILLink'))
@@ -389,7 +367,6 @@
true
- truetruetrue
@@ -397,8 +374,6 @@
$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'testhost', '$(BuildConfiguration)'))$([MSBuild]::NormalizeDirectory('$(TestHostRootPath)', 'host', 'fxr', '$(NETCoreAppTestSharedFxVersion)'))$([MSBuild]::NormalizeDirectory('$(TestHostRootPath)', 'shared', 'Microsoft.NETCore.App', '$(NETCoreAppTestSharedFxVersion)'))
- $(TestHostRootPath)ILCInputFolder
- $(TestHostRootPath)TestILC$(TestHostRootPath)UAPLayout
@@ -422,27 +397,18 @@
-
-
-
-
-
-
$(DefineConstants),uap$(DefineConstants),uapaot$(DefineConstants),netfx$(DefineConstants),netstandard
+ $(DefineConstants),NETSTANDARD10$(DefineConstants),netcoreapp$(DefineConstants),netcoreapp20
-
- true
-
true
@@ -456,6 +422,7 @@
true
+
diff --git a/Directory.Build.targets b/Directory.Build.targets
index 8591539bf844..8923127a4df6 100644
--- a/Directory.Build.targets
+++ b/Directory.Build.targets
@@ -15,6 +15,7 @@
$(TestStrongNameKeyId)
+
@@ -82,10 +83,6 @@
$(NETCoreAppTestSharedFrameworkPath)
-
-
- $(ILCFXInputFolder)
- $(UAPTestSharedFrameworkPath)
@@ -125,30 +122,14 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -170,6 +151,7 @@
<_GenAPICmd>$(_GenAPICmd) --out "$(_RefSourceFileOutputPath)"
<_GenAPICmd>$(_GenAPICmd) --exclude-attributes-list "$(_ExcludeAPIList)"
<_GenAPICmd>$(_GenAPICmd) --header-file "$(_LicenseHeaderTxtPath)"
+ <_GenAPICmd Condition="'$(LangVersion)' != ''">$(_GenAPICmd) --lang-version "$(LangVersion)"
diff --git a/Documentation/building/windows-instructions.md b/Documentation/building/windows-instructions.md
index ba6bf631a799..ba46273e780a 100644
--- a/Documentation/building/windows-instructions.md
+++ b/Documentation/building/windows-instructions.md
@@ -8,7 +8,7 @@ Building CoreFX on Windows
## Recommended Software
1. **[Visual Studio 2019 Preview](https://visualstudio.microsoft.com/vs/preview/)** (Community, Professional, Enterprise) with the latest update should be installed. The Community version is completely free.
-1. **[.NET Core SDK](https://www.microsoft.com/net/download/windows)** >= v3.0.0-preview3 should be installed, which will add the `dotnet` toolchain to your path.
+1. **[.NET Core SDK](https://dotnet.microsoft.com/download/dotnet-core/3.0)** >= v3.0.0-preview3 should be installed, which will add the `dotnet` toolchain to your path.
### Visual Studio 2019
diff --git a/Documentation/debugging/unix-instructions.md b/Documentation/debugging/unix-instructions.md
index 20d37c820357..33c89819b54c 100644
--- a/Documentation/debugging/unix-instructions.md
+++ b/Documentation/debugging/unix-instructions.md
@@ -33,7 +33,6 @@ It is also possible to debug .NET Core crash dumps using lldb and SOS. In order
- Matching coreclr/corefx runtime bits from the crash. To get these, you should either:
- Download the matching Jenkins archive onto your repro machine.
- Check out the coreclr and corefx repositories at the appropriate commit and re-build the necessary portions.
- - You can also download the matching "symbols" nuget package from myget.org. There is a "Download Symbols" button in the myget UI for this purpose.
- lldb version 3.9. The SOS plugin (i.e. libsosplugin.so) provided is now built for lldb 3.9. In order to install lldb 3.9 just run the following commands:
```
~$ echo "deb http://llvm.org/apt/trusty/ llvm-toolchain-trusty-3.9 main" | sudo tee /etc/apt/sources.list.d/llvm.list
diff --git a/Documentation/project-docs/developer-guide.md b/Documentation/project-docs/developer-guide.md
index febf112fca1c..e1c9511aefa7 100644
--- a/Documentation/project-docs/developer-guide.md
+++ b/Documentation/project-docs/developer-guide.md
@@ -8,7 +8,7 @@ The repo can be built for the following platforms, using the provided setup and
| x64 | ✔ | ✔ | ✔ | ✔ |
| x86 | ✔ | | | |
| ARM | ✔ | ✔ | | |
-| ARM64 | | ✔ | | |
+| ARM64 | ✔ | ✔ | | |
| | [Instructions](../building/windows-instructions.md) | [Instructions](../building/unix-instructions.md) | [Instructions](../building/unix-instructions.md) | [Instructions](../building/unix-instructions.md) |
@@ -266,11 +266,11 @@ The tests can also be filtered based on xunit trait attributes defined in [`Micr
```cs
[OuterLoop()]
```
-Tests marked as `OuterLoop` are for scenarios that don't need to run every build. They may take longer than normal tests, cover seldom hit code paths, or require special setup or resources to execute. These tests are excluded by default when testing through `dotnet msbuild` but can be enabled manually by adding the `-outerloop` switch or `/p:OuterLoop=true` e.g.
+Tests marked as `OuterLoop` are for scenarios that don't need to run every build. They may take longer than normal tests, cover seldom hit code paths, or require special setup or resources to execute. These tests are excluded by default when testing through `dotnet msbuild` but can be enabled manually by adding the `-testscope outerloop` switch or `/p:TestScope=outerloop` e.g.
```cmd
-build -test -outerloop
-cd src/System.Text.RegularExpressions/tests && dotnet msbuild /t:RebuildAndTest /p:OuterLoop=true
+build -test -testscope outerloop
+cd src/System.Text.RegularExpressions/tests && dotnet msbuild /t:RebuildAndTest /p:TestScope=outerloop
```
#### PlatformSpecificAttribute
diff --git a/Documentation/project-docs/dogfooding.md b/Documentation/project-docs/dogfooding.md
index fffc61f88578..0a771def3d6b 100644
--- a/Documentation/project-docs/dogfooding.md
+++ b/Documentation/project-docs/dogfooding.md
@@ -47,7 +47,7 @@ To install additional .NET Core runtimes or SDKs:
4. Our nightly builds are uploaded to MyGet, not NuGet - so ensure the .NET Core MyGet feed is in your nuget configuration in case you need other packages from .NET Core that aren't included in the download. For example, on Windows you could edit `%userprofile%\appdata\roaming\nuget\nuget.config` or on Linux edit `~/.nuget/NuGet/NuGet.Config` to add this line:
```xml
-
+
...
```
@@ -118,7 +118,7 @@ make it self-contained
Exenetcoreapp3.0
-
+
3.0.0-preview-27218-01win-x64
@@ -167,13 +167,13 @@ Note these instructions above were only about updates to the binaries that are p
By default the dogfooding dotnet SDK will create a Nuget.Config file next to your project, if it doesn't
you can create one. Your config file will need a source for your local corefx package directory as well
-as a reference to our nightly dotnet-core feed on myget. The Nuget.Config file content should be:
+as a reference to our nightly dotnet-core blob feed. The Nuget.Config file content should be:
```xml
-
+
```
diff --git a/Documentation/project-docs/issue-guide.md b/Documentation/project-docs/issue-guide.md
index 4c99053dfc07..945d69044bc5 100644
--- a/Documentation/project-docs/issue-guide.md
+++ b/Documentation/project-docs/issue-guide.md
@@ -42,7 +42,7 @@ Areas are tracked by labels area-* (e.g. area-System.Collections). Each area
|-----------------------------------------------------------------------------------------------|------------------|-------------|
| [area-Infrastructure](https://github.com/dotnet/corefx/labels/area-Infrastructure) | [@ericstj](https://github.com/ericstj), [@karelz](https://github.com/karelz), [@wtgodbe](https://github.com/wtgodbe) | Covers:
Packaging
Build and test infra for CoreFX repo
VS integration
|
| [area-Meta](https://github.com/dotnet/corefx/labels/area-Meta) | [@joperezr](https://github.com/joperezr) | Issues without clear association to any specific API/contract, e.g.
|
| [System.Runtime.Intrinsics](https://github.com/dotnet/corefx/labels/area-System.Runtime.Intrinsics) | [@tannergooding](https://github.com/tannergooding), [@CarolEidt](https://github.com/CarolEidt), [@RussKeldorph](https://github.com/RussKeldorph) | |
| [System.Security](https://github.com/dotnet/corefx/labels/area-System.Security) | **[@bartonjs](https://github.com/bartonjs)**, [@GrabYourPitchforks](https://github.com/GrabYourPitchforks) | |
| System.ServiceModel | N/A | [dotnet/wcf](https://github.com/dotnet/wcf) (except System.ServiceModel.Syndication) |
-| [System.ServiceModel.Syndication](https://github.com/dotnet/corefx/labels/area-System.ServiceModel.Syndication) | [@huanwu](https://github.com/huanwu), [@Lxiamail](https://github.com/Lxiamail), [@zhenlan](https://github.com/zhenlan) | |
+| [System.ServiceModel.Syndication](https://github.com/dotnet/corefx/labels/area-System.ServiceModel.Syndication) | [StephenMolloy](https://github.com/StephenMolloy), [@HongGit](https://github.com/HongGit) | |
| [System.ServiceProcess](https://github.com/dotnet/corefx/labels/area-System.ServiceProcess) | **[@maryamariyan](https://github.com/maryamariyan)**, [@Anipik](https://github.com/Anipik) | |
| [System.Text.Encoding](https://github.com/dotnet/corefx/labels/area-System.Text.Encoding) | **[@layomia](https://github.com/layomia)**, [@krwq](https://github.com/krwq), [@tarekgh](https://github.com/tarekgh) | |
| [System.Text.Encodings.Web](https://github.com/dotnet/corefx/labels/area-System.Text.Encodings.Web) | **[@GrabYourPitchforks](https://github.com/GrabYourPitchforks)**, [@layomia](https://github.com/layomia), [@tarekgh](https://github.com/tarekgh) | |
diff --git a/Documentation/project-docs/pullrequest-builds.md b/Documentation/project-docs/pullrequest-builds.md
index e46818274e41..ebda7c343c4c 100644
--- a/Documentation/project-docs/pullrequest-builds.md
+++ b/Documentation/project-docs/pullrequest-builds.md
@@ -15,7 +15,7 @@ As part of our Pull Requests we have some validation builds where we build the p
| Linux arm64_Release | netcoreapp | X | X |
| Linux arm_Release | netcoreapp | X | |
| Linux musl_x64_Debug | netcoreapp | X | |
-| MacOS x64_Debug | netcoreapp | X | |
+| MacOS x64_Debug | netcoreapp | X | X |
| Packaging All Configurations x64_Debug | all | X | X |
Our build definitions are defined by some `.yml` files with the following structure:
@@ -58,12 +58,7 @@ Once in the build UI you can look at a specific job, or step log, by clicking on
## How to look at a test failure
-Currently, our test results are exposed by https://mc.dot.net/ as we wait for new features by Azure DevOps to use their text explorer. In order to get to the test results, you need to click on the `Send to Helix` step on a job, and within its logs, there will be a text containing the test results URL, which you can `CTRL+Click` to open. It will look like the following:
-```
-Results will be available from https://mc.dot.net/#/user/dotnet-bot/pr~2Fdotnet~2Fcorefx~2Frefs~2Fpull~2F35667~2Fmerge/test~2Ffunctional~2Fcli~2F/20190228.23
-```
-
-Then on Mission Control, you can just navigate through the results and look at stack traces, and detailed logs.
+Use the Azure DevOps Test Explorer which lists all tests grouped by the different build configurations. You can filter and navigate through the results and look at stack traces, and detailed logs.
## How to rerun builds
@@ -91,4 +86,4 @@ Once you click under the `Artifacts` section, a popup will show, with multiple d
7. Only an entire pipeline can be triggered through comments, triggering a single leg is not supported yet. `/azp run corefx-ci (macOS x64_Debug)` wouldn't work.
8. Rerunning a single leg while others are still running is not yet supported, you have to wait for all legs to finish before retrying an individual leg.
-All of this issues have been raised to Azure DevOps teams, expect @safern, to update the docs through PR to widely communicate new features coming.
\ No newline at end of file
+All of this issues have been raised to Azure DevOps teams, expect @safern, to update the docs through PR to widely communicate new features coming.
diff --git a/README.md b/README.md
index dac3e2e16202..26b6a118994c 100644
--- a/README.md
+++ b/README.md
@@ -10,12 +10,12 @@ Runtime-specific library code ([System.Private.CoreLib](https://github.com/dotne
## .NET Core
-Official Starting Page: https://dotnet.github.io
+Official Starting Page: https://dotnet.microsoft.com/
-* [How to use .NET Core](https://github.com/dotnet/core/#get-started) (with VS, VS Code, command-line CLI)
- * [Install official releases](https://www.microsoft.com/net/core)
- * [Documentation](https://docs.microsoft.com/en-us/dotnet) (Get Started, Tutorials, Porting from .NET Framework, API reference, ...)
- * [Deploying apps](https://docs.microsoft.com/en-us/dotnet/core/deploying)
+* [How to use .NET Core](https://docs.microsoft.com/dotnet/core/get-started) (with VS, VS Code, command-line CLI)
+ * [Install official releases](https://dotnet.microsoft.com/download)
+ * [Documentation](https://docs.microsoft.com/dotnet/core) (Get Started, Tutorials, Porting from .NET Framework, API reference, ...)
+ * [Deploying apps](https://docs.microsoft.com/dotnet/core/deploying)
* [Supported OS versions](https://github.com/dotnet/core/blob/master/os-lifecycle-policy.md)
* [Roadmap](https://github.com/dotnet/core/blob/master/roadmap.md)
* [Releases](https://github.com/dotnet/core/tree/master/release-notes)
@@ -45,8 +45,9 @@ This section is **in progress** here: [New contributor Docs - Contributing](http
### Useful Links
* [.NET Core source index](https://source.dot.net) / [.NET Framework source index](https://referencesource.microsoft.com)
-* [API Reference docs](https://docs.microsoft.com/en-us/dotnet/core/api)
+* [API Reference docs](https://docs.microsoft.com/dotnet/api/?view=netcore-3.0)
* [.NET API Catalog](http://apisof.net) (incl. APIs from daily builds and API usage info)
+* [API docs writing guidelines](https://github.com/dotnet/dotnet-api-docs/wiki) - useful when writing /// comments
### Community
@@ -83,7 +84,8 @@ There are many .NET related projects on GitHub.
### Daily Builds
-Daily builds of .NET Core components are published to [dotnet-core MyGet gallery](https://dotnet.myget.org/gallery/dotnet-core).
-The latest version number of each library can be seen in that gallery.
+Daily builds of .NET Core components are published to dotnet-blob feed (https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json).
+The latest version number of each library can be seen in that feed.
+Currently, there is no website to visualize the contents of the feed, so in order to do so, you have to use a NuGet feed explorer, like Visual Studio.
Note: See officially supported [OS versions](https://github.com/dotnet/core/blob/master/os-lifecycle-policy.md).
diff --git a/SECURITY.md b/SECURITY.md
new file mode 100644
index 000000000000..92d052767fc0
--- /dev/null
+++ b/SECURITY.md
@@ -0,0 +1,15 @@
+# Security Policy
+
+## Supported Versions
+
+The .NET Core and ASP.NET Core support policy, including supported versions can be found at the [.NET Core Support Policy Page](https://dotnet.microsoft.com/platform/support/policy/dotnet-core).
+
+## Reporting a Vulnerability
+
+Security issues and bugs should be reported privately, via email, to the Microsoft Security Response Center (MSRC) secure@microsoft.com.
+You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your
+original message. Further information, including the MSRC PGP key, can be found in the [Security TechCenter](https://technet.microsoft.com/en-us/security/ff852094.aspx).
+
+Reports via MSRC may qualify for the .NET Core Bug Bounty. Details of the .NET Core Bug Bounty including terms and conditions are at [https://aka.ms/corebounty](https://aka.ms/corebounty).
+
+Please do not open issues for anything you think might have a security implication.
diff --git a/THIRD-PARTY-NOTICES.TXT b/THIRD-PARTY-NOTICES.TXT
index b25636f506b8..de86db916f79 100644
--- a/THIRD-PARTY-NOTICES.TXT
+++ b/THIRD-PARTY-NOTICES.TXT
@@ -332,3 +332,35 @@ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+License notice for vectorized base64 encoding / decoding
+--------------------------------------------------------
+
+Copyright (c) 2005-2007, Nick Galbreath
+Copyright (c) 2013-2017, Alfred Klomp
+Copyright (c) 2015-2017, Wojciech Mula
+Copyright (c) 2016-2017, Matthieu Darbois
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+- Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+- Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
+TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/build.proj b/build.proj
index 9583b0d4c2e4..d881d293f38a 100644
--- a/build.proj
+++ b/build.proj
@@ -26,14 +26,6 @@
-
-
-
- <_ValidProjectsForRestore Include="$(MSBuildProjectFullPath)" />
-
-
-
<_BuildNativeProjects Include="src\Native\build-native.proj" />
@@ -114,7 +106,8 @@
-
+
<_solutionsToUpdateFiles Include="$(MSBuildThisFileDirectory)src/*/Directory.Build.props" />
diff --git a/eng/Build.props b/eng/Build.props
index 71feaecf8884..e44e41b604cb 100644
--- a/eng/Build.props
+++ b/eng/Build.props
@@ -1,7 +1,4 @@
-
- false
-
diff --git a/eng/DefaultGenApiDocIds.txt b/eng/DefaultGenApiDocIds.txt
index aab2ef4ec82b..c0649f4f6c61 100644
--- a/eng/DefaultGenApiDocIds.txt
+++ b/eng/DefaultGenApiDocIds.txt
@@ -20,16 +20,17 @@ T:System.IO.IODescriptionAttribute
T:System.Runtime.CompilerServices.AsyncStateMachineAttribute
T:System.Runtime.CompilerServices.CompilerGeneratedAttribute
T:System.Runtime.CompilerServices.IteratorStateMachineAttribute
-T:System.Runtime.CompilerServices.TypeForwardedFromAttribute
T:System.Runtime.CompilerServices.MethodImpl
+T:System.Runtime.CompilerServices.NullableAttribute
+T:System.Runtime.CompilerServices.TypeForwardedFromAttribute
T:System.Runtime.ConstrainedExecution.ReliabilityContractAttribute
T:System.Runtime.InteropServices.ClassInterfaceAttribute
T:System.Runtime.InteropServices.ComDefaultInterfaceAttribute
T:System.Runtime.InteropServices.ComVisibleAttribute
T:System.Runtime.InteropServices.GuidAttribute
T:System.Runtime.InteropServices.InterfaceTypeAttribute
+T:System.Runtime.InteropServices.LCIDConversionAttribute
T:System.Runtime.InteropServices.StructLayoutAttribute
-T:System.Runtime.Serialization.KnownTypeAttribute
T:System.Security.Permissions.EnvironmentPermissionAttribute
T:System.Security.Permissions.FileIOPermissionAttribute
T:System.Security.Permissions.HostProtectionAttribute
@@ -41,10 +42,6 @@ T:System.Security.Permissions.StrongNameIdentityPermissionAttribute
T:System.Security.SecurityCriticalAttribute
T:System.Security.SecuritySafeCriticalAttribute
T:System.Security.SuppressUnmanagedCodeSecurityAttribute
-T:System.Xml.Serialization.XmlAttributeAttribute
-T:System.Xml.Serialization.XmlEnumAttribute
-T:System.Xml.Serialization.XmlIgnoreAttribute
-T:System.Xml.Serialization.XmlRootAttribute
T:System.Runtime.Versioning.NonVersionableAttribute
T:System.Runtime.CompilerServices.IntrinsicAttribute
T:System.Runtime.CompilerServices.ExtensionAttribute
diff --git a/eng/InternalTools.props b/eng/InternalTools.props
deleted file mode 100644
index b16d4b44460d..000000000000
--- a/eng/InternalTools.props
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-
-
- true
-
-
-
-
-
-
-
-
-
-
-
-
- https://dnceng.pkgs.visualstudio.com/_packaging/dotnet-internal/nuget/v3/index.json;
- $(RestoreSources);
-
-
-
diff --git a/eng/Packaging.props b/eng/Packaging.props
index b87e77a0a347..e0db02c6cbf2 100644
--- a/eng/Packaging.props
+++ b/eng/Packaging.props
@@ -14,7 +14,7 @@
Microsoft.Private.Intellisense3.0.0-preview3-190305-0
- $(PackagesDir)$(XmlDocPackage.ToLowerInvariant())/$(XmlDocPackageVersion)/xmldocs/netcoreapp
+ $(NuGetPackageRoot)$(XmlDocPackage.ToLowerInvariant())/$(XmlDocPackageVersion)/xmldocs/netcoreapp$(ArtifactsBinDir)docs
- $(NoWarn);0169;0649
+ $(NoWarn);CS0169;CS0649;CS8618
+
+
+ $(NoWarn);CS8597
+
+
+ $(NoWarn);CS8625
diff --git a/eng/Tools.props b/eng/Tools.props
index 6cd5fb9f7829..2508e08626a5 100644
--- a/eng/Tools.props
+++ b/eng/Tools.props
@@ -3,6 +3,7 @@
https://dotnet.myget.org/F/dotnet-buildtools/api/v3/index.json;
https://dotnet.myget.org/F/sourcelink/api/v3/index.json;
+ $(OverridePackageSource);
$(RestoreSources)
false
@@ -10,11 +11,6 @@
$(ArtifactsToolsetDir)Common\Tools.Analyzers.props
-
- $([MSBuild]::NormalizeDirectory('$(RepoRoot)', '.dotnet'))
- $(DotNetRoot)dotnet
- $(DotNetCmd).exe
- "$(DotNetCmd)"
@@ -22,15 +18,10 @@
-
-
-
-
-
@@ -39,6 +30,11 @@
+
+
+
+
+
@@ -53,73 +49,8 @@
-
-
-
-
-
-
-
-
- $([MSBuild]::NormalizeDirectory('$(RepoRoot)', '.tools', 'CredentialsProvider'))
- https://raw.githubusercontent.com/Microsoft/artifacts-credprovider/master/helpers/installcredprovider.ps1
- https://raw.githubusercontent.com/Microsoft/artifacts-credprovider/master/helpers/installcredprovider.sh
-
-
-
-
-
-
-
-
-
-
- $([MSBuild]::NormalizeDirectory('$(RepositoryEngineeringDir)', 'common', 'internal'))
- $(OptionalToolDir)Tools.csproj
-
-
-
-
-
-
-
-
-
-
- $([MSBuild]::NormalizePath('$(RepoRoot)', '.tools', 'globaltools'))
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ https://github.com/dotnet/coreclr
- e330c2ce5b1af4e69cdcacb8254a5107586c68f8
+ fa8383fb28be945cae900a5579afd5920f274fd4
-
+ https://github.com/dotnet/coreclr
- e330c2ce5b1af4e69cdcacb8254a5107586c68f8
+ fa8383fb28be945cae900a5579afd5920f274fd4
-
+ https://github.com/dotnet/coreclr
- e330c2ce5b1af4e69cdcacb8254a5107586c68f8
+ fa8383fb28be945cae900a5579afd5920f274fd4
-
+ https://github.com/dotnet/core-setup
- 3907f75cb6a0489f8dc6f72169146c3d79d20d41
+ 63abc77da6d99470caa5bfa0465afe244105e595
-
+ https://github.com/dotnet/core-setup
- 3907f75cb6a0489f8dc6f72169146c3d79d20d41
+ 63abc77da6d99470caa5bfa0465afe244105e595
-
+ https://github.com/dotnet/core-setup
- 3907f75cb6a0489f8dc6f72169146c3d79d20d41
+ 63abc77da6d99470caa5bfa0465afe244105e595
-
+ https://github.com/dotnet/corefx
- 8b515adcd4ea0b8233f018f9e87ef946ce0e7c42
+ 82408cd90f4d4573d502e8df2ca437b35e6a37f7
-
+
+ https://github.com/dotnet/corefx
+ 82408cd90f4d4573d502e8df2ca437b35e6a37f7
+
+ https://github.com/dotnet/arcade
- 5e7ce5b394f3477bb0a485a4b761b7742e95be37
+ 7c50d548001a83a18449ad4dda370122ede5fbf6
-
+ https://github.com/dotnet/standard
- 5eee83eaa61eff38f470dc690218bebf73f46e23
-
-
- https://github.com/dotnet/arcade
- bda52d7619f9420de46f2c39ffc972864bbcab63
+ 4d364ea4ecaf4d5da8d6f969f70db753dcc614b0
-
+ https://github.com/dotnet/arcade
- 5e7ce5b394f3477bb0a485a4b761b7742e95be37
+ 7c50d548001a83a18449ad4dda370122ede5fbf6
-
+ https://github.com/dotnet/arcade
- 5e7ce5b394f3477bb0a485a4b761b7742e95be37
+ 7c50d548001a83a18449ad4dda370122ede5fbf6
-
+ https://github.com/dotnet/arcade
- 5e7ce5b394f3477bb0a485a4b761b7742e95be37
+ 7c50d548001a83a18449ad4dda370122ede5fbf6
-
+ https://github.com/dotnet/arcade
- 5e7ce5b394f3477bb0a485a4b761b7742e95be37
+ 7c50d548001a83a18449ad4dda370122ede5fbf6
-
+ https://github.com/dotnet/arcade
- 5e7ce5b394f3477bb0a485a4b761b7742e95be37
+ 7c50d548001a83a18449ad4dda370122ede5fbf6
-
+ https://github.com/dotnet/arcade
- 5e7ce5b394f3477bb0a485a4b761b7742e95be37
+ 7c50d548001a83a18449ad4dda370122ede5fbf6
-
+ https://github.com/dotnet/arcade
- 5e7ce5b394f3477bb0a485a4b761b7742e95be37
+ 7c50d548001a83a18449ad4dda370122ede5fbf6
-
+ https://github.com/dotnet/arcade
- 5e7ce5b394f3477bb0a485a4b761b7742e95be37
+ 7c50d548001a83a18449ad4dda370122ede5fbf6
-
+ https://github.com/dotnet/arcade
- 5e7ce5b394f3477bb0a485a4b761b7742e95be37
+ 7c50d548001a83a18449ad4dda370122ede5fbf6
-
+ https://github.com/dotnet/arcade
- 5e7ce5b394f3477bb0a485a4b761b7742e95be37
+ 7c50d548001a83a18449ad4dda370122ede5fbf6
-
+ https://github.com/dotnet/arcade
- 5e7ce5b394f3477bb0a485a4b761b7742e95be37
+ 7c50d548001a83a18449ad4dda370122ede5fbf6
-
+ https://github.com/dotnet/arcade
- 5e7ce5b394f3477bb0a485a4b761b7742e95be37
+ 7c50d548001a83a18449ad4dda370122ede5fbf6
-
+ https://github.com/dotnet/arcade
- 5e7ce5b394f3477bb0a485a4b761b7742e95be37
+ 7c50d548001a83a18449ad4dda370122ede5fbf6
-
+ https://dev.azure.com/dnceng/internal/_git/dotnet-optimization
- f0801f43ca046737efb933d07b741838f5197e19
+ 680817355bb2e1326de1124c846263f8d9fb9294
diff --git a/eng/Versions.props b/eng/Versions.props
index 3308bded8da8..7d74ab0a8658 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -7,7 +7,7 @@
7true
- preview5
+ preview6truetrue
@@ -18,36 +18,52 @@
Microsoft.DotNet.XUnitExtensionsmicrosoft.dotnet.xunitconsolerunner
- Microsoft.DotNet.RemoteExecutor
+ microsoft.dotnet.remoteexecutorNETStandard.Library
- 1.0.0-beta.19218.7
- 1.0.0-beta.19218.7
- 1.0.0-beta.19218.7
- 1.0.0-beta.19218.7
- 1.0.0-beta.19218.7
- 2.4.0-beta.19218.7
- 2.5.1-beta.19218.7
- 1.0.0-beta.19218.7
- 1.0.0-beta.19218.7
- 1.0.0-beta.19218.7
- 1.0.0-beta.19218.7
- 2.2.0-beta.19218.7
- 1.0.0-beta.19218.7
+ 1.0.0-beta.19280.2
+ 1.0.0-beta.19280.2
+ 1.0.0-beta.19280.2
+ 1.0.0-beta.19280.2
+ 2.4.1-beta.19280.2
+ 2.5.1-beta.19280.2
+ 1.0.0-beta.19280.2
+ 1.0.0-beta.19280.2
+ 1.0.0-beta.19280.2
+ 1.0.0-beta.19280.2
+ 2.2.0-beta.19280.2
+ 1.0.0-beta.19280.2
- 3.0.0-preview5-27620-10
- 3.0.0-preview5-27620-10
- 3.0.0-preview5-27620-10
+ 3.0.0-preview6-27730-01
+ 3.0.0-preview6-27730-01
+ 3.0.0-preview6-27730-01
- 3.0.0-preview5-27708-72
- 3.0.0-preview5-27708-72
+ 3.0.0-preview6.19280.2
+ 3.0.0-preview6.19280.2
- 3.0.0-preview5.19220.3
+ 3.0.0-preview6.19281.1
+ 4.6.0-preview6.19281.1
- 2.1.0-prerelease.19222.1
+ 2.1.0-prerelease.19281.2
- 99.99.99-master-20190421.1
+ 99.99.99-master-20190521.3
+
+ 4.4.0
+ 4.4.0
+
+ 16.0.1
+ 2.4.1-pre.build.4059
+ 2.0.5
+ 1.0.31
+
+ 1.5.0
+ 4.1.4
+
+ Microsoft.SymbolUploader.Build.Task
+ 1.0.0-beta-63604-05
+
+
diff --git a/eng/build.ps1 b/eng/build.ps1
index 09a3e5030a76..e459efa38805 100644
--- a/eng/build.ps1
+++ b/eng/build.ps1
@@ -1,13 +1,14 @@
[CmdletBinding(PositionalBinding=$false)]
Param(
[switch][Alias('b')]$build,
+ [switch][Alias('t')]$test,
[switch] $buildtests,
[string][Alias('c')]$configuration = "Debug",
[string][Alias('f')]$framework,
[string] $os,
[switch] $allconfigurations,
[switch] $coverage,
- [switch] $outerloop,
+ [string] $testscope,
[string] $arch,
[switch] $clean,
[Parameter(ValueFromRemainingArguments=$true)][String[]]$properties
@@ -36,7 +37,7 @@ function Get-Help() {
Write-Host "Advanced settings:"
Write-Host " -coverage Collect code coverage when testing"
- Write-Host " -outerloop Include tests which are marked as OuterLoop"
+ Write-Host " -testscope Scope tests, allowed values: innerloop, outerloop, all"
Write-Host " -allconfigurations Build packages for all build configurations"
Write-Host " -os Build operating system: Windows_NT or Unix"
Write-Host " -arch Build platform: x86, x64, arm or arm64"
@@ -93,6 +94,8 @@ foreach ($argument in $PSBoundParameters.Keys)
{
switch($argument)
{
+ "build" { $arguments += " -build" }
+ "test" { $arguments += " -test" }
"buildtests" { $arguments += " /p:BuildTests=true" }
"clean" { }
"configuration" { $configuration = (Get-Culture).TextInfo.ToTitleCase($($PSBoundParameters[$argument])); $arguments += " /p:ConfigurationGroup=$configuration -configuration $configuration" }
@@ -100,7 +103,7 @@ foreach ($argument in $PSBoundParameters.Keys)
"os" { $arguments += " /p:OSGroup=$($PSBoundParameters[$argument])" }
"allconfigurations" { $arguments += " /p:BuildAllConfigurations=true" }
"coverage" { $arguments += " /p:Coverage=true" }
- "outerloop" { $arguments += " /p:OuterLoop=true" }
+ "testscope" { $arguments += " /p:TestScope=$($PSBoundParameters[$argument])" }
"arch" { $arguments += " /p:ArchGroup=$($PSBoundParameters[$argument])" }
"properties" { $arguments += " " + $properties }
default { $arguments += " /p:$argument=$($PSBoundParameters[$argument])" }
diff --git a/eng/build.sh b/eng/build.sh
index a72e265d9733..1ba96ae25f40 100755
--- a/eng/build.sh
+++ b/eng/build.sh
@@ -36,7 +36,7 @@ usage()
echo "Advanced settings:"
echo " --coverage Collect code coverage when testing"
- echo " --outerloop Include tests which are marked as OuterLoop"
+ echo " --testscope Test scope, allowed values: innerloop, outerloop, all"
echo " --allconfigurations Build packages for all build configurations"
echo " --os Build operating system: Windows_NT or Unix"
echo " --arch Build platform: x86, x64, arm or arm64"
@@ -100,9 +100,9 @@ while [[ $# > 0 ]]; do
arguments="$arguments /p:BuildTests=true"
shift 1
;;
- -outerloop)
- arguments="$arguments /p:OuterLoop=true"
- shift 1
+ -testscope)
+ arguments="$arguments /p:TestScope=$2"
+ shift 2
;;
-coverage)
arguments="$arguments /p:Coverage=true"
diff --git a/eng/common/LoggingCommandFunctions.ps1 b/eng/common/LoggingCommandFunctions.ps1
new file mode 100644
index 000000000000..c225eaecbf25
--- /dev/null
+++ b/eng/common/LoggingCommandFunctions.ps1
@@ -0,0 +1,146 @@
+# Source for this file was taken from https://github.com/microsoft/azure-pipelines-task-lib/blob/11c9439d4af17e6475d9fe058e6b2e03914d17e6/powershell/VstsTaskSdk/LoggingCommandFunctions.ps1
+
+# NOTE: You should not be calling these method directly as they are likely to change. Instead you should be calling the Write-Pipeline* functions defined in tools.ps1
+
+$script:loggingCommandPrefix = '##vso['
+$script:loggingCommandEscapeMappings = @( # TODO: WHAT ABOUT "="? WHAT ABOUT "%"?
+ New-Object psobject -Property @{ Token = ';' ; Replacement = '%3B' }
+ New-Object psobject -Property @{ Token = "`r" ; Replacement = '%0D' }
+ New-Object psobject -Property @{ Token = "`n" ; Replacement = '%0A' }
+ New-Object psobject -Property @{ Token = "]" ; Replacement = '%5D' }
+)
+# TODO: BUG: Escape % ???
+# TODO: Add test to verify don't need to escape "=".
+
+<########################################
+# Private functions.
+########################################>
+function Format-LoggingCommandData {
+ [CmdletBinding()]
+ param([string]$Value, [switch]$Reverse)
+
+ if (!$Value) {
+ return ''
+ }
+
+ if (!$Reverse) {
+ foreach ($mapping in $script:loggingCommandEscapeMappings) {
+ $Value = $Value.Replace($mapping.Token, $mapping.Replacement)
+ }
+ } else {
+ for ($i = $script:loggingCommandEscapeMappings.Length - 1 ; $i -ge 0 ; $i--) {
+ $mapping = $script:loggingCommandEscapeMappings[$i]
+ $Value = $Value.Replace($mapping.Replacement, $mapping.Token)
+ }
+ }
+
+ return $Value
+}
+
+function Format-LoggingCommand {
+ [CmdletBinding()]
+ param(
+ [Parameter(Mandatory = $true)]
+ [string]$Area,
+ [Parameter(Mandatory = $true)]
+ [string]$Event,
+ [string]$Data,
+ [hashtable]$Properties)
+
+ # Append the preamble.
+ [System.Text.StringBuilder]$sb = New-Object -TypeName System.Text.StringBuilder
+ $null = $sb.Append($script:loggingCommandPrefix).Append($Area).Append('.').Append($Event)
+
+ # Append the properties.
+ if ($Properties) {
+ $first = $true
+ foreach ($key in $Properties.Keys) {
+ [string]$value = Format-LoggingCommandData $Properties[$key]
+ if ($value) {
+ if ($first) {
+ $null = $sb.Append(' ')
+ $first = $false
+ } else {
+ $null = $sb.Append(';')
+ }
+
+ $null = $sb.Append("$key=$value")
+ }
+ }
+ }
+
+ # Append the tail and output the value.
+ $Data = Format-LoggingCommandData $Data
+ $sb.Append(']').Append($Data).ToString()
+}
+
+function Write-LoggingCommand {
+ [CmdletBinding(DefaultParameterSetName = 'Parameters')]
+ param(
+ [Parameter(Mandatory = $true, ParameterSetName = 'Parameters')]
+ [string]$Area,
+ [Parameter(Mandatory = $true, ParameterSetName = 'Parameters')]
+ [string]$Event,
+ [Parameter(ParameterSetName = 'Parameters')]
+ [string]$Data,
+ [Parameter(ParameterSetName = 'Parameters')]
+ [hashtable]$Properties,
+ [Parameter(Mandatory = $true, ParameterSetName = 'Object')]
+ $Command,
+ [switch]$AsOutput)
+
+ if ($PSCmdlet.ParameterSetName -eq 'Object') {
+ Write-LoggingCommand -Area $Command.Area -Event $Command.Event -Data $Command.Data -Properties $Command.Properties -AsOutput:$AsOutput
+ return
+ }
+
+ $command = Format-LoggingCommand -Area $Area -Event $Event -Data $Data -Properties $Properties
+ if ($AsOutput) {
+ $command
+ } else {
+ Write-Host $command
+ }
+}
+
+function Write-LogIssue {
+ [CmdletBinding()]
+ param(
+ [ValidateSet('warning', 'error')]
+ [Parameter(Mandatory = $true)]
+ [string]$Type,
+ [string]$Message,
+ [string]$ErrCode,
+ [string]$SourcePath,
+ [string]$LineNumber,
+ [string]$ColumnNumber,
+ [switch]$AsOutput)
+
+ $command = Format-LoggingCommand -Area 'task' -Event 'logissue' -Data $Message -Properties @{
+ 'type' = $Type
+ 'code' = $ErrCode
+ 'sourcepath' = $SourcePath
+ 'linenumber' = $LineNumber
+ 'columnnumber' = $ColumnNumber
+ }
+ if ($AsOutput) {
+ return $command
+ }
+
+ if ($Type -eq 'error') {
+ $foregroundColor = $host.PrivateData.ErrorForegroundColor
+ $backgroundColor = $host.PrivateData.ErrorBackgroundColor
+ if ($foregroundColor -isnot [System.ConsoleColor] -or $backgroundColor -isnot [System.ConsoleColor]) {
+ $foregroundColor = [System.ConsoleColor]::Red
+ $backgroundColor = [System.ConsoleColor]::Black
+ }
+ } else {
+ $foregroundColor = $host.PrivateData.WarningForegroundColor
+ $backgroundColor = $host.PrivateData.WarningBackgroundColor
+ if ($foregroundColor -isnot [System.ConsoleColor] -or $backgroundColor -isnot [System.ConsoleColor]) {
+ $foregroundColor = [System.ConsoleColor]::Yellow
+ $backgroundColor = [System.ConsoleColor]::Black
+ }
+ }
+
+ Write-Host $command -ForegroundColor $foregroundColor -BackgroundColor $backgroundColor
+}
\ No newline at end of file
diff --git a/eng/common/PublishToPackageFeed.proj b/eng/common/PublishToPackageFeed.proj
index e17f72644e3e..a1b1333723eb 100644
--- a/eng/common/PublishToPackageFeed.proj
+++ b/eng/common/PublishToPackageFeed.proj
@@ -53,6 +53,8 @@
https://dotnetfeed.blob.core.windows.net/dotnet-toolset/index.jsonhttps://dotnetfeed.blob.core.windows.net/dotnet-windowsdesktop/index.jsonhttps://dotnetfeed.blob.core.windows.net/nuget-nugetclient/index.json
+ https://dotnetfeed.blob.core.windows.net/aspnet-entityframework6/index.json
+ https://dotnetfeed.blob.core.windows.net/aspnet-blazor/index.json Exist flag) used to consult whether a file exist
+# in the repository at a specific commit point. This is populated by inserting
+# all files present in the repo at a specific commit point.
+$global:RepoFiles = @{}
+
+$ValidatePackage = {
+ param(
+ [string] $PackagePath # Full path to a Symbols.NuGet package
+ )
+
+ # Ensure input file exist
+ if (!(Test-Path $PackagePath)) {
+ throw "Input file does not exist: $PackagePath"
+ }
+
+ # Extensions for which we'll look for SourceLink information
+ # For now we'll only care about Portable & Embedded PDBs
+ $RelevantExtensions = @(".dll", ".exe", ".pdb")
+
+ Write-Host -NoNewLine "Validating" ([System.IO.Path]::GetFileName($PackagePath)) "... "
+
+ $PackageId = [System.IO.Path]::GetFileNameWithoutExtension($PackagePath)
+ $ExtractPath = Join-Path -Path $using:ExtractPath -ChildPath $PackageId
+ $FailedFiles = 0
+
+ Add-Type -AssemblyName System.IO.Compression.FileSystem
+
+ [System.IO.Directory]::CreateDirectory($ExtractPath);
+
+ $zip = [System.IO.Compression.ZipFile]::OpenRead($PackagePath)
+
+ $zip.Entries |
+ Where-Object {$RelevantExtensions -contains [System.IO.Path]::GetExtension($_.Name)} |
+ ForEach-Object {
+ $FileName = $_.FullName
+ $Extension = [System.IO.Path]::GetExtension($_.Name)
+ $FakeName = -Join((New-Guid), $Extension)
+ $TargetFile = Join-Path -Path $ExtractPath -ChildPath $FakeName
+
+ # We ignore resource DLLs
+ if ($FileName.EndsWith(".resources.dll")) {
+ return
+ }
+
+ [System.IO.Compression.ZipFileExtensions]::ExtractToFile($_, $TargetFile, $true)
+
+ $ValidateFile = {
+ param(
+ [string] $FullPath, # Full path to the module that has to be checked
+ [string] $RealPath,
+ [ref] $FailedFiles
+ )
+
+ # Makes easier to reference `sourcelink cli`
+ Push-Location $using:SourceLinkToolPath
+
+ $SourceLinkInfos = .\sourcelink.exe print-urls $FullPath | Out-String
+
+ if ($LASTEXITCODE -eq 0 -and -not ([string]::IsNullOrEmpty($SourceLinkInfos))) {
+ $NumFailedLinks = 0
+
+ # We only care about Http addresses
+ $Matches = (Select-String '(http[s]?)(:\/\/)([^\s,]+)' -Input $SourceLinkInfos -AllMatches).Matches
+
+ if ($Matches.Count -ne 0) {
+ $Matches.Value |
+ ForEach-Object {
+ $Link = $_
+ $CommitUrl = -Join("https://raw.githubusercontent.com/", $using:GHRepoName, "/", $using:GHCommit, "/")
+ $FilePath = $Link.Replace($CommitUrl, "")
+ $Status = 200
+ $Cache = $using:RepoFiles
+
+ if ( !($Cache.ContainsKey($FilePath)) ) {
+ try {
+ $Uri = $Link -as [System.URI]
+
+ # Only GitHub links are valid
+ if ($Uri.AbsoluteURI -ne $null -and $Uri.Host -match "github") {
+ $Status = (Invoke-WebRequest -Uri $Link -UseBasicParsing -Method HEAD -TimeoutSec 5).StatusCode
+ }
+ else {
+ $Status = 0
+ }
+ }
+ catch {
+ $Status = 0
+ }
+ }
+
+ if ($Status -ne 200) {
+ if ($NumFailedLinks -eq 0) {
+ if ($FailedFiles.Value -eq 0) {
+ Write-Host
+ }
+
+ Write-Host "`tFile $RealPath has broken links:"
+ }
+
+ Write-Host "`t`tFailed to retrieve $Link"
+
+ $NumFailedLinks++
+ }
+ }
+ }
+
+ if ($NumFailedLinks -ne 0) {
+ $FailedFiles.value++
+ $global:LASTEXITCODE = 1
+ }
+ }
+
+ Pop-Location
+ }
+
+ &$ValidateFile $TargetFile $FileName ([ref]$FailedFiles)
+ }
+
+ $zip.Dispose()
+
+ if ($FailedFiles -eq 0) {
+ Write-Host "Passed."
+ }
+}
+
+function ValidateSourceLinkLinks {
+ if (!($GHRepoName -Match "^[^\s\/]+/[^\s\/]+$")) {
+ Write-Host "GHRepoName should be in the format /"
+ $global:LASTEXITCODE = 1
+ return
+ }
+
+ if (!($GHCommit -Match "^[0-9a-fA-F]{40}$")) {
+ Write-Host "GHCommit should be a 40 chars hexadecimal string"
+ $global:LASTEXITCODE = 1
+ return
+ }
+
+ $RepoTreeURL = -Join("https://api.github.com/repos/", $GHRepoName, "/git/trees/", $GHCommit, "?recursive=1")
+ $CodeExtensions = @(".cs", ".vb", ".fs", ".fsi", ".fsx", ".fsscript")
+
+ try {
+ # Retrieve the list of files in the repo at that particular commit point and store them in the RepoFiles hash
+ $Data = Invoke-WebRequest $RepoTreeURL | ConvertFrom-Json | Select-Object -ExpandProperty tree
+
+ foreach ($file in $Data) {
+ $Extension = [System.IO.Path]::GetExtension($file.path)
+
+ if ($CodeExtensions.Contains($Extension)) {
+ $RepoFiles[$file.path] = 1
+ }
+ }
+ }
+ catch {
+ Write-Host "Problems downloading the list of files from the repo. Url used: $RepoTreeURL"
+ $global:LASTEXITCODE = 1
+ return
+ }
+
+ if (Test-Path $ExtractPath) {
+ Remove-Item $ExtractPath -Force -Recurse -ErrorAction SilentlyContinue
+ }
+
+ # Process each NuGet package in parallel
+ $Jobs = @()
+ Get-ChildItem "$InputPath\*.symbols.nupkg" |
+ ForEach-Object {
+ $Jobs += Start-Job -ScriptBlock $ValidatePackage -ArgumentList $_.FullName
+ }
+
+ foreach ($Job in $Jobs) {
+ Wait-Job -Id $Job.Id | Receive-Job
+ }
+}
+
+Measure-Command { ValidateSourceLinkLinks }
diff --git a/eng/common/build.ps1 b/eng/common/build.ps1
index d0147db4bd52..4cb2ce489b6c 100644
--- a/eng/common/build.ps1
+++ b/eng/common/build.ps1
@@ -1,6 +1,7 @@
[CmdletBinding(PositionalBinding=$false)]
Param(
[string][Alias('c')]$configuration = "Debug",
+ [string]$platform = $null,
[string] $projects,
[string][Alias('v')]$verbosity = "minimal",
[string] $msbuildEngine = $null,
@@ -29,6 +30,7 @@ Param(
function Print-Usage() {
Write-Host "Common settings:"
Write-Host " -configuration Build configuration: 'Debug' or 'Release' (short: -c)"
+ Write-Host " -platform Platform configuration: 'x86', 'x64' or any valid Platform value to pass to msbuild"
Write-Host " -verbosity Msbuild verbosity: q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic] (short: -v)"
Write-Host " -binaryLog Output binary log (short: -bl)"
Write-Host " -help Print help and exit"
@@ -77,6 +79,7 @@ function Build {
InitializeCustomToolset
$bl = if ($binaryLog) { "/bl:" + (Join-Path $LogDir "Build.binlog") } else { "" }
+ $platformArg = if ($platform) { "/p:Platform=$platform" } else { "" }
if ($projects) {
# Re-assign properties to a new variable because PowerShell doesn't let us append properties directly for unclear reasons.
@@ -88,6 +91,7 @@ function Build {
MSBuild $toolsetBuildProj `
$bl `
+ $platformArg `
/p:Configuration=$configuration `
/p:RepoRoot=$RepoRoot `
/p:Restore=$restore `
@@ -122,12 +126,15 @@ try {
. $configureToolsetScript
}
+ if (($restore) -and ($null -eq $env:DisableNativeToolsetInstalls)) {
+ InitializeNativeTools
+ }
+
Build
}
catch {
- Write-Host $_
- Write-Host $_.Exception
Write-Host $_.ScriptStackTrace
+ Write-PipelineTaskError -Message $_
ExitWithExitCode 1
}
diff --git a/eng/common/build.sh b/eng/common/build.sh
index 40b1e8ec73e3..6236fc4d38cd 100755
--- a/eng/common/build.sh
+++ b/eng/common/build.sh
@@ -35,7 +35,7 @@ usage()
echo " --nodeReuse Sets nodereuse msbuild parameter ('true' or 'false')"
echo " --warnAsError Sets warnaserror msbuild parameter ('true' or 'false')"
echo ""
- echo "Command line arguments starting with '/p:' are passed through to MSBuild."
+ echo "Command line arguments not listed above are passed thru to msbuild."
echo "Arguments can also be passed in with a single hyphen."
}
@@ -66,6 +66,7 @@ ci=false
warn_as_error=true
node_reuse=true
binary_log=false
+pipelines_log=false
projects=''
configuration='Debug'
@@ -92,6 +93,9 @@ while [[ $# > 0 ]]; do
-binarylog|-bl)
binary_log=true
;;
+ -pipelineslog|-pl)
+ pipelines_log=true
+ ;;
-restore|-r)
restore=true
;;
@@ -137,22 +141,8 @@ while [[ $# > 0 ]]; do
node_reuse=$2
shift
;;
- -p:*|/p:*)
- properties="$properties $1"
- ;;
- -m:*|/m:*)
- properties="$properties $1"
- ;;
- -bl:*|/bl:*)
- properties="$properties $1"
- ;;
- -dl:*|/dl:*)
- properties="$properties $1"
- ;;
*)
- echo "Invalid argument: $1"
- usage
- exit 1
+ properties="$properties $1"
;;
esac
@@ -160,6 +150,7 @@ while [[ $# > 0 ]]; do
done
if [[ "$ci" == true ]]; then
+ pipelines_log=true
binary_log=true
node_reuse=false
fi
@@ -218,4 +209,8 @@ if [[ -n "${useInstalledDotNetCli:-}" ]]; then
use_installed_dotnet_cli="$useInstalledDotNetCli"
fi
+if [[ "$restore" == true && -z ${DisableNativeToolsetInstalls:-} ]]; then
+ InitializeNativeTools
+fi
+
Build
diff --git a/eng/common/cross/arm/sources.list.vivid b/eng/common/cross/arm/sources.list.vivid
deleted file mode 100644
index 0b1215e475ac..000000000000
--- a/eng/common/cross/arm/sources.list.vivid
+++ /dev/null
@@ -1,11 +0,0 @@
-deb http://ports.ubuntu.com/ubuntu-ports/ vivid main restricted universe
-deb-src http://ports.ubuntu.com/ubuntu-ports/ vivid main restricted universe
-
-deb http://ports.ubuntu.com/ubuntu-ports/ vivid-updates main restricted universe
-deb-src http://ports.ubuntu.com/ubuntu-ports/ vivid-updates main restricted universe
-
-deb http://ports.ubuntu.com/ubuntu-ports/ vivid-backports main restricted
-deb-src http://ports.ubuntu.com/ubuntu-ports/ vivid-backports main restricted
-
-deb http://ports.ubuntu.com/ubuntu-ports/ vivid-security main restricted universe multiverse
-deb-src http://ports.ubuntu.com/ubuntu-ports/ vivid-security main restricted universe multiverse
\ No newline at end of file
diff --git a/eng/common/cross/arm/sources.list.wily b/eng/common/cross/arm/sources.list.wily
deleted file mode 100644
index e23d1e02a05d..000000000000
--- a/eng/common/cross/arm/sources.list.wily
+++ /dev/null
@@ -1,11 +0,0 @@
-deb http://ports.ubuntu.com/ubuntu-ports/ wily main restricted universe
-deb-src http://ports.ubuntu.com/ubuntu-ports/ wily main restricted universe
-
-deb http://ports.ubuntu.com/ubuntu-ports/ wily-updates main restricted universe
-deb-src http://ports.ubuntu.com/ubuntu-ports/ wily-updates main restricted universe
-
-deb http://ports.ubuntu.com/ubuntu-ports/ wily-backports main restricted
-deb-src http://ports.ubuntu.com/ubuntu-ports/ wily-backports main restricted
-
-deb http://ports.ubuntu.com/ubuntu-ports/ wily-security main restricted universe multiverse
-deb-src http://ports.ubuntu.com/ubuntu-ports/ wily-security main restricted universe multiverse
\ No newline at end of file
diff --git a/eng/common/cross/arm64/sources.list.buster b/eng/common/cross/arm64/sources.list.buster
new file mode 100644
index 000000000000..7194ac64a960
--- /dev/null
+++ b/eng/common/cross/arm64/sources.list.buster
@@ -0,0 +1,11 @@
+deb http://deb.debian.org/debian buster main
+deb-src http://deb.debian.org/debian buster main
+
+deb http://deb.debian.org/debian-security/ buster/updates main
+deb-src http://deb.debian.org/debian-security/ buster/updates main
+
+deb http://deb.debian.org/debian buster-updates main
+deb-src http://deb.debian.org/debian buster-updates main
+
+deb http://deb.debian.org/debian buster-backports main contrib non-free
+deb-src http://deb.debian.org/debian buster-backports main contrib non-free
diff --git a/eng/common/cross/arm64/sources.list.stretch b/eng/common/cross/arm64/sources.list.stretch
new file mode 100644
index 000000000000..0e1215774368
--- /dev/null
+++ b/eng/common/cross/arm64/sources.list.stretch
@@ -0,0 +1,12 @@
+deb http://deb.debian.org/debian stretch main
+deb-src http://deb.debian.org/debian stretch main
+
+deb http://deb.debian.org/debian-security/ stretch/updates main
+deb-src http://deb.debian.org/debian-security/ stretch/updates main
+
+deb http://deb.debian.org/debian stretch-updates main
+deb-src http://deb.debian.org/debian stretch-updates main
+
+deb http://deb.debian.org/debian stretch-backports main contrib non-free
+deb-src http://deb.debian.org/debian stretch-backports main contrib non-free
+
diff --git a/eng/common/cross/arm64/sources.list.vivid b/eng/common/cross/arm64/sources.list.vivid
deleted file mode 100644
index 0b1215e475ac..000000000000
--- a/eng/common/cross/arm64/sources.list.vivid
+++ /dev/null
@@ -1,11 +0,0 @@
-deb http://ports.ubuntu.com/ubuntu-ports/ vivid main restricted universe
-deb-src http://ports.ubuntu.com/ubuntu-ports/ vivid main restricted universe
-
-deb http://ports.ubuntu.com/ubuntu-ports/ vivid-updates main restricted universe
-deb-src http://ports.ubuntu.com/ubuntu-ports/ vivid-updates main restricted universe
-
-deb http://ports.ubuntu.com/ubuntu-ports/ vivid-backports main restricted
-deb-src http://ports.ubuntu.com/ubuntu-ports/ vivid-backports main restricted
-
-deb http://ports.ubuntu.com/ubuntu-ports/ vivid-security main restricted universe multiverse
-deb-src http://ports.ubuntu.com/ubuntu-ports/ vivid-security main restricted universe multiverse
\ No newline at end of file
diff --git a/eng/common/cross/arm64/sources.list.wily b/eng/common/cross/arm64/sources.list.wily
deleted file mode 100644
index e23d1e02a05d..000000000000
--- a/eng/common/cross/arm64/sources.list.wily
+++ /dev/null
@@ -1,11 +0,0 @@
-deb http://ports.ubuntu.com/ubuntu-ports/ wily main restricted universe
-deb-src http://ports.ubuntu.com/ubuntu-ports/ wily main restricted universe
-
-deb http://ports.ubuntu.com/ubuntu-ports/ wily-updates main restricted universe
-deb-src http://ports.ubuntu.com/ubuntu-ports/ wily-updates main restricted universe
-
-deb http://ports.ubuntu.com/ubuntu-ports/ wily-backports main restricted
-deb-src http://ports.ubuntu.com/ubuntu-ports/ wily-backports main restricted
-
-deb http://ports.ubuntu.com/ubuntu-ports/ wily-security main restricted universe multiverse
-deb-src http://ports.ubuntu.com/ubuntu-ports/ wily-security main restricted universe multiverse
\ No newline at end of file
diff --git a/eng/common/cross/build-rootfs.sh b/eng/common/cross/build-rootfs.sh
index 805948ca83c7..34d3d2ba1fe1 100644
--- a/eng/common/cross/build-rootfs.sh
+++ b/eng/common/cross/build-rootfs.sh
@@ -2,21 +2,21 @@
usage()
{
- echo "Usage: $0 [BuildArch] [LinuxCodeName] [lldbx.y] [--skipunmount]"
+ echo "Usage: $0 [BuildArch] [LinuxCodeName] [lldbx.y] [--skipunmount] --rootfsdir ]"
echo "BuildArch can be: arm(default), armel, arm64, x86"
- echo "LinuxCodeName - optional, Code name for Linux, can be: trusty(default), vivid, wily, xenial, zesty, bionic, alpine. If BuildArch is armel, LinuxCodeName is jessie(default) or tizen."
- echo "lldbx.y - optional, LLDB version, can be: lldb3.6(default), lldb3.8, lldb3.9, lldb4.0, no-lldb. Ignored for alpine"
+ echo "LinuxCodeName - optional, Code name for Linux, can be: trusty, xenial(default), zesty, bionic, alpine. If BuildArch is armel, LinuxCodeName is jessie(default) or tizen."
+ echo "lldbx.y - optional, LLDB version, can be: lldb3.9(default), lldb4.0, lldb5.0, lldb6.0 no-lldb. Ignored for alpine"
echo "--skipunmount - optional, will skip the unmount of rootfs folder."
exit 1
}
-__LinuxCodeName=trusty
+__LinuxCodeName=xenial
__CrossDir=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
__InitialDir=$PWD
__BuildArch=arm
__UbuntuArch=armhf
__UbuntuRepo="http://ports.ubuntu.com/"
-__LLDB_Package="lldb-3.6-dev"
+__LLDB_Package="liblldb-3.9-dev"
__SkipUnmount=0
# base development support
@@ -53,8 +53,12 @@ __AlpinePackages+=" openssl-dev"
__AlpinePackages+=" zlib-dev"
__UnprocessedBuildArgs=
-for i in "$@" ; do
- lowerI="$(echo $i | awk '{print tolower($0)}')"
+while :; do
+ if [ $# -le 0 ]; then
+ break
+ fi
+
+ lowerI="$(echo $1 | awk '{print tolower($0)}')"
case $lowerI in
-?|-h|--help)
usage
@@ -95,38 +99,49 @@ for i in "$@" ; do
lldb4.0)
__LLDB_Package="liblldb-4.0-dev"
;;
+ lldb5.0)
+ __LLDB_Package="liblldb-5.0-dev"
+ ;;
+ lldb6.0)
+ __LLDB_Package="liblldb-6.0-dev"
+ ;;
no-lldb)
unset __LLDB_Package
;;
- vivid)
+ trusty) # Ubuntu 14.04
if [ "$__LinuxCodeName" != "jessie" ]; then
- __LinuxCodeName=vivid
+ __LinuxCodeName=trusty
fi
;;
- wily)
- if [ "$__LinuxCodeName" != "jessie" ]; then
- __LinuxCodeName=wily
- fi
- ;;
- xenial)
+ xenial) # Ubuntu 16.04
if [ "$__LinuxCodeName" != "jessie" ]; then
__LinuxCodeName=xenial
fi
;;
- zesty)
+ zesty) # Ubuntu 17.04
if [ "$__LinuxCodeName" != "jessie" ]; then
__LinuxCodeName=zesty
fi
;;
- bionic)
+ bionic) # Ubuntu 18.04
if [ "$__LinuxCodeName" != "jessie" ]; then
__LinuxCodeName=bionic
fi
;;
- jessie)
+ jessie) # Debian 8
__LinuxCodeName=jessie
__UbuntuRepo="http://ftp.debian.org/debian/"
;;
+ stretch) # Debian 9
+ __LinuxCodeName=stretch
+ __UbuntuRepo="http://ftp.debian.org/debian/"
+ __LLDB_Package="liblldb-6.0-dev"
+ ;;
+ buster) # Debian 10
+ __LinuxCodeName=buster
+ __UbuntuRepo="http://ftp.debian.org/debian/"
+ __LLDB_Package="liblldb-6.0-dev"
+ ;;
tizen)
if [ "$__BuildArch" != "armel" ]; then
echo "Tizen is available only for armel."
@@ -144,10 +159,16 @@ for i in "$@" ; do
--skipunmount)
__SkipUnmount=1
;;
+ --rootfsdir|-rootfsdir)
+ shift
+ __RootfsDir=$1
+ ;;
*)
- __UnprocessedBuildArgs="$__UnprocessedBuildArgs $i"
+ __UnprocessedBuildArgs="$__UnprocessedBuildArgs $1"
;;
esac
+
+ shift
done
if [ "$__BuildArch" == "armel" ]; then
@@ -155,12 +176,14 @@ if [ "$__BuildArch" == "armel" ]; then
fi
__UbuntuPackages+=" ${__LLDB_Package:-}"
-__RootfsDir="$__CrossDir/rootfs/$__BuildArch"
-
-if [[ -n "$ROOTFS_DIR" ]]; then
+if [ -z "$__RootfsDir" ] && [ ! -z "$ROOTFS_DIR" ]; then
__RootfsDir=$ROOTFS_DIR
fi
+if [ -z "$__RootfsDir" ]; then
+ __RootfsDir="$__CrossDir/rootfs/$__BuildArch"
+fi
+
if [ -d "$__RootfsDir" ]; then
if [ $__SkipUnmount == 0 ]; then
umount $__RootfsDir/*
diff --git a/eng/common/cross/x86/sources.list.vivid b/eng/common/cross/x86/sources.list.vivid
deleted file mode 100644
index 26d37b20fc37..000000000000
--- a/eng/common/cross/x86/sources.list.vivid
+++ /dev/null
@@ -1,11 +0,0 @@
-deb http://archive.ubuntu.com/ubuntu/ vivid main restricted universe
-deb-src http://archive.ubuntu.com/ubuntu/ vivid main restricted universe
-
-deb http://archive.ubuntu.com/ubuntu/ vivid-updates main restricted universe
-deb-src http://archive.ubuntu.com/ubuntu/ vivid-updates main restricted universe
-
-deb http://archive.ubuntu.com/ubuntu/ vivid-backports main restricted
-deb-src http://archive.ubuntu.com/ubuntu/ vivid-backports main restricted
-
-deb http://archive.ubuntu.com/ubuntu/ vivid-security main restricted universe multiverse
-deb-src http://archive.ubuntu.com/ubuntu/ vivid-security main restricted universe multiverse
diff --git a/eng/common/cross/x86/sources.list.wily b/eng/common/cross/x86/sources.list.wily
deleted file mode 100644
index c4b0b442ab6b..000000000000
--- a/eng/common/cross/x86/sources.list.wily
+++ /dev/null
@@ -1,11 +0,0 @@
-deb http://archive.ubuntu.com/ubuntu/ wily main restricted universe
-deb-src http://archive.ubuntu.com/ubuntu/ wily main restricted universe
-
-deb http://archive.ubuntu.com/ubuntu/ wily-updates main restricted universe
-deb-src http://archive.ubuntu.com/ubuntu/ wily-updates main restricted universe
-
-deb http://archive.ubuntu.com/ubuntu/ wily-backports main restricted
-deb-src http://archive.ubuntu.com/ubuntu/ wily-backports main restricted
-
-deb http://archive.ubuntu.com/ubuntu/ wily-security main restricted universe multiverse
-deb-src http://archive.ubuntu.com/ubuntu/ wily-security main restricted universe multiverse
diff --git a/eng/common/darc-init.ps1 b/eng/common/darc-init.ps1
index 81ffd16779cb..dea7cdd903b1 100644
--- a/eng/common/darc-init.ps1
+++ b/eng/common/darc-init.ps1
@@ -1,5 +1,6 @@
param (
- $darcVersion = $null
+ $darcVersion = $null,
+ $versionEndpoint = "https://maestro-prod.westus2.cloudapp.azure.com/api/assets/darc-version?api-version=2019-01-16"
)
$verbosity = "m"
@@ -16,13 +17,13 @@ function InstallDarcCli ($darcVersion) {
Invoke-Expression "& `"$dotnet`" tool uninstall $darcCliPackageName -g"
}
- # Until we can anonymously query the BAR API for the latest arcade-services
- # build applied to the PROD channel, this is hardcoded.
+ # If the user didn't explicitly specify the darc version,
+ # query the Maestro API for the correct version of darc to install.
if (-not $darcVersion) {
- $darcVersion = '1.1.0-beta.19205.4'
+ $darcVersion = $(Invoke-WebRequest -Uri $versionEndpoint -UseBasicParsing).Content
}
- $arcadeServicesSource = 'https://dotnetfeed.blob.core.windows.net/dotnet-arcade/index.json'
+ $arcadeServicesSource = 'https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json'
Write-Host "Installing Darc CLI version $darcVersion..."
Write-Host "You may need to restart your command window if this is the first dotnet tool you have installed."
diff --git a/eng/common/darc-init.sh b/eng/common/darc-init.sh
index bd7eb4639864..abdd0bc05a13 100755
--- a/eng/common/darc-init.sh
+++ b/eng/common/darc-init.sh
@@ -1,7 +1,8 @@
#!/usr/bin/env bash
source="${BASH_SOURCE[0]}"
-darcVersion="1.1.0-beta.19205.4"
+darcVersion=''
+versionEndpoint="https://maestro-prod.westus2.cloudapp.azure.com/api/assets/darc-version?api-version=2019-01-16"
while [[ $# > 0 ]]; do
opt="$(echo "$1" | awk '{print tolower($0)}')"
@@ -10,6 +11,10 @@ while [[ $# > 0 ]]; do
darcVersion=$2
shift
;;
+ --versionendpoint)
+ versionEndpoint=$2
+ shift
+ ;;
*)
echo "Invalid argument: $1"
usage
@@ -33,6 +38,10 @@ verbosity=m
. "$scriptroot/tools.sh"
+if [ -z "$darcVersion" ]; then
+ darcVersion=$(curl -X GET "$versionEndpoint" -H "accept: text/plain")
+fi
+
function InstallDarcCli {
local darc_cli_package_name="microsoft.dotnet.darc"
@@ -45,9 +54,9 @@ function InstallDarcCli {
echo $($dotnet_root/dotnet tool uninstall $darc_cli_package_name -g)
fi
- local arcadeServicesSource="https://dotnetfeed.blob.core.windows.net/dotnet-arcade/index.json"
+ local arcadeServicesSource="https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json"
- echo "Installing Darc CLI version $toolset_version..."
+ echo "Installing Darc CLI version $darcVersion..."
echo "You may need to restart your command shell if this is the first dotnet tool you have installed."
echo $($dotnet_root/dotnet tool install $darc_cli_package_name --version $darcVersion --add-source "$arcadeServicesSource" -v $verbosity -g)
}
diff --git a/eng/common/dotnet-install.cmd b/eng/common/dotnet-install.cmd
new file mode 100644
index 000000000000..b1c2642e76f7
--- /dev/null
+++ b/eng/common/dotnet-install.cmd
@@ -0,0 +1,2 @@
+@echo off
+powershell -ExecutionPolicy ByPass -NoProfile -command "& """%~dp0dotnet-install.ps1""" %*"
\ No newline at end of file
diff --git a/eng/common/dotnet-install.ps1 b/eng/common/dotnet-install.ps1
new file mode 100644
index 000000000000..0b629b8301a1
--- /dev/null
+++ b/eng/common/dotnet-install.ps1
@@ -0,0 +1,27 @@
+[CmdletBinding(PositionalBinding=$false)]
+Param(
+ [string] $verbosity = "minimal",
+ [string] $architecture = "",
+ [string] $version = "Latest",
+ [string] $runtime = "dotnet"
+)
+
+. $PSScriptRoot\tools.ps1
+
+$dotnetRoot = Join-Path $RepoRoot ".dotnet"
+
+$installdir = $dotnetRoot
+try {
+ if ($architecture -and $architecture.Trim() -eq "x86") {
+ $installdir = Join-Path $installdir "x86"
+ }
+ InstallDotNet $installdir $version $architecture $runtime $true
+}
+catch {
+ Write-Host $_
+ Write-Host $_.Exception
+ Write-Host $_.ScriptStackTrace
+ ExitWithExitCode 1
+}
+
+ExitWithExitCode 0
diff --git a/eng/common/dotnet-install.sh b/eng/common/dotnet-install.sh
new file mode 100644
index 000000000000..c3072c958af0
--- /dev/null
+++ b/eng/common/dotnet-install.sh
@@ -0,0 +1,49 @@
+#!/usr/bin/env bash
+
+source="${BASH_SOURCE[0]}"
+# resolve $source until the file is no longer a symlink
+while [[ -h "$source" ]]; do
+ scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
+ source="$(readlink "$source")"
+ # if $source was a relative symlink, we need to resolve it relative to the path where the
+ # symlink file was located
+ [[ $source != /* ]] && source="$scriptroot/$source"
+done
+scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
+
+version='Latest'
+architecture=''
+runtime='dotnet'
+while [[ $# > 0 ]]; do
+ opt="$(echo "$1" | awk '{print tolower($0)}')"
+ case "$opt" in
+ -version|-v)
+ shift
+ version="$1"
+ ;;
+ -architecture|-a)
+ shift
+ architecture="$1"
+ ;;
+ -runtime|-r)
+ shift
+ runtime="$1"
+ ;;
+ *)
+ echo "Invalid argument: $1"
+ usage
+ exit 1
+ ;;
+ esac
+ shift
+done
+
+. "$scriptroot/tools.sh"
+dotnetRoot="$repo_root/.dotnet"
+InstallDotNet $dotnetRoot $version "$architecture" $runtime true || {
+ local exit_code=$?
+ echo "dotnet-install.sh failed (exit code '$exit_code')." >&2
+ ExitWithExitCode $exit_code
+}
+
+ExitWithExitCode 0
diff --git a/eng/common/init-tools-native.ps1 b/eng/common/init-tools-native.ps1
index 495a563a7583..a4306bd37e14 100644
--- a/eng/common/init-tools-native.ps1
+++ b/eng/common/init-tools-native.ps1
@@ -41,9 +41,13 @@ Param (
[switch] $Force = $False,
[int] $DownloadRetries = 5,
[int] $RetryWaitTimeInSeconds = 30,
- [string] $GlobalJsonFile = "$PSScriptRoot\..\..\global.json"
+ [string] $GlobalJsonFile
)
+if (!$GlobalJsonFile) {
+ $GlobalJsonFile = Join-Path (Get-Item $PSScriptRoot).Parent.Parent.FullName "global.json"
+}
+
Set-StrictMode -version 2.0
$ErrorActionPreference="Stop"
diff --git a/eng/common/init-tools-native.sh b/eng/common/init-tools-native.sh
index 54b70f678ba3..fc72d13948e8 100644
--- a/eng/common/init-tools-native.sh
+++ b/eng/common/init-tools-native.sh
@@ -9,7 +9,7 @@ clean=false
force=false
download_retries=5
retry_wait_time_seconds=30
-global_json_file="${scriptroot}/../../global.json"
+global_json_file="$(dirname "$(dirname "${scriptroot}")")/global.json"
declare -A native_assets
. $scriptroot/native/common-library.sh
@@ -71,6 +71,7 @@ function ReadGlobalJsonNativeTools {
local native_tools_list=$(echo $native_tools_section | awk -F"[{}]" '{print $2}')
native_tools_list=${native_tools_list//[\" ]/}
native_tools_list=${native_tools_list//,/$'\n'}
+ native_tools_list="$(echo -e "${native_tools_list}" | tr -d '[:space:]')"
local old_IFS=$IFS
while read -r line; do
@@ -116,8 +117,6 @@ else
installer_command+=" --clean"
fi
- echo "Installing $tool version $tool_version"
- echo "Executing '$installer_command'"
$installer_command
if [[ $? != 0 ]]; then
@@ -127,19 +126,16 @@ else
done
fi
-if [[ ! -z $clean ]]; then
+if [[ $clean = true ]]; then
exit 0
fi
if [[ -d $install_bin ]]; then
echo "Native tools are available from $install_bin"
- if [[ !-z BUILD_BUILDNUMBER ]]; then
- echo "##vso[task.prependpath]$install_bin"
- fi
+ echo "##vso[task.prependpath]$install_bin"
else
echo "Native tools install directory does not exist, installation failed" >&2
exit 1
fi
exit 0
-
diff --git a/eng/common/templates/job/job.yml b/eng/common/templates/job/job.yml
index 74dd81fdc0a3..1814e0ab6124 100644
--- a/eng/common/templates/job/job.yml
+++ b/eng/common/templates/job/job.yml
@@ -43,9 +43,12 @@ parameters:
# Optional: enable sending telemetry
enableTelemetry: false
- # Optional: define the helix repo for telemeetry (example: 'dotnet/arcade')
+ # Optional: define the helix repo for telemetry (example: 'dotnet/arcade')
helixRepo: ''
+ # Optional: define the helix type for telemetry (example: 'build/product/')
+ helixType: ''
+
# Required: name of the job
name: ''
@@ -87,6 +90,9 @@ jobs:
timeoutInMinutes: ${{ parameters.timeoutInMinutes }}
variables:
+ - ${{ if eq(parameters.enableTelemetry, 'true') }}:
+ - name: DOTNET_CLI_TELEMETRY_PROFILE
+ value: '$(Build.Repository.Uri)'
- ${{ each variable in parameters.variables }}:
# handle name-value variable syntax
# example:
@@ -122,6 +128,8 @@ jobs:
displayName: 'Send Helix Start Telemetry'
inputs:
helixRepo: ${{ parameters.helixRepo }}
+ ${{ if ne(parameters.helixType, '') }}:
+ helixType: ${{ parameters.helixType }}
buildConfig: $(_BuildConfig)
runAsPublic: ${{ parameters.runAsPublic }}
continueOnError: ${{ parameters.continueOnError }}
diff --git a/eng/common/templates/steps/helix-publish.yml b/eng/common/templates/steps/helix-publish.yml
deleted file mode 100644
index 470ab65da0c6..000000000000
--- a/eng/common/templates/steps/helix-publish.yml
+++ /dev/null
@@ -1,51 +0,0 @@
-parameters:
- HelixSource: 'pr/dotnet-github-anon-kaonashi-bot'
- HelixType: Ì“'tests/default'
- HelixBuild: $(Build.BuildNumber)
- HelixTargetQueues: ''
- HelixAccessToken: ''
- HelixPreCommands: ''
- HelixPostCommands: ''
- WorkItemDirectory: ''
- WorkItemCommand: ''
- CorrelationPayloadDirectory: ''
- XUnitProjects: ''
- XUnitTargetFramework: ''
- XUnitRunnerVersion: ''
- IncludeDotNetCli: false
- DotNetCliPackageType: ''
- DotNetCliVersion: ''
- EnableXUnitReporter: false
- WaitForWorkItemCompletion: true
- condition: succeeded()
- continueOnError: false
-
-steps:
- - task: DotNetCoreCLI@2
- inputs:
- command: custom
- projects: eng/common/helixpublish.proj
- custom: msbuild
- arguments: '/bl:$(Build.SourcesDirectory)/artifacts/log/$(_BuildConfig)/SendToHelix.binlog'
- displayName: Send job to Helix
- env:
- HelixSource: ${{ parameters.HelixSource }}
- HelixType: ${{ parameters.HelixType }}
- HelixBuild: ${{ parameters.HelixBuild }}
- HelixTargetQueues: ${{ parameters.HelixTargetQueues }}
- HelixAccessToken: ${{ parameters.HelixAccessToken }}
- HelixPreCommands: ${{ parameters.HelixPreCommands }}
- HelixPostCommands: ${{ parameters.HelixPostCommands }}
- WorkItemDirectory: ${{ parameters.WorkItemDirectory }}
- WorkItemCommand: ${{ parameters.WorkItemCommand }}
- CorrelationPayloadDirectory: ${{ parameters.CorrelationPayloadDirectory }}
- XUnitProjects: ${{ parameters.XUnitProjects }}
- XUnitRuntimeTargetFramework: ${{ parameters.XUnitTargetFramework }}
- XUnitRunnerVersion: ${{ parameters.XUnitRunnerVersion }}
- IncludeDotNetCli: ${{ parameters.IncludeDotNetCli }}
- DotNetCliPackageType: ${{ parameters.DotNetCliPackageType }}
- DotNetCliVersion: ${{ parameters.DotNetCliVersion }}
- EnableXUnitReporter: ${{ parameters.EnableXUnitReporter }}
- WaitForWorkItemCompletion: ${{ parameters.WaitForWorkItemCompletion }}
- condition: ${{ parameters.condition }}
- continueOnError: ${{ parameters.continueOnError }}
diff --git a/eng/common/templates/steps/send-to-helix.yml b/eng/common/templates/steps/send-to-helix.yml
index 7c185e94147a..05df886f55f7 100644
--- a/eng/common/templates/steps/send-to-helix.yml
+++ b/eng/common/templates/steps/send-to-helix.yml
@@ -5,6 +5,7 @@ parameters:
HelixBuild: $(Build.BuildNumber) # required -- the build number Helix will use to identify this -- automatically set to the AzDO build number
HelixTargetQueues: '' # required -- semicolon delimited list of Helix queues to test on; see https://helix.dot.net/ for a list of queues
HelixAccessToken: '' # required -- access token to make Helix API requests; should be provided by the appropriate variable group
+ HelixConfiguration: '' # optional -- additional property attached to a job
HelixPreCommands: '' # optional -- commands to run before Helix work item execution
HelixPostCommands: '' # optional -- commands to run after Helix work item execution
WorkItemDirectory: '' # optional -- a payload directory to zip up and send to Helix; requires WorkItemCommand; incompatible with XUnitProjects
@@ -23,7 +24,7 @@ parameters:
WaitForWorkItemCompletion: true # optional -- true will make the task wait until work items have been completed and fail the build if work items fail. False is "fire and forget."
IsExternal: false # [DEPRECATED] -- doesn't do anything, jobs are external if HelixAccessToken is empty and Creator is set
Creator: '' # optional -- if the build is external, use this to specify who is sending the job
- DisplayNamePrefix: 'Send job to Helix' # optional -- rename the beginning of the displayName of the steps in AzDO
+ DisplayNamePrefix: 'Run Tests' # optional -- rename the beginning of the displayName of the steps in AzDO
condition: succeeded() # optional -- condition for step to execute; defaults to succeeded()
continueOnError: false # optional -- determines whether to continue the build if the step errors; defaults to false
@@ -35,6 +36,7 @@ steps:
HelixSource: ${{ parameters.HelixSource }}
HelixType: ${{ parameters.HelixType }}
HelixBuild: ${{ parameters.HelixBuild }}
+ HelixConfiguration: ${{ parameters.HelixConfiguration }}
HelixTargetQueues: ${{ parameters.HelixTargetQueues }}
HelixAccessToken: ${{ parameters.HelixAccessToken }}
HelixPreCommands: ${{ parameters.HelixPreCommands }}
@@ -64,6 +66,7 @@ steps:
HelixSource: ${{ parameters.HelixSource }}
HelixType: ${{ parameters.HelixType }}
HelixBuild: ${{ parameters.HelixBuild }}
+ HelixConfiguration: ${{ parameters.HelixConfiguration }}
HelixTargetQueues: ${{ parameters.HelixTargetQueues }}
HelixAccessToken: ${{ parameters.HelixAccessToken }}
HelixPreCommands: ${{ parameters.HelixPreCommands }}
diff --git a/eng/common/tools.ps1 b/eng/common/tools.ps1
index 5c4a129c8632..3983d719be3f 100644
--- a/eng/common/tools.ps1
+++ b/eng/common/tools.ps1
@@ -11,6 +11,12 @@
# Binary log must be enabled on CI.
[bool]$binaryLog = if (Test-Path variable:binaryLog) { $binaryLog } else { $ci }
+# Set to true to use the pipelines logger which will enable Azure logging output.
+# https://github.com/Microsoft/azure-pipelines-tasks/blob/master/docs/authoring/commands.md
+# This flag is meant as a temporary opt-opt for the feature while validate it across
+# our consumers. It will be deleted in the future.
+[bool]$pipelinesLog = if (Test-Path variable:pipelinesLog) { $pipelinesLog } else { $ci }
+
# Turns on machine preparation/clean up code that changes the machine state (e.g. kills build processes).
[bool]$prepareMachine = if (Test-Path variable:prepareMachine) { $prepareMachine } else { $false }
@@ -86,6 +92,68 @@ function Exec-Process([string]$command, [string]$commandArgs) {
}
}
+function Write-PipelineTaskError {
+ [CmdletBinding()]
+ param(
+ [Parameter(Mandatory = $true)]
+ [string]$Message,
+ [Parameter(Mandatory = $false)]
+ [string]$Type = 'error',
+ [string]$ErrCode,
+ [string]$SourcePath,
+ [string]$LineNumber,
+ [string]$ColumnNumber,
+ [switch]$AsOutput)
+
+ if(!$ci) {
+ if($Type -eq 'error') {
+ Write-Error $Message
+ return
+ }
+ elseif ($Type -eq 'warning') {
+ Write-Warning $Message
+ return
+ }
+ }
+
+ if(($Type -ne 'error') -and ($Type -ne 'warning')) {
+ Write-Host $Message
+ return
+ }
+ if(-not $PSBoundParameters.ContainsKey('Type')) {
+ $PSBoundParameters.Add('Type', 'error')
+ }
+ Write-LogIssue @PSBoundParameters
+}
+
+function Write-PipelineSetVariable {
+ [CmdletBinding()]
+ param(
+ [Parameter(Mandatory = $true)]
+ [string]$Name,
+ [string]$Value,
+ [switch]$Secret,
+ [switch]$AsOutput)
+
+ if($ci) {
+ Write-LoggingCommand -Area 'task' -Event 'setvariable' -Data $Value -Properties @{
+ 'variable' = $Name
+ 'issecret' = $Secret
+ } -AsOutput:$AsOutput
+ }
+}
+
+function Write-PipelinePrependPath {
+ [CmdletBinding()]
+ param(
+ [Parameter(Mandatory=$true)]
+ [string]$Path,
+ [switch]$AsOutput)
+ if($ci) {
+ Write-LoggingCommand -Area 'task' -Event 'prependpath' -Data $Path -AsOutput:$AsOutput
+ }
+}
+
function InitializeDotNetCli([bool]$install) {
if (Test-Path variable:global:_DotNetInstallDir) {
return $global:_DotNetInstallDir
@@ -108,7 +176,7 @@ function InitializeDotNetCli([bool]$install) {
}
# Find the first path on %PATH% that contains the dotnet.exe
- if ($useInstalledDotNetCli -and ($env:DOTNET_INSTALL_DIR -eq $null)) {
+ if ($useInstalledDotNetCli -and (-not $globalJsonHasRuntimes) -and ($env:DOTNET_INSTALL_DIR -eq $null)) {
$dotnetCmd = Get-Command "dotnet.exe" -ErrorAction SilentlyContinue
if ($dotnetCmd -ne $null) {
$env:DOTNET_INSTALL_DIR = Split-Path $dotnetCmd.Path -Parent
@@ -119,7 +187,7 @@ function InitializeDotNetCli([bool]$install) {
# Use dotnet installation specified in DOTNET_INSTALL_DIR if it contains the required SDK version,
# otherwise install the dotnet CLI and SDK to repo local .dotnet directory to avoid potential permission issues.
- if (($env:DOTNET_INSTALL_DIR -ne $null) -and (Test-Path(Join-Path $env:DOTNET_INSTALL_DIR "sdk\$dotnetSdkVersion"))) {
+ if ((-not $globalJsonHasRuntimes) -and ($env:DOTNET_INSTALL_DIR -ne $null) -and (Test-Path(Join-Path $env:DOTNET_INSTALL_DIR "sdk\$dotnetSdkVersion"))) {
$dotnetRoot = $env:DOTNET_INSTALL_DIR
} else {
$dotnetRoot = Join-Path $RepoRoot ".dotnet"
@@ -128,7 +196,7 @@ function InitializeDotNetCli([bool]$install) {
if ($install) {
InstallDotNetSdk $dotnetRoot $dotnetSdkVersion
} else {
- Write-Host "Unable to find dotnet with SDK version '$dotnetSdkVersion'" -ForegroundColor Red
+ Write-PipelineTaskError "Unable to find dotnet with SDK version '$dotnetSdkVersion'"
ExitWithExitCode 1
}
}
@@ -141,18 +209,16 @@ function InitializeDotNetCli([bool]$install) {
# It also ensures that VS msbuild will use the downloaded sdk targets.
$env:PATH = "$dotnetRoot;$env:PATH"
- if ($ci) {
- # Make Sure that our bootstrapped dotnet cli is avaliable in future steps of the Azure Pipelines build
- Write-Host "##vso[task.prependpath]$dotnetRoot"
- Write-Host "##vso[task.setvariable variable=DOTNET_MULTILEVEL_LOOKUP]0"
- Write-Host "##vso[task.setvariable variable=DOTNET_SKIP_FIRST_TIME_EXPERIENCE]1"
- }
+ # Make Sure that our bootstrapped dotnet cli is avaliable in future steps of the Azure Pipelines build
+ Write-PipelinePrependPath -Path $dotnetRoot
+ Write-PipelineSetVariable -Name 'DOTNET_MULTILEVEL_LOOKUP' -Value '0'
+ Write-PipelineSetVariable -Name 'DOTNET_SKIP_FIRST_TIME_EXPERIENCE' -Value '1'
return $global:_DotNetInstallDir = $dotnetRoot
}
function GetDotNetInstallScript([string] $dotnetRoot) {
- $installScript = "$dotnetRoot\dotnet-install.ps1"
+ $installScript = Join-Path $dotnetRoot "dotnet-install.ps1"
if (!(Test-Path $installScript)) {
Create-Directory $dotnetRoot
Invoke-WebRequest "https://dot.net/v1/dotnet-install.ps1" -OutFile $installScript
@@ -162,11 +228,23 @@ function GetDotNetInstallScript([string] $dotnetRoot) {
}
function InstallDotNetSdk([string] $dotnetRoot, [string] $version, [string] $architecture = "") {
+ InstallDotNet $dotnetRoot $version $architecture
+}
+
+function InstallDotNet([string] $dotnetRoot, [string] $version, [string] $architecture = "", [string] $runtime = "", [bool] $skipNonVersionedFiles = $false) { $installScript = GetDotNetInstallScript $dotnetRoot
$installScript = GetDotNetInstallScript $dotnetRoot
- $archArg = if ($architecture) { $architecture } else { "" }
- & $installScript -Version $version -InstallDir $dotnetRoot -Architecture $archArg
+ $installParameters = @{
+ Version = $version
+ InstallDir = $dotnetRoot
+ }
+
+ if ($architecture) { $installParameters.Architecture = $architecture }
+ if ($runtime) { $installParameters.Runtime = $runtime }
+ if ($skipNonVersionedFiles) { $installParameters.SkipNonVersionedFiles = $skipNonVersionedFiles }
+
+ & $installScript @installParameters
if ($lastExitCode -ne 0) {
- Write-Host "Failed to install dotnet cli (exit code '$lastExitCode')." -ForegroundColor Red
+ Write-PipelineTaskError -Message "Failed to install dotnet cli (exit code '$lastExitCode')."
ExitWithExitCode $lastExitCode
}
}
@@ -195,7 +273,11 @@ function InitializeVisualStudioMSBuild([bool]$install, [object]$vsRequirements =
if ($env:VSINSTALLDIR -ne $null) {
$msbuildCmd = Get-Command "msbuild.exe" -ErrorAction SilentlyContinue
if ($msbuildCmd -ne $null) {
- if ($msbuildCmd.Version -ge $vsMinVersion) {
+ # Workaround for https://github.com/dotnet/roslyn/issues/35793
+ # Due to this issue $msbuildCmd.Version returns 0.0.0.0 for msbuild.exe 16.2+
+ $msbuildVersion = [Version]::new((Get-Item $msbuildCmd.Path).VersionInfo.ProductVersion.Split(@('-', '+'))[0])
+
+ if ($msbuildVersion -ge $vsMinVersion) {
return $global:_MSBuildExe = $msbuildCmd.Path
}
@@ -336,22 +418,22 @@ function InitializeBuildTool() {
if ($msbuildEngine -eq "dotnet") {
if (!$dotnetRoot) {
- Write-Host "/global.json must specify 'tools.dotnet'." -ForegroundColor Red
+ Write-PipelineTaskError "/global.json must specify 'tools.dotnet'."
ExitWithExitCode 1
}
- $buildTool = @{ Path = Join-Path $dotnetRoot "dotnet.exe"; Command = "msbuild" }
+ $buildTool = @{ Path = Join-Path $dotnetRoot "dotnet.exe"; Command = "msbuild"; Tool = "dotnet"; Framework = "netcoreapp2.1" }
} elseif ($msbuildEngine -eq "vs") {
try {
$msbuildPath = InitializeVisualStudioMSBuild -install:$restore
} catch {
- Write-Host $_ -ForegroundColor Red
+ Write-PipelineTaskError $_
ExitWithExitCode 1
}
- $buildTool = @{ Path = $msbuildPath; Command = "" }
+ $buildTool = @{ Path = $msbuildPath; Command = ""; Tool = "vs"; Framework = "net472" }
} else {
- Write-Host "Unexpected value of -msbuildEngine: '$msbuildEngine'." -ForegroundColor Red
+ Write-PipelineTaskError "Unexpected value of -msbuildEngine: '$msbuildEngine'."
ExitWithExitCode 1
}
@@ -368,7 +450,7 @@ function GetDefaultMSBuildEngine() {
return "dotnet"
}
- Write-Host "-msbuildEngine must be specified, or /global.json must specify 'tools.dotnet' or 'tools.vs'." -ForegroundColor Red
+ Write-PipelineTaskError "-msbuildEngine must be specified, or /global.json must specify 'tools.dotnet' or 'tools.vs'."
ExitWithExitCode 1
}
@@ -391,6 +473,16 @@ function GetSdkTaskProject([string]$taskName) {
return Join-Path (Split-Path (InitializeToolset) -Parent) "SdkTasks\$taskName.proj"
}
+function InitializeNativeTools() {
+ if (Get-Member -InputObject $GlobalJson -Name "native-tools") {
+ $nativeArgs=""
+ if ($ci) {
+ $nativeArgs = "-InstallDirectory $ToolsDir"
+ }
+ Invoke-Expression "& `"$PSScriptRoot/init-tools-native.ps1`" $nativeArgs"
+ }
+}
+
function InitializeToolset() {
if (Test-Path variable:global:_ToolsetBuildProj) {
return $global:_ToolsetBuildProj
@@ -409,7 +501,7 @@ function InitializeToolset() {
}
if (-not $restore) {
- Write-Host "Toolset version $toolsetVersion has not been restored." -ForegroundColor Red
+ Write-PipelineTaskError "Toolset version $toolsetVersion has not been restored."
ExitWithExitCode 1
}
@@ -419,7 +511,8 @@ function InitializeToolset() {
$bl = if ($binaryLog) { "/bl:" + (Join-Path $LogDir "ToolsetRestore.binlog") } else { "" }
'' | Set-Content $proj
- MSBuild $proj $bl /t:__WriteToolsetLocation /clp:ErrorsOnly`;NoSummary /p:__ToolsetLocationOutputFile=$toolsetLocationFile
+
+ MSBuild-Core $proj $bl /t:__WriteToolsetLocation /clp:ErrorsOnly`;NoSummary /p:__ToolsetLocationOutputFile=$toolsetLocationFile
$path = Get-Content $toolsetLocationFile -TotalCount 1
if (!(Test-Path $path)) {
@@ -449,6 +542,23 @@ function Stop-Processes() {
# Terminates the script if the build fails.
#
function MSBuild() {
+ if ($pipelinesLog) {
+ $buildTool = InitializeBuildTool
+ $toolsetBuildProject = InitializeToolset
+ $path = Split-Path -parent $toolsetBuildProject
+ $path = Join-Path $path (Join-Path $buildTool.Framework "Microsoft.DotNet.Arcade.Sdk.dll")
+ $args += "/logger:$path"
+ }
+
+ MSBuild-Core @args
+}
+
+#
+# Executes msbuild (or 'dotnet msbuild') with arguments passed to the function.
+# The arguments are automatically quoted.
+# Terminates the script if the build fails.
+#
+function MSBuild-Core() {
if ($ci) {
if (!$binaryLog) {
throw "Binary log must be enabled in CI build."
@@ -476,7 +586,7 @@ function MSBuild() {
$exitCode = Exec-Process $buildTool.Path $cmdArgs
if ($exitCode -ne 0) {
- Write-Host "Build failed." -ForegroundColor Red
+ Write-PipelineTaskError "Build failed."
$buildLog = GetMSBuildBinaryLogCommandLineArgument $args
if ($buildLog -ne $null) {
@@ -504,6 +614,8 @@ function GetMSBuildBinaryLogCommandLineArgument($arguments) {
return $null
}
+. $PSScriptRoot\LoggingCommandFunctions.ps1
+
$RepoRoot = Resolve-Path (Join-Path $PSScriptRoot "..\..")
$EngRoot = Resolve-Path (Join-Path $PSScriptRoot "..")
$ArtifactsDir = Join-Path $RepoRoot "artifacts"
@@ -512,16 +624,15 @@ $ToolsDir = Join-Path $RepoRoot ".tools"
$LogDir = Join-Path (Join-Path $ArtifactsDir "log") $configuration
$TempDir = Join-Path (Join-Path $ArtifactsDir "tmp") $configuration
$GlobalJson = Get-Content -Raw -Path (Join-Path $RepoRoot "global.json") | ConvertFrom-Json
+# true if global.json contains a "runtimes" section
+$globalJsonHasRuntimes = if ($GlobalJson.tools.PSObject.Properties.Name -Match 'runtimes') { $true } else { $false }
Create-Directory $ToolsetDir
Create-Directory $TempDir
Create-Directory $LogDir
-if ($ci) {
- Write-Host "##vso[task.setvariable variable=Artifacts]$ArtifactsDir"
- Write-Host "##vso[task.setvariable variable=Artifacts.Toolset]$ToolsetDir"
- Write-Host "##vso[task.setvariable variable=Artifacts.Log]$LogDir"
-
- $env:TEMP = $TempDir
- $env:TMP = $TempDir
-}
+Write-PipelineSetVariable -Name 'Artifacts' -Value $ArtifactsDir
+Write-PipelineSetVariable -Name 'Artifacts.Toolset' -Value $ToolsetDir
+Write-PipelineSetVariable -Name 'Artifacts.Log' -Value $LogDir
+Write-PipelineSetVariable -Name 'TEMP' -Value $TempDir
+Write-PipelineSetVariable -Name 'TMP' -Value $TempDir
diff --git a/eng/common/tools.sh b/eng/common/tools.sh
index ecdece1f8552..fd26f6fbb275 100644
--- a/eng/common/tools.sh
+++ b/eng/common/tools.sh
@@ -1,8 +1,20 @@
+#!/usr/bin/env bash
+
# Initialize variables if they aren't already defined.
# CI mode - set to true on CI server for PR validation build or official build.
ci=${ci:-false}
+# Set to true to use the pipelines logger which will enable Azure logging output.
+# https://github.com/Microsoft/azure-pipelines-tasks/blob/master/docs/authoring/commands.md
+# This flag is meant as a temporary opt-opt for the feature while validate it across
+# our consumers. It will be deleted in the future.
+if [[ "$ci" == true ]]; then
+ pipelines_log=${pipelines_log:-true}
+else
+ pipelines_log=${pipelines_log:-false}
+fi
+
# Build configuration. Common values include 'Debug' and 'Release', but the repository may use other names.
configuration=${configuration:-'Debug'}
@@ -40,6 +52,78 @@ else
use_global_nuget_cache=${use_global_nuget_cache:-true}
fi
+function EmitError {
+ if [[ "$ci" != true ]]; then
+ echo "$@" >&2
+ return
+ fi
+
+ message_type="error"
+ sourcepath=''
+ linenumber=''
+ columnnumber=''
+ error_code=''
+
+ while [[ $# -gt 0 ]]; do
+ opt="$(echo "${1/#--/-}" | awk '{print tolower($0)}')"
+ case "$opt" in
+ -type|-t)
+ message_type=$2
+ shift
+ ;;
+ -sourcepath|-s)
+ sourcepath=$2
+ shift
+ ;;
+ -linenumber|-l)
+ linenumber=$2
+ shift
+ ;;
+ -columnnumber|-col)
+ columnnumber=$2
+ shift
+ ;;
+ -code|-c)
+ error_code=$2
+ shift
+ ;;
+ *)
+ break
+ ;;
+ esac
+
+ shift
+ done
+
+ message='##vso[task.logissue'
+
+ message="$message type=$message_type"
+
+ if [ -n "$sourcepath" ]; then
+ message="$message;sourcepath=$sourcepath"
+ else
+ message="$message;sourcepath=${BASH_SOURCE[1]}"
+ fi
+
+ if [ -n "$linenumber" ]; then
+ message="$message;linenumber=$linenumber"
+ else
+ message="$message;linenumber=${BASH_LINENO[0]}"
+ fi
+
+ if [ -n "$columnnumber" ]; then
+ message="$message;columnnumber=$columnnumber"
+ fi
+
+ if [ -n "$error_code" ]; then
+ message="$message;code=$error_code"
+ fi
+
+ message="$message]$*"
+
+ echo "$message"
+}
+
# Resolve any symlinks in the given path.
function ResolvePath {
local path=$1
@@ -65,7 +149,7 @@ function ReadGlobalVersion {
local pattern="\"$key\" *: *\"(.*)\""
if [[ ! $line =~ $pattern ]]; then
- echo "Error: Cannot find \"$key\" in $global_json_file" >&2
+ EmitError "Error: Cannot find \"$key\" in $global_json_file"
ExitWithExitCode 1
fi
@@ -101,7 +185,7 @@ function InitializeDotNetCli {
fi
# Find the first path on $PATH that contains the dotnet.exe
- if [[ "$use_installed_dotnet_cli" == true && -z "${DOTNET_INSTALL_DIR:-}" ]]; then
+ if [[ "$use_installed_dotnet_cli" == true && $global_json_has_runtimes == false && -z "${DOTNET_INSTALL_DIR:-}" ]]; then
local dotnet_path=`command -v dotnet`
if [[ -n "$dotnet_path" ]]; then
ResolvePath "$dotnet_path"
@@ -115,17 +199,18 @@ function InitializeDotNetCli {
# Use dotnet installation specified in DOTNET_INSTALL_DIR if it contains the required SDK version,
# otherwise install the dotnet CLI and SDK to repo local .dotnet directory to avoid potential permission issues.
- if [[ -n "${DOTNET_INSTALL_DIR:-}" && -d "$DOTNET_INSTALL_DIR/sdk/$dotnet_sdk_version" ]]; then
+ if [[ $global_json_has_runtimes == false && -n "${DOTNET_INSTALL_DIR:-}" && -d "$DOTNET_INSTALL_DIR/sdk/$dotnet_sdk_version" ]]; then
dotnet_root="$DOTNET_INSTALL_DIR"
else
dotnet_root="$repo_root/.dotnet"
+
export DOTNET_INSTALL_DIR="$dotnet_root"
if [[ ! -d "$DOTNET_INSTALL_DIR/sdk/$dotnet_sdk_version" ]]; then
if [[ "$install" == true ]]; then
InstallDotNetSdk "$dotnet_root" "$dotnet_sdk_version"
else
- echo "Unable to find dotnet with SDK version '$dotnet_sdk_version'" >&2
+ EmitError "Unable to find dotnet with SDK version '$dotnet_sdk_version'"
ExitWithExitCode 1
fi
fi
@@ -149,18 +234,36 @@ function InitializeDotNetCli {
function InstallDotNetSdk {
local root=$1
local version=$2
+ local architecture=""
+ if [[ $# == 3 ]]; then
+ architecture=$3
+ fi
+ InstallDotNet "$root" "$version" $architecture
+}
+function InstallDotNet {
+ local root=$1
+ local version=$2
+
GetDotNetInstallScript "$root"
local install_script=$_GetDotNetInstallScript
- local arch_arg=""
- if [[ $# == 3 ]]; then
- arch_arg="--architecture $3"
+ local archArg=''
+ if [[ -n "${3:-}" ]]; then
+ archArg="--architecture $3"
+ fi
+ local runtimeArg=''
+ if [[ -n "${4:-}" ]]; then
+ runtimeArg="--runtime $4"
fi
- bash "$install_script" --version $version --install-dir "$root" $arch_arg || {
+ local skipNonVersionedFilesArg=""
+ if [[ "$#" -ge "5" ]]; then
+ skipNonVersionedFilesArg="--skip-non-versioned-files"
+ fi
+ bash "$install_script" --version $version --install-dir "$root" $archArg $runtimeArg $skipNonVersionedFilesArg || {
local exit_code=$?
- echo "Failed to install dotnet SDK (exit code '$exit_code')." >&2
+ EmitError "Failed to install dotnet SDK (exit code '$exit_code')."
ExitWithExitCode $exit_code
}
}
@@ -197,6 +300,7 @@ function InitializeBuildTool {
# return values
_InitializeBuildTool="$_InitializeDotNetCli/dotnet"
_InitializeBuildToolCommand="msbuild"
+ _InitializeBuildToolFramework="netcoreapp2.1"
}
function GetNuGetPackageCachePath {
@@ -212,6 +316,17 @@ function GetNuGetPackageCachePath {
_GetNuGetPackageCachePath=$NUGET_PACKAGES
}
+function InitializeNativeTools() {
+ if grep -Fq "native-tools" $global_json_file
+ then
+ local nativeArgs=""
+ if [[ "$ci" == true ]]; then
+ nativeArgs="-InstallDirectory $tools_dir"
+ fi
+ "$_script_dir/init-tools-native.sh" $nativeArgs
+ fi
+}
+
function InitializeToolset {
if [[ -n "${_InitializeToolset:-}" ]]; then
return
@@ -234,7 +349,7 @@ function InitializeToolset {
fi
if [[ "$restore" != true ]]; then
- echo "Toolset version $toolsetVersion has not been restored." >&2
+ EmitError "Toolset version $toolsetVersion has not been restored."
ExitWithExitCode 2
fi
@@ -246,12 +361,12 @@ function InitializeToolset {
fi
echo '' > "$proj"
- MSBuild "$proj" $bl /t:__WriteToolsetLocation /clp:ErrorsOnly\;NoSummary /p:__ToolsetLocationOutputFile="$toolset_location_file"
+ MSBuild-Core "$proj" $bl /t:__WriteToolsetLocation /clp:ErrorsOnly\;NoSummary /p:__ToolsetLocationOutputFile="$toolset_location_file"
local toolset_build_proj=`cat "$toolset_location_file"`
if [[ ! -a "$toolset_build_proj" ]]; then
- echo "Invalid toolset path: $toolset_build_proj" >&2
+ EmitError "Invalid toolset path: $toolset_build_proj"
ExitWithExitCode 3
fi
@@ -274,14 +389,27 @@ function StopProcesses {
}
function MSBuild {
+ local args=$@
+ if [[ "$pipelines_log" == true ]]; then
+ InitializeBuildTool
+ InitializeToolset
+ local toolset_dir="${_InitializeToolset%/*}"
+ local logger_path="$toolset_dir/$_InitializeBuildToolFramework/Microsoft.DotNet.Arcade.Sdk.dll"
+ args=( "${args[@]}" "-logger:$logger_path" )
+ fi
+
+ MSBuild-Core ${args[@]}
+}
+
+function MSBuild-Core {
if [[ "$ci" == true ]]; then
if [[ "$binary_log" != true ]]; then
- echo "Binary log must be enabled in CI build." >&2
+ EmitError "Binary log must be enabled in CI build."
ExitWithExitCode 1
fi
if [[ "$node_reuse" == true ]]; then
- echo "Node reuse must be disabled in CI build." >&2
+ EmitError "Node reuse must be disabled in CI build."
ExitWithExitCode 1
fi
fi
@@ -295,7 +423,7 @@ function MSBuild {
"$_InitializeBuildTool" "$_InitializeBuildToolCommand" /m /nologo /clp:Summary /v:$verbosity /nr:$node_reuse $warnaserror_switch /p:TreatWarningsAsErrors=$warn_as_error /p:ContinuousIntegrationBuild=$ci "$@" || {
local exit_code=$?
- echo "Build failed (exit code '$exit_code')." >&2
+ EmitError "Build failed (exit code '$exit_code')."
ExitWithExitCode $exit_code
}
}
@@ -307,10 +435,17 @@ eng_root=`cd -P "$_script_dir/.." && pwd`
repo_root=`cd -P "$_script_dir/../.." && pwd`
artifacts_dir="$repo_root/artifacts"
toolset_dir="$artifacts_dir/toolset"
+tools_dir="$repo_root/.tools"
log_dir="$artifacts_dir/log/$configuration"
temp_dir="$artifacts_dir/tmp/$configuration"
global_json_file="$repo_root/global.json"
+# determine if global.json contains a "runtimes" entry
+global_json_has_runtimes=false
+dotnetlocal_key=`grep -m 1 "runtimes" "$global_json_file"` || true
+if [[ -n "$dotnetlocal_key" ]]; then
+ global_json_has_runtimes=true
+fi
# HOME may not be defined in some scenarios, but it is required by NuGet
if [[ -z $HOME ]]; then
@@ -325,4 +460,4 @@ mkdir -p "$log_dir"
if [[ $ci == true ]]; then
export TEMP="$temp_dir"
export TMP="$temp_dir"
-fi
+fi
\ No newline at end of file
diff --git a/eng/configurations/targetgroups.props b/eng/configurations/targetgroups.props
index 320103337fdb..5878d40d2532 100644
--- a/eng/configurations/targetgroups.props
+++ b/eng/configurations/targetgroups.props
@@ -42,7 +42,7 @@
aottrueuap10.0.16299aot
- uapvnext;netstandard2.0
+ uapvnext;netstandard2.1$(UAPvNextTFM)
@@ -50,7 +50,7 @@
$(UAPvNextVersion)trueuap10.0.16299
- netstandard2.0
+ netstandard2.1
@@ -59,7 +59,7 @@
$(UAPvNextVersion)trueuapvnext
- netstandard
+ netstandard2.1
@@ -69,7 +69,7 @@
aottrueuapvnextaot
- uap;netstandard
+ uap;netstandard2.1netstandard1.0
@@ -126,6 +126,13 @@
truenetstandard1.6
+
+ netstandard2.1
+
+ true
+ netstandard
+ netstandard2.0
@@ -157,14 +164,14 @@
3.0netcoreapp3.0netcoreapp2.2
- netstandard
+ netstandard2.13.0netcoreapp3.0netcoreapp3.0
- netstandard
+ netstandard2.1net45
diff --git a/eng/configure-toolset.ps1 b/eng/configure-toolset.ps1
deleted file mode 100644
index 637e9869e2f7..000000000000
--- a/eng/configure-toolset.ps1
+++ /dev/null
@@ -1,5 +0,0 @@
-# We depend on a local cli for a number of our buildtool
-# commands like init-tools so for now we need to disable
-# using the globally installed dotnet
-
-$script:useInstalledDotNetCli = $false
diff --git a/eng/configure-toolset.sh b/eng/configure-toolset.sh
deleted file mode 100644
index 267c180859f8..000000000000
--- a/eng/configure-toolset.sh
+++ /dev/null
@@ -1,5 +0,0 @@
-# We depend on a local cli for a number of our buildtool
-# commands like init-tools so for now we need to disable
-# using the globally installed dotnet
-
-useInstalledDotNetCli=false
\ No newline at end of file
diff --git a/eng/depProj.targets b/eng/depProj.targets
index 11b70d940762..ce8fcd6b06f3 100644
--- a/eng/depProj.targets
+++ b/eng/depProj.targets
@@ -111,6 +111,13 @@ See the LICENSE file in the project root for more information.
+
+
+
+
+
+
- c86a1e0c3659a3046d43dc278e9711cd23002d97
- c86a1e0c3659a3046d43dc278e9711cd23002d97
- 8bd1ec5fac9f0eec34ff6b34b1d878b4359e02dd
-
-
-
-
-
- 4.4.0
+ 9fc9c2df2bf2681e69651664461887c759d0e1e5
- beta-27612-00
- beta-27612-00
- 1.0.0-beta-27612-00
-
-
- 4.4.0
-
-
- 16.0.1
- 2.4.1-pre.build.4059
- 1.0.0-beta-build0020
- 2.0.5
- 1.0.31
-
-
- 1.4.0
- 4.0.5
-
- 4.6.0-alpha-00001
- $(ProjectNTfsTestILCPackageVersion)
- $(ProjectNTfsTestILCPackageVersion)
- $(ProjectNTfsTestILCPackageVersion)
-
-
-
-
- Microsoft.SymbolUploader.Build.Task
- 1.0.0-beta-63604-05
+ beta-27731-00
@@ -60,18 +25,10 @@
-
- $(BaseDotNetBuildInfo)sni/$(DependencyBranch)
- $(SniCurrentRef)
- $(BaseDotNetBuildInfo)projectn-tfs/$(DependencyBranch)$(ProjectNTfsCurrentRef)
-
- $(BaseDotNetBuildInfo)projectn-tfs-testilc/$(DependencyBranch)
- $(ProjectNTfsTestILCCurrentRef)
- https://raw.githubusercontent.com/dotnet/versions
@@ -82,61 +39,5 @@
ProjectNTfsExpectedPrereleaseProjectNTfs
-
- $(MSBuildThisFileFullPath)
- ProjectNTfsTestILCExpectedPrerelease
- ProjectNTfsTestILC
-
-
- $(MSBuildThisFileFullPath)
- ProjectNTfsTestILCPackageVersion
- TestILC.amd64ret
-
-
- $(MSBuildThisFileFullPath)
- RuntimeWinX64RuntimeNativeSystemDataSqlClientSniPackageVersion
- runtime.win-x64.runtime.native.System.Data.SqlClient.sni
-
-
-
-
-
-
-
-
-
-
-
- 1.0.1
-
-
-
- 1.0.5
-
-
-
-
-
-
- $(XUnitPackageVersion)
-
-
-
-
-
-
-
- $(XUnitPerformancePackageVersion)
-
-
-
- %(Identity)
- true
-
-
-
-
-
diff --git a/eng/dir.traversal.targets b/eng/dir.traversal.targets
index c9bbb50c019e..e5f0f1b2cf2a 100644
--- a/eng/dir.traversal.targets
+++ b/eng/dir.traversal.targets
@@ -1,32 +1,6 @@
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
$(MSBuildProjectDefaultTargets)
diff --git a/eng/internal/NuGet.config b/eng/internal/NuGet.config
index f3a94002b19a..885f44c10936 100644
--- a/eng/internal/NuGet.config
+++ b/eng/internal/NuGet.config
@@ -7,7 +7,6 @@
-
diff --git a/eng/pipelines/corefx-base.yml b/eng/pipelines/corefx-base.yml
index 67a02a0391a3..9f98999bded1 100644
--- a/eng/pipelines/corefx-base.yml
+++ b/eng/pipelines/corefx-base.yml
@@ -22,8 +22,8 @@ parameters:
# _framework: (netcoreapp, netfx, uap, etc).
# _helixQueues: Windows.Amd64 (Only needed if submitToHelix -> true.) -- Queues should be separated by + if multiple.
- # Required: as part of the variables object, the following values need to be passed:
- # _outerloop: true | false
+ # Required: empty | innerloop | outerloop | all
+ testScope: ''
# Optional: _publishTests -> Boolean -> Publish test assets to blob storage if true.
# Default: false
@@ -75,6 +75,10 @@ jobs:
- _msbuildCommonParameters: ''
- _archiveTestsParameter: ''
- _finalFrameworkArg: -framework $(_framework)
+ - _testScopeArg: ''
+
+ - ${{ if ne(parameters.testScope, '') }}:
+ - _testScopeArg: -testscope ${{ parameters.testScope }}
- ${{ if ne(job._jobFramework, '')}}:
- _finalFrameworkArg: ${{ job._jobFramework }}
@@ -142,15 +146,13 @@ jobs:
restoreDirectory: '$(Build.SourcesDirectory)\.packages'
verbosityRestore: 'normal'
externalFeedCredentials: 'dotnet-core-internal-tooling'
- env:
- TargetGroup: $(_framework)
- ${{ if eq(job.customBuildSteps[0], '') }}:
- script: $(_buildScript)
-build
-buildtests
$(_commonArguments)
- /p:OuterLoop=$(_outerloop)
+ $(_testScopeArg)
$(_msbuildCommonParameters)
displayName: Build Sources and Tests
@@ -189,26 +191,23 @@ jobs:
- template: /eng/pipelines/helix.yml
parameters:
+ # send tests to helix only on public builds, official scheduled builds or manual official builds.
+ condition: eq(${{ parameters.isOfficialBuild }}, False)
targetOS: ${{ parameters.targetOS }}
archGroup: $(_architecture)
configuration: $(_BuildConfig)
helixQueues: $(_helixQueues)
msbuildScript: $(_msbuildCommand)
framework: $(_framework)
- outerloop: $(_outerloop)
- enableAzurePipelinesReporter: false
+ testScope: ${{ parameters.testScope }}
${{ if eq(parameters.isOfficialBuild, 'true') }}:
- isExternal: false
- waitForCompletion: false
officialBuildId: $(Build.BuildNumber)
helixToken: $(HelixApiAccessToken)
${{ if eq(parameters.isOfficialBuild, 'false') }}:
# TODO: SET Creator to the PR owner whenever Azure DevOps supports a good way to retrieve it.
creator: dotnet-bot
- isExternal: true
- waitForCompletion: true
helixToken: ''
- ${{ if eq(parameters.isOfficialBuild, 'true') }}:
diff --git a/eng/pipelines/freebsd.yml b/eng/pipelines/freebsd.yml
index 4f35c108455f..5c18391311ee 100644
--- a/eng/pipelines/freebsd.yml
+++ b/eng/pipelines/freebsd.yml
@@ -1,9 +1,20 @@
-# FreeBSD leg. Only for used in Official Builds
+# FreeBSD leg
+parameters:
+ # Required: value to specify if the job is comming from an official build to run extra steps and sign binaries
+ # Default: false
+ isOfficialBuild: false
+ # Required: value to specify if the full test matrix should be tested
+ # Default: false
+ fullMatrix: false
+ # Optional: value to scope the tests.
+ # Default: empty
+ testScope: ''
jobs:
- template: corefx-base.yml
parameters:
- isOfficialBuild: true
+ isOfficialBuild: ${{ parameters.isOfficialBuild }}
+ testScope: ${{ parameters.testScope }}
targetOS: FreeBSD
jobs:
@@ -21,7 +32,3 @@ jobs:
buildScriptPrefix: $(_buildScriptPrefix)
submitToHelix: false
-
- variables:
- - _skipTests: true
- - _outerloop: true # Only runs in official builds
diff --git a/eng/pipelines/helix.yml b/eng/pipelines/helix.yml
index b6395d277952..b1f0c74396f9 100644
--- a/eng/pipelines/helix.yml
+++ b/eng/pipelines/helix.yml
@@ -5,13 +5,11 @@ parameters:
framework: ''
helixQueues: ''
helixToken: ''
- isExternal: '' # true | false
msbuildScript: ''
targetOS: ''
- waitForCompletion: '' # true | false
officialBuildId: ''
- enableAzurePipelinesReporter: '' # true | false
- outerloop: '' # true | false
+ testScope: '' # empty | innerloop | outerloop | all
+ condition: always()
steps:
- script: ${{ parameters.msbuildScript }}
@@ -20,17 +18,15 @@ steps:
/p:ArchGroup=${{ parameters.archGroup }}
/p:ConfigurationGroup=${{ parameters.configuration }}
/p:OSGroup=${{ parameters.targetOS }}
- /p:OuterLoop=${{ parameters.outerloop }}
+ /p:testScope=${{ parameters.testScope }}
/p:TargetGroup=${{ parameters.framework }}
/p:HelixTargetQueues=${{ parameters.helixQueues }}
/p:HelixBuild=$(Build.BuildNumber)
/p:HelixAccessToken=${{ parameters.helixToken }}
- /p:WaitForWorkItemCompletion=${{ parameters.waitForCompletion }}
- /p:IsExternal=${{ parameters.isExternal }}
/p:Creator=${{ parameters.creator }}
/p:OfficialBuildId=${{ parameters.officialBuildId }}
- /p:EnableAzurePipelinesReporter=${{ parameters.enableAzurePipelinesReporter }}
/bl:$(Build.SourcesDirectory)/artifacts/log/$(_BuildConfig)/SendToHelix.binlog
displayName: Send to Helix
+ condition: and(succeeded(), ${{ parameters.condition }})
env:
SYSTEM_ACCESSTOKEN: $(System.AccessToken) # We need to set this env var to publish helix results to Azure Dev Ops
diff --git a/eng/pipelines/linux.yml b/eng/pipelines/linux.yml
index 2b623afeb34c..49c1e60cf544 100644
--- a/eng/pipelines/linux.yml
+++ b/eng/pipelines/linux.yml
@@ -3,15 +3,18 @@ parameters:
# Required: value to specify if the job is comming from an official build to run extra steps and sign binaries
# Default: false
isOfficialBuild: false
- # Required: value to specify if the build is comming from an outerloop pipeline.
+ # Required: value to specify if the full test matrix should be tested
# Default: false
- isOuterloopBuild: false
+ fullMatrix: false
+ # Optional: value to scope the tests.
+ # Default: empty
+ testScope: ''
jobs:
-
- template: corefx-base.yml
parameters:
isOfficialBuild: ${{ parameters.isOfficialBuild }}
+ testScope: ${{ parameters.testScope }}
targetOS: Linux
jobs:
@@ -38,6 +41,7 @@ jobs:
_dockerContainer: ubuntu_1604_arm64_cross_container
_buildScriptPrefix: 'ROOTFS_DIR=/crossrootfs/arm64 '
_buildExtraArguments: -warnAsError false
+ _publishTests: true
musl_x64_Release:
_BuildConfig: Release
@@ -47,8 +51,9 @@ jobs:
_dockerContainer: alpine_36_container
_buildScriptPrefix: ''
_buildExtraArguments: /p:RuntimeOS=linux-musl
+ _publishTests: true
- ${{ if eq(parameters.isOuterloopBuild, 'true') }}:
+ ${{ if or(eq(parameters.testScope, 'outerloop'), eq(parameters.testScope, 'all')) }}:
x64_Debug:
_BuildConfig: Debug
_architecture: x64
@@ -76,7 +81,7 @@ jobs:
_buildScriptPrefix: ''
_buildExtraArguments: /p:RuntimeOS=linux-musl
- ${{ if eq(parameters.isOfficialBuild, 'true') }}:
+ ${{ if eq(parameters.fullMatrix, 'true') }}:
arm_Release:
_BuildConfig: Release
_architecture: arm
@@ -85,6 +90,7 @@ jobs:
_dockerContainer: ubuntu_1604_arm_cross_container
_buildScriptPrefix: 'ROOTFS_DIR=/crossrootfs/arm '
_buildExtraArguments: -warnAsError false
+ _publishTests: true
musl_arm64_Release:
_BuildConfig: Release
@@ -94,6 +100,7 @@ jobs:
_dockerContainer: alpine_37_arm64_container
_buildScriptPrefix: 'ROOTFS_DIR=/crossrootfs/arm64 '
_buildExtraArguments: -warnAsError false /p:BuildNativeCompiler=--clang5.0 /p:RuntimeOS=linux-musl
+ _publishTests: true
pool:
name: Hosted Ubuntu 1604
@@ -104,26 +111,21 @@ jobs:
submitToHelix: true
variables:
- - _skipTests: true
- - _outerloop: ${{ parameters.isOfficialBuild }}
- - ${{ if eq(parameters.isOuterloopBuild, 'true') }}:
- - _outerloop: true
-
- - ${{ if eq(parameters.isOfficialBuild, 'false') }}:
- - linuxDefaultQueues: Centos.7.Amd64.Open+RedHat.7.Amd64.Open+Debian.8.Amd64.Open+Ubuntu.1604.Amd64.Open+Ubuntu.1804.Amd64.Open+OpenSuse.42.Amd64.Open+\(Fedora.28.Amd64\)ubuntu.1604.amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-28-helix-45b1fa2-20190402012449
- - linuxArm64Queues: \(Ubuntu.1604.Arm64\)Ubuntu.1604.Arm64.Docker.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-16.04-helix-arm64v8-b049512-20190321153539
- - alpineQueues: \(Alpine.38.Amd64\)ubuntu.1604.amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.8-helix-45b1fa2-20190327215821
-
- - ${{ if eq(parameters.isOfficialBuild, 'true') }}:
- - linuxDefaultQueues: Centos.7.Amd64+RedHat.7.Amd64+Debian.8.Amd64+Debian.9.Amd64+Ubuntu.1604.Amd64+Ubuntu.1804.Amd64+Ubuntu.1810.Amd64+OpenSuse.42.Amd64+SLES.12.Amd64+SLES.15.Amd64+\(Fedora.28.Amd64\)ubuntu.1604.amd64@mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-28-helix-45b1fa2-20190402012449+\(Fedora.29.Amd64\)ubuntu.1604.amd64@mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-29-helix-c6dc5e6-20190402012449
- - linuxArm64Queues: \(Ubuntu.1604.Arm64\)Ubuntu.1604.Arm64.Docker@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-16.04-helix-arm64v8-b049512-20190321153539
- - linuxArmQueues: \(Debian.9.Arm32\)Ubuntu.1604.Arm32@mcr.microsoft.com/dotnet-buildtools/prereqs:debian-9-helix-arm32v7-b049512-20190321153542
- - alpineQueues: \(Alpine.38.Amd64\)ubuntu.1604.amd64@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.8-helix-45b1fa2-20190327215821+\(Alpine.39.Amd64\)ubuntu.1604.amd64@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.9-helix-e4eaef4-20190228230637
- - alpineArm64Queues: \(Alpine.38.Arm64\)Ubuntu.1604.Arm64.Docker@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.8-helix-arm64v8-46e69dd-20190327215724
+ - linuxArm64Queues: \(Ubuntu.1604.Arm64.Open\)Ubuntu.1604.Arm64.Docker.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-16.04-helix-arm64v8-b049512-20190321153539
+
+ - ${{ if eq(parameters.fullMatrix, 'false') }}:
+ - linuxDefaultQueues: Centos.7.Amd64.Open+RedHat.7.Amd64.Open+Debian.8.Amd64.Open+Ubuntu.1604.Amd64.Open+Ubuntu.1804.Amd64.Open+OpenSuse.42.Amd64.Open+\(Fedora.28.Amd64.Open\)ubuntu.1604.amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-28-helix-09ca40b-20190508143249
+ - alpineQueues: \(Alpine.39.Amd64.Open\)ubuntu.1604.amd64.open@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.9-helix-09ca40b-20190508143246
+
+ - ${{ if eq(parameters.fullMatrix, 'true') }}:
+ - linuxDefaultQueues: Centos.7.Amd64.Open+RedHat.7.Amd64.Open+Debian.8.Amd64.Open+Debian.9.Amd64.Open+Ubuntu.1604.Amd64.Open+Ubuntu.1804.Amd64.Open+Ubuntu.1810.Amd64.Open+OpenSuse.42.Amd64.Open+SLES.12.Amd64.Open+SLES.15.Amd64.Open+\(Fedora.28.Amd64.Open\)ubuntu.1604.amd64.open@mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-28-helix-09ca40b-20190508143249+\(Fedora.29.Amd64.Open\)ubuntu.1604.amd64.open@mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-29-09ca40b-20190508143249+\(Ubuntu.1904.Amd64.Open\)ubuntu.1604.amd64.open@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-19.04-helix-amd64-09ca40b-20190508143257
+ - linuxArmQueues: \(Debian.9.Arm32.Open\)Ubuntu.1604.Arm32.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:debian-9-helix-arm32v7-b049512-20190321153542
+ - alpineQueues: \(Alpine.38.Amd64.Open\)ubuntu.1604.amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.8-helix-09ca40b-20190508143246+\(Alpine.39.Amd64.Open\)ubuntu.1604.amd64.open@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.9-helix-09ca40b-20190508143246
+ - alpineArm64Queues: \(Alpine.38.Arm64.Open\)Ubuntu.1604.Arm64.Docker.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.8-helix-arm64v8-46e69dd-20190327215724
# Legs without helix testing
# Only run this leg in PRs.
- - ${{ if and(eq(parameters.isOfficialBuild, 'false'), eq(parameters.isOuterloopBuild, 'false')) }}:
+ - ${{ if and(eq(parameters.isOfficialBuild, 'false'), and(ne(parameters.testScope, 'outerloop'), ne(parameters.testScope, 'all'))) }}:
- job: LinuxNoTest
displayName: Linux
strategy:
@@ -151,7 +153,3 @@ jobs:
buildExtraArguments: $(_buildExtraArguments)
buildScriptPrefix: $(_buildScriptPrefix)
submitToHelix: false
-
- variables:
- - _skipTests: true
- - _outerloop: ${{ parameters.isOfficialBuild }}
diff --git a/eng/pipelines/macos.yml b/eng/pipelines/macos.yml
index 5c1d0c1d67d0..779b9a2c5837 100644
--- a/eng/pipelines/macos.yml
+++ b/eng/pipelines/macos.yml
@@ -3,15 +3,18 @@ parameters:
# Required: value to specify if the job is comming from an official build to run extra steps and sign binaries
# Default: false
isOfficialBuild: false
- # Required: value to specify if the build is comming from an outerloop pipeline.
+ # Required: value to specify if the full test matrix should be tested
# Default: false
- isOuterloopBuild: false
+ fullMatrix: false
+ # Optional: value to scope the tests.
+ # Default: empty
+ testScope: ''
jobs:
-
- template: corefx-base.yml
parameters:
isOfficialBuild: ${{ parameters.isOfficialBuild }}
+ testScope: ${{ parameters.testScope }}
targetOS: OSX
jobs:
@@ -20,14 +23,14 @@ jobs:
displayName: MacOS
strategy:
matrix:
- ${{ if eq(parameters.isOfficialBuild, 'false') }}:
+ ${{ if eq(parameters.fullMatrix, 'false') }}:
x64_Debug:
_BuildConfig: Debug
_architecture: x64
_framework: netcoreapp
_helixQueues: $(macOSQueues)
- ${{ if eq(parameters.isOfficialBuild, 'true') }}:
+ ${{ if eq(parameters.fullMatrix, 'true') }}:
x64_Release:
_BuildConfig: Release
_architecture: x64
@@ -49,13 +52,8 @@ jobs:
submitToHelix: true
variables:
- - _skipTests: true
- - _outerloop: ${{ parameters.isOfficialBuild }}
- - ${{ if eq(parameters.isOuterloopBuild, 'true') }}:
- - _outerloop: true
-
- ${{ if eq(parameters.isOfficialBuild, 'false') }}:
- macOSQueues: OSX.1012.Amd64.Open+OSX.1013.Amd64.Open
- ${{ if eq(parameters.isOfficialBuild, 'true') }}:
- - macOSQueues: OSX.1012.Amd64+OSX.1013.Amd64+OSX.1014.Amd64
+ - macOSQueues: OSX.1012.Amd64.Open+OSX.1013.Amd64.Open+OSX.1014.Amd64.Open
diff --git a/eng/pipelines/outerloop.yml b/eng/pipelines/outerloop.yml
index e3222799f409..3dc88a70cb79 100644
--- a/eng/pipelines/outerloop.yml
+++ b/eng/pipelines/outerloop.yml
@@ -5,27 +5,42 @@ resources:
- container: rhel7_container
image: microsoft/dotnet-buildtools-prereqs:rhel7_prereqs_2
- - container: ubuntu_1604_arm64_cross_container
- image: microsoft/dotnet-buildtools-prereqs:ubuntu-16.04-cross-arm64-a3ae44b-20180315221921
+ - container: rhel6_container
+ image: microsoft/dotnet-buildtools-prereqs:centos-6-376e1a3-20174311014331
- container: alpine_36_container
image: microsoft/dotnet-buildtools-prereqs:alpine-3.6-WithNode-f4d3fe3-20181213005010
+ - container: alpine_37_arm64_container
+ image: microsoft/dotnet-buildtools-prereqs:ubuntu-16.04-cross-arm64-alpine10fcdcf-20190208200917
+
+ - container: ubuntu_1604_arm64_cross_container
+ image: microsoft/dotnet-buildtools-prereqs:ubuntu-16.04-cross-arm64-a3ae44b-20180315221921
+
+ - container: ubuntu_1604_arm_cross_container
+ image: microsoft/dotnet-buildtools-prereqs:ubuntu-16.04-cross-ef0ac75-20175511035548
+
jobs:
# Windows outerloop legs
- - ${{ if endsWith(variables['Build.DefinitionName'], 'windows') }}:
+ - ${{ if or(endsWith(variables['Build.DefinitionName'], 'windows'), endsWith(variables['Build.DefinitionName'], 'outerloop')) }}:
- template: /eng/pipelines/windows.yml
parameters:
- isOuterloopBuild: true
+ isOfficialBuild: ${{ and(ne(variables['System.TeamProject'], 'public'), notIn(variables['Build.Reason'], 'PullRequest')) }}
+ fullMatrix: ${{ notIn(variables['Build.Reason'], 'PullRequest') }}
+ testScope: outerloop
# Linux outerloop legs
- - ${{ if endsWith(variables['Build.DefinitionName'], 'linux') }}:
+ - ${{ if or(endsWith(variables['Build.DefinitionName'], 'linux'), endsWith(variables['Build.DefinitionName'], 'outerloop')) }}:
- template: /eng/pipelines/linux.yml
parameters:
- isOuterloopBuild: true
+ isOfficialBuild: ${{ and(ne(variables['System.TeamProject'], 'public'), notIn(variables['Build.Reason'], 'PullRequest')) }}
+ fullMatrix: ${{ notIn(variables['Build.Reason'], 'PullRequest') }}
+ testScope: outerloop
# MacOS outerloop legs
- - ${{ if endsWith(variables['Build.DefinitionName'], 'osx') }}:
+ - ${{ if or(endsWith(variables['Build.DefinitionName'], 'osx'), endsWith(variables['Build.DefinitionName'], 'outerloop')) }}:
- template: /eng/pipelines/macos.yml
parameters:
- isOuterloopBuild: true
\ No newline at end of file
+ isOfficialBuild: ${{ and(ne(variables['System.TeamProject'], 'public'), notIn(variables['Build.Reason'], 'PullRequest')) }}
+ fullMatrix: ${{ notIn(variables['Build.Reason'], 'PullRequest') }}
+ testScope: outerloop
\ No newline at end of file
diff --git a/eng/pipelines/publish.yml b/eng/pipelines/publish.yml
index 7813515ffac2..6080e752ad85 100644
--- a/eng/pipelines/publish.yml
+++ b/eng/pipelines/publish.yml
@@ -16,7 +16,7 @@ jobs:
dependsOn: ${{ parameters.dependsOn }}
pool:
- name: NetCoreInternal-Int-Pool
+ name: NetCoreInternal-Pool
queue: buildpool.windows.10.amd64.vs2017
workspace:
@@ -112,7 +112,7 @@ jobs:
dependsOn: ${{ parameters.dependsOn }}
pool:
- name: NetCoreInternal-Int-Pool
+ name: NetCoreInternal-Pool
queue: buildpool.windows.10.amd64.vs2017
workspace:
diff --git a/eng/pipelines/redhat6.yml b/eng/pipelines/redhat6.yml
index 52cc6eb20a35..af7f71776274 100644
--- a/eng/pipelines/redhat6.yml
+++ b/eng/pipelines/redhat6.yml
@@ -1,9 +1,20 @@
-# RedHat 6 leg. Only for used in Official Builds
+# RedHat 6 leg
+parameters:
+ # Required: value to specify if the job is comming from an official build to run extra steps and sign binaries
+ # Default: false
+ isOfficialBuild: false
+ # Required: value to specify if the full test matrix should be tested
+ # Default: false
+ fullMatrix: false
+ # Optional: value to scope the tests.
+ # Default: empty
+ testScope: ''
jobs:
- template: corefx-base.yml
parameters:
- isOfficialBuild: true
+ isOfficialBuild: ${{ parameters.isOfficialBuild }}
+ testScope: ${{ parameters.testScope }}
targetOS: Linux
jobs:
@@ -26,6 +37,4 @@ jobs:
submitToHelix: true
variables:
- - _skipTests: true
- - _outerloop: true # Only runs in official builds
- - redhatHelixQueue: RedHat.6.Amd64
+ - redhatHelixQueue: RedHat.6.Amd64.Open
diff --git a/eng/pipelines/windows.yml b/eng/pipelines/windows.yml
index b165a2ae837e..30cffd3d6ed5 100644
--- a/eng/pipelines/windows.yml
+++ b/eng/pipelines/windows.yml
@@ -3,15 +3,19 @@ parameters:
# Required: value to specify if the job is comming from an official build to run extra steps and sign binaries
# Default: false
isOfficialBuild: false
- # Required: value to specify if the build is comming from an outerloop pipeline.
+ # Required: value to specify if the full test matrix should be tested
# Default: false
- isOuterloopBuild: false
+ fullMatrix: false
+ # Optional: value to scope the tests.
+ # Default: empty
+ testScope: ''
jobs:
- template: corefx-base.yml
parameters:
isOfficialBuild: ${{ parameters.isOfficialBuild }}
+ testScope: ${{ parameters.testScope }}
targetOS: Windows_NT
jobs:
@@ -21,7 +25,7 @@ jobs:
strategy:
matrix:
# PR CI Matrix
- ${{ if eq(parameters.isOfficialBuild, 'false') }}:
+ ${{ if eq(parameters.fullMatrix, 'false') }}:
x64_Debug:
_BuildConfig: Debug
_architecture: x64
@@ -46,9 +50,18 @@ jobs:
_architecture: x64
_framework: uap
_helixQueues: $(uapNetfxQueues)
+
+ # Run arm on the matrix or in Outerloop
+ ${{ if or(eq(parameters.fullMatrix, 'true'), or(eq(parameters.testScope, 'outerloop'), eq(parameters.testScope, 'all'))) }}:
+ arm64_Release:
+ _BuildConfig: Release
+ _architecture: arm64
+ _framework: netcoreapp
+ _helixQueues: $(windowsArmQueue)
+ _publishTests: true
- # Official build LEGS with HELIX Testing
- ${{ if eq(parameters.isOfficialBuild, 'true') }}:
+ # Full test matrix
+ ${{ if eq(parameters.fullMatrix, 'true') }}:
x64_Release:
_BuildConfig: Release
_architecture: x64
@@ -63,13 +76,6 @@ jobs:
_helixQueues: $(netcoreappWindowsQueues)
_publishTests: true
- arm64_Release:
- _BuildConfig: Release
- _architecture: arm64
- _framework: netcoreapp
- _helixQueues: $(windowsArmQueue)
- _publishTests: true
-
NETFX_x86_Release:
_BuildConfig: Release
_architecture: x86
@@ -96,54 +102,32 @@ jobs:
_framework: uap
_helixQueues: $(uapNetfxQueues)
- UAPAOT_x86_Release:
- _BuildConfig: Release
- _architecture: x86
- _framework: uapaot
- _helixQueues: $(uapNetfxQueues)
-
- UAPAOT_x64_Release:
- _BuildConfig: Release
- _architecture: x64
- _framework: uapaot
- _helixQueues: $(uapNetfxQueues)
-
pool:
- ${{ if eq(parameters.isOfficialBuild, 'true') }}:
- name: NetCoreInternal-Int-Pool
- queue: buildpool.windows.10.amd64.vs2017
- ${{ if eq(parameters.isOfficialBuild, 'false') }}:
- name: Hosted VS2017
+ name: Hosted VS2017
submitToHelix: true
buildExtraArguments: /p:RuntimeOS=win10
variables:
- - _skipTests: true
- - _outerloop: ${{ parameters.isOfficialBuild }}
- - ${{ if eq(parameters.isOuterloopBuild, 'true') }}:
- - _outerloop: true
+ - nanoQueues: "`(Windows.Nano.1803.Amd64.Open`)windows.10.amd64.serverrs4.open@mcr.microsoft.com/dotnet-buildtools/prereqs:nanoserver-1803-helix-amd64-05227e1-20190509225944"
+ - uapNetfxQueues: Windows.10.Amd64.ClientRS5.Open
+ - windowsArmQueue: Windows.10.Arm64.Open
- - ${{ if eq(parameters.isOfficialBuild, 'false') }}:
+ - ${{ if eq(parameters.fullMatrix, 'false') }}:
- netcoreappWindowsQueues: Windows.7.Amd64.Open+Windows.81.Amd64.Open+Windows.10.Amd64.ClientRS4.ES.Open
- - nanoQueues: Windows.10.Nano.Amd64.Open
- - uapNetfxQueues: Windows.10.Amd64.ClientRS5.Open
- - ${{ if eq(parameters.isOfficialBuild, 'true') }}:
- - netcoreappWindowsQueues: Windows.7.Amd64+Windows.81.Amd64+Windows.10.Amd64.Core+Windows.10.Amd64.ClientRS4
- - nanoQueues: Windows.10.Nano.Amd64
- - uapNetfxQueues: Windows.10.Amd64.ClientRS5
- - windowsArmQueue: Windows.10.Arm64
+ - ${{ if eq(parameters.fullMatrix, 'true') }}:
+ - netcoreappWindowsQueues: Windows.7.Amd64.Open+Windows.81.Amd64.Open+Windows.10.Amd64.ClientRS4.Open+Windows.10.Amd64.ServerRS5.Open
# There is no point of running legs without outerloop tests, when in an outerloop build.
- - ${{ if eq(parameters.isOuterloopBuild, 'false') }}:
+ - ${{ if and(ne(parameters.testScope, 'outerloop'), ne(parameters.testScope, 'all')) }}:
# Packaging all configurations
- job: AllConfigurations
displayName: Packaging All Configurations
strategy:
matrix:
# PR Validation Matrix
- ${{ if eq(parameters.isOfficialBuild, 'false') }}:
+ ${{ if eq(parameters.fullMatrix, 'false') }}:
x64_Debug:
_BuildConfig: Debug
_architecture: x64
@@ -151,7 +135,7 @@ jobs:
_helixQueues: $(allConfigurationsQueues)
# Official Build Matrix
- ${{ if eq(parameters.isOfficialBuild, 'true') }}:
+ ${{ if eq(parameters.fullMatrix, 'true') }}:
x64_Release:
_BuildConfig: Release
_architecture: x64
@@ -159,23 +143,13 @@ jobs:
_helixQueues: $(allConfigurationsQueues)
pool:
- ${{ if eq(parameters.isOfficialBuild, 'true') }}:
- name: NetCoreInternal-Int-Pool
- queue: buildpool.windows.10.amd64.vs2017
- ${{ if eq(parameters.isOfficialBuild, 'false') }}:
- name: Hosted VS2017
+ name: Hosted VS2017
submitToHelix: true
buildExtraArguments: /p:RuntimeOS=win10
- # azure pipelines reporter only supports xunit results based tests.
- enableAzurePipelinesReporter: false
variables:
- - _outerloop: false
- - ${{ if eq(parameters.isOfficialBuild, 'false') }}:
- - allConfigurationsQueues: Windows.10.Amd64.ClientRS5.Open
- - ${{ if eq(parameters.isOfficialBuild, 'true') }}:
- - allConfigurationsQueues: Windows.10.Amd64.ClientRS5
+ - allConfigurationsQueues: Windows.10.Amd64.ClientRS5.Open
_jobFramework: -allConfigurations
customBuildSteps:
@@ -191,19 +165,18 @@ jobs:
$(_msbuildCommonParameters)
displayName: Build Packages and Tests
- # TODO: UAPAOT official builds should send to helix using continuation runner.
# Legs without HELIX testing
- job: WindowsNoTest
displayName: Windows
strategy:
matrix:
- ${{ if eq(parameters.isOfficialBuild, 'false') }}:
+ ${{ if eq(parameters.fullMatrix, 'false') }}:
UWP_NETNative_x86_Release:
_BuildConfig: Release
_architecture: x86
_framework: uapaot
- ${{ if eq(parameters.isOfficialBuild, 'true') }}:
+ ${{ if eq(parameters.fullMatrix, 'true') }}:
arm_Release:
_BuildConfig: Release
_architecture: arm
@@ -214,26 +187,8 @@ jobs:
_architecture: arm
_framework: uap
- UAPAOT_arm_Release:
- _BuildConfig: Release
- _architecture: arm
- _framework: uapaot
-
- UAPAOT_arm64_Release:
- _BuildConfig: Release
- _architecture: arm64
- _framework: uapaot
-
pool:
- ${{ if eq(parameters.isOfficialBuild, 'true') }}:
- name: NetCoreInternal-Int-Pool
- queue: buildpool.windows.10.amd64.vs2017
- ${{ if eq(parameters.isOfficialBuild, 'false') }}:
- name: Hosted VS2017
+ name: Hosted VS2017
submitToHelix: false
buildExtraArguments: /p:RuntimeOS=win10
-
- variables:
- - _skipTests: true
- - _outerloop: ${{ parameters.isOfficialBuild }}
diff --git a/eng/publish.proj b/eng/publish.proj
index 439dffa16f17..e2c970d4a2b7 100644
--- a/eng/publish.proj
+++ b/eng/publish.proj
@@ -1,6 +1,6 @@
-
+
@@ -135,7 +135,8 @@
ManifestCommit="$(ManifestCommit)"
ManifestBuildData="$(ManifestBuildData)"
ManifestRepoUri="$(ManifestRepoUri)"
- AssetManifestPath="$(AssetManifestFilePath)" />
+ AssetManifestPath="$(AssetManifestFilePath)"
+ Overwrite="true" />
<_ManifestToPush Remove="@(_ManifestToPush)" />
@@ -155,6 +156,7 @@
ManifestCommit="$(ManifestCommit)"
ManifestBuildData="$(ManifestBuildData)"
ManifestRepoUri="$(ManifestRepoUri)"
- AssetManifestPath="$(AssetManifestDir)ManifestUpload.xml" />
+ AssetManifestPath="$(AssetManifestDir)ManifestUpload.xml"
+ Overwrite="true" />
diff --git a/eng/references.props b/eng/references.props
new file mode 100644
index 000000000000..9c65f4210c84
--- /dev/null
+++ b/eng/references.props
@@ -0,0 +1,10 @@
+
+
+
+ $(AssemblySearchPaths);$(RefPath);{RawFileName}
+
+
\ No newline at end of file
diff --git a/eng/references.targets b/eng/references.targets
index de6eccf63382..f559f1f8adeb 100644
--- a/eng/references.targets
+++ b/eng/references.targets
@@ -1,8 +1,8 @@
- $(RefPath)
- $(ContractOutputPath)
- $(AssemblySearchPaths);$(ContractOutputPath);{RawFileName}
+ $(RefPath)
+ $(RefPath)
+ $(AssemblySearchPaths);$(RefPath);{RawFileName}
<_FindDependencies>false
+ false
@@ -17,7 +20,13 @@
-
-
+
+
+
+ False
+
\ No newline at end of file
diff --git a/run-test.sh b/eng/run-test.sh
old mode 100755
new mode 100644
similarity index 71%
rename from run-test.sh
rename to eng/run-test.sh
index c54987063924..b8f694b94e44
--- a/run-test.sh
+++ b/eng/run-test.sh
@@ -15,21 +15,21 @@ wait_on_pids()
usage()
{
- echo "Runs .NET CoreFX tests on FreeBSD, Linux, NetBSD or OSX"
+ echo "Runs .NET CoreFX tests on FreeBSD, NetBSD or Linux"
echo "usage: run-test [options]"
echo
echo "Input sources:"
echo " --runtime Location of root of the binaries directory"
- echo " containing the FreeBSD, Linux, NetBSD or OSX runtime"
+ echo " containing the FreeBSD, NetBSD or Linux runtime"
echo " default: /bin/testhost/netcoreapp---"
echo " --corefx-tests Location of the root binaries location containing"
echo " the tests to run"
- echo " default: /bin"
+ echo " default: /artifacts/bin"
echo
echo "Flavor/OS/Architecture options:"
echo " --configurationGroup ConfigurationGroup to run (Debug/Release)"
echo " default: Debug"
- echo " --os OS to run (FreeBSD, Linux, NetBSD or OSX)"
+ echo " --os OS to run (FreeBSD, NetBSD or Linux)"
echo " default: detect current OS"
echo " --arch Architecture to run (x64, arm, armel, x86, arm64)"
echo " default: detect current architecture"
@@ -47,14 +47,6 @@ usage()
echo " listed one line, relative to the directory specified by --corefx-tests"
echo " --timeout
diff --git a/external/ILLink/ILLink.depproj b/external/ILLink/ILLink.depproj
index 5049897cd56f..7f13db572f27 100644
--- a/external/ILLink/ILLink.depproj
+++ b/external/ILLink/ILLink.depproj
@@ -14,14 +14,14 @@
-
+ $(ILLinkTasksPackageId)$(ILLinkTasksPackageVersion)/netcoreapp2.0/
-
+ $(ILLinkTasksPackageId)$(ILLinkTasksPackageVersion)/net46/
diff --git a/external/binplacePackages/binplacePackages.depproj b/external/binplacePackages/binplacePackages.depproj
index 0f6da524ca17..8f1984117221 100644
--- a/external/binplacePackages/binplacePackages.depproj
+++ b/external/binplacePackages/binplacePackages.depproj
@@ -4,6 +4,7 @@
true$(TargetFramework.SubString(11))Reference
+ true
@@ -29,11 +30,15 @@
- 4.5.1
+ 4.5.3
+
+
+
+ 4.5.0
- 4.5.1
+ 4.5.2
diff --git a/external/dir.proj b/external/dir.proj
index fccddc9f626d..cb86099dbf35 100644
--- a/external/dir.proj
+++ b/external/dir.proj
@@ -17,7 +17,7 @@
-
+
diff --git a/external/harvestPackages/harvestPackages.props b/external/harvestPackages/harvestPackages.props
index 4b088b2258d0..38fa48fdd21a 100644
--- a/external/harvestPackages/harvestPackages.props
+++ b/external/harvestPackages/harvestPackages.props
@@ -1,4 +1,4 @@
-
+
@@ -62,10 +62,10 @@
4.5.0
- 4.5.1
+ 4.6.1
- 4.5.0
+ 4.5.14.5.0
@@ -80,7 +80,7 @@
4.5.0
- 4.5.0
+ 4.5.14.5.0
@@ -89,7 +89,7 @@
4.5.0
- 4.5.0
+ 4.5.34.5.0
@@ -101,17 +101,14 @@
4.5.0
- 4.5.0
+ 4.5.4
- 4.5.1
+ 4.5.30.1.0
-
- 4.5.0
-4.3.0
@@ -125,13 +122,13 @@
1.6.0
- 4.5.0
+ 4.5.14.5.0
- 4.5.1
+ 4.5.24.3.0
@@ -146,10 +143,10 @@
4.5.0
- 4.5.0
+ 4.5.1
- 4.5.0
+ 4.5.24.5.0
@@ -161,7 +158,7 @@
4.5.0
- 4.5.0
+ 4.5.14.5.0
@@ -170,7 +167,7 @@
4.5.0
- 4.5.0
+ 4.5.14.5.0
@@ -185,7 +182,7 @@
4.9.0
- 4.5.1
+ 4.5.24.5.0
diff --git a/external/netfx/netfx.depproj b/external/netfx/netfx.depproj
index ccf87f90409c..8acf4c30625e 100644
--- a/external/netfx/netfx.depproj
+++ b/external/netfx/netfx.depproj
@@ -6,7 +6,7 @@
ReferenceNETStandard.Library.NETFramework2.0.1-servicing-26011-01
- $(PackagesDir)$(NETStandardSupportPackageId.ToLower())\$(NETStandardSupportPackageVersion)\build
+ $(NuGetPackageRoot)$(NETStandardSupportPackageId.ToLower())\$(NETStandardSupportPackageVersion)\buildtrue
@@ -40,6 +40,9 @@
4.5.2
+
+ 4.5.0
+ $(NETStandardSupportPackageVersion)
diff --git a/external/netstandard/netstandard.depproj b/external/netstandard/netstandard.depproj
index 7e474bb52ef7..6c139d25e175 100644
--- a/external/netstandard/netstandard.depproj
+++ b/external/netstandard/netstandard.depproj
@@ -77,7 +77,7 @@
- <_NETStandard21RefFolder>$(PackagesDir)$(NETStandardLibraryPackageId.ToLower())\$(NETStandardLibraryPackageVersion)\build\netstandard2.1\ref
+ <_NETStandard21RefFolder>$(NuGetPackageRoot)$(NETStandardLibraryPackageId.ToLower())\$(NETStandardLibraryPackageVersion)\build\netstandard2.1\ref
@@ -94,7 +94,7 @@
- <_NETStandardRefFolder>$(PackagesDir)$(NETStandardLibraryPackageId.ToLower())\$(NETStandardLibraryPackageVersion)\build\$(_NETStandardTFMFolder)\ref
+ <_NETStandardRefFolder>$(NuGetPackageRoot)$(NETStandardLibraryPackageId.ToLower())\$(NETStandardLibraryPackageVersion)\build\$(_NETStandardTFMFolder)\ref
diff --git a/external/runtime/runtime.depproj b/external/runtime/runtime.depproj
index 3a876a60aaf1..c7da29345fa8 100644
--- a/external/runtime/runtime.depproj
+++ b/external/runtime/runtime.depproj
@@ -2,10 +2,11 @@
$(PackageRID)$(NoWarn);NU1603;NU1605
+ true
+
+ false
-
- falseReferenceuap10.0$(NoWarn);NU1701
@@ -30,7 +31,7 @@
-
+ $(MicrosoftNETCoreRuntimeCoreCLRPackageVersion)2.1.0-b-uwp6-25707-02
@@ -45,19 +46,6 @@
-
-
-
-
- CoreCLRILFiles
- $(NETCoreAppTestSharedFrameworkPath)il
-
-
- CoreCLRCrossGenFiles
- $(NETCoreAppTestSharedFrameworkPath)ni
-
-
-
@@ -87,86 +75,53 @@
-
- $(PackagesDir)symbolpackages/
- https://dotnetfeed.blob.core.windows.net/dotnet-coreclr/assets/
-
-
-
-
-
- <_CoreCLRSymbolPackagesToDownload Include="@(ReferenceCopyLocalPaths->'%(NuGetPackageId)')" Condition="$([System.String]::Copy('%(Identity)').EndsWith('System.Private.CoreLib.dll'))">
- $(DotNetAssetRootUrl)symbols/%(NuGetPackageId).%(NuGetPackageVersion).symbols.nupkg
- %(NuGetPackageId).%(NuGetPackageVersion).symbols.nupkg.zip
- $(SymbolPackagesDir)/%(NuGetPackageId).%(NuGetPackageVersion)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- <_CoreCLRSymbolFiles Include="%(_CoreCLRSymbolPackagesToDownload.UnzipDestinationDir)/runtimes/$(RuntimeIdentifier)/native/*.pdb" />
- <_CoreCLRSymbolFiles Include="%(_CoreCLRSymbolPackagesToDownload.UnzipDestinationDir)/runtimes/$(RuntimeIdentifier)/native/*.dbg" />
-
-
-
- %(_CoreCLRSymbolPackagesToDownload.UnzipDestinationDir)/runtimes/$(RuntimeIdentifier)/native/
-
-
-
-
-
-
-
-
+ $(CoreCLROverridePath)/PDB
- true
-
-
-
-
-
+
- <_ReferenceCopyLocalPathsToRemove Include="@(ReferenceCopyLocalPaths)" Condition="'@(CoreCLRFiles->'%(FileName)%(Extension)')' == '%(FileName)%(Extension)'" />
-
-
+
+
-
+
+
-
-
-
+
+
+ <_CoreLibFile Include="@(ReferenceCopyLocalPaths)" Condition="'%(FileName)' == 'System.Private.CoreLib'" />
+
+ <_CoreLibFilePath>%(_CoreLibFile.FullPath)
+ <_CoreLibPackagePath>$(_CoreLibFilePath.SubString(0, $(_CoreLibFilePath.IndexOf('runtimes'))))
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/external/test-runtime/XUnit.Runtime.depproj b/external/test-runtime/XUnit.Runtime.depproj
index e795c082bc1c..4c69191a8ab8 100644
--- a/external/test-runtime/XUnit.Runtime.depproj
+++ b/external/test-runtime/XUnit.Runtime.depproj
@@ -34,10 +34,11 @@
-
+
+
@@ -51,13 +52,14 @@
-
+
+
@@ -98,7 +100,7 @@
AfterTargets="AfterResolveReferences">
-
+
@@ -127,7 +129,7 @@
AfterTargets="AfterResolveReferences">
- $(PackagesDir)$(MicrosoftDotNetUapTestToolsPackageName)\$(MicrosoftDotNetUapTestToolsPackageVersion)\Tools\$(ArchGroup)
+ $(NuGetPackageRoot)$(MicrosoftDotNetUapTestToolsPackageName)\$(MicrosoftDotNetUapTestToolsPackageVersion)\Tools\$(ArchGroup)$(UAPToolsFolder.Replace('/', '\'))
@@ -151,36 +153,6 @@
-
-
-
-
-
-
-
-
-
- TestILC
- $(TestILCToolsPackageName).amd64ret
- $(TestILCToolsPackageName).x86ret
- $(TestILCToolsPackageName).armret
- $(PackagesDir)$(TestILCToolsPackageName)\$(ProjectNTfsTestILCPackageVersion)\TestILC
-
-
-
-
-
-
-
-
-
-
@@ -192,7 +164,7 @@
- <_microsoftNetTestSdkAssets Include="$(PackagesDir)$(MicrosoftNetTestSdkPackageName)\$(MicrosoftNETTestSdkPackageVersion)\build\$(TestSdkTFM)\*.*" />
+ <_microsoftNetTestSdkAssets Include="$(NuGetPackageRoot)$(MicrosoftNetTestSdkPackageName)\$(MicrosoftNETTestSdkPackageVersion)\build\$(TestSdkTFM)\*.*" />
false$(MicrosoftNetTestSdkPackageName)
@@ -201,7 +173,7 @@
+ Text="Error: no assets for test sdk package were found under: $(NuGetPackageRoot)$(MicrosoftNetTestSdkPackageName)\$(MicrosoftNETTestSdkPackageVersion)\build\$(TestSdkTFM)\*.*" />
@@ -209,25 +181,25 @@
Condition="'$(TargetGroup)' == 'netcoreapp'"
BeforeTargets="ResolveReferences">
-
-
-
+
+
+
-
+ false$(MicrosoftDotNetXUnitConsoleRunnerPackage)$(MicrosoftDotNetXUnitConsoleRunnerPackageVersion)
-
+ false$(XUnitTestAdapterPackageId)$(XUnitPackageVersion)
-
+ false$(TestPlatformHostPackageId)$(MicrosoftNETTestSdkPackageVersion)
@@ -240,18 +212,18 @@
Condition="'$(TargetsUap)' == 'true'"
BeforeTargets="ResolveReferences">
-
-
+
+
-
+ false$(XUnitTestAdapterPackageId)$(XUnitPackageVersion)
-
+ false$(TestPlatformHostPackageId)$(MicrosoftNETTestSdkPackageVersion)
@@ -264,18 +236,18 @@
Condition="'$(TargetsAot)' == 'true'"
BeforeTargets="ResolveReferences">
-
-
+
+
-
+ false$(MicrosoftDotNetUapTestToolsPackageName)$(MicrosoftDotNetUapTestToolsPackageVersion)
-
+ falsexunit.runner.utility$(XUnitPackageVersion)
@@ -288,19 +260,19 @@
Condition="'$(TargetGroup)' == 'netfx'"
BeforeTargets="ResolveReferences">
-
-
+
+
-
+ false$(XUnitRunnerConsolePackageName)$(XUnitPackageVersion)
-
+ false$(XUnitTestAdapterPackageId)$(XUnitPackageVersion)
@@ -309,4 +281,20 @@
+
+
+
+
+
+
+ false
+ $(MicrosoftDotNetRemoteExecutorPackage)
+ $(MicrosoftDotNetRemoteExecutorPackageVersion)
+
+
+
+
+
diff --git a/global.json b/global.json
index 55ebddfb1aac..d71693b10a45 100644
--- a/global.json
+++ b/global.json
@@ -1,10 +1,11 @@
{
"tools": {
- "dotnet": "3.0.100-preview3-010431"
+ "dotnet": "3.0.100-preview6-011681"
},
"msbuild-sdks": {
- "Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19218.7",
- "Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19257.7",
- "Microsoft.NET.Sdk.IL": "3.0.0-preview5-27708-72"
+ "Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19280.2",
+ "Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19280.2",
+ "FIX-85B6-MERGE-9C38-CONFLICT": "1.0.0",
+ "Microsoft.NET.Sdk.IL": "3.0.0-preview6.19280.2"
}
}
diff --git a/pkg/Microsoft.NETCore.Platforms/runtime.compatibility.json b/pkg/Microsoft.NETCore.Platforms/runtime.compatibility.json
index 64512cb82db9..1d45d566032f 100644
--- a/pkg/Microsoft.NETCore.Platforms/runtime.compatibility.json
+++ b/pkg/Microsoft.NETCore.Platforms/runtime.compatibility.json
@@ -303,6 +303,74 @@
"any",
"base"
],
+ "debian.10": [
+ "debian.10",
+ "debian",
+ "linux",
+ "unix",
+ "any",
+ "base"
+ ],
+ "debian.10-arm": [
+ "debian.10-arm",
+ "debian.10",
+ "debian-arm",
+ "debian",
+ "linux-arm",
+ "linux",
+ "unix-arm",
+ "unix",
+ "any",
+ "base"
+ ],
+ "debian.10-arm64": [
+ "debian.10-arm64",
+ "debian.10",
+ "debian-arm64",
+ "debian",
+ "linux-arm64",
+ "linux",
+ "unix-arm64",
+ "unix",
+ "any",
+ "base"
+ ],
+ "debian.10-armel": [
+ "debian.10-armel",
+ "debian.10",
+ "debian-armel",
+ "debian",
+ "linux-armel",
+ "linux",
+ "unix-armel",
+ "unix",
+ "any",
+ "base"
+ ],
+ "debian.10-x64": [
+ "debian.10-x64",
+ "debian.10",
+ "debian-x64",
+ "debian",
+ "linux-x64",
+ "linux",
+ "unix-x64",
+ "unix",
+ "any",
+ "base"
+ ],
+ "debian.10-x86": [
+ "debian.10-x86",
+ "debian.10",
+ "debian-x86",
+ "debian",
+ "linux-x86",
+ "linux",
+ "unix-x86",
+ "unix",
+ "any",
+ "base"
+ ],
"debian.8": [
"debian.8",
"debian",
@@ -596,6 +664,46 @@
"any",
"base"
],
+ "fedora.30": [
+ "fedora.30",
+ "fedora",
+ "linux",
+ "unix",
+ "any",
+ "base"
+ ],
+ "fedora.30-x64": [
+ "fedora.30-x64",
+ "fedora.30",
+ "fedora-x64",
+ "fedora",
+ "linux-x64",
+ "linux",
+ "unix-x64",
+ "unix",
+ "any",
+ "base"
+ ],
+ "fedora.31": [
+ "fedora.31",
+ "fedora",
+ "linux",
+ "unix",
+ "any",
+ "base"
+ ],
+ "fedora.31-x64": [
+ "fedora.31-x64",
+ "fedora.31",
+ "fedora-x64",
+ "fedora",
+ "linux-x64",
+ "linux",
+ "unix-x64",
+ "unix",
+ "any",
+ "base"
+ ],
"freebsd": [
"freebsd",
"unix",
@@ -1086,6 +1194,67 @@
"any",
"base"
],
+ "linuxmint.19.1": [
+ "linuxmint.19.1",
+ "linuxmint.19",
+ "ubuntu.18.04",
+ "ubuntu",
+ "debian",
+ "linux",
+ "unix",
+ "any",
+ "base"
+ ],
+ "linuxmint.19.1-x64": [
+ "linuxmint.19.1-x64",
+ "linuxmint.19.1",
+ "linuxmint.19-x64",
+ "linuxmint.19",
+ "ubuntu.18.04-x64",
+ "ubuntu.18.04",
+ "ubuntu-x64",
+ "ubuntu",
+ "debian-x64",
+ "debian",
+ "linux-x64",
+ "linux",
+ "unix-x64",
+ "unix",
+ "any",
+ "base"
+ ],
+ "linuxmint.19.2": [
+ "linuxmint.19.2",
+ "linuxmint.19.1",
+ "linuxmint.19",
+ "ubuntu.18.04",
+ "ubuntu",
+ "debian",
+ "linux",
+ "unix",
+ "any",
+ "base"
+ ],
+ "linuxmint.19.2-x64": [
+ "linuxmint.19.2-x64",
+ "linuxmint.19.2",
+ "linuxmint.19.1-x64",
+ "linuxmint.19.1",
+ "linuxmint.19-x64",
+ "linuxmint.19",
+ "ubuntu.18.04-x64",
+ "ubuntu.18.04",
+ "ubuntu-x64",
+ "ubuntu",
+ "debian-x64",
+ "debian",
+ "linux-x64",
+ "linux",
+ "unix-x64",
+ "unix",
+ "any",
+ "base"
+ ],
"ol": [
"ol",
"rhel",
@@ -1482,6 +1651,64 @@
"any",
"base"
],
+ "ol.8": [
+ "ol.8",
+ "ol",
+ "rhel.8",
+ "rhel",
+ "linux",
+ "unix",
+ "any",
+ "base"
+ ],
+ "ol.8-x64": [
+ "ol.8-x64",
+ "ol.8",
+ "ol-x64",
+ "rhel.8-x64",
+ "ol",
+ "rhel.8",
+ "rhel-x64",
+ "rhel",
+ "linux-x64",
+ "linux",
+ "unix-x64",
+ "unix",
+ "any",
+ "base"
+ ],
+ "ol.8.0": [
+ "ol.8.0",
+ "ol.8",
+ "rhel.8.0",
+ "ol",
+ "rhel.8",
+ "rhel",
+ "linux",
+ "unix",
+ "any",
+ "base"
+ ],
+ "ol.8.0-x64": [
+ "ol.8.0-x64",
+ "ol.8.0",
+ "ol.8-x64",
+ "rhel.8.0-x64",
+ "ol.8",
+ "rhel.8.0",
+ "ol-x64",
+ "rhel.8-x64",
+ "ol",
+ "rhel.8",
+ "rhel-x64",
+ "rhel",
+ "linux-x64",
+ "linux",
+ "unix-x64",
+ "unix",
+ "any",
+ "base"
+ ],
"opensuse": [
"opensuse",
"linux",
@@ -1539,6 +1766,26 @@
"any",
"base"
],
+ "opensuse.15.1": [
+ "opensuse.15.1",
+ "opensuse",
+ "linux",
+ "unix",
+ "any",
+ "base"
+ ],
+ "opensuse.15.1-x64": [
+ "opensuse.15.1-x64",
+ "opensuse.15.1",
+ "opensuse-x64",
+ "opensuse",
+ "linux-x64",
+ "linux",
+ "unix-x64",
+ "unix",
+ "any",
+ "base"
+ ],
"opensuse.42.1": [
"opensuse.42.1",
"opensuse",
@@ -2167,8 +2414,41 @@
"any",
"base"
],
+ "sles.12.4": [
+ "sles.12.4",
+ "sles.12.3",
+ "sles.12.2",
+ "sles.12.1",
+ "sles.12",
+ "sles",
+ "linux",
+ "unix",
+ "any",
+ "base"
+ ],
+ "sles.12.4-x64": [
+ "sles.12.4-x64",
+ "sles.12.4",
+ "sles.12.3-x64",
+ "sles.12.3",
+ "sles.12.2-x64",
+ "sles.12.2",
+ "sles.12.1-x64",
+ "sles.12.1",
+ "sles.12-x64",
+ "sles.12",
+ "sles-x64",
+ "sles",
+ "linux-x64",
+ "linux",
+ "unix-x64",
+ "unix",
+ "any",
+ "base"
+ ],
"sles.15": [
"sles.15",
+ "sles.12.4",
"sles.12.3",
"sles.12.2",
"sles.12.1",
@@ -2182,6 +2462,46 @@
"sles.15-x64": [
"sles.15-x64",
"sles.15",
+ "sles.12.4-x64",
+ "sles.12.4",
+ "sles.12.3-x64",
+ "sles.12.3",
+ "sles.12.2-x64",
+ "sles.12.2",
+ "sles.12.1-x64",
+ "sles.12.1",
+ "sles.12-x64",
+ "sles.12",
+ "sles-x64",
+ "sles",
+ "linux-x64",
+ "linux",
+ "unix-x64",
+ "unix",
+ "any",
+ "base"
+ ],
+ "sles.15.1": [
+ "sles.15.1",
+ "sles.15",
+ "sles.12.4",
+ "sles.12.3",
+ "sles.12.2",
+ "sles.12.1",
+ "sles.12",
+ "sles",
+ "linux",
+ "unix",
+ "any",
+ "base"
+ ],
+ "sles.15.1-x64": [
+ "sles.15.1-x64",
+ "sles.15.1",
+ "sles.15-x64",
+ "sles.15",
+ "sles.12.4-x64",
+ "sles.12.4",
"sles.12.3-x64",
"sles.12.3",
"sles.12.2-x64",
@@ -2945,6 +3265,136 @@
"any",
"base"
],
+ "ubuntu.19.04": [
+ "ubuntu.19.04",
+ "ubuntu",
+ "debian",
+ "linux",
+ "unix",
+ "any",
+ "base"
+ ],
+ "ubuntu.19.04-arm": [
+ "ubuntu.19.04-arm",
+ "ubuntu.19.04",
+ "ubuntu-arm",
+ "ubuntu",
+ "debian-arm",
+ "debian",
+ "linux-arm",
+ "linux",
+ "unix-arm",
+ "unix",
+ "any",
+ "base"
+ ],
+ "ubuntu.19.04-arm64": [
+ "ubuntu.19.04-arm64",
+ "ubuntu.19.04",
+ "ubuntu-arm64",
+ "ubuntu",
+ "debian-arm64",
+ "debian",
+ "linux-arm64",
+ "linux",
+ "unix-arm64",
+ "unix",
+ "any",
+ "base"
+ ],
+ "ubuntu.19.04-x64": [
+ "ubuntu.19.04-x64",
+ "ubuntu.19.04",
+ "ubuntu-x64",
+ "ubuntu",
+ "debian-x64",
+ "debian",
+ "linux-x64",
+ "linux",
+ "unix-x64",
+ "unix",
+ "any",
+ "base"
+ ],
+ "ubuntu.19.04-x86": [
+ "ubuntu.19.04-x86",
+ "ubuntu.19.04",
+ "ubuntu-x86",
+ "ubuntu",
+ "debian-x86",
+ "debian",
+ "linux-x86",
+ "linux",
+ "unix-x86",
+ "unix",
+ "any",
+ "base"
+ ],
+ "ubuntu.19.10": [
+ "ubuntu.19.10",
+ "ubuntu",
+ "debian",
+ "linux",
+ "unix",
+ "any",
+ "base"
+ ],
+ "ubuntu.19.10-arm": [
+ "ubuntu.19.10-arm",
+ "ubuntu.19.10",
+ "ubuntu-arm",
+ "ubuntu",
+ "debian-arm",
+ "debian",
+ "linux-arm",
+ "linux",
+ "unix-arm",
+ "unix",
+ "any",
+ "base"
+ ],
+ "ubuntu.19.10-arm64": [
+ "ubuntu.19.10-arm64",
+ "ubuntu.19.10",
+ "ubuntu-arm64",
+ "ubuntu",
+ "debian-arm64",
+ "debian",
+ "linux-arm64",
+ "linux",
+ "unix-arm64",
+ "unix",
+ "any",
+ "base"
+ ],
+ "ubuntu.19.10-x64": [
+ "ubuntu.19.10-x64",
+ "ubuntu.19.10",
+ "ubuntu-x64",
+ "ubuntu",
+ "debian-x64",
+ "debian",
+ "linux-x64",
+ "linux",
+ "unix-x64",
+ "unix",
+ "any",
+ "base"
+ ],
+ "ubuntu.19.10-x86": [
+ "ubuntu.19.10-x86",
+ "ubuntu.19.10",
+ "ubuntu-x86",
+ "ubuntu",
+ "debian-x86",
+ "debian",
+ "linux-x86",
+ "linux",
+ "unix-x86",
+ "unix",
+ "any",
+ "base"
+ ],
"unix": [
"unix",
"any",
diff --git a/pkg/Microsoft.NETCore.Platforms/runtime.json b/pkg/Microsoft.NETCore.Platforms/runtime.json
index f9ee87f9febf..af6347b76c6f 100644
--- a/pkg/Microsoft.NETCore.Platforms/runtime.json
+++ b/pkg/Microsoft.NETCore.Platforms/runtime.json
@@ -161,6 +161,41 @@
"linux-x86"
]
},
+ "debian.10": {
+ "#import": [
+ "debian"
+ ]
+ },
+ "debian.10-arm": {
+ "#import": [
+ "debian.10",
+ "debian-arm"
+ ]
+ },
+ "debian.10-arm64": {
+ "#import": [
+ "debian.10",
+ "debian-arm64"
+ ]
+ },
+ "debian.10-armel": {
+ "#import": [
+ "debian.10",
+ "debian-armel"
+ ]
+ },
+ "debian.10-x64": {
+ "#import": [
+ "debian.10",
+ "debian-x64"
+ ]
+ },
+ "debian.10-x86": {
+ "#import": [
+ "debian.10",
+ "debian-x86"
+ ]
+ },
"debian.8": {
"#import": [
"debian"
@@ -319,6 +354,28 @@
"fedora-x64"
]
},
+ "fedora.30": {
+ "#import": [
+ "fedora"
+ ]
+ },
+ "fedora.30-x64": {
+ "#import": [
+ "fedora.30",
+ "fedora-x64"
+ ]
+ },
+ "fedora.31": {
+ "#import": [
+ "fedora"
+ ]
+ },
+ "fedora.31-x64": {
+ "#import": [
+ "fedora.31",
+ "fedora-x64"
+ ]
+ },
"freebsd": {
"#import": [
"unix"
@@ -554,6 +611,28 @@
"ubuntu.18.04-x64"
]
},
+ "linuxmint.19.1": {
+ "#import": [
+ "linuxmint.19"
+ ]
+ },
+ "linuxmint.19.1-x64": {
+ "#import": [
+ "linuxmint.19.1",
+ "linuxmint.19-x64"
+ ]
+ },
+ "linuxmint.19.2": {
+ "#import": [
+ "linuxmint.19.1"
+ ]
+ },
+ "linuxmint.19.2-x64": {
+ "#import": [
+ "linuxmint.19.2",
+ "linuxmint.19.1-x64"
+ ]
+ },
"ol": {
"#import": [
"rhel"
@@ -669,6 +748,32 @@
"rhel.7.6-x64"
]
},
+ "ol.8": {
+ "#import": [
+ "ol",
+ "rhel.8"
+ ]
+ },
+ "ol.8-x64": {
+ "#import": [
+ "ol.8",
+ "ol-x64",
+ "rhel.8-x64"
+ ]
+ },
+ "ol.8.0": {
+ "#import": [
+ "ol.8",
+ "rhel.8.0"
+ ]
+ },
+ "ol.8.0-x64": {
+ "#import": [
+ "ol.8.0",
+ "ol.8-x64",
+ "rhel.8.0-x64"
+ ]
+ },
"opensuse": {
"#import": [
"linux"
@@ -702,6 +807,17 @@
"opensuse-x64"
]
},
+ "opensuse.15.1": {
+ "#import": [
+ "opensuse"
+ ]
+ },
+ "opensuse.15.1-x64": {
+ "#import": [
+ "opensuse.15.1",
+ "opensuse-x64"
+ ]
+ },
"opensuse.42.1": {
"#import": [
"opensuse"
@@ -988,15 +1104,37 @@
"sles.12.2-x64"
]
},
- "sles.15": {
+ "sles.12.4": {
"#import": [
"sles.12.3"
]
},
+ "sles.12.4-x64": {
+ "#import": [
+ "sles.12.4",
+ "sles.12.3-x64"
+ ]
+ },
+ "sles.15": {
+ "#import": [
+ "sles.12.4"
+ ]
+ },
"sles.15-x64": {
"#import": [
"sles.15",
- "sles.12.3-x64"
+ "sles.12.4-x64"
+ ]
+ },
+ "sles.15.1": {
+ "#import": [
+ "sles.15"
+ ]
+ },
+ "sles.15.1-x64": {
+ "#import": [
+ "sles.15.1",
+ "sles.15-x64"
]
},
"tizen": {
@@ -1345,6 +1483,64 @@
"ubuntu-x86"
]
},
+ "ubuntu.19.04": {
+ "#import": [
+ "ubuntu"
+ ]
+ },
+ "ubuntu.19.04-arm": {
+ "#import": [
+ "ubuntu.19.04",
+ "ubuntu-arm"
+ ]
+ },
+ "ubuntu.19.04-arm64": {
+ "#import": [
+ "ubuntu.19.04",
+ "ubuntu-arm64"
+ ]
+ },
+ "ubuntu.19.04-x64": {
+ "#import": [
+ "ubuntu.19.04",
+ "ubuntu-x64"
+ ]
+ },
+ "ubuntu.19.04-x86": {
+ "#import": [
+ "ubuntu.19.04",
+ "ubuntu-x86"
+ ]
+ },
+ "ubuntu.19.10": {
+ "#import": [
+ "ubuntu"
+ ]
+ },
+ "ubuntu.19.10-arm": {
+ "#import": [
+ "ubuntu.19.10",
+ "ubuntu-arm"
+ ]
+ },
+ "ubuntu.19.10-arm64": {
+ "#import": [
+ "ubuntu.19.10",
+ "ubuntu-arm64"
+ ]
+ },
+ "ubuntu.19.10-x64": {
+ "#import": [
+ "ubuntu.19.10",
+ "ubuntu-x64"
+ ]
+ },
+ "ubuntu.19.10-x86": {
+ "#import": [
+ "ubuntu.19.10",
+ "ubuntu-x86"
+ ]
+ },
"unix": {
"#import": [
"any"
diff --git a/pkg/Microsoft.NETCore.Platforms/runtimeGroups.props b/pkg/Microsoft.NETCore.Platforms/runtimeGroups.props
index a819d57ddc61..55299c20432a 100644
--- a/pkg/Microsoft.NETCore.Platforms/runtimeGroups.props
+++ b/pkg/Microsoft.NETCore.Platforms/runtimeGroups.props
@@ -35,14 +35,14 @@
linuxx64;x86;arm;armel;arm64
- 8;9
+ 8;9;10falselinuxx64
- 23;24;25;26;27;28;29
+ 23;24;25;26;27;28;29;30;31false
@@ -65,7 +65,7 @@
ubuntu.18.04x64
-
+ 1;2
@@ -74,12 +74,18 @@
7;7.0;7.1;7.2;7.3;7.4;7.5;7.6true
+
+ rhel
+ x64
+ 8;8.0
+ true
+ linuxx64
- 13.2;15.0;42.1;42.2;42.3
+ 13.2;15.0;15.1;42.1;42.2;42.3false
@@ -107,7 +113,6 @@
x647;7.0;7.1;7.2;7.3;7.4;7.5;7.6
-
linuxx64
@@ -117,7 +122,7 @@
linuxx64
- 12;12.1;12.2;12.3;15
+ 12;12.1;12.2;12.3;12.4;15;15.1
@@ -135,7 +140,7 @@
debianx64;x86;arm;arm64
- 16.04;16.10;17.04;17.10;18.04;18.10
+ 16.04;16.10;17.04;17.10;18.04;18.10;19.04;19.10false
diff --git a/pkg/Microsoft.NETCore.Targets/Microsoft.NETCore.Targets.pkgproj b/pkg/Microsoft.NETCore.Targets/Microsoft.NETCore.Targets.pkgproj
index d57412478ead..2c48d5fbe229 100644
--- a/pkg/Microsoft.NETCore.Targets/Microsoft.NETCore.Targets.pkgproj
+++ b/pkg/Microsoft.NETCore.Targets/Microsoft.NETCore.Targets.pkgproj
@@ -11,7 +11,6 @@
lib/netstandard1.0
-
diff --git a/pkg/Microsoft.NETCore.Targets/runtime.json b/pkg/Microsoft.NETCore.Targets/runtime.json
deleted file mode 100644
index 925514c3611f..000000000000
--- a/pkg/Microsoft.NETCore.Targets/runtime.json
+++ /dev/null
@@ -1,92 +0,0 @@
-{
- "supports": {
- "uwp.10.0.app": {
- "uap10.0": [
- "win10-x86",
- "win10-x86-aot",
- "win10-x64",
- "win10-x64-aot",
- "win10-arm",
- "win10-arm-aot"
- ]
- },
- "net45.app": {
- "net45": [
- "",
- "win-x86",
- "win-x64"
- ]
- },
- "net451.app": {
- "net451": [
- "",
- "win-x86",
- "win-x64"
- ]
- },
- "net452.app": {
- "net452": [
- "",
- "win-x86",
- "win-x64"
- ]
- },
- "net46.app": {
- "net46": [
- "",
- "win-x86",
- "win-x64"
- ]
- },
- "net461.app": {
- "net461": [
- "",
- "win-x86",
- "win-x64"
- ]
- },
- "net462.app": {
- "net462": [
- "",
- "win-x86",
- "win-x64"
- ]
- },
- "netcoreapp1.0.app": {
- "netcoreapp1.0": [
- "win7-x86",
- "win7-x64",
- "osx.10.11-x64",
- "centos.7-x64",
- "debian.8-x64",
- "linuxmint.17-x64",
- "opensuse.13.2-x64",
- "rhel.7.2-x64",
- "ubuntu.14.04-x64",
- "ubuntu.16.04-x64"
- ]
- },
- "win8.app": {
- "win8": ""
- },
- "win81.app": {
- "win81": ""
- },
- "wp8.app": {
- "wp8": ""
- },
- "wp81.app": {
- "wp81": ""
- },
- "wpa81.app": {
- "wpa81": ""
- },
- "dnxcore50.app": {
- "dnxcore50": [
- "win7-x86",
- "win7-x64"
- ]
- }
- }
- }
-
diff --git a/pkg/Microsoft.Private.CoreFx.OOB/Microsoft.Private.CoreFx.OOB.builds b/pkg/Microsoft.Private.CoreFx.OOB/Microsoft.Private.CoreFx.OOB.builds
new file mode 100644
index 000000000000..17a7f1689029
--- /dev/null
+++ b/pkg/Microsoft.Private.CoreFx.OOB/Microsoft.Private.CoreFx.OOB.builds
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pkg/Microsoft.Private.CoreFx.OOB/Microsoft.Private.CoreFx.OOB.pkgproj b/pkg/Microsoft.Private.CoreFx.OOB/Microsoft.Private.CoreFx.OOB.pkgproj
new file mode 100644
index 000000000000..def37549519f
--- /dev/null
+++ b/pkg/Microsoft.Private.CoreFx.OOB/Microsoft.Private.CoreFx.OOB.pkgproj
@@ -0,0 +1,34 @@
+
+
+
+
+ <_PreReleasePackageVersion>$(PackageVersion)
+
+ false
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/pkg/Microsoft.Private.PackageBaseline/Microsoft.Private.PackageBaseline.pkgproj b/pkg/Microsoft.Private.PackageBaseline/Microsoft.Private.PackageBaseline.pkgproj
index b9bd433bee7a..52b3b657ca59 100644
--- a/pkg/Microsoft.Private.PackageBaseline/Microsoft.Private.PackageBaseline.pkgproj
+++ b/pkg/Microsoft.Private.PackageBaseline/Microsoft.Private.PackageBaseline.pkgproj
@@ -30,10 +30,10 @@
$(UAPvNextTFM)
-
+ netstandard2.0
-
+ net461
diff --git a/pkg/Microsoft.Private.PackageBaseline/packageIndex.json b/pkg/Microsoft.Private.PackageBaseline/packageIndex.json
index e1ab4eb8d7e0..18f5f8a3eb15 100644
--- a/pkg/Microsoft.Private.PackageBaseline/packageIndex.json
+++ b/pkg/Microsoft.Private.PackageBaseline/packageIndex.json
@@ -27,6 +27,18 @@
"net45": "4.0.0.0"
}
},
+ "Microsoft.Bcl.AsyncInterfaces": {
+ "InboxOn": {},
+ "AssemblyVersionInPackageVersion": {
+ "1.0.0.0": "1.0.0"
+ }
+ },
+ "Microsoft.Bcl.HashCode": {
+ "InboxOn": {},
+ "AssemblyVersionInPackageVersion": {
+ "1.0.0.0": "1.0.0"
+ }
+ },
"Microsoft.Bcl.Json.Sources": {
"InboxOn": {}
},
@@ -68,7 +80,7 @@
"4.4.0",
"4.5.0"
],
- "BaselineVersion": "4.5.0",
+ "BaselineVersion": "4.6.0",
"InboxOn": {
"netcoreapp2.0": "4.0.3.0",
"netcoreapp2.1": "4.0.4.0",
@@ -101,7 +113,7 @@
"4.0.1.0": "4.0.1",
"4.0.2.0": "4.3.0",
"4.0.3.0": "4.4.0",
- "4.0.4.0": "4.6.0"
+ "4.0.4.0": "4.5.0"
}
},
"Microsoft.Devices.Sensors": {
@@ -139,9 +151,14 @@
"1.0.2",
"1.1.0",
"2.0.0",
- "2.1.0"
- ],
- "BaselineVersion": "2.0.0",
+ "2.1.0",
+ "2.1.1",
+ "2.1.2",
+ "2.1.3",
+ "2.1.4",
+ "2.2.0"
+ ],
+ "BaselineVersion": "3.0.0",
"InboxOn": {}
},
"Microsoft.NETCore.Targets": {
@@ -153,7 +170,7 @@
"2.0.0",
"2.1.0"
],
- "BaselineVersion": "2.0.0",
+ "BaselineVersion": "3.0.0",
"InboxOn": {}
},
"Microsoft.Phone": {
@@ -189,6 +206,9 @@
"Microsoft.Private.CoreFx.NETCoreApp": {
"InboxOn": {}
},
+ "Microsoft.Private.CoreFx.OOB": {
+ "InboxOn": {}
+ },
"Microsoft.Private.PackageBaseline": {
"InboxOn": {}
},
@@ -219,7 +239,7 @@
"10.0.1.0": "10.0.1",
"10.0.2.0": "10.1.0",
"10.0.3.0": "10.2.0",
- "10.0.4.0": "10.4.0"
+ "10.0.4.0": "10.3.0"
}
},
"Microsoft.VisualBasic.Compatibility": {
@@ -281,7 +301,7 @@
"4.4.0",
"4.5.0"
],
- "BaselineVersion": "4.5.0",
+ "BaselineVersion": "4.6.0",
"InboxOn": {},
"AssemblyVersionInPackageVersion": {
"4.0.0.0": "4.0.0",
@@ -298,7 +318,7 @@
"4.4.0",
"4.5.0"
],
- "BaselineVersion": "4.5.0",
+ "BaselineVersion": "4.6.0",
"InboxOn": {},
"AssemblyVersionInPackageVersion": {
"4.0.0.0": "4.0.0",
@@ -312,7 +332,7 @@
"StableVersions": [
"4.5.0"
],
- "BaselineVersion": "4.5.0",
+ "BaselineVersion": "4.6.0",
"InboxOn": {},
"AssemblyVersionInPackageVersion": {
"4.0.0.0": "4.5.0",
@@ -321,13 +341,16 @@
},
"Microsoft.Windows.Compatibility": {
"StableVersions": [
- "2.0.0"
+ "2.0.0",
+ "2.0.1",
+ "2.1.0"
],
"InboxOn": {}
},
"Microsoft.Windows.Compatibility.Shims": {
"StableVersions": [
- "2.0.0"
+ "2.0.0",
+ "2.0.1"
],
"InboxOn": {}
},
@@ -427,6 +450,7 @@
"netcoreapp3.0": "2.1.0.0",
"net461": "2.0.0.0",
"netstandard2.0": "2.0.0.0",
+ "netstandard2.1": "2.1.0.0",
"uap10.0.16299": "2.0.0.0",
"uap10.0.16300": "2.1.0.0"
}
@@ -496,7 +520,7 @@
"4.4.0",
"4.5.0"
],
- "BaselineVersion": "4.5.0",
+ "BaselineVersion": "4.6.0",
"InboxOn": {}
},
"runtime.native.System.IO.Ports": {
@@ -645,7 +669,7 @@
"4.4.0",
"4.5.0"
],
- "BaselineVersion": "4.5.0",
+ "BaselineVersion": "4.6.0",
"InboxOn": {},
"AssemblyVersionInPackageVersion": {
"4.0.0.0": "4.4.0",
@@ -740,7 +764,7 @@
"1.4.0",
"1.5.0"
],
- "BaselineVersion": "1.5.0",
+ "BaselineVersion": "1.6.0",
"InboxOn": {
"netcoreapp2.0": "1.2.2.0",
"netcoreapp2.1": "1.2.3.0",
@@ -858,7 +882,7 @@
"4.4.0",
"4.5.0"
],
- "BaselineVersion": "4.5.0",
+ "BaselineVersion": "4.6.0",
"InboxOn": {
"netcoreapp2.0": "4.2.0.0",
"netcoreapp2.1": "4.2.1.0",
@@ -891,7 +915,7 @@
"StableVersions": [
"4.5.0"
],
- "BaselineVersion": "4.5.0",
+ "BaselineVersion": "4.6.0",
"InboxOn": {
"net45": "4.0.0.0",
"monoandroid10": "Any",
@@ -903,7 +927,7 @@
"xamarinwatchos10": "Any"
},
"AssemblyVersionInPackageVersion": {
- "4.0.0.0": "4.6.0"
+ "4.0.0.0": "4.5.0"
}
},
"System.ComponentModel.Composition.Registration": {
@@ -1031,7 +1055,7 @@
"1.1.0",
"1.2.0"
],
- "BaselineVersion": "1.2.0",
+ "BaselineVersion": "1.3.0",
"InboxOn": {}
},
"System.Composition.AttributedModel": {
@@ -1040,7 +1064,7 @@
"1.1.0",
"1.2.0"
],
- "BaselineVersion": "1.2.0",
+ "BaselineVersion": "1.3.0",
"InboxOn": {},
"AssemblyVersionInPackageVersion": {
"1.0.31.0": "1.0.31",
@@ -1055,7 +1079,7 @@
"1.1.0",
"1.2.0"
],
- "BaselineVersion": "1.2.0",
+ "BaselineVersion": "1.3.0",
"InboxOn": {},
"AssemblyVersionInPackageVersion": {
"1.0.31.0": "1.0.31",
@@ -1070,7 +1094,7 @@
"1.1.0",
"1.2.0"
],
- "BaselineVersion": "1.2.0",
+ "BaselineVersion": "1.3.0",
"InboxOn": {},
"AssemblyVersionInPackageVersion": {
"1.0.31.0": "1.0.31",
@@ -1085,7 +1109,7 @@
"1.1.0",
"1.2.0"
],
- "BaselineVersion": "1.2.0",
+ "BaselineVersion": "1.3.0",
"InboxOn": {},
"AssemblyVersionInPackageVersion": {
"1.0.31.0": "1.0.31",
@@ -1100,7 +1124,7 @@
"1.1.0",
"1.2.0"
],
- "BaselineVersion": "1.2.0",
+ "BaselineVersion": "1.3.0",
"InboxOn": {},
"AssemblyVersionInPackageVersion": {
"1.0.31.0": "1.0.31",
@@ -1121,7 +1145,7 @@
"4.4.0",
"4.5.0"
],
- "BaselineVersion": "4.5.0",
+ "BaselineVersion": "4.6.0",
"InboxOn": {},
"AssemblyVersionInPackageVersion": {
"4.0.0.0": "4.4.0",
@@ -1232,12 +1256,12 @@
],
"BaselineVersion": "4.5.0",
"InboxOn": {
- "net45": "4.0.0.0",
"netcoreapp3.0": "4.0.0.0",
+ "net45": "4.0.0.0",
"uap10.0.16300": "4.0.0.0"
},
"AssemblyVersionInPackageVersion": {
- "4.0.0.0": "4.6.0"
+ "4.0.0.0": "4.5.0"
}
},
"System.Data.Entity": {
@@ -1260,13 +1284,19 @@
"StableVersions": [
"4.5.0"
],
- "BaselineVersion": "4.5.0",
+ "BaselineVersion": "4.6.0",
"InboxOn": {},
"AssemblyVersionInPackageVersion": {
"4.0.0.0": "4.5.0",
"4.0.1.0": "4.6.0"
}
},
+ "System.Data.OleDb": {
+ "InboxOn": {},
+ "AssemblyVersionInPackageVersion": {
+ "4.0.0.0": "4.6.0"
+ }
+ },
"System.Data.OracleClient": {
"InboxOn": {
"net45": "4.0.0.0"
@@ -1298,9 +1328,12 @@
"4.1.0",
"4.3.0",
"4.4.0",
- "4.5.1"
+ "4.5.1",
+ "4.5.0",
+ "4.6.0",
+ "4.6.1"
],
- "BaselineVersion": "4.5.1",
+ "BaselineVersion": "4.7.0",
"InboxOn": {
"net461": "4.1.0.0",
"monoandroid10": "Any",
@@ -1319,6 +1352,7 @@
"4.2.0.0": "4.4.0",
"4.4.0.0": "4.5.0",
"4.5.0.0": "4.6.0",
+ "4.5.0.1": "4.6.1",
"4.6.0.0": "4.7.0"
}
},
@@ -1430,12 +1464,13 @@
"4.0.0",
"4.3.0",
"4.4.1",
- "4.5.0"
+ "4.5.0",
+ "4.5.1"
],
- "BaselineVersion": "4.5.0",
+ "BaselineVersion": "4.6.0",
"InboxOn": {
"netcoreapp2.0": "4.0.2.1",
- "netcoreapp2.1": "4.0.3.0",
+ "netcoreapp2.1": "4.0.3.1",
"netcoreapp3.0": "4.0.4.0"
},
"AssemblyVersionInPackageVersion": {
@@ -1444,6 +1479,7 @@
"4.0.2.0": "4.4.0",
"4.0.2.1": "4.4.1",
"4.0.3.0": "4.5.0",
+ "4.0.3.1": "4.5.1",
"4.0.4.0": "4.6.0"
}
},
@@ -1451,6 +1487,7 @@
"StableVersions": [
"4.5.0"
],
+ "BaselineVersion": "4.6.0",
"InboxOn": {},
"AssemblyVersionInPackageVersion": {
"4.0.0.0": "4.5.0",
@@ -1485,7 +1522,7 @@
"StableVersions": [
"4.5.0"
],
- "BaselineVersion": "4.5.0",
+ "BaselineVersion": "4.6.0",
"InboxOn": {
"monoandroid10": "Any",
"monotouch10": "Any",
@@ -1695,36 +1732,36 @@
"StableVersions": [
"4.5.0"
],
- "BaselineVersion": "4.5.0",
+ "BaselineVersion": "4.6.0",
"InboxOn": {
"net45": "4.0.0.0"
},
"AssemblyVersionInPackageVersion": {
- "4.0.0.0": "4.6.0"
+ "4.0.0.0": "4.5.0"
}
},
"System.DirectoryServices.AccountManagement": {
"StableVersions": [
"4.5.0"
],
- "BaselineVersion": "4.5.0",
+ "BaselineVersion": "4.6.0",
"InboxOn": {
"net45": "4.0.0.0"
},
"AssemblyVersionInPackageVersion": {
- "4.0.0.0": "4.6.0"
+ "4.0.0.0": "4.5.0"
}
},
"System.DirectoryServices.Protocols": {
"StableVersions": [
"4.5.0"
],
- "BaselineVersion": "4.5.0",
+ "BaselineVersion": "4.6.0",
"InboxOn": {
"net45": "4.0.0.0"
},
"AssemblyVersionInPackageVersion": {
- "4.0.0.0": "4.6.0"
+ "4.0.0.0": "4.5.0"
}
},
"System.Drawing": {
@@ -1737,9 +1774,10 @@
},
"System.Drawing.Common": {
"StableVersions": [
- "4.5.0"
+ "4.5.0",
+ "4.5.1"
],
- "BaselineVersion": "4.5.0",
+ "BaselineVersion": "4.6.0",
"InboxOn": {
"monoandroid10": "Any",
"monotouch10": "Any",
@@ -1750,6 +1788,7 @@
},
"AssemblyVersionInPackageVersion": {
"4.0.0.0": "4.5.0",
+ "4.0.0.1": "4.5.1",
"4.0.1.0": "4.6.0"
}
},
@@ -2109,7 +2148,7 @@
"4.4.0",
"4.5.0"
],
- "BaselineVersion": "4.5.0",
+ "BaselineVersion": "4.6.0",
"InboxOn": {},
"AssemblyVersionInPackageVersion": {
"4.0.0.0": "4.0.0",
@@ -2255,7 +2294,7 @@
"4.4.0",
"4.5.0"
],
- "BaselineVersion": "4.5.0",
+ "BaselineVersion": "4.6.0",
"InboxOn": {},
"AssemblyVersionInPackageVersion": {
"4.0.0.0": "4.0.0",
@@ -2267,12 +2306,16 @@
},
"System.IO.Pipelines": {
"StableVersions": [
- "4.5.0"
+ "4.5.0",
+ "4.5.1",
+ "4.5.2",
+ "4.5.3"
],
- "BaselineVersion": "4.5.0",
+ "BaselineVersion": "4.6.0",
"InboxOn": {},
"AssemblyVersionInPackageVersion": {
"4.0.0.0": "4.5.0",
+ "4.0.0.1": "4.5.2",
"4.0.1.0": "4.6.0"
}
},
@@ -2316,14 +2359,14 @@
"4.4.0",
"4.5.0"
],
- "BaselineVersion": "4.5.0",
+ "BaselineVersion": "4.6.0",
"InboxOn": {
"uap10.0.16299": "4.0.1.0",
"uap10.0.16300": "4.0.2.0"
},
"AssemblyVersionInPackageVersion": {
"4.0.0.0": "4.4.0",
- "4.0.1.0": "4.6.0",
+ "4.0.1.0": "4.5.0",
"4.0.2.0": "4.6.0"
}
},
@@ -2358,7 +2401,7 @@
"4.4.0",
"4.5.0"
],
- "BaselineVersion": "4.5.0",
+ "BaselineVersion": "4.6.0",
"InboxOn": {
"monoandroid10": "Any",
"monotouch10": "Any",
@@ -2496,7 +2539,7 @@
"4.0.1",
"4.3.0"
],
- "BaselineVersion": "4.3.0",
+ "BaselineVersion": "4.6.0",
"InboxOn": {
"netcoreapp2.0": "4.0.3.0",
"net45": "4.0.0.0",
@@ -2533,12 +2576,12 @@
"StableVersions": [
"4.5.0"
],
- "BaselineVersion": "4.5.0",
+ "BaselineVersion": "4.6.0",
"InboxOn": {
"net45": "4.0.0.0"
},
"AssemblyVersionInPackageVersion": {
- "4.0.0.0": "4.6.0"
+ "4.0.0.0": "4.5.0"
}
},
"System.Management.Instrumentation": {
@@ -2549,8 +2592,11 @@
"System.Memory": {
"StableVersions": [
"4.5.0",
- "4.5.1"
+ "4.5.1",
+ "4.5.2",
+ "4.5.3"
],
+ "BaselineVersion": "4.5.3",
"InboxOn": {
"netcoreapp2.1": "4.1.0.0",
"netcoreapp3.0": "4.2.0.0",
@@ -2563,7 +2609,9 @@
"xamarinwatchos10": "Any"
},
"AssemblyVersionInPackageVersion": {
+ "4.0.0.0": "4.4.0",
"4.0.1.0": "4.5.0",
+ "4.0.1.1": "4.5.3",
"4.1.0.0": "4.6.0"
}
},
@@ -2694,16 +2742,24 @@
"4.0.0",
"4.0.1",
"4.3.0",
+ "4.3.3",
"4.4.0",
- "4.5.0"
+ "4.5.0",
+ "4.5.1",
+ "4.5.2",
+ "4.5.3",
+ "4.5.4"
],
- "BaselineVersion": "4.5.0",
+ "BaselineVersion": "4.6.0",
"InboxOn": {},
"AssemblyVersionInPackageVersion": {
"4.0.0.0": "4.0.0",
"4.0.1.0": "4.3.0",
+ "4.0.1.3": "4.3.3",
"4.0.2.0": "4.4.0",
"4.0.3.0": "4.5.0",
+ "4.0.3.1": "4.5.1",
+ "4.0.3.2": "4.5.3",
"4.0.4.0": "4.6.0"
}
},
@@ -3077,12 +3133,17 @@
},
"System.Net.WebSockets.WebSocketProtocol": {
"StableVersions": [
- "4.5.1"
+ "4.5.1",
+ "4.5.0",
+ "4.5.2",
+ "4.5.3"
],
- "BaselineVersion": "4.5.1",
+ "BaselineVersion": "4.6.0",
"InboxOn": {},
"AssemblyVersionInPackageVersion": {
"4.0.0.0": "4.5.0",
+ "4.0.0.1": "4.5.2",
+ "4.0.0.2": "4.5.3",
"4.0.1.0": "4.6.0"
}
},
@@ -3111,6 +3172,7 @@
"StableVersions": [
"0.1.0"
],
+ "BaselineVersion": "0.2.0",
"InboxOn": {},
"AssemblyVersionInPackageVersion": {
"0.1.0.0": "0.1.0",
@@ -3148,8 +3210,7 @@
"4.1.1.0": "4.1.1",
"4.1.2.0": "4.3.0",
"4.1.3.0": "4.4.0",
- "4.1.4.0": "4.5.0",
- "4.1.5.0": "4.6.0"
+ "4.1.4.0": "4.5.0"
}
},
"System.Numerics.Vectors.WindowsRuntime": {
@@ -3298,11 +3359,12 @@
"4.0.0",
"4.3.0"
],
- "BaselineVersion": "4.3.0",
+ "BaselineVersion": "4.6.0",
"InboxOn": {
"net45": "4.0.0.0",
"portable46-net451+win81": "4.0.0.0",
"portable45-net45+win8": "4.0.0.0",
+ "uap10.0.16299": "4.0.3.0",
"win8": "4.0.0.0"
},
"AssemblyVersionInPackageVersion": {
@@ -3318,9 +3380,10 @@
"4.0.1",
"4.3.0",
"4.4.0",
- "4.5.1"
+ "4.5.1",
+ "4.5.0"
],
- "BaselineVersion": "4.5.1",
+ "BaselineVersion": "4.6.0",
"InboxOn": {
"netcoreapp2.0": "4.0.3.0",
"netcoreapp2.1": "4.0.4.0",
@@ -3349,11 +3412,12 @@
"4.0.1",
"4.3.0"
],
- "BaselineVersion": "4.3.0",
+ "BaselineVersion": "4.6.0",
"InboxOn": {
"netcoreapp2.0": "4.1.0.0",
"netcoreapp2.1": "4.1.1.0",
"net45": "4.0.0.0",
+ "netstandard2.1": "4.0.0.0",
"monoandroid10": "Any",
"xamarinmac20": "Any"
},
@@ -3376,6 +3440,7 @@
"netcoreapp2.0": "4.0.3.0",
"net45": "4.0.0.0",
"portable45-net45+wp8": "4.0.0.0",
+ "netstandard2.1": "4.0.0.0",
"monoandroid10": "Any",
"monotouch10": "Any",
"wp8": "4.0.0.0",
@@ -3402,6 +3467,7 @@
"netcoreapp2.0": "4.0.3.0",
"net45": "4.0.0.0",
"portable45-net45+wp8": "4.0.0.0",
+ "netstandard2.1": "4.0.0.0",
"monoandroid10": "Any",
"monotouch10": "Any",
"wp8": "4.0.0.0",
@@ -3467,7 +3533,7 @@
"1.5.0",
"1.6.0"
],
- "BaselineVersion": "1.6.0",
+ "BaselineVersion": "1.7.0",
"InboxOn": {
"netcoreapp2.0": "1.4.2.0",
"netcoreapp2.1": "1.4.3.0",
@@ -3538,9 +3604,10 @@
"4.1.0",
"4.3.0",
"4.4.0",
- "4.5.0"
+ "4.5.0",
+ "4.5.1"
],
- "BaselineVersion": "4.5.0",
+ "BaselineVersion": "4.6.0",
"InboxOn": {
"netcoreapp2.0": "4.1.2.0",
"netcoreapp2.1": "4.1.3.0",
@@ -3563,6 +3630,12 @@
"4.1.4.0": "4.6.0"
}
},
+ "System.Resources.Extensions": {
+ "InboxOn": {},
+ "AssemblyVersionInPackageVersion": {
+ "4.0.0.0": "4.6.0"
+ }
+ },
"System.Resources.Reader": {
"StableVersions": [
"4.0.0",
@@ -3701,7 +3774,7 @@
"StableVersions": [
"4.5.0"
],
- "BaselineVersion": "4.5.0",
+ "BaselineVersion": "4.6.0",
"InboxOn": {
"net45": "4.0.0.0",
"monoandroid10": "Any",
@@ -3712,23 +3785,25 @@
"xamarinwatchos10": "Any"
},
"AssemblyVersionInPackageVersion": {
- "4.0.0.0": "4.6.0"
+ "4.0.0.0": "4.5.0"
}
},
"System.Runtime.CompilerServices.Unsafe": {
"StableVersions": [
"4.4.0",
"4.5.0",
- "4.5.1"
+ "4.5.1",
+ "4.5.2"
],
- "BaselineVersion": "4.5.1",
+ "BaselineVersion": "4.6.0",
"InboxOn": {
- "uap10.0.16300": "4.0.5.0",
- "netcoreapp3.0": "4.0.5.0"
+ "netcoreapp3.0": "4.0.5.0",
+ "uap10.0.16300": "4.0.5.0"
},
"AssemblyVersionInPackageVersion": {
"4.0.3.0": "4.4.0",
"4.0.4.0": "4.5.0",
+ "4.0.4.1": "4.5.2",
"4.0.5.0": "4.6.0"
}
},
@@ -3901,7 +3976,7 @@
"4.0.1",
"4.3.0"
],
- "BaselineVersion": "4.3.0",
+ "BaselineVersion": "4.6.0",
"InboxOn": {
"netcoreapp2.0": "4.0.3.0",
"net45": "4.0.0.0",
@@ -4223,7 +4298,7 @@
"4.0.0",
"4.3.0"
],
- "BaselineVersion": "4.3.0",
+ "BaselineVersion": "4.6.0",
"InboxOn": {
"net45": "4.0.0.0",
"portable46-win81+wpa81": "4.0.0.0",
@@ -4253,7 +4328,7 @@
"4.4.0",
"4.5.0"
],
- "BaselineVersion": "4.5.0",
+ "BaselineVersion": "4.6.0",
"InboxOn": {
"uap10.0.16299": "4.1.1.0"
},
@@ -4261,7 +4336,7 @@
"4.0.0.0": "4.0.0",
"4.0.1.0": "4.3.0",
"4.1.0.0": "4.4.0",
- "4.1.1.0": "4.6.0",
+ "4.1.1.0": "4.5.0",
"4.1.2.0": "4.6.0"
}
},
@@ -4324,7 +4399,7 @@
"4.4.0",
"4.5.0"
],
- "BaselineVersion": "4.5.0",
+ "BaselineVersion": "4.6.0",
"InboxOn": {
"monoandroid10": "Any",
"monotouch10": "Any",
@@ -4398,15 +4473,17 @@
"4.0.0",
"4.3.0",
"4.4.0",
- "4.5.0"
+ "4.5.0",
+ "4.5.1"
],
- "BaselineVersion": "4.5.0",
+ "BaselineVersion": "4.6.0",
"InboxOn": {},
"AssemblyVersionInPackageVersion": {
"4.0.0.0": "4.0.0",
"4.0.1.0": "4.3.0",
"4.1.0.0": "4.4.0",
"4.1.1.0": "4.5.0",
+ "4.1.1.1": "4.5.1",
"4.1.2.0": "4.6.0"
}
},
@@ -4415,15 +4492,19 @@
"4.0.0",
"4.3.0",
"4.4.0",
- "4.5.0"
+ "4.5.0",
+ "4.5.1",
+ "4.5.2"
],
- "BaselineVersion": "4.5.0",
+ "BaselineVersion": "4.6.0",
"InboxOn": {},
"AssemblyVersionInPackageVersion": {
"4.0.0.0": "4.0.0",
"4.0.1.0": "4.3.0",
"4.0.2.0": "4.4.0",
"4.0.3.0": "4.5.0",
+ "4.0.3.1": "4.5.1",
+ "4.0.3.2": "4.5.2",
"4.0.4.0": "4.6.0",
"4.1.0.0": "4.6.0"
}
@@ -4459,7 +4540,7 @@
"4.4.0",
"4.5.0"
],
- "BaselineVersion": "4.5.0",
+ "BaselineVersion": "4.6.0",
"InboxOn": {
"monoandroid10": "Any",
"monotouch10": "Any",
@@ -4506,7 +4587,7 @@
"4.4.0",
"4.5.0"
],
- "BaselineVersion": "4.5.0",
+ "BaselineVersion": "4.6.0",
"InboxOn": {},
"AssemblyVersionInPackageVersion": {
"4.0.0.0": "4.4.0",
@@ -4519,7 +4600,7 @@
"4.4.0",
"4.5.0"
],
- "BaselineVersion": "4.5.0",
+ "BaselineVersion": "4.6.0",
"InboxOn": {},
"AssemblyVersionInPackageVersion": {
"4.0.0.0": "4.4.0",
@@ -4572,9 +4653,10 @@
"4.0.0",
"4.3.0",
"4.4.0",
- "4.5.0"
+ "4.5.0",
+ "4.5.1"
],
- "BaselineVersion": "4.5.0",
+ "BaselineVersion": "4.6.0",
"InboxOn": {
"uap10.0.16299": "4.1.1.0"
},
@@ -4582,7 +4664,8 @@
"4.0.0.0": "4.0.0",
"4.0.1.0": "4.3.0",
"4.1.0.0": "4.4.0",
- "4.1.1.0": "4.6.0",
+ "4.1.1.0": "4.5.0",
+ "4.1.1.1": "4.5.1",
"4.1.2.0": "4.6.0"
}
},
@@ -4750,7 +4833,7 @@
"StableVersions": [
"4.5.0"
],
- "BaselineVersion": "4.5.0",
+ "BaselineVersion": "4.6.0",
"InboxOn": {},
"AssemblyVersionInPackageVersion": {
"4.0.0.0": "4.5.0",
@@ -4798,7 +4881,7 @@
"4.4.0",
"4.5.0"
],
- "BaselineVersion": "4.5.0",
+ "BaselineVersion": "4.6.0",
"InboxOn": {},
"AssemblyVersionInPackageVersion": {
"4.1.0.0": "4.1.0",
@@ -4862,9 +4945,10 @@
"4.0.1",
"4.3.0",
"4.4.0",
- "4.5.0"
+ "4.5.0",
+ "4.5.1"
],
- "BaselineVersion": "4.5.0",
+ "BaselineVersion": "4.6.0",
"InboxOn": {
"monoandroid10": "Any",
"monotouch10": "Any",
@@ -4934,8 +5018,10 @@
"4.4.0",
"4.5.0"
],
- "BaselineVersion": "4.5.0",
- "InboxOn": {},
+ "BaselineVersion": "4.6.0",
+ "InboxOn": {
+ "netcoreapp3.0": "4.0.4.0"
+ },
"AssemblyVersionInPackageVersion": {
"4.0.0.0": "4.0.0",
"4.0.1.0": "4.3.0",
@@ -5047,7 +5133,7 @@
"4.4.0",
"4.5.0"
],
- "BaselineVersion": "4.5.0",
+ "BaselineVersion": "4.6.0",
"InboxOn": {},
"AssemblyVersionInPackageVersion": {
"4.0.0.0": "4.0.0",
@@ -5061,7 +5147,7 @@
"StableVersions": [
"4.5.0"
],
- "BaselineVersion": "4.5.0",
+ "BaselineVersion": "4.6.0",
"InboxOn": {},
"AssemblyVersionInPackageVersion": {
"4.0.0.0": "4.5.0",
@@ -5139,7 +5225,7 @@
"4.8.0",
"4.9.0"
],
- "BaselineVersion": "4.9.0",
+ "BaselineVersion": "4.10.0",
"InboxOn": {
"netcoreapp2.0": "4.6.2.0",
"netcoreapp2.1": "4.6.3.0",
@@ -5161,9 +5247,11 @@
"4.0.0",
"4.3.0",
"4.4.0",
- "4.5.1"
+ "4.5.1",
+ "4.5.2",
+ "4.5.0"
],
- "BaselineVersion": "4.5.1",
+ "BaselineVersion": "4.5.2",
"InboxOn": {
"netcoreapp2.0": "4.1.1.0",
"netcoreapp2.1": "4.3.0.0",
@@ -5939,4 +6027,4 @@
"System.Xml.XDocument"
]
}
-}
+}
\ No newline at end of file
diff --git a/pkg/Microsoft.Windows.Compatibility/Microsoft.Windows.Compatibility.pkgproj b/pkg/Microsoft.Windows.Compatibility/Microsoft.Windows.Compatibility.pkgproj
index 52fb8f3764fd..1c9ce5a57bff 100644
--- a/pkg/Microsoft.Windows.Compatibility/Microsoft.Windows.Compatibility.pkgproj
+++ b/pkg/Microsoft.Windows.Compatibility/Microsoft.Windows.Compatibility.pkgproj
@@ -24,6 +24,7 @@
+ 4.7.0
diff --git a/pkg/baseline/packageBaseline.1.1.json b/pkg/baseline/packageBaseline.1.1.json
index deadd99eaa2e..c1b6c58d7aa1 100644
--- a/pkg/baseline/packageBaseline.1.1.json
+++ b/pkg/baseline/packageBaseline.1.1.json
@@ -446,4 +446,4 @@
}
},
"ModulesToPackages": {}
-}
\ No newline at end of file
+}
diff --git a/pkg/descriptions.json b/pkg/descriptions.json
index eb6700439880..6367b981e4b7 100644
--- a/pkg/descriptions.json
+++ b/pkg/descriptions.json
@@ -30,6 +30,13 @@
"Microsoft.CSharp.RuntimeBinder.CSharpBinderFlags"
]
},
+ {
+ "Name": "Microsoft.Bcl.HashCode",
+ "Description": "Provides the HashCode type for .NET Standard 2.0. This package is not required starting with .NET Standard 2.1 and .NET Core 3.0.",
+ "CommonTypes": [
+ "System.HashCode"
+ ]
+ },
{
"Name": "Microsoft.Diagnostics.Tracing.EventSource.Redist",
"Description": "This package includes the class Microsoft.Diagnostics.Tracing.EventSource which enables firing ETW events from managed code. This is the \"runtime\" or \"redist\" EventSource package and should be referenced directly only by other NuGet packages that need the EventSource functionality. Application developers that need this functionality should instead reference the Microsoft.Diagnostics.Tracing.EventSource NuGet package which provides an enhanced developer experience.
@@ -148,6 +155,11 @@
"Description": "Package used to represent the portions of NETCoreApp that come from CoreFx.",
"CommonTypes": []
},
+ {
+ "Name": "Microsoft.Private.CoreFx.OOB",
+ "Description": "Package used to represent out-of-band packages that are not included in NetCoreApp.",
+ "CommonTypes": []
+ },
{
"Name": "Microsoft.Private.CoreFx.UAP",
"Description": "Package used to represent the portions of UAP that come from CoreFx.",
@@ -540,6 +552,20 @@
"System.Data.Odbc.OdbcTransaction"
]
},
+ {
+ "Name": "System.Data.OleDb",
+ "Description": "Provides a collection of classes for OLEDB.",
+ "CommonTypes": [
+ "System.Data.OleDb.OleDbCommand",
+ "System.Data.OleDb.OleDbCommandBuilder",
+ "System.Data.OleDb.OleDbConnection",
+ "System.Data.OleDb.OleDbDataAdapter",
+ "System.Data.OleDb.OleDbDataReader",
+ "System.Data.OleDb.OleDbParameter",
+ "System.Data.OleDb.OleDbParameterCollection",
+ "System.Data.OleDb.OleDbTransaction"
+ ]
+ },
{
"Name": "System.Data.SqlClient",
"Description": "Provides the data provider for SQL Server. These classes provide access to versions of SQL Server and encapsulate database-specific protocols, including tabular data stream (TDS)",
@@ -1042,6 +1068,15 @@
"System.Buffers.Text.Utf8Formatter"
]
},
+ {
+ "Name": "Microsoft.Bcl.AsyncInterfaces",
+ "Description": "Provides the IAsyncEnumerable and IAsyncDisposable interfaces and helper types for .NET Standard 2.0. This package is not required starting with .NET Standard 2.1 and .NET Core 3.0.",
+ "CommonTypes": [
+ "System.IAsyncDisposable",
+ "System.Collections.Generic.IAsyncEnumerable",
+ "System.Collections.Generic.IAsyncEnumerator"
+ ]
+ },
{
"Name": "System.Net.Http",
"Description": "Provides a programming interface for modern HTTP applications, including HTTP client components that allow applications to consume web services over HTTP and HTTP components that can be used by both clients and servers for parsing HTTP headers.",
@@ -1245,21 +1280,6 @@
"System.Numerics.Tensors.SparseTensor"
]
},
- {
- "Name": "System.Numerics.Vectors",
- "Description": "Provides hardware-accelerated numeric types, suitable for high-performance processing and graphics applications.",
- "CommonTypes": [
- "System.Numerics.Matrix3x2",
- "System.Numerics.Matrix4x4",
- "System.Numerics.Plane",
- "System.Numerics.Quaternion",
- "System.Numerics.Vector2",
- "System.Numerics.Vector3",
- "System.Numerics.Vector4",
- "System.Numerics.Vector",
- "System.Numerics.Vector"
- ]
- },
{
"Name": "System.Numerics.Vectors.WindowsRuntime",
"Description": "Provides extension methods for converting between System.Numerics.Vector2 and Windows.Foundation.Point and Size.",
@@ -1428,6 +1448,14 @@
"System.Resources.SatelliteContractVersionAttribute",
"System.Resources.MissingManifestResourceException"
]
+ },
+ {
+ "Name": "System.Resources.Extensions",
+ "Description": "Provides classes which read and write resources in a format that supports non-primitive objects.",
+ "CommonTypes": [
+ "System.Resources.Extensions.DeserializingResourceReader",
+ "System.Resources.Extensions.PreserializedResourceWriter"
+ ]
},
{
"Name": "System.Resources.Reader",
diff --git a/pkg/frameworkPackage.targets b/pkg/frameworkPackage.targets
index 1c0abf101f06..c91d1ebe3132 100644
--- a/pkg/frameworkPackage.targets
+++ b/pkg/frameworkPackage.targets
@@ -5,7 +5,7 @@
true2.0
- $(PackagesDir)$(NETStandardLibraryPackageId.ToLower())\$(NETStandardLibraryPackageVersion)\build\netstandard$(NETStandardVersion)\ref
+ $(NuGetPackageRoot)$(NETStandardLibraryPackageId.ToLower())\$(NETStandardLibraryPackageVersion)\build\netstandard$(NETStandardVersion)\reftruetrue
diff --git a/pkg/test/frameworkSettings/net/settings.targets b/pkg/test/frameworkSettings/net/settings.targets
index 25b7f5936bc7..b7ee4126aa5d 100644
--- a/pkg/test/frameworkSettings/net/settings.targets
+++ b/pkg/test/frameworkSettings/net/settings.targets
@@ -8,7 +8,7 @@
-
+
diff --git a/pkg/test/frameworkSettings/netcoreapp3.0/settings.targets b/pkg/test/frameworkSettings/netcoreapp3.0/settings.targets
index afde20c57942..4397153c29fa 100644
--- a/pkg/test/frameworkSettings/netcoreapp3.0/settings.targets
+++ b/pkg/test/frameworkSettings/netcoreapp3.0/settings.targets
@@ -15,11 +15,4 @@
-
-
-
-
-
diff --git a/pkg/test/packageSettings/System.Diagnostics.DiagnosticSource/workaroundMissingSystemMemory.targets b/pkg/test/packageSettings/System.Diagnostics.DiagnosticSource/workaroundMissingSystemMemory.targets
deleted file mode 100644
index fdb725fd625f..000000000000
--- a/pkg/test/packageSettings/System.Diagnostics.DiagnosticSource/workaroundMissingSystemMemory.targets
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
-
-
-
-
diff --git a/pkg/test/packageSettings/System.IO.Ports/netcoreapp1.0/workaroundDowngrade.targets b/pkg/test/packageSettings/System.IO.Ports/netcoreapp1.0/workaroundDowngrade.targets
deleted file mode 100644
index 2a4b06900c28..000000000000
--- a/pkg/test/packageSettings/System.IO.Ports/netcoreapp1.0/workaroundDowngrade.targets
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
diff --git a/pkg/test/packageSettings/System.IO.Ports/workaroundDowngrade.targets b/pkg/test/packageSettings/System.IO.Ports/workaroundDowngrade.targets
new file mode 100644
index 000000000000..37e8334cafc9
--- /dev/null
+++ b/pkg/test/packageSettings/System.IO.Ports/workaroundDowngrade.targets
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/pkg/test/packageTest.targets b/pkg/test/packageTest.targets
index d0f78b37cc08..f3e2d7efa671 100644
--- a/pkg/test/packageTest.targets
+++ b/pkg/test/packageTest.targets
@@ -8,14 +8,13 @@
https://api.nuget.org/v3/index.json;
https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json;
- https://dotnet.myget.org/F/roslyn-tools/api/v3/index.json;
$(LocalPackagesPath)
-
+
diff --git a/pkg/test/testPackages.proj b/pkg/test/testPackages.proj
index 466c9005e835..da1e0ecd6a56 100644
--- a/pkg/test/testPackages.proj
+++ b/pkg/test/testPackages.proj
@@ -3,7 +3,7 @@
-
+
@@ -40,7 +40,7 @@
-
+ $(TestToolsDir)%(RecursiveDir)
@@ -52,7 +52,7 @@
$(TestToolsDir)eng/
-
+ $(TestToolsDir)%(RecursiveDir)
diff --git a/src/Common/src/CoreLib/Internal/IO/File.Unix.cs b/src/Common/src/CoreLib/Internal/IO/File.Unix.cs
index 25d62003de8c..50fa0f0d0c4b 100644
--- a/src/Common/src/CoreLib/Internal/IO/File.Unix.cs
+++ b/src/Common/src/CoreLib/Internal/IO/File.Unix.cs
@@ -2,8 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
-
namespace Internal.IO
{
internal static partial class File
diff --git a/src/Common/src/CoreLib/Internal/IO/File.Windows.cs b/src/Common/src/CoreLib/Internal/IO/File.Windows.cs
index 28624bb95f32..0acae3b4577d 100644
--- a/src/Common/src/CoreLib/Internal/IO/File.Windows.cs
+++ b/src/Common/src/CoreLib/Internal/IO/File.Windows.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using Microsoft.Win32;
using Microsoft.Win32.SafeHandles;
using System.IO;
diff --git a/src/Common/src/CoreLib/Internal/IO/File.cs b/src/Common/src/CoreLib/Internal/IO/File.cs
index a8439895b1bd..a21f4954d4de 100644
--- a/src/Common/src/CoreLib/Internal/IO/File.cs
+++ b/src/Common/src/CoreLib/Internal/IO/File.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System;
using System.Diagnostics;
using System.Security;
diff --git a/src/Common/src/CoreLib/Internal/Padding.cs b/src/Common/src/CoreLib/Internal/Padding.cs
index 86050b7fb75c..14bf998babaa 100644
--- a/src/Common/src/CoreLib/Internal/Padding.cs
+++ b/src/Common/src/CoreLib/Internal/Padding.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System.Runtime.InteropServices;
namespace Internal
diff --git a/src/Common/src/CoreLib/Internal/Resources/PRIExceptionInfo.cs b/src/Common/src/CoreLib/Internal/Resources/PRIExceptionInfo.cs
index 1ae4674a9813..2b097a9d939d 100644
--- a/src/Common/src/CoreLib/Internal/Resources/PRIExceptionInfo.cs
+++ b/src/Common/src/CoreLib/Internal/Resources/PRIExceptionInfo.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
namespace Internal.Resources
{
public class PRIExceptionInfo
diff --git a/src/Common/src/CoreLib/Internal/Resources/WindowsRuntimeResourceManagerBase.cs b/src/Common/src/CoreLib/Internal/Resources/WindowsRuntimeResourceManagerBase.cs
index 531b0fd4e602..173b2372c959 100644
--- a/src/Common/src/CoreLib/Internal/Resources/WindowsRuntimeResourceManagerBase.cs
+++ b/src/Common/src/CoreLib/Internal/Resources/WindowsRuntimeResourceManagerBase.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System.Globalization;
namespace Internal.Resources
diff --git a/src/Common/src/CoreLib/Internal/Runtime/CompilerServices/Unsafe.cs b/src/Common/src/CoreLib/Internal/Runtime/CompilerServices/Unsafe.cs
index 02092af2094d..4688933881af 100644
--- a/src/Common/src/CoreLib/Internal/Runtime/CompilerServices/Unsafe.cs
+++ b/src/Common/src/CoreLib/Internal/Runtime/CompilerServices/Unsafe.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
diff --git a/src/Common/src/CoreLib/Internal/Threading/Tasks/AsyncCausalitySupport.cs b/src/Common/src/CoreLib/Internal/Threading/Tasks/AsyncCausalitySupport.cs
index 54df96db664a..dcea41dbab22 100644
--- a/src/Common/src/CoreLib/Internal/Threading/Tasks/AsyncCausalitySupport.cs
+++ b/src/Common/src/CoreLib/Internal/Threading/Tasks/AsyncCausalitySupport.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System.Threading.Tasks;
using System.Runtime.CompilerServices;
diff --git a/src/Common/src/CoreLib/Internal/Win32/RegistryKey.cs b/src/Common/src/CoreLib/Internal/Win32/RegistryKey.cs
index 469d67866a17..912ddceef3e8 100644
--- a/src/Common/src/CoreLib/Internal/Win32/RegistryKey.cs
+++ b/src/Common/src/CoreLib/Internal/Win32/RegistryKey.cs
@@ -2,11 +2,11 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System;
using System.Buffers;
using System.Collections.Generic;
using System.Diagnostics;
+using System.Diagnostics.CodeAnalysis;
using System.IO;
using System.Security;
@@ -220,7 +220,8 @@ public unsafe string[] GetValueNames()
return GetValue(name, null);
}
- public object? GetValue(string name, object? defaultValue) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761
+ [return: NotNullIfNotNull("defaultValue")]
+ public object? GetValue(string name, object? defaultValue)
{
object? data = defaultValue;
int type = 0;
@@ -370,7 +371,7 @@ public unsafe string[] GetValueNames()
// make sure the string is null terminated before processing the data
if (blob.Length > 0 && blob[blob.Length - 1] != (char)0)
{
- Array.Resize(ref blob!, blob.Length + 1); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761
+ Array.Resize(ref blob!, blob.Length + 1); // TODO-NULLABLE: Remove ! when nullable attributes are respected
}
string[] strings = Array.Empty();
@@ -415,13 +416,13 @@ public unsafe string[] GetValueNames()
{
if (strings.Length == stringsCount)
{
- Array.Resize(ref strings!, stringsCount > 0 ? stringsCount * 2 : 4); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761
+ Array.Resize(ref strings!, stringsCount > 0 ? stringsCount * 2 : 4); // TODO-NULLABLE: Remove ! when nullable attributes are respected
}
- strings![stringsCount++] = toAdd; // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761
+ strings![stringsCount++] = toAdd; // TODO-NULLABLE: Remove ! when nullable attributes are respected
}
}
- Array.Resize(ref strings!, stringsCount); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761
+ Array.Resize(ref strings!, stringsCount); // TODO-NULLABLE: Remove ! when nullable attributes are respected
data = strings;
}
break;
diff --git a/src/Common/src/CoreLib/Interop/Unix/Interop.Errors.cs b/src/Common/src/CoreLib/Interop/Unix/Interop.Errors.cs
index a4a7a4344aa3..2e597e7cae45 100644
--- a/src/Common/src/CoreLib/Interop/Unix/Interop.Errors.cs
+++ b/src/Common/src/CoreLib/Interop/Unix/Interop.Errors.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System;
using System.Runtime.InteropServices;
@@ -146,9 +145,7 @@ internal string GetErrorMessage()
return Interop.Sys.StrError(RawErrno);
}
-#pragma warning disable CS8609 // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/23268
public override string ToString()
-#pragma warning restore CS8609
{
return $"RawErrno: {RawErrno} Error: {Error} GetErrorMessage: {GetErrorMessage()}"; // No localization required; text is member names used for debugging purposes
}
diff --git a/src/Common/src/CoreLib/Interop/Unix/Interop.Libraries.cs b/src/Common/src/CoreLib/Interop/Unix/Interop.Libraries.cs
index 6c620bf03107..02d009244509 100644
--- a/src/Common/src/CoreLib/Interop/Unix/Interop.Libraries.cs
+++ b/src/Common/src/CoreLib/Interop/Unix/Interop.Libraries.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
internal static partial class Interop
{
internal static partial class Libraries
diff --git a/src/Common/src/CoreLib/Interop/Unix/System.Globalization.Native/Interop.Calendar.cs b/src/Common/src/CoreLib/Interop/Unix/System.Globalization.Native/Interop.Calendar.cs
index c5ec71a73d2f..764bdaf85afe 100644
--- a/src/Common/src/CoreLib/Interop/Unix/System.Globalization.Native/Interop.Calendar.cs
+++ b/src/Common/src/CoreLib/Interop/Unix/System.Globalization.Native/Interop.Calendar.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System;
using System.Globalization;
using System.Runtime.InteropServices;
diff --git a/src/Common/src/CoreLib/Interop/Unix/System.Globalization.Native/Interop.Casing.cs b/src/Common/src/CoreLib/Interop/Unix/System.Globalization.Native/Interop.Casing.cs
index 2878161c9910..503a864d693c 100644
--- a/src/Common/src/CoreLib/Interop/Unix/System.Globalization.Native/Interop.Casing.cs
+++ b/src/Common/src/CoreLib/Interop/Unix/System.Globalization.Native/Interop.Casing.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System;
using System.Runtime.InteropServices;
using System.Security;
diff --git a/src/Common/src/CoreLib/Interop/Unix/System.Globalization.Native/Interop.Collation.cs b/src/Common/src/CoreLib/Interop/Unix/System.Globalization.Native/Interop.Collation.cs
index 9d21d23acb08..aea7615e4e71 100644
--- a/src/Common/src/CoreLib/Interop/Unix/System.Globalization.Native/Interop.Collation.cs
+++ b/src/Common/src/CoreLib/Interop/Unix/System.Globalization.Native/Interop.Collation.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System;
using System.Globalization;
using System.Runtime.InteropServices;
diff --git a/src/Common/src/CoreLib/Interop/Unix/System.Globalization.Native/Interop.ICU.cs b/src/Common/src/CoreLib/Interop/Unix/System.Globalization.Native/Interop.ICU.cs
index f122d519ba0d..a16c813b2f5a 100644
--- a/src/Common/src/CoreLib/Interop/Unix/System.Globalization.Native/Interop.ICU.cs
+++ b/src/Common/src/CoreLib/Interop/Unix/System.Globalization.Native/Interop.ICU.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System;
using System.Runtime.InteropServices;
using System.Runtime.CompilerServices;
diff --git a/src/Common/src/CoreLib/Interop/Unix/System.Globalization.Native/Interop.Idna.cs b/src/Common/src/CoreLib/Interop/Unix/System.Globalization.Native/Interop.Idna.cs
index 9a0cd923be01..89b6c3cebec0 100644
--- a/src/Common/src/CoreLib/Interop/Unix/System.Globalization.Native/Interop.Idna.cs
+++ b/src/Common/src/CoreLib/Interop/Unix/System.Globalization.Native/Interop.Idna.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System;
using System.Runtime.InteropServices;
diff --git a/src/Common/src/CoreLib/Interop/Unix/System.Globalization.Native/Interop.Locale.cs b/src/Common/src/CoreLib/Interop/Unix/System.Globalization.Native/Interop.Locale.cs
index 40de0991821a..b563752bc00d 100644
--- a/src/Common/src/CoreLib/Interop/Unix/System.Globalization.Native/Interop.Locale.cs
+++ b/src/Common/src/CoreLib/Interop/Unix/System.Globalization.Native/Interop.Locale.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System;
using System.Runtime.InteropServices;
diff --git a/src/Common/src/CoreLib/Interop/Unix/System.Globalization.Native/Interop.Normalization.cs b/src/Common/src/CoreLib/Interop/Unix/System.Globalization.Native/Interop.Normalization.cs
index 2cfc3746ba4b..d442da0ea137 100644
--- a/src/Common/src/CoreLib/Interop/Unix/System.Globalization.Native/Interop.Normalization.cs
+++ b/src/Common/src/CoreLib/Interop/Unix/System.Globalization.Native/Interop.Normalization.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System;
using System.Runtime.InteropServices;
using System.Text;
diff --git a/src/Common/src/CoreLib/Interop/Unix/System.Globalization.Native/Interop.ResultCode.cs b/src/Common/src/CoreLib/Interop/Unix/System.Globalization.Native/Interop.ResultCode.cs
index d5261ac6ca32..4a9933f9291f 100644
--- a/src/Common/src/CoreLib/Interop/Unix/System.Globalization.Native/Interop.ResultCode.cs
+++ b/src/Common/src/CoreLib/Interop/Unix/System.Globalization.Native/Interop.ResultCode.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
internal static partial class Interop
{
internal static partial class Globalization
diff --git a/src/Common/src/CoreLib/Interop/Unix/System.Globalization.Native/Interop.TimeZoneInfo.cs b/src/Common/src/CoreLib/Interop/Unix/System.Globalization.Native/Interop.TimeZoneInfo.cs
index 583599fb1390..6c6926824621 100644
--- a/src/Common/src/CoreLib/Interop/Unix/System.Globalization.Native/Interop.TimeZoneInfo.cs
+++ b/src/Common/src/CoreLib/Interop/Unix/System.Globalization.Native/Interop.TimeZoneInfo.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System.Runtime.InteropServices;
using System.Text;
diff --git a/src/Common/src/CoreLib/Interop/Unix/System.Globalization.Native/Interop.Utils.cs b/src/Common/src/CoreLib/Interop/Unix/System.Globalization.Native/Interop.Utils.cs
index 058f07efe1ae..627ab56c9187 100644
--- a/src/Common/src/CoreLib/Interop/Unix/System.Globalization.Native/Interop.Utils.cs
+++ b/src/Common/src/CoreLib/Interop/Unix/System.Globalization.Native/Interop.Utils.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System;
using System.Diagnostics;
using System.Buffers;
diff --git a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.Access.cs b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.Access.cs
index 62b212b8074a..a723f572a5b0 100644
--- a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.Access.cs
+++ b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.Access.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System;
using System.Runtime.InteropServices;
diff --git a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.ChDir.cs b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.ChDir.cs
index ebfa8738c98c..3c66995182ac 100644
--- a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.ChDir.cs
+++ b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.ChDir.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System;
using System.Runtime.InteropServices;
diff --git a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.Close.cs b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.Close.cs
index 0c5ca55d8c06..8d192398a036 100644
--- a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.Close.cs
+++ b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.Close.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System;
using System.Runtime.InteropServices;
diff --git a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.FLock.cs b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.FLock.cs
index b4b5902920cd..22934a3e77d5 100644
--- a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.FLock.cs
+++ b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.FLock.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System;
using System.Runtime.InteropServices;
using Microsoft.Win32.SafeHandles;
diff --git a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.FSync.cs b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.FSync.cs
index 5660aecce5ee..e3ab97093135 100644
--- a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.FSync.cs
+++ b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.FSync.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System.Runtime.InteropServices;
using Microsoft.Win32.SafeHandles;
diff --git a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.FTruncate.cs b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.FTruncate.cs
index 6d6b36811193..5dad650362d0 100644
--- a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.FTruncate.cs
+++ b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.FTruncate.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System.Runtime.InteropServices;
using Microsoft.Win32.SafeHandles;
diff --git a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.GetCpuUtilization.cs b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.GetCpuUtilization.cs
index 701c01cd9cf3..a630a3e82c34 100644
--- a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.GetCpuUtilization.cs
+++ b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.GetCpuUtilization.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
@@ -14,9 +13,9 @@ internal unsafe partial class Sys
[StructLayout(LayoutKind.Sequential)]
internal struct ProcessCpuInformation
{
- ulong lastRecordedCurrentTime;
- ulong lastRecordedKernelTime;
- ulong lastRecordedUserTime;
+ internal ulong lastRecordedCurrentTime;
+ internal ulong lastRecordedKernelTime;
+ internal ulong lastRecordedUserTime;
}
[DllImport(Libraries.SystemNative, EntryPoint = "SystemNative_GetCpuUtilization")]
diff --git a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.GetCwd.cs b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.GetCwd.cs
index 2951d441d2d8..f6412992b130 100644
--- a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.GetCwd.cs
+++ b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.GetCwd.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System;
using System.Buffers;
using System.Runtime.InteropServices;
diff --git a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.GetEUid.cs b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.GetEUid.cs
index 98f5545f902a..8b525fa32729 100644
--- a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.GetEUid.cs
+++ b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.GetEUid.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System;
using System.Runtime.InteropServices;
diff --git a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.GetHostName.cs b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.GetHostName.cs
index 34fa14f35256..f2555b0fc827 100644
--- a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.GetHostName.cs
+++ b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.GetHostName.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System;
using System.Diagnostics;
using System.Runtime.InteropServices;
diff --git a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.GetPid.cs b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.GetPid.cs
index 2656753655e9..02d259db7d18 100644
--- a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.GetPid.cs
+++ b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.GetPid.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System;
using System.Runtime.InteropServices;
diff --git a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.GetPwUid.cs b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.GetPwUid.cs
index cbab70a97194..28b2309d03ec 100644
--- a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.GetPwUid.cs
+++ b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.GetPwUid.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System;
using System.Runtime.InteropServices;
diff --git a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.GetRandomBytes.cs b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.GetRandomBytes.cs
index 7956567e8ba1..e911b13583d7 100644
--- a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.GetRandomBytes.cs
+++ b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.GetRandomBytes.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System;
using System.Diagnostics;
using System.Runtime.InteropServices;
diff --git a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.GetSystemTimeAsTicks.cs b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.GetSystemTimeAsTicks.cs
index 35e37834e10e..f02ecac13b91 100644
--- a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.GetSystemTimeAsTicks.cs
+++ b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.GetSystemTimeAsTicks.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System.Runtime.InteropServices;
internal static partial class Interop
diff --git a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.GetTimestamp.cs b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.GetTimestamp.cs
index d1669b60951e..b57c0cd175f0 100644
--- a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.GetTimestamp.cs
+++ b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.GetTimestamp.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System.Runtime.InteropServices;
internal static partial class Interop
diff --git a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.GetUnixName.cs b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.GetUnixName.cs
index 02e08fd447c1..fb925b9dca92 100644
--- a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.GetUnixName.cs
+++ b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.GetUnixName.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System;
using System.Runtime.InteropServices;
diff --git a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.GetUnixRelease.cs b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.GetUnixRelease.cs
index 5885de678fe5..5e41ae98046e 100644
--- a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.GetUnixRelease.cs
+++ b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.GetUnixRelease.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System.Runtime.InteropServices;
internal static partial class Interop
diff --git a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.LSeek.cs b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.LSeek.cs
index 3f93192422b1..7f8df7c6bf9f 100644
--- a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.LSeek.cs
+++ b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.LSeek.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System.Runtime.InteropServices;
using Microsoft.Win32.SafeHandles;
diff --git a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.LockFileRegion.cs b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.LockFileRegion.cs
index ecc95c4dc6a0..1deb9a431320 100644
--- a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.LockFileRegion.cs
+++ b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.LockFileRegion.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System;
using System.Runtime.InteropServices;
diff --git a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.MksTemps.cs b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.MksTemps.cs
index e9624591b31b..14c2d989130a 100644
--- a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.MksTemps.cs
+++ b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.MksTemps.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System;
using System.Runtime.InteropServices;
diff --git a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.MountPoints.cs b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.MountPoints.cs
index c2d1b7946672..a2fe2078b69b 100644
--- a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.MountPoints.cs
+++ b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.MountPoints.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
@@ -28,13 +27,13 @@ internal static string[] GetAllMountPoints()
{
if (count == found.Length)
{
- Array.Resize(ref found!, count * 2); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761
+ Array.Resize(ref found!, count * 2); // TODO-NULLABLE: Remove ! when nullable attributes are respected
}
found[count++] = Marshal.PtrToStringAnsi((IntPtr)name)!;
});
}
- Array.Resize(ref found!, count); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761
+ Array.Resize(ref found!, count); // TODO-NULLABLE: Remove ! when nullable attributes are respected
return found;
}
}
diff --git a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.Open.cs b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.Open.cs
index e151c4cf75fd..a9a994c78c01 100644
--- a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.Open.cs
+++ b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.Open.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System.Runtime.InteropServices;
using Microsoft.Win32.SafeHandles;
diff --git a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.OpenFlags.cs b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.OpenFlags.cs
index ce5f9ad70fae..f9e54c3cbcf9 100644
--- a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.OpenFlags.cs
+++ b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.OpenFlags.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System;
internal static partial class Interop
diff --git a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.PathConf.cs b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.PathConf.cs
index 27d5095a16b4..7213cb02640f 100644
--- a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.PathConf.cs
+++ b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.PathConf.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System;
using System.Runtime.InteropServices;
diff --git a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.Permissions.cs b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.Permissions.cs
index 5cddd425bcfb..f1d13787d257 100644
--- a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.Permissions.cs
+++ b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.Permissions.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System;
internal static partial class Interop
diff --git a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.PosixFAdvise.cs b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.PosixFAdvise.cs
index 3035c5ecb420..ad8b73aed211 100644
--- a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.PosixFAdvise.cs
+++ b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.PosixFAdvise.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System.Runtime.InteropServices;
using Microsoft.Win32.SafeHandles;
diff --git a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.Read.cs b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.Read.cs
index e835b7ff6599..233feabdbb69 100644
--- a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.Read.cs
+++ b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.Read.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System.Runtime.InteropServices;
using Microsoft.Win32.SafeHandles;
diff --git a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.ReadDir.cs b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.ReadDir.cs
index a55ca83204ce..cacb3664db07 100644
--- a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.ReadDir.cs
+++ b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.ReadDir.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System;
using System.Diagnostics;
using System.Runtime.InteropServices;
diff --git a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.ReadLink.cs b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.ReadLink.cs
index f78fd1a80692..9a2d7d1e79d9 100644
--- a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.ReadLink.cs
+++ b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.ReadLink.cs
@@ -61,4 +61,4 @@ internal static partial class Sys
} while (true);
}
}
-}
\ No newline at end of file
+}
diff --git a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.Stat.cs b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.Stat.cs
index ff4699c78288..d06fbda71852 100644
--- a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.Stat.cs
+++ b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.Stat.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System;
using System.Runtime.InteropServices;
using Microsoft.Win32.SafeHandles;
diff --git a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.SysConf.cs b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.SysConf.cs
index 1482b2861476..be0c0dee7bb6 100644
--- a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.SysConf.cs
+++ b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.SysConf.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System.Runtime.InteropServices;
internal static partial class Interop
diff --git a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.SysLog.cs b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.SysLog.cs
index 85eef433837f..6b6a74b7436b 100644
--- a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.SysLog.cs
+++ b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.SysLog.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System.Runtime.InteropServices;
internal static partial class Interop
diff --git a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.Unlink.cs b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.Unlink.cs
index bbeb8896e873..829210fa7e03 100644
--- a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.Unlink.cs
+++ b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.Unlink.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System;
using System.Runtime.InteropServices;
diff --git a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.Write.cs b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.Write.cs
index 761cd1635361..fb06d463beb7 100644
--- a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.Write.cs
+++ b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.Write.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System.Runtime.InteropServices;
using Microsoft.Win32.SafeHandles;
diff --git a/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.ActivityControl.cs b/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.ActivityControl.cs
index 34df748d39ab..27dce5853861 100644
--- a/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.ActivityControl.cs
+++ b/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.ActivityControl.cs
@@ -2,9 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-using System;
-using System.Runtime.InteropServices;
-
internal partial class Interop
{
internal partial class Advapi32
diff --git a/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.EVENT_INFO_CLASS.cs b/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.EVENT_INFO_CLASS.cs
index a122002e9abe..36abdb41905e 100644
--- a/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.EVENT_INFO_CLASS.cs
+++ b/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.EVENT_INFO_CLASS.cs
@@ -2,9 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-using System;
-using System.Runtime.InteropServices;
-
internal partial class Interop
{
internal partial class Advapi32
diff --git a/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.EventSetInformation.cs b/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.EventSetInformation.cs
index 381cb661c37e..90286b27be63 100644
--- a/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.EventSetInformation.cs
+++ b/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.EventSetInformation.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-using System;
using System.Runtime.InteropServices;
internal partial class Interop
diff --git a/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.EventTraceGuidsEx.cs b/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.EventTraceGuidsEx.cs
index c5f6f3b18790..0e7c3cc64510 100644
--- a/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.EventTraceGuidsEx.cs
+++ b/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.EventTraceGuidsEx.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-using System;
using System.Runtime.InteropServices;
internal partial class Interop
diff --git a/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.EventUnregister.cs b/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.EventUnregister.cs
index f387b3a9ab5c..3fb5a75b1ae6 100644
--- a/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.EventUnregister.cs
+++ b/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.EventUnregister.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-using System;
using System.Runtime.InteropServices;
internal partial class Interop
diff --git a/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.EventWriteString.cs b/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.EventWriteString.cs
index a00a2f3a2c99..4ee30f62de6e 100644
--- a/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.EventWriteString.cs
+++ b/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.EventWriteString.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-using System;
using System.Runtime.InteropServices;
internal partial class Interop
diff --git a/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.LookupAccountNameW.cs b/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.LookupAccountNameW.cs
index bef8afa434bb..2aa5851a4aa2 100644
--- a/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.LookupAccountNameW.cs
+++ b/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.LookupAccountNameW.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System.Runtime.InteropServices;
internal partial class Interop
diff --git a/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.RegCloseKey.cs b/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.RegCloseKey.cs
index e27966978231..375376d52a01 100644
--- a/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.RegCloseKey.cs
+++ b/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.RegCloseKey.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System;
using System.Runtime.InteropServices;
diff --git a/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.RegDeleteKeyEx.cs b/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.RegDeleteKeyEx.cs
index 01c4cea4086a..c949cc15ff1f 100644
--- a/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.RegDeleteKeyEx.cs
+++ b/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.RegDeleteKeyEx.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
#if REGISTRY_ASSEMBLY
using Microsoft.Win32.SafeHandles;
#else
diff --git a/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.RegFlushKey.cs b/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.RegFlushKey.cs
index 3a867a2e31be..fa56f483990a 100644
--- a/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.RegFlushKey.cs
+++ b/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.RegFlushKey.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
#if REGISTRY_ASSEMBLY
using Microsoft.Win32.SafeHandles;
#else
diff --git a/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.RegistryConstants.cs b/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.RegistryConstants.cs
index b358f9fee081..bdb89702f8c3 100644
--- a/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.RegistryConstants.cs
+++ b/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.RegistryConstants.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
internal partial class Interop
{
internal partial class Advapi32
diff --git a/src/Common/src/CoreLib/Interop/Windows/BCrypt/Interop.BCryptGenRandom.GetRandomBytes.cs b/src/Common/src/CoreLib/Interop/Windows/BCrypt/Interop.BCryptGenRandom.GetRandomBytes.cs
index 50bc5281586c..4d75163d4b41 100644
--- a/src/Common/src/CoreLib/Interop/Windows/BCrypt/Interop.BCryptGenRandom.GetRandomBytes.cs
+++ b/src/Common/src/CoreLib/Interop/Windows/BCrypt/Interop.BCryptGenRandom.GetRandomBytes.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System;
using System.Diagnostics;
using System.Runtime.InteropServices;
diff --git a/src/Common/src/CoreLib/Interop/Windows/BCrypt/Interop.BCryptGenRandom.cs b/src/Common/src/CoreLib/Interop/Windows/BCrypt/Interop.BCryptGenRandom.cs
index d877dd255ce1..9d072a3b01e6 100644
--- a/src/Common/src/CoreLib/Interop/Windows/BCrypt/Interop.BCryptGenRandom.cs
+++ b/src/Common/src/CoreLib/Interop/Windows/BCrypt/Interop.BCryptGenRandom.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System;
using System.Diagnostics;
using System.Runtime.InteropServices;
diff --git a/src/Common/src/CoreLib/Interop/Windows/BCrypt/Interop.NTSTATUS.cs b/src/Common/src/CoreLib/Interop/Windows/BCrypt/Interop.NTSTATUS.cs
index 74079f8f80ad..29aaa2904bff 100644
--- a/src/Common/src/CoreLib/Interop/Windows/BCrypt/Interop.NTSTATUS.cs
+++ b/src/Common/src/CoreLib/Interop/Windows/BCrypt/Interop.NTSTATUS.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System;
internal partial class Interop
diff --git a/src/Common/src/CoreLib/Interop/Windows/Crypt32/Interop.CryptProtectMemory.cs b/src/Common/src/CoreLib/Interop/Windows/Crypt32/Interop.CryptProtectMemory.cs
index a60dc8eeecac..b10cb6a0410b 100644
--- a/src/Common/src/CoreLib/Interop/Windows/Crypt32/Interop.CryptProtectMemory.cs
+++ b/src/Common/src/CoreLib/Interop/Windows/Crypt32/Interop.CryptProtectMemory.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System;
using System.Runtime.InteropServices;
using System.Security;
diff --git a/src/Common/src/CoreLib/Interop/Windows/Interop.BOOL.cs b/src/Common/src/CoreLib/Interop/Windows/Interop.BOOL.cs
index 8a89556e59b0..9f4dab8935d2 100644
--- a/src/Common/src/CoreLib/Interop/Windows/Interop.BOOL.cs
+++ b/src/Common/src/CoreLib/Interop/Windows/Interop.BOOL.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
internal partial class Interop
{
///
diff --git a/src/Common/src/CoreLib/Interop/Windows/Interop.BOOLEAN.cs b/src/Common/src/CoreLib/Interop/Windows/Interop.BOOLEAN.cs
index 154ecbec7275..4874734534df 100644
--- a/src/Common/src/CoreLib/Interop/Windows/Interop.BOOLEAN.cs
+++ b/src/Common/src/CoreLib/Interop/Windows/Interop.BOOLEAN.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
internal partial class Interop
{
///
diff --git a/src/Common/src/CoreLib/Interop/Windows/Interop.Errors.cs b/src/Common/src/CoreLib/Interop/Windows/Interop.Errors.cs
index ea9ce0b8a35a..2e4683dfd70a 100644
--- a/src/Common/src/CoreLib/Interop/Windows/Interop.Errors.cs
+++ b/src/Common/src/CoreLib/Interop/Windows/Interop.Errors.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
internal partial class Interop
{
// As defined in winerror.h and https://msdn.microsoft.com/en-us/library/windows/desktop/ms681382.aspx
diff --git a/src/Common/src/CoreLib/Interop/Windows/Interop.Libraries.cs b/src/Common/src/CoreLib/Interop/Windows/Interop.Libraries.cs
index 80321fb07af8..8cbc8bfb266b 100644
--- a/src/Common/src/CoreLib/Interop/Windows/Interop.Libraries.cs
+++ b/src/Common/src/CoreLib/Interop/Windows/Interop.Libraries.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
internal static partial class Interop
{
internal static partial class Libraries
diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.CREATEFILE2_EXTENDED_PARAMETERS.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.CREATEFILE2_EXTENDED_PARAMETERS.cs
index 3330d32f9a89..16365ee65119 100644
--- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.CREATEFILE2_EXTENDED_PARAMETERS.cs
+++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.CREATEFILE2_EXTENDED_PARAMETERS.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using Microsoft.Win32.SafeHandles;
using System;
using System.IO;
diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.CancelIoEx.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.CancelIoEx.cs
index 85809e1ed202..fc99e3052f6d 100644
--- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.CancelIoEx.cs
+++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.CancelIoEx.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using Microsoft.Win32.SafeHandles;
using System.Runtime.InteropServices;
using System.Threading;
diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.CloseHandle.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.CloseHandle.cs
index fd194166709f..ff41f939f1c6 100644
--- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.CloseHandle.cs
+++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.CloseHandle.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System;
using System.Runtime.InteropServices;
diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.Constants.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.Constants.cs
index dc7dfef34e9e..b13cdfd03fed 100644
--- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.Constants.cs
+++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.Constants.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
internal static partial class Interop
{
internal static partial class Kernel32
diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.CreateFile.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.CreateFile.cs
index 99ef2b28d792..de68a36cb997 100644
--- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.CreateFile.cs
+++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.CreateFile.cs
@@ -2,10 +2,8 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using Microsoft.Win32.SafeHandles;
using System;
-using System.Diagnostics;
using System.IO;
using System.Runtime.InteropServices;
@@ -35,9 +33,8 @@ internal static SafeFileHandle CreateFile(
int dwFlagsAndAttributes,
IntPtr hTemplateFile)
{
- string? lpFileNameWithPrefix = PathInternal.EnsureExtendedPrefixIfNeeded(lpFileName);
- Debug.Assert(lpFileNameWithPrefix != null, "null not expected when non-null passed"); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761
- return CreateFilePrivate(lpFileNameWithPrefix, dwDesiredAccess, dwShareMode, ref securityAttrs, dwCreationDisposition, dwFlagsAndAttributes, hTemplateFile);
+ lpFileName = PathInternal.EnsureExtendedPrefixIfNeeded(lpFileName)!; // TODO-NULLABLE: Remove ! when nullable attributes are respected
+ return CreateFilePrivate(lpFileName, dwDesiredAccess, dwShareMode, ref securityAttrs, dwCreationDisposition, dwFlagsAndAttributes, hTemplateFile);
}
}
}
diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.CreateFile2.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.CreateFile2.cs
index fc9806132269..49e7485c00c8 100644
--- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.CreateFile2.cs
+++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.CreateFile2.cs
@@ -2,8 +2,8 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using Microsoft.Win32.SafeHandles;
+using System.Diagnostics;
using System.IO;
using System.Runtime.InteropServices;
@@ -26,7 +26,7 @@ internal static SafeFileHandle CreateFile2(
FileMode dwCreationDisposition,
ref Kernel32.CREATEFILE2_EXTENDED_PARAMETERS pCreateExParams)
{
- lpFileName = PathInternal.EnsureExtendedPrefixOverMaxPath(lpFileName);
+ lpFileName = PathInternal.EnsureExtendedPrefixIfNeeded(lpFileName)!; // TODO-NULLABLE: Remove ! when nullable attributes are respected
return CreateFile2Private(lpFileName, dwDesiredAccess, dwShareMode, dwCreationDisposition, ref pCreateExParams);
}
}
diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.EventWaitHandle.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.EventWaitHandle.cs
index 8ff166c95845..dabe8c2dc2bd 100644
--- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.EventWaitHandle.cs
+++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.EventWaitHandle.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using Microsoft.Win32.SafeHandles;
using System;
using System.Runtime.InteropServices;
diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.ExpandEnvironmentStrings.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.ExpandEnvironmentStrings.cs
index 67804d4a737b..ce3db6f2b458 100644
--- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.ExpandEnvironmentStrings.cs
+++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.ExpandEnvironmentStrings.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System.Runtime.InteropServices;
internal partial class Interop
diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.FILE_INFO_BY_HANDLE_CLASS.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.FILE_INFO_BY_HANDLE_CLASS.cs
index c619115fdd49..e31a453ba943 100644
--- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.FILE_INFO_BY_HANDLE_CLASS.cs
+++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.FILE_INFO_BY_HANDLE_CLASS.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using Microsoft.Win32.SafeHandles;
using System;
using System.Runtime.InteropServices;
diff --git a/src/Common/src/Interop/Windows/Kernel32/Interop.FILE_TIME.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.FILE_TIME.cs
similarity index 100%
rename from src/Common/src/Interop/Windows/Kernel32/Interop.FILE_TIME.cs
rename to src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.FILE_TIME.cs
diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.FileAttributes.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.FileAttributes.cs
index 8103870deae8..725a25a7193a 100644
--- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.FileAttributes.cs
+++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.FileAttributes.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
internal partial class Interop
{
internal partial class Kernel32
diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.FileTimeToSystemTime.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.FileTimeToSystemTime.cs
index f8c1be93f5b7..067ee715870c 100644
--- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.FileTimeToSystemTime.cs
+++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.FileTimeToSystemTime.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System;
using System.Runtime.InteropServices;
diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.FileTypes.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.FileTypes.cs
index a4330f53389b..9d52f1f4f42d 100644
--- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.FileTypes.cs
+++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.FileTypes.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
internal partial class Interop
{
internal partial class Kernel32
diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.FindClose.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.FindClose.cs
index de11958fe369..fcf9254acaae 100644
--- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.FindClose.cs
+++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.FindClose.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using Microsoft.Win32.SafeHandles;
using System;
using System.Runtime.InteropServices;
diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.FindFirstFileEx.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.FindFirstFileEx.cs
index 80fb2e7189fc..52dcd54c9e05 100644
--- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.FindFirstFileEx.cs
+++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.FindFirstFileEx.cs
@@ -21,11 +21,10 @@ internal partial class Kernel32
internal static SafeFindHandle FindFirstFile(string fileName, ref WIN32_FIND_DATA data)
{
- string? fileNameWithPrefix = PathInternal.EnsureExtendedPrefixIfNeeded(fileName);
- Debug.Assert(fileNameWithPrefix != null, "null not expected when non-null passed"); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761
+ fileName = PathInternal.EnsureExtendedPrefixIfNeeded(fileName)!; // TODO-NULLABLE: Remove ! when nullable attributes are respected
// use FindExInfoBasic since we don't care about short name and it has better perf
- return FindFirstFileExPrivate(fileNameWithPrefix, FINDEX_INFO_LEVELS.FindExInfoBasic, ref data, FINDEX_SEARCH_OPS.FindExSearchNameMatch, IntPtr.Zero, 0);
+ return FindFirstFileExPrivate(fileName, FINDEX_INFO_LEVELS.FindExInfoBasic, ref data, FINDEX_SEARCH_OPS.FindExSearchNameMatch, IntPtr.Zero, 0);
}
internal enum FINDEX_INFO_LEVELS : uint
diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.FlushFileBuffers.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.FlushFileBuffers.cs
index 5d0f0dcea7cc..e10a2279cff1 100644
--- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.FlushFileBuffers.cs
+++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.FlushFileBuffers.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using Microsoft.Win32.SafeHandles;
using System;
using System.Runtime.InteropServices;
diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.FormatMessage.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.FormatMessage.cs
index bfa40819a1e0..09001e81e064 100644
--- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.FormatMessage.cs
+++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.FormatMessage.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System;
using System.Runtime.InteropServices;
diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.FreeEnvironmentStrings.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.FreeEnvironmentStrings.cs
index 7c317e2665a9..c372a8553ecb 100644
--- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.FreeEnvironmentStrings.cs
+++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.FreeEnvironmentStrings.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System.Runtime.InteropServices;
internal partial class Interop
diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.FreeLibrary.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.FreeLibrary.cs
index b6b8ed670182..c70865350aeb 100644
--- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.FreeLibrary.cs
+++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.FreeLibrary.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System;
using System.Runtime.InteropServices;
diff --git a/src/Common/src/Interop/Windows/Kernel32/Interop.GET_FILEEX_INFO_LEVELS.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GET_FILEEX_INFO_LEVELS.cs
similarity index 100%
rename from src/Common/src/Interop/Windows/Kernel32/Interop.GET_FILEEX_INFO_LEVELS.cs
rename to src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GET_FILEEX_INFO_LEVELS.cs
diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetCPInfo.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetCPInfo.cs
index 98537ec330b8..8d523e41e9ac 100644
--- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetCPInfo.cs
+++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetCPInfo.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System.Runtime.InteropServices;
internal partial class Interop
diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetCurrentDirectory.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetCurrentDirectory.cs
index 2f2eb48bbd5e..611cc70d289d 100644
--- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetCurrentDirectory.cs
+++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetCurrentDirectory.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System.Runtime.InteropServices;
internal partial class Interop
diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetCurrentProcessId.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetCurrentProcessId.cs
index b71fb4e6f22f..3a1a353d8620 100644
--- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetCurrentProcessId.cs
+++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetCurrentProcessId.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System.Runtime.InteropServices;
internal partial class Interop
diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetCurrentProcess_IntPtr.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetCurrentProcess_IntPtr.cs
index 7b9ea6661897..c99351950a83 100644
--- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetCurrentProcess_IntPtr.cs
+++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetCurrentProcess_IntPtr.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System;
using System.Runtime.InteropServices;
diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetCurrentThreadId.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetCurrentThreadId.cs
index 0599f4c59023..d456db752257 100644
--- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetCurrentThreadId.cs
+++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetCurrentThreadId.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System;
using System.Runtime.InteropServices;
diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetEnvironmentStrings.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetEnvironmentStrings.cs
index 9d25bed4800e..29a686026a27 100644
--- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetEnvironmentStrings.cs
+++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetEnvironmentStrings.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System.Runtime.InteropServices;
internal partial class Interop
diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetEnvironmentVariable.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetEnvironmentVariable.cs
index d591219b12ae..13adefc21634 100644
--- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetEnvironmentVariable.cs
+++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetEnvironmentVariable.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System;
using System.Runtime.InteropServices;
diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetFileAttributesEx.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetFileAttributesEx.cs
index 624404952f77..e3f18fe6c087 100644
--- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetFileAttributesEx.cs
+++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetFileAttributesEx.cs
@@ -21,77 +21,8 @@ internal partial class Kernel32
internal static bool GetFileAttributesEx(string name, GET_FILEEX_INFO_LEVELS fileInfoLevel, ref WIN32_FILE_ATTRIBUTE_DATA lpFileInformation)
{
- string? nameWithExtendedPrefix = PathInternal.EnsureExtendedPrefixIfNeeded(name);
- Debug.Assert(nameWithExtendedPrefix != null, "null not expected when non-null is passed"); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761
- return GetFileAttributesExPrivate(nameWithExtendedPrefix, fileInfoLevel, ref lpFileInformation);
- }
-
- internal enum GET_FILEEX_INFO_LEVELS : uint
- {
- GetFileExInfoStandard = 0x0u,
- GetFileExMaxInfoLevel = 0x1u,
- }
-
- internal struct WIN32_FILE_ATTRIBUTE_DATA
- {
- internal int dwFileAttributes;
- internal uint ftCreationTimeLow;
- internal uint ftCreationTimeHigh;
- internal uint ftLastAccessTimeLow;
- internal uint ftLastAccessTimeHigh;
- internal uint ftLastWriteTimeLow;
- internal uint ftLastWriteTimeHigh;
- internal uint fileSizeHigh;
- internal uint fileSizeLow;
-
- internal void PopulateFrom(ref WIN32_FIND_DATA findData)
- {
- // Copy the information to data
- dwFileAttributes = (int)findData.dwFileAttributes;
- ftCreationTimeLow = findData.ftCreationTime.dwLowDateTime;
- ftCreationTimeHigh = findData.ftCreationTime.dwHighDateTime;
- ftLastAccessTimeLow = findData.ftLastAccessTime.dwLowDateTime;
- ftLastAccessTimeHigh = findData.ftLastAccessTime.dwHighDateTime;
- ftLastWriteTimeLow = findData.ftLastWriteTime.dwLowDateTime;
- ftLastWriteTimeHigh = findData.ftLastWriteTime.dwHighDateTime;
- fileSizeHigh = findData.nFileSizeHigh;
- fileSizeLow = findData.nFileSizeLow;
- }
- }
-
- [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
- [BestFitMapping(false)]
- internal unsafe struct WIN32_FIND_DATA
- {
- internal uint dwFileAttributes;
- internal FILE_TIME ftCreationTime;
- internal FILE_TIME ftLastAccessTime;
- internal FILE_TIME ftLastWriteTime;
- internal uint nFileSizeHigh;
- internal uint nFileSizeLow;
- internal uint dwReserved0;
- internal uint dwReserved1;
- [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 260)]
- internal string? cFileName;
- [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 14)]
- internal string? cAlternateFileName;
- }
-
- internal struct FILE_TIME
- {
- internal uint dwLowDateTime;
- internal uint dwHighDateTime;
-
- internal FILE_TIME(long fileTime)
- {
- dwLowDateTime = (uint)fileTime;
- dwHighDateTime = (uint)(fileTime >> 32);
- }
-
- internal long ToTicks()
- {
- return ((long)dwHighDateTime << 32) + dwLowDateTime;
- }
+ name = PathInternal.EnsureExtendedPrefixIfNeeded(name)!; // TODO-NULLABLE: Remove ! when nullable attributes are respected
+ return GetFileAttributesExPrivate(name, fileInfoLevel, ref lpFileInformation);
}
}
}
diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetFileInformationByHandleEx.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetFileInformationByHandleEx.cs
index 78c9e7071fe0..1106cff1c58f 100644
--- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetFileInformationByHandleEx.cs
+++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetFileInformationByHandleEx.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using Microsoft.Win32.SafeHandles;
using System;
using System.Runtime.InteropServices;
diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetFileType_SafeHandle.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetFileType_SafeHandle.cs
index 3f9e6271b5b5..faa57cc2f121 100644
--- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetFileType_SafeHandle.cs
+++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetFileType_SafeHandle.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using Microsoft.Win32.SafeHandles;
using System.Runtime.InteropServices;
diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetFullPathNameW.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetFullPathNameW.cs
index 38b7cdd2e63f..197b0a9be523 100644
--- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetFullPathNameW.cs
+++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetFullPathNameW.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System;
using System.Runtime.InteropServices;
diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetLogicalDrives.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetLogicalDrives.cs
index c69f7d30c204..657188f255e2 100644
--- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetLogicalDrives.cs
+++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetLogicalDrives.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System.Runtime.InteropServices;
internal partial class Interop
diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetLongPathNameW.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetLongPathNameW.cs
index dd497bf6d92c..81b4d096f564 100644
--- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetLongPathNameW.cs
+++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetLongPathNameW.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System;
using System.Runtime.InteropServices;
diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetProcessInformation.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetProcessInformation.cs
index 76027483f23a..22e056937548 100644
--- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetProcessInformation.cs
+++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetProcessInformation.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System;
using System.Runtime.InteropServices;
diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetProcessTimes.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetProcessTimes.cs
index 7b72ca773207..03c6c080c7d9 100644
--- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetProcessTimes.cs
+++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetProcessTimes.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System;
using System.Runtime.InteropServices;
diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetStdHandle.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetStdHandle.cs
index ae54f641d60d..f2b54c9728a2 100644
--- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetStdHandle.cs
+++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetStdHandle.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System;
using System.Runtime.InteropServices;
diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetSystemDirectoryW.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetSystemDirectoryW.cs
index a7cd273098c3..197f6f5eadcd 100644
--- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetSystemDirectoryW.cs
+++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetSystemDirectoryW.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System.Runtime.InteropServices;
internal static partial class Interop
diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetSystemInfo.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetSystemInfo.cs
index 56210558d2d1..cbf07eae7ffa 100644
--- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetSystemInfo.cs
+++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetSystemInfo.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System;
using System.Runtime.InteropServices;
diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetSystemTime.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetSystemTime.cs
index b51cfa396e1a..710db5e4b99f 100644
--- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetSystemTime.cs
+++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetSystemTime.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System;
using System.Runtime.InteropServices;
diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetSystemTimeAsFileTime.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetSystemTimeAsFileTime.cs
index 70363ce6961f..e2dcd906c2ad 100644
--- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetSystemTimeAsFileTime.cs
+++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetSystemTimeAsFileTime.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System;
using System.Runtime.InteropServices;
diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetSystemTimePreciseAsFileTime.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetSystemTimePreciseAsFileTime.cs
index 8c86d952870b..e3262799d132 100644
--- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetSystemTimePreciseAsFileTime.cs
+++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetSystemTimePreciseAsFileTime.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System;
using System.Runtime.InteropServices;
diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetSystemTimes.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetSystemTimes.cs
index 12d5a4aa57d4..d9e858062c7d 100644
--- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetSystemTimes.cs
+++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetSystemTimes.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System;
using System.Runtime.InteropServices;
diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetTempFileNameW.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetTempFileNameW.cs
index 0afc4481be75..97e1d82847a6 100644
--- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetTempFileNameW.cs
+++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetTempFileNameW.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System.Runtime.InteropServices;
internal partial class Interop
diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetTempPathW.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetTempPathW.cs
index 68ff9aca40f8..7f7bb775c85a 100644
--- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetTempPathW.cs
+++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetTempPathW.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System.Runtime.InteropServices;
internal partial class Interop
diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetVersionExW.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetVersionExW.cs
index ab79ed2ea4f7..13a997a34400 100644
--- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetVersionExW.cs
+++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetVersionExW.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System.Runtime.InteropServices;
internal partial class Interop
diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GlobalMemoryStatusEx.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GlobalMemoryStatusEx.cs
index 99dde8581597..6a87ec370b24 100644
--- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GlobalMemoryStatusEx.cs
+++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GlobalMemoryStatusEx.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System;
using System.Runtime.InteropServices;
diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.Globalization.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.Globalization.cs
index 1312454eabbd..49d8033e542a 100644
--- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.Globalization.cs
+++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.Globalization.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System;
using System.Runtime.InteropServices;
@@ -102,8 +101,8 @@ internal static extern unsafe bool IsNLSDefinedString(
int cchStr);
#if !ENABLE_WINRT
- [DllImport("Kernel32.dll", CharSet = CharSet.Auto)]
- internal static extern bool GetUserPreferredUILanguages(uint dwFlags, out uint pulNumLanguages, char[]? pwszLanguagesBuffer, ref uint pcchLanguagesBuffer);
+ [DllImport("kernel32.dll", CharSet = CharSet.Auto)]
+ internal static extern Interop.BOOL GetUserPreferredUILanguages(uint dwFlags, uint* pulNumLanguages, char* pwszLanguagesBuffer, uint* pcchLanguagesBuffer);
#endif //!ENABLE_WINRT
[DllImport("kernel32.dll", CharSet = CharSet.Unicode)]
diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.HandleTypes.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.HandleTypes.cs
index 51f7c92f024f..c2096aa62b75 100644
--- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.HandleTypes.cs
+++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.HandleTypes.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
internal partial class Interop
{
internal partial class Kernel32
diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.IsWow64Process_IntPtr.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.IsWow64Process_IntPtr.cs
index 5d064780bfec..7953da68daa5 100644
--- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.IsWow64Process_IntPtr.cs
+++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.IsWow64Process_IntPtr.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System;
using System.Runtime.InteropServices;
diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.LoadLibraryEx.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.LoadLibraryEx.cs
index c3c6fcc118d1..4eef5852fe7e 100644
--- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.LoadLibraryEx.cs
+++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.LoadLibraryEx.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using Microsoft.Win32.SafeHandles;
using System;
using System.Runtime.InteropServices;
diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.LocalAlloc.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.LocalAlloc.cs
index 55f76b4403c5..9c74adbe01a5 100644
--- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.LocalAlloc.cs
+++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.LocalAlloc.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System;
using System.Runtime.InteropServices;
diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.LockFile.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.LockFile.cs
index 7d0a55ce644f..a21d00f4f665 100644
--- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.LockFile.cs
+++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.LockFile.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using Microsoft.Win32.SafeHandles;
using System;
using System.IO;
diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.MAX_PATH.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.MAX_PATH.cs
index 0a05230f1328..f7fa32669bad 100644
--- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.MAX_PATH.cs
+++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.MAX_PATH.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
internal partial class Interop
{
internal partial class Kernel32
diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.MEMORYSTATUSEX.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.MEMORYSTATUSEX.cs
index 8ddac8e64f48..45f57aa4d83b 100644
--- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.MEMORYSTATUSEX.cs
+++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.MEMORYSTATUSEX.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System;
using System.Runtime.InteropServices;
diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.MEMORY_BASIC_INFORMATION.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.MEMORY_BASIC_INFORMATION.cs
index a14157fecc10..0744d53f66c5 100644
--- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.MEMORY_BASIC_INFORMATION.cs
+++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.MEMORY_BASIC_INFORMATION.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System;
using System.Runtime.InteropServices;
diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.MUI.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.MUI.cs
index 024dd1fba49c..509d9a241107 100644
--- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.MUI.cs
+++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.MUI.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System;
using System.Runtime.InteropServices;
diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.MultiByteToWideChar.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.MultiByteToWideChar.cs
index edabe9f9f6b9..158e4db3fd30 100644
--- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.MultiByteToWideChar.cs
+++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.MultiByteToWideChar.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System;
using System.Runtime.InteropServices;
diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.Mutex.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.Mutex.cs
index ed25668a0001..46ddd12f9b43 100644
--- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.Mutex.cs
+++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.Mutex.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using Microsoft.Win32.SafeHandles;
using System;
using System.Runtime.InteropServices;
diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.OSVERSIONINFOEX.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.OSVERSIONINFOEX.cs
index 19c32e07c183..1bfe00c57446 100644
--- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.OSVERSIONINFOEX.cs
+++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.OSVERSIONINFOEX.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System.Runtime.InteropServices;
internal partial class Interop
diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.OutputDebugString.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.OutputDebugString.cs
index bc7c1c83be5a..8da50ff8ab3a 100644
--- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.OutputDebugString.cs
+++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.OutputDebugString.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System.Runtime.InteropServices;
internal partial class Interop
diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.QueryPerformanceCounter.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.QueryPerformanceCounter.cs
index e0959f73daea..ddc9797e5f2a 100644
--- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.QueryPerformanceCounter.cs
+++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.QueryPerformanceCounter.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System.Runtime.InteropServices;
internal partial class Interop
diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.QueryPerformanceFrequency.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.QueryPerformanceFrequency.cs
index 71fd3db6cb70..72a48ba208be 100644
--- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.QueryPerformanceFrequency.cs
+++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.QueryPerformanceFrequency.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System.Runtime.InteropServices;
internal partial class Interop
diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.QueryUnbiasedInterruptTime.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.QueryUnbiasedInterruptTime.cs
index bdd77c180fb1..87ca7fd1d497 100644
--- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.QueryUnbiasedInterruptTime.cs
+++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.QueryUnbiasedInterruptTime.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System.Runtime.InteropServices;
internal partial class Interop
diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.ReadFile_SafeHandle_IntPtr.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.ReadFile_SafeHandle_IntPtr.cs
index 67e317adf060..076f7f136fde 100644
--- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.ReadFile_SafeHandle_IntPtr.cs
+++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.ReadFile_SafeHandle_IntPtr.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using Microsoft.Win32.SafeHandles;
using System;
using System.Runtime.InteropServices;
diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.ReadFile_SafeHandle_NativeOverlapped.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.ReadFile_SafeHandle_NativeOverlapped.cs
index 0687830057c1..3ae65a88069e 100644
--- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.ReadFile_SafeHandle_NativeOverlapped.cs
+++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.ReadFile_SafeHandle_NativeOverlapped.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using Microsoft.Win32.SafeHandles;
using System;
using System.Runtime.InteropServices;
diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.ResolveLocaleName.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.ResolveLocaleName.cs
index 1a0e61317ceb..2d6b6c3c729e 100644
--- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.ResolveLocaleName.cs
+++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.ResolveLocaleName.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System;
using System.Runtime.InteropServices;
diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.SECURITY_ATTRIBUTES.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.SECURITY_ATTRIBUTES.cs
index 16e9fec77394..8d31f8622ff4 100644
--- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.SECURITY_ATTRIBUTES.cs
+++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.SECURITY_ATTRIBUTES.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using Microsoft.Win32.SafeHandles;
using System;
using System.Runtime.InteropServices;
diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.SYSTEM_INFO.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.SYSTEM_INFO.cs
index ab793a390b55..16e5bfd8da0c 100644
--- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.SYSTEM_INFO.cs
+++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.SYSTEM_INFO.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System;
using System.Runtime.InteropServices;
diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.SecurityOptions.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.SecurityOptions.cs
index 4e94e3e5a856..4a4402484f2b 100644
--- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.SecurityOptions.cs
+++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.SecurityOptions.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
internal partial class Interop
{
internal partial class Kernel32
diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.Semaphore.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.Semaphore.cs
index f453a255bdbf..cc2735945249 100644
--- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.Semaphore.cs
+++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.Semaphore.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using Microsoft.Win32.SafeHandles;
using System;
using System.Runtime.InteropServices;
diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.SetCurrentDirectory.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.SetCurrentDirectory.cs
index 5cf23a8d471e..b30e5d765643 100644
--- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.SetCurrentDirectory.cs
+++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.SetCurrentDirectory.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System.Runtime.InteropServices;
internal partial class Interop
diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.SetEndOfFile.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.SetEndOfFile.cs
index 2233e1f83815..e5d60041a8ed 100644
--- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.SetEndOfFile.cs
+++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.SetEndOfFile.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using Microsoft.Win32.SafeHandles;
using System.Runtime.InteropServices;
diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.SetEnvironmentVariable.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.SetEnvironmentVariable.cs
index 6a0fc1d4d96a..b94ec2111f5c 100644
--- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.SetEnvironmentVariable.cs
+++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.SetEnvironmentVariable.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System.Runtime.InteropServices;
internal partial class Interop
diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.SetFilePointerEx.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.SetFilePointerEx.cs
index dbedf85cbead..c0e5247a5233 100644
--- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.SetFilePointerEx.cs
+++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.SetFilePointerEx.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using Microsoft.Win32.SafeHandles;
using System.Runtime.InteropServices;
diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.SetThreadErrorMode.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.SetThreadErrorMode.cs
index b5bd94508608..123eb75d7bee 100644
--- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.SetThreadErrorMode.cs
+++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.SetThreadErrorMode.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System.Runtime.InteropServices;
internal partial class Interop
diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.SystemTimeToFileTime.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.SystemTimeToFileTime.cs
index cf81e3d29524..43db7b47164d 100644
--- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.SystemTimeToFileTime.cs
+++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.SystemTimeToFileTime.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System.Runtime.InteropServices;
internal partial class Interop
diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.TimeZone.Registry.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.TimeZone.Registry.cs
index 30299ae709dd..062d1caebacc 100644
--- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.TimeZone.Registry.cs
+++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.TimeZone.Registry.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System;
using System.Runtime.InteropServices;
diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.TimeZone.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.TimeZone.cs
index dc89af488a8c..68d4583b54a2 100644
--- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.TimeZone.cs
+++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.TimeZone.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System;
using System.Runtime.InteropServices;
diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.TzSpecificLocalTimeToSystemTime.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.TzSpecificLocalTimeToSystemTime.cs
index e832e9341e6e..2cca7faed732 100644
--- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.TzSpecificLocalTimeToSystemTime.cs
+++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.TzSpecificLocalTimeToSystemTime.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System;
using System.Runtime.InteropServices;
diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.VerSetConditionMask.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.VerSetConditionMask.cs
index 931faf5705da..385e48a43907 100644
--- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.VerSetConditionMask.cs
+++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.VerSetConditionMask.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System.Runtime.InteropServices;
internal partial class Interop
diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.VerifyVersionExW.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.VerifyVersionExW.cs
index 90f5bdbe103f..5c2471cf4952 100644
--- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.VerifyVersionExW.cs
+++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.VerifyVersionExW.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System.Runtime.InteropServices;
internal partial class Interop
diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.VirtualAlloc.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.VirtualAlloc.cs
index 944fb4e5eb62..a97dc1aec7bb 100644
--- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.VirtualAlloc.cs
+++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.VirtualAlloc.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System;
using System.Runtime.InteropServices;
diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.VirtualFree.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.VirtualFree.cs
index 2b940a4210cf..574cd93a0a8f 100644
--- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.VirtualFree.cs
+++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.VirtualFree.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System;
using System.Runtime.InteropServices;
diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.VirtualQuery.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.VirtualQuery.cs
index c7c02d687551..faab1cc81a61 100644
--- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.VirtualQuery.cs
+++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.VirtualQuery.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System;
using System.Runtime.InteropServices;
diff --git a/src/Common/src/Interop/Windows/Kernel32/Interop.WIN32_FILE_ATTRIBUTE_DATA.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.WIN32_FILE_ATTRIBUTE_DATA.cs
similarity index 100%
rename from src/Common/src/Interop/Windows/Kernel32/Interop.WIN32_FILE_ATTRIBUTE_DATA.cs
rename to src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.WIN32_FILE_ATTRIBUTE_DATA.cs
diff --git a/src/Common/src/Interop/Windows/Kernel32/Interop.WIN32_FIND_DATA.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.WIN32_FIND_DATA.cs
similarity index 100%
rename from src/Common/src/Interop/Windows/Kernel32/Interop.WIN32_FIND_DATA.cs
rename to src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.WIN32_FIND_DATA.cs
diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.WideCharToMultiByte.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.WideCharToMultiByte.cs
index 6e523e5b7b44..a06c9153f470 100644
--- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.WideCharToMultiByte.cs
+++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.WideCharToMultiByte.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System;
using System.Runtime.InteropServices;
diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.WriteFile_SafeHandle_IntPtr.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.WriteFile_SafeHandle_IntPtr.cs
index 46948096ed72..69651ca1cab3 100644
--- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.WriteFile_SafeHandle_IntPtr.cs
+++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.WriteFile_SafeHandle_IntPtr.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using Microsoft.Win32.SafeHandles;
using System;
using System.Runtime.InteropServices;
diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.WriteFile_SafeHandle_NativeOverlapped.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.WriteFile_SafeHandle_NativeOverlapped.cs
index 6816d59028ef..dc1e97555b89 100644
--- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.WriteFile_SafeHandle_NativeOverlapped.cs
+++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.WriteFile_SafeHandle_NativeOverlapped.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using Microsoft.Win32.SafeHandles;
using System;
using System.Runtime.InteropServices;
diff --git a/src/Common/src/CoreLib/Interop/Windows/Normaliz/Interop.Idna.cs b/src/Common/src/CoreLib/Interop/Windows/Normaliz/Interop.Idna.cs
index 61b107bd5afc..f49ce8dd6170 100644
--- a/src/Common/src/CoreLib/Interop/Windows/Normaliz/Interop.Idna.cs
+++ b/src/Common/src/CoreLib/Interop/Windows/Normaliz/Interop.Idna.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System;
using System.Runtime.InteropServices;
diff --git a/src/Common/src/CoreLib/Interop/Windows/Normaliz/Interop.Normalization.cs b/src/Common/src/CoreLib/Interop/Windows/Normaliz/Interop.Normalization.cs
index d7f639b9653a..84664d51cb08 100644
--- a/src/Common/src/CoreLib/Interop/Windows/Normaliz/Interop.Normalization.cs
+++ b/src/Common/src/CoreLib/Interop/Windows/Normaliz/Interop.Normalization.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System;
using System.Runtime.InteropServices;
diff --git a/src/Common/src/CoreLib/Interop/Windows/NtDll/Interop.NtQuerySystemInformation.cs b/src/Common/src/CoreLib/Interop/Windows/NtDll/Interop.NtQuerySystemInformation.cs
index 1115926bba43..16f05e338cd9 100644
--- a/src/Common/src/CoreLib/Interop/Windows/NtDll/Interop.NtQuerySystemInformation.cs
+++ b/src/Common/src/CoreLib/Interop/Windows/NtDll/Interop.NtQuerySystemInformation.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System;
using System.Runtime.InteropServices;
diff --git a/src/Common/src/CoreLib/Interop/Windows/Ole32/Interop.CoCreateGuid.cs b/src/Common/src/CoreLib/Interop/Windows/Ole32/Interop.CoCreateGuid.cs
index db5c04aeff03..57accbe7c008 100644
--- a/src/Common/src/CoreLib/Interop/Windows/Ole32/Interop.CoCreateGuid.cs
+++ b/src/Common/src/CoreLib/Interop/Windows/Ole32/Interop.CoCreateGuid.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System;
using System.Runtime.InteropServices;
diff --git a/src/Common/src/CoreLib/Interop/Windows/Ole32/Interop.CoTaskMemAlloc.cs b/src/Common/src/CoreLib/Interop/Windows/Ole32/Interop.CoTaskMemAlloc.cs
index 335531d77a54..9119ee774e5f 100644
--- a/src/Common/src/CoreLib/Interop/Windows/Ole32/Interop.CoTaskMemAlloc.cs
+++ b/src/Common/src/CoreLib/Interop/Windows/Ole32/Interop.CoTaskMemAlloc.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System;
using System.Runtime.InteropServices;
diff --git a/src/Common/src/CoreLib/Interop/Windows/OleAut32/Interop.SysAllocStringByteLen.cs b/src/Common/src/CoreLib/Interop/Windows/OleAut32/Interop.SysAllocStringByteLen.cs
index 6cec249eba59..846283a67420 100644
--- a/src/Common/src/CoreLib/Interop/Windows/OleAut32/Interop.SysAllocStringByteLen.cs
+++ b/src/Common/src/CoreLib/Interop/Windows/OleAut32/Interop.SysAllocStringByteLen.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System;
using System.Runtime.InteropServices;
diff --git a/src/Common/src/CoreLib/Interop/Windows/OleAut32/Interop.SysAllocStringLen.cs b/src/Common/src/CoreLib/Interop/Windows/OleAut32/Interop.SysAllocStringLen.cs
index 67bd4f0bc05a..4980844deaac 100644
--- a/src/Common/src/CoreLib/Interop/Windows/OleAut32/Interop.SysAllocStringLen.cs
+++ b/src/Common/src/CoreLib/Interop/Windows/OleAut32/Interop.SysAllocStringLen.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System;
using System.Runtime.InteropServices;
using System.Security;
diff --git a/src/Common/src/CoreLib/Interop/Windows/OleAut32/Interop.SysFreeString.cs b/src/Common/src/CoreLib/Interop/Windows/OleAut32/Interop.SysFreeString.cs
index 8e1c9d8f2e4c..8673cc672411 100644
--- a/src/Common/src/CoreLib/Interop/Windows/OleAut32/Interop.SysFreeString.cs
+++ b/src/Common/src/CoreLib/Interop/Windows/OleAut32/Interop.SysFreeString.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System;
using System.Runtime.InteropServices;
diff --git a/src/Common/src/CoreLib/Interop/Windows/OleAut32/Interop.SysStringLen.cs b/src/Common/src/CoreLib/Interop/Windows/OleAut32/Interop.SysStringLen.cs
index 7bd214ac6733..cf65d6b086cf 100644
--- a/src/Common/src/CoreLib/Interop/Windows/OleAut32/Interop.SysStringLen.cs
+++ b/src/Common/src/CoreLib/Interop/Windows/OleAut32/Interop.SysStringLen.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System;
using System.Runtime.InteropServices;
using System.Security;
diff --git a/src/Common/src/CoreLib/Interop/Windows/Secur32/Interop.GetUserNameExW.cs b/src/Common/src/CoreLib/Interop/Windows/Secur32/Interop.GetUserNameExW.cs
index e91506bf4e43..cf0dd5f698fb 100644
--- a/src/Common/src/CoreLib/Interop/Windows/Secur32/Interop.GetUserNameExW.cs
+++ b/src/Common/src/CoreLib/Interop/Windows/Secur32/Interop.GetUserNameExW.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System.Runtime.InteropServices;
internal partial class Interop
diff --git a/src/Common/src/CoreLib/Interop/Windows/Shell32/Interop.SHGetKnownFolderPath.cs b/src/Common/src/CoreLib/Interop/Windows/Shell32/Interop.SHGetKnownFolderPath.cs
index c6bc10a95f81..1090805c0e04 100644
--- a/src/Common/src/CoreLib/Interop/Windows/Shell32/Interop.SHGetKnownFolderPath.cs
+++ b/src/Common/src/CoreLib/Interop/Windows/Shell32/Interop.SHGetKnownFolderPath.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System;
using System.Runtime.InteropServices;
diff --git a/src/Common/src/CoreLib/Interop/Windows/User32/Interop.Constants.cs b/src/Common/src/CoreLib/Interop/Windows/User32/Interop.Constants.cs
index 2cc835fad951..f1f09740e90f 100644
--- a/src/Common/src/CoreLib/Interop/Windows/User32/Interop.Constants.cs
+++ b/src/Common/src/CoreLib/Interop/Windows/User32/Interop.Constants.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
internal partial class Interop
{
internal partial class User32
diff --git a/src/Common/src/CoreLib/Interop/Windows/User32/Interop.LoadString.cs b/src/Common/src/CoreLib/Interop/Windows/User32/Interop.LoadString.cs
index d7239a3c4ac0..078ebd481dd6 100644
--- a/src/Common/src/CoreLib/Interop/Windows/User32/Interop.LoadString.cs
+++ b/src/Common/src/CoreLib/Interop/Windows/User32/Interop.LoadString.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System.Runtime.InteropServices;
using Microsoft.Win32.SafeHandles;
diff --git a/src/Common/src/CoreLib/Interop/Windows/User32/Interop.SendMessageTimeout.cs b/src/Common/src/CoreLib/Interop/Windows/User32/Interop.SendMessageTimeout.cs
index 2c1bcc6c3222..c8a97e6b9dbf 100644
--- a/src/Common/src/CoreLib/Interop/Windows/User32/Interop.SendMessageTimeout.cs
+++ b/src/Common/src/CoreLib/Interop/Windows/User32/Interop.SendMessageTimeout.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System;
using System.Runtime.InteropServices;
diff --git a/src/Common/src/CoreLib/Microsoft/Win32/SafeHandles/CriticalHandleMinusOneIsInvalid.cs b/src/Common/src/CoreLib/Microsoft/Win32/SafeHandles/CriticalHandleMinusOneIsInvalid.cs
index 8576dacc3d0c..a76c51d96660 100644
--- a/src/Common/src/CoreLib/Microsoft/Win32/SafeHandles/CriticalHandleMinusOneIsInvalid.cs
+++ b/src/Common/src/CoreLib/Microsoft/Win32/SafeHandles/CriticalHandleMinusOneIsInvalid.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System;
using System.Runtime.InteropServices;
diff --git a/src/Common/src/CoreLib/Microsoft/Win32/SafeHandles/CriticalHandleZeroOrMinusOneIsInvalid.cs b/src/Common/src/CoreLib/Microsoft/Win32/SafeHandles/CriticalHandleZeroOrMinusOneIsInvalid.cs
index 2b61f6248ac0..28d021948962 100644
--- a/src/Common/src/CoreLib/Microsoft/Win32/SafeHandles/CriticalHandleZeroOrMinusOneIsInvalid.cs
+++ b/src/Common/src/CoreLib/Microsoft/Win32/SafeHandles/CriticalHandleZeroOrMinusOneIsInvalid.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System;
using System.Runtime.InteropServices;
diff --git a/src/Common/src/CoreLib/Microsoft/Win32/SafeHandles/SafeFileHandle.Unix.cs b/src/Common/src/CoreLib/Microsoft/Win32/SafeHandles/SafeFileHandle.Unix.cs
index ec99cbf17eb3..602537a30561 100644
--- a/src/Common/src/CoreLib/Microsoft/Win32/SafeHandles/SafeFileHandle.Unix.cs
+++ b/src/Common/src/CoreLib/Microsoft/Win32/SafeHandles/SafeFileHandle.Unix.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System;
using System.Diagnostics;
using System.IO;
diff --git a/src/Common/src/CoreLib/Microsoft/Win32/SafeHandles/SafeFileHandle.Windows.cs b/src/Common/src/CoreLib/Microsoft/Win32/SafeHandles/SafeFileHandle.Windows.cs
index db8482ed712c..a53046cc182a 100644
--- a/src/Common/src/CoreLib/Microsoft/Win32/SafeHandles/SafeFileHandle.Windows.cs
+++ b/src/Common/src/CoreLib/Microsoft/Win32/SafeHandles/SafeFileHandle.Windows.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System;
using System.Security;
using System.Runtime.InteropServices;
diff --git a/src/Common/src/CoreLib/Microsoft/Win32/SafeHandles/SafeFindHandle.Windows.cs b/src/Common/src/CoreLib/Microsoft/Win32/SafeHandles/SafeFindHandle.Windows.cs
index 192f523ff162..4ba05409fd92 100644
--- a/src/Common/src/CoreLib/Microsoft/Win32/SafeHandles/SafeFindHandle.Windows.cs
+++ b/src/Common/src/CoreLib/Microsoft/Win32/SafeHandles/SafeFindHandle.Windows.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System;
using System.Security;
using System.Runtime.InteropServices;
diff --git a/src/Common/src/CoreLib/Microsoft/Win32/SafeHandles/SafeHandleMinusOneIsInvalid.cs b/src/Common/src/CoreLib/Microsoft/Win32/SafeHandles/SafeHandleMinusOneIsInvalid.cs
index b146b5a68713..5415f2c35d31 100644
--- a/src/Common/src/CoreLib/Microsoft/Win32/SafeHandles/SafeHandleMinusOneIsInvalid.cs
+++ b/src/Common/src/CoreLib/Microsoft/Win32/SafeHandles/SafeHandleMinusOneIsInvalid.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System;
using System.Runtime.InteropServices;
diff --git a/src/Common/src/CoreLib/Microsoft/Win32/SafeHandles/SafeHandleZeroOrMinusOneIsInvalid.cs b/src/Common/src/CoreLib/Microsoft/Win32/SafeHandles/SafeHandleZeroOrMinusOneIsInvalid.cs
index 9a58aa29fed2..8d0220bf905e 100644
--- a/src/Common/src/CoreLib/Microsoft/Win32/SafeHandles/SafeHandleZeroOrMinusOneIsInvalid.cs
+++ b/src/Common/src/CoreLib/Microsoft/Win32/SafeHandles/SafeHandleZeroOrMinusOneIsInvalid.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System;
using System.Runtime.InteropServices;
diff --git a/src/Common/src/CoreLib/Microsoft/Win32/SafeHandles/SafeLibraryHandle.cs b/src/Common/src/CoreLib/Microsoft/Win32/SafeHandles/SafeLibraryHandle.cs
index dea7978ee8ec..3be2e354abf3 100644
--- a/src/Common/src/CoreLib/Microsoft/Win32/SafeHandles/SafeLibraryHandle.cs
+++ b/src/Common/src/CoreLib/Microsoft/Win32/SafeHandles/SafeLibraryHandle.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
namespace Microsoft.Win32.SafeHandles
{
sealed internal class SafeLibraryHandle : SafeHandleZeroOrMinusOneIsInvalid
diff --git a/src/Common/src/CoreLib/Microsoft/Win32/SafeHandles/SafeRegistryHandle.Windows.cs b/src/Common/src/CoreLib/Microsoft/Win32/SafeHandles/SafeRegistryHandle.Windows.cs
index 011aaeae662f..249f5e9f7c24 100644
--- a/src/Common/src/CoreLib/Microsoft/Win32/SafeHandles/SafeRegistryHandle.Windows.cs
+++ b/src/Common/src/CoreLib/Microsoft/Win32/SafeHandles/SafeRegistryHandle.Windows.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using Microsoft.Win32.SafeHandles;
using System.Runtime.InteropServices;
diff --git a/src/Common/src/CoreLib/Microsoft/Win32/SafeHandles/SafeRegistryHandle.cs b/src/Common/src/CoreLib/Microsoft/Win32/SafeHandles/SafeRegistryHandle.cs
index c3a7fcad885d..37e350031b83 100644
--- a/src/Common/src/CoreLib/Microsoft/Win32/SafeHandles/SafeRegistryHandle.cs
+++ b/src/Common/src/CoreLib/Microsoft/Win32/SafeHandles/SafeRegistryHandle.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using Microsoft.Win32.SafeHandles;
using System;
diff --git a/src/Common/src/CoreLib/Microsoft/Win32/SafeHandles/SafeWaitHandle.Windows.cs b/src/Common/src/CoreLib/Microsoft/Win32/SafeHandles/SafeWaitHandle.Windows.cs
index e87fedd724a0..66f17f0af709 100644
--- a/src/Common/src/CoreLib/Microsoft/Win32/SafeHandles/SafeWaitHandle.Windows.cs
+++ b/src/Common/src/CoreLib/Microsoft/Win32/SafeHandles/SafeWaitHandle.Windows.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
namespace Microsoft.Win32.SafeHandles
{
public sealed partial class SafeWaitHandle : SafeHandleZeroOrMinusOneIsInvalid
diff --git a/src/Common/src/CoreLib/Microsoft/Win32/SafeHandles/SafeWaitHandle.cs b/src/Common/src/CoreLib/Microsoft/Win32/SafeHandles/SafeWaitHandle.cs
index f2e81eacd8c5..edb0cdfcafe7 100644
--- a/src/Common/src/CoreLib/Microsoft/Win32/SafeHandles/SafeWaitHandle.cs
+++ b/src/Common/src/CoreLib/Microsoft/Win32/SafeHandles/SafeWaitHandle.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System;
namespace Microsoft.Win32.SafeHandles
diff --git a/src/Common/src/CoreLib/System.Private.CoreLib.Shared.projitems b/src/Common/src/CoreLib/System.Private.CoreLib.Shared.projitems
index e51a210baea6..0b8bddea5f52 100644
--- a/src/Common/src/CoreLib/System.Private.CoreLib.Shared.projitems
+++ b/src/Common/src/CoreLib/System.Private.CoreLib.Shared.projitems
@@ -7,6 +7,9 @@
+
+ enable
+ falsefalse
@@ -195,6 +198,7 @@
+
@@ -528,6 +532,7 @@
+
@@ -672,6 +677,7 @@
+
@@ -699,6 +705,7 @@
+
@@ -854,6 +861,7 @@
+
@@ -1016,11 +1024,13 @@
+
+
@@ -1032,7 +1042,7 @@
-
+
@@ -1070,6 +1080,8 @@
+
+
@@ -1080,6 +1092,7 @@
+
@@ -1100,6 +1113,7 @@
+
@@ -1211,7 +1225,7 @@
-
+
@@ -1241,6 +1255,7 @@
+
@@ -1265,6 +1280,7 @@
+
diff --git a/src/Common/src/CoreLib/System/AccessViolationException.cs b/src/Common/src/CoreLib/System/AccessViolationException.cs
index 357930898ca7..11590028d5a8 100644
--- a/src/Common/src/CoreLib/System/AccessViolationException.cs
+++ b/src/Common/src/CoreLib/System/AccessViolationException.cs
@@ -11,7 +11,6 @@
**
=============================================================================*/
-#nullable enable
using System;
using System.Runtime.Serialization;
diff --git a/src/Common/src/CoreLib/System/Action.cs b/src/Common/src/CoreLib/System/Action.cs
index 4c840379c843..54ca7aaf5323 100644
--- a/src/Common/src/CoreLib/System/Action.cs
+++ b/src/Common/src/CoreLib/System/Action.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
namespace System
{
public delegate void Action();
diff --git a/src/Common/src/CoreLib/System/Activator.RuntimeType.cs b/src/Common/src/CoreLib/System/Activator.RuntimeType.cs
index 224abdbcd451..bd7670f9e312 100644
--- a/src/Common/src/CoreLib/System/Activator.RuntimeType.cs
+++ b/src/Common/src/CoreLib/System/Activator.RuntimeType.cs
@@ -2,9 +2,9 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System.Reflection;
using System.Globalization;
+using System.Runtime.Loader;
using System.Runtime.Remoting;
using System.Threading;
@@ -111,14 +111,9 @@ public static partial class Activator
}
else
{
- RuntimeAssembly? assemblyFromResolveEvent;
- AssemblyName assemblyName = RuntimeAssembly.CreateAssemblyName(assemblyString, out assemblyFromResolveEvent);
- if (assemblyFromResolveEvent != null)
- {
- // Assembly was resolved via AssemblyResolve event
- assembly = assemblyFromResolveEvent;
- }
- else if (assemblyName.ContentType == AssemblyContentType.WindowsRuntime)
+ AssemblyName assemblyName = new AssemblyName(assemblyString);
+
+ if (assemblyName.ContentType == AssemblyContentType.WindowsRuntime)
{
// WinRT type - we have to use Type.GetType
type = Type.GetType(typeName + ", " + assemblyString, true /*throwOnError*/, ignoreCase);
@@ -127,7 +122,7 @@ public static partial class Activator
{
// Classic managed type
assembly = RuntimeAssembly.InternalLoadAssemblyName(
- assemblyName, ref stackMark);
+ assemblyName, ref stackMark, AssemblyLoadContext.CurrentContextualReflectionContext);
}
}
diff --git a/src/Common/src/CoreLib/System/Activator.cs b/src/Common/src/CoreLib/System/Activator.cs
index b4e5ddfeea24..8d6610f6a94f 100644
--- a/src/Common/src/CoreLib/System/Activator.cs
+++ b/src/Common/src/CoreLib/System/Activator.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System.Diagnostics;
using System.Globalization;
using System.Reflection;
diff --git a/src/Common/src/CoreLib/System/AggregateException.cs b/src/Common/src/CoreLib/System/AggregateException.cs
index d0043cfc908a..08cda7c38834 100644
--- a/src/Common/src/CoreLib/System/AggregateException.cs
+++ b/src/Common/src/CoreLib/System/AggregateException.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
diff --git a/src/Common/src/CoreLib/System/AppContext.cs b/src/Common/src/CoreLib/System/AppContext.cs
index fcda485fa149..7f81a4346753 100644
--- a/src/Common/src/CoreLib/System/AppContext.cs
+++ b/src/Common/src/CoreLib/System/AppContext.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System.Collections.Generic;
using System.Reflection;
using System.Runtime.ExceptionServices;
@@ -127,7 +126,7 @@ public static void SetSwitch(string switchName, bool isEnabled)
Interlocked.CompareExchange(ref s_switches, new Dictionary(), null);
}
- lock (s_switches!) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761
+ lock (s_switches!) // TODO-NULLABLE: Remove ! when compiler specially-recognizes CompareExchange for nullability
{
s_switches[switchName] = isEnabled;
}
diff --git a/src/Common/src/CoreLib/System/AppDomain.Unix.cs b/src/Common/src/CoreLib/System/AppDomain.Unix.cs
new file mode 100644
index 000000000000..3c1ef889f97b
--- /dev/null
+++ b/src/Common/src/CoreLib/System/AppDomain.Unix.cs
@@ -0,0 +1,26 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+namespace System
+{
+ public sealed partial class AppDomain
+ {
+ public TimeSpan MonitoringTotalProcessorTime
+ {
+ get
+ {
+ Interop.Sys.ProcessCpuInformation cpuInfo = default;
+ Interop.Sys.GetCpuUtilization(ref cpuInfo);
+
+ ulong userTime100Nanoseconds = cpuInfo.lastRecordedUserTime / 100; // nanoseconds to 100-nanoseconds
+ if (userTime100Nanoseconds > long.MaxValue)
+ {
+ userTime100Nanoseconds = long.MaxValue;
+ }
+
+ return new TimeSpan((long)userTime100Nanoseconds);
+ }
+ }
+ }
+}
diff --git a/src/Common/src/CoreLib/System/AppDomain.Windows.cs b/src/Common/src/CoreLib/System/AppDomain.Windows.cs
new file mode 100644
index 000000000000..07633273e243
--- /dev/null
+++ b/src/Common/src/CoreLib/System/AppDomain.Windows.cs
@@ -0,0 +1,14 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+namespace System
+{
+ public sealed partial class AppDomain
+ {
+ public TimeSpan MonitoringTotalProcessorTime =>
+ Interop.Kernel32.GetProcessTimes(Interop.Kernel32.GetCurrentProcess(), out _, out _, out _, out long userTime100Nanoseconds) ?
+ new TimeSpan(userTime100Nanoseconds) :
+ TimeSpan.Zero;
+ }
+}
diff --git a/src/Common/src/CoreLib/System/AppDomain.cs b/src/Common/src/CoreLib/System/AppDomain.cs
index b1a20551b5e9..2d8cd9c57680 100644
--- a/src/Common/src/CoreLib/System/AppDomain.cs
+++ b/src/Common/src/CoreLib/System/AppDomain.cs
@@ -4,7 +4,6 @@
#pragma warning disable CS0067 // events are declared but not used
-#nullable enable
using System.Diagnostics;
using System.IO;
using System.Reflection;
@@ -185,26 +184,28 @@ public static void Unload(AppDomain domain)
public static bool MonitoringIsEnabled
{
- get { return false; }
+ get { return true; }
set
{
if (!value)
{
throw new ArgumentException(SR.Arg_MustBeTrue);
}
- throw new PlatformNotSupportedException(SR.PlatformNotSupported_AppDomain_ResMon);
}
}
- public long MonitoringSurvivedMemorySize { get { throw CreateResMonNotAvailException(); } }
+ public long MonitoringSurvivedMemorySize => MonitoringSurvivedProcessMemorySize;
- public static long MonitoringSurvivedProcessMemorySize { get { throw CreateResMonNotAvailException(); } }
-
- public long MonitoringTotalAllocatedMemorySize { get { throw CreateResMonNotAvailException(); } }
-
- public TimeSpan MonitoringTotalProcessorTime { get { throw CreateResMonNotAvailException(); } }
+ public static long MonitoringSurvivedProcessMemorySize
+ {
+ get
+ {
+ GCMemoryInfo mi = GC.GetGCMemoryInfo();
+ return mi.HeapSizeBytes - mi.FragmentedBytes;
+ }
+ }
- private static Exception CreateResMonNotAvailException() => new InvalidOperationException(SR.PlatformNotSupported_AppDomain_ResMon);
+ public long MonitoringTotalAllocatedMemorySize => GC.GetTotalAllocatedBytes(precise: false);
[ObsoleteAttribute("AppDomain.GetCurrentThreadId has been deprecated because it does not provide a stable Id when managed threads are running on fibers (aka lightweight threads). To get a stable identifier for a managed thread, use the ManagedThreadId property on Thread. https://go.microsoft.com/fwlink/?linkid=14202", false)]
public static int GetCurrentThreadId() => Environment.CurrentManagedThreadId;
@@ -389,7 +390,7 @@ public void SetThreadPrincipal(IPrincipal principal)
return oh?.Unwrap();
}
- public IPrincipal? GetThreadPrincipal()
+ internal IPrincipal? GetThreadPrincipal()
{
IPrincipal? principal = _defaultPrincipal;
if (principal == null)
@@ -399,8 +400,8 @@ public void SetThreadPrincipal(IPrincipal principal)
case PrincipalPolicy.UnauthenticatedPrincipal:
if (s_getUnauthenticatedPrincipal == null)
{
- Type type = Type.GetType("System.Security.Principal.GenericPrincipal, System.Security.Claims", throwOnError: true);
- MethodInfo mi = type.GetMethod("GetDefaultInstance", BindingFlags.NonPublic | BindingFlags.Static);
+ Type type = Type.GetType("System.Security.Principal.GenericPrincipal, System.Security.Claims", throwOnError: true)!;
+ MethodInfo? mi = type.GetMethod("GetDefaultInstance", BindingFlags.NonPublic | BindingFlags.Static);
Debug.Assert(mi != null);
// Don't throw PNSE if null like for WindowsPrincipal as UnauthenticatedPrincipal should
// be available on all platforms.
@@ -408,14 +409,14 @@ public void SetThreadPrincipal(IPrincipal principal)
(Func)mi.CreateDelegate(typeof(Func)));
}
- principal = s_getUnauthenticatedPrincipal!(); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761
+ principal = s_getUnauthenticatedPrincipal!(); // TODO-NULLABLE: Remove ! when nullable attributes are respected
break;
case PrincipalPolicy.WindowsPrincipal:
if (s_getWindowsPrincipal == null)
{
- Type type = Type.GetType("System.Security.Principal.WindowsPrincipal, System.Security.Principal.Windows", throwOnError: true);
- MethodInfo mi = type.GetMethod("GetDefaultInstance", BindingFlags.NonPublic | BindingFlags.Static);
+ Type type = Type.GetType("System.Security.Principal.WindowsPrincipal, System.Security.Principal.Windows", throwOnError: true)!;
+ MethodInfo? mi = type.GetMethod("GetDefaultInstance", BindingFlags.NonPublic | BindingFlags.Static);
if (mi == null)
{
throw new PlatformNotSupportedException(SR.PlatformNotSupported_Principal);
@@ -424,7 +425,7 @@ public void SetThreadPrincipal(IPrincipal principal)
(Func)mi.CreateDelegate(typeof(Func)));
}
- principal = s_getWindowsPrincipal!(); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761
+ principal = s_getWindowsPrincipal!(); // TODO-NULLABLE: Remove ! when nullable attributes are respected
break;
}
}
diff --git a/src/Common/src/CoreLib/System/AppDomainSetup.cs b/src/Common/src/CoreLib/System/AppDomainSetup.cs
index e8d0b9fff4f3..4537dcdf94e5 100644
--- a/src/Common/src/CoreLib/System/AppDomainSetup.cs
+++ b/src/Common/src/CoreLib/System/AppDomainSetup.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
namespace System
{
#if PROJECTN
diff --git a/src/Common/src/CoreLib/System/ApplicationException.cs b/src/Common/src/CoreLib/System/ApplicationException.cs
index 5042b112cdbd..875b54a2a6a2 100644
--- a/src/Common/src/CoreLib/System/ApplicationException.cs
+++ b/src/Common/src/CoreLib/System/ApplicationException.cs
@@ -12,7 +12,6 @@
**
=============================================================================*/
-#nullable enable
using System.Runtime.Serialization;
namespace System
diff --git a/src/Common/src/CoreLib/System/ArgumentException.cs b/src/Common/src/CoreLib/System/ArgumentException.cs
index be7ffbe7fa70..6e38c7b3f2d1 100644
--- a/src/Common/src/CoreLib/System/ArgumentException.cs
+++ b/src/Common/src/CoreLib/System/ArgumentException.cs
@@ -11,7 +11,6 @@
**
=============================================================================*/
-#nullable enable
using System.Globalization;
using System.Runtime.Serialization;
diff --git a/src/Common/src/CoreLib/System/ArgumentNullException.cs b/src/Common/src/CoreLib/System/ArgumentNullException.cs
index 206c1a055bed..bf0d205fe701 100644
--- a/src/Common/src/CoreLib/System/ArgumentNullException.cs
+++ b/src/Common/src/CoreLib/System/ArgumentNullException.cs
@@ -11,7 +11,6 @@
**
=============================================================================*/
-#nullable enable
using System.Runtime.Serialization;
namespace System
diff --git a/src/Common/src/CoreLib/System/ArgumentOutOfRangeException.cs b/src/Common/src/CoreLib/System/ArgumentOutOfRangeException.cs
index 7ca9085c6335..8c47541b10d4 100644
--- a/src/Common/src/CoreLib/System/ArgumentOutOfRangeException.cs
+++ b/src/Common/src/CoreLib/System/ArgumentOutOfRangeException.cs
@@ -11,7 +11,6 @@
**
=============================================================================*/
-#nullable enable
using System.Globalization;
using System.Runtime.Serialization;
diff --git a/src/Common/src/CoreLib/System/ArithmeticException.cs b/src/Common/src/CoreLib/System/ArithmeticException.cs
index 5521c39a2f5a..a5028dbd79b2 100644
--- a/src/Common/src/CoreLib/System/ArithmeticException.cs
+++ b/src/Common/src/CoreLib/System/ArithmeticException.cs
@@ -11,7 +11,6 @@
**
=============================================================================*/
-#nullable enable
using System.Runtime.Serialization;
namespace System
diff --git a/src/Common/src/CoreLib/System/Array.Enumerators.cs b/src/Common/src/CoreLib/System/Array.Enumerators.cs
index 4547af13dda5..dd46dc82d8d8 100644
--- a/src/Common/src/CoreLib/System/Array.Enumerators.cs
+++ b/src/Common/src/CoreLib/System/Array.Enumerators.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
diff --git a/src/Common/src/CoreLib/System/Array.cs b/src/Common/src/CoreLib/System/Array.cs
index 058f1ca8e214..11479d88e28d 100644
--- a/src/Common/src/CoreLib/System/Array.cs
+++ b/src/Common/src/CoreLib/System/Array.cs
@@ -6,10 +6,11 @@
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Diagnostics;
+using System.Diagnostics.CodeAnalysis;
using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
using Internal.Runtime.CompilerServices;
-#nullable enable
namespace System
{
[Serializable]
@@ -36,10 +37,10 @@ public static ReadOnlyCollection AsReadOnly(T[] array)
}
// T[] implements IList.
- return new ReadOnlyCollection(array);
+ return new ReadOnlyCollection(array!); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected
}
- public static void Resize(ref T[]? array, int newSize) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761
+ public static void Resize([NotNull] ref T[]? array, int newSize)
{
if (newSize < 0)
ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.newSize, ExceptionResource.ArgumentOutOfRange_NeedNonNegNum);
@@ -65,7 +66,7 @@ public static Array CreateInstance(Type elementType, params long[] lengths)
{
ThrowHelper.ThrowArgumentNullException(ExceptionArgument.lengths);
}
- if (lengths!.Length == 0) // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538
+ if (lengths!.Length == 0) // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected
ThrowHelper.ThrowArgumentException(ExceptionResource.Arg_NeedAtLeast1Rank);
int[] intLengths = new int[lengths.Length];
@@ -149,7 +150,7 @@ public static void Copy(Array sourceArray, long sourceIndex, Array destinationAr
{
if (indices == null)
ThrowHelper.ThrowArgumentNullException(ExceptionArgument.indices);
- if (Rank != indices!.Length) // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538
+ if (Rank != indices!.Length) // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected
ThrowHelper.ThrowArgumentException(ExceptionResource.Arg_RankIndices);
int[] intIndices = new int[indices.Length];
@@ -189,7 +190,7 @@ public void SetValue(object? value, long index1, long index2)
this.SetValue(value, iindex1, iindex2);
}
- public void SetValue(object value, long index1, long index2, long index3)
+ public void SetValue(object? value, long index1, long index2, long index3)
{
int iindex1 = (int)index1;
int iindex2 = (int)index2;
@@ -209,7 +210,7 @@ public void SetValue(object? value, params long[] indices)
{
if (indices == null)
ThrowHelper.ThrowArgumentNullException(ExceptionArgument.indices);
- if (Rank != indices!.Length) // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538
+ if (Rank != indices!.Length) // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected
ThrowHelper.ThrowArgumentException(ExceptionResource.Arg_RankIndices);
int[] intIndices = new int[indices.Length];
@@ -324,7 +325,7 @@ int IStructuralComparable.CompareTo(object? other, IComparer comparer)
int i = 0;
int c = 0;
- while (i < o!.Length && c == 0) // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538
+ while (i < o!.Length && c == 0) // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected
{
object? left = GetValue(i);
object? right = o.GetValue(i);
@@ -383,7 +384,7 @@ int IStructuralEquatable.GetHashCode(IEqualityComparer comparer)
for (int i = (this.Length >= 8 ? this.Length - 8 : 0); i < this.Length; i++)
{
- ret = CombineHashCodes(ret, comparer!.GetHashCode(GetValue(i))); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538
+ ret = CombineHashCodes(ret, comparer!.GetHashCode(GetValue(i)!)); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected
}
return ret;
@@ -406,7 +407,7 @@ public static int BinarySearch(Array array, object? value)
{
if (array == null)
ThrowHelper.ThrowArgumentNullException(ExceptionArgument.array);
- return BinarySearch(array!, array!.GetLowerBound(0), array.Length, value, null); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538
+ return BinarySearch(array!, array!.GetLowerBound(0), array.Length, value, null); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected
}
// Searches a section of an array for a given element using a binary search
@@ -445,7 +446,7 @@ public static int BinarySearch(Array array, object? value, IComparer? comparer)
{
if (array == null)
ThrowHelper.ThrowArgumentNullException(ExceptionArgument.array);
- return BinarySearch(array!, array!.GetLowerBound(0), array.Length, value, comparer); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538
+ return BinarySearch(array!, array!.GetLowerBound(0), array.Length, value, comparer); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected
}
// Searches a section of an array for a given element using a binary search
@@ -467,7 +468,7 @@ public static int BinarySearch(Array array, int index, int length, object? value
{
if (array == null)
ThrowHelper.ThrowArgumentNullException(ExceptionArgument.array);
- int lb = array!.GetLowerBound(0); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538
+ int lb = array!.GetLowerBound(0); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected
if (index < lb)
ThrowHelper.ThrowIndexArgumentOutOfRange_NeedNonNegNumException();
if (length < 0)
@@ -552,14 +553,14 @@ public static int BinarySearch(T[] array, T value)
{
if (array == null)
ThrowHelper.ThrowArgumentNullException(ExceptionArgument.array);
- return BinarySearch(array!, 0, array!.Length, value, null); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538
+ return BinarySearch(array!, 0, array!.Length, value, null); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected
}
public static int BinarySearch(T[] array, T value, System.Collections.Generic.IComparer? comparer)
{
if (array == null)
ThrowHelper.ThrowArgumentNullException(ExceptionArgument.array);
- return BinarySearch(array!, 0, array!.Length, value, comparer); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538
+ return BinarySearch(array!, 0, array!.Length, value, comparer); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected
}
public static int BinarySearch(T[] array, int index, int length, T value)
@@ -576,7 +577,7 @@ public static int BinarySearch(T[] array, int index, int length, T value, Sys
if (length < 0)
ThrowHelper.ThrowLengthArgumentOutOfRange_ArgumentOutOfRange_NeedNonNegNum();
- if (array!.Length - index < length) // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538
+ if (array!.Length - index < length) // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected
ThrowHelper.ThrowArgumentException(ExceptionResource.Argument_InvalidOffLen);
return ArraySortHelper.Default.BinarySearch(array, index, length, value, comparer);
@@ -594,10 +595,10 @@ public static TOutput[] ConvertAll(TInput[] array, Converter(T[] array, T value)
ThrowHelper.ThrowArgumentNullException(ExceptionArgument.array);
}
- for (int i = 0; i < array!.Length; i++) // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538
+ for (int i = 0; i < array!.Length; i++) // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected
{
array[i] = value;
}
@@ -661,22 +662,23 @@ public static void Fill(T[] array, T value, int startIndex, int count)
ThrowHelper.ThrowArgumentNullException(ExceptionArgument.array);
}
- if (startIndex < 0 || startIndex > array!.Length) // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538
+ if (startIndex < 0 || startIndex > array!.Length) // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected
{
ThrowHelper.ThrowStartIndexArgumentOutOfRange_ArgumentOutOfRange_Index();
}
- if (count < 0 || startIndex > array!.Length - count) // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538
+ if (count < 0 || startIndex > array!.Length - count) // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected
{
ThrowHelper.ThrowCountArgumentOutOfRange_ArgumentOutOfRange_Count();
}
for (int i = startIndex; i < startIndex + count; i++)
{
- array![i] = value; // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538
+ array![i] = value; // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected
}
}
+ [return: MaybeNull]
public static T Find(T[] array, Predicate match)
{
if (array == null)
@@ -689,14 +691,14 @@ public static T Find(T[] array, Predicate match)
ThrowHelper.ThrowArgumentNullException(ExceptionArgument.match);
}
- for (int i = 0; i < array!.Length; i++) // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538
+ for (int i = 0; i < array!.Length; i++) // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected
{
- if (match!(array[i])) // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538
+ if (match!(array[i])) // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected
{
return array[i];
}
}
- return default!; // TODO-NULLABLE-GENERIC
+ return default!;
}
public static T[] FindAll(T[] array, Predicate match)
@@ -712,9 +714,9 @@ public static T[] FindAll(T[] array, Predicate match)
}
List list = new List();
- for (int i = 0; i < array!.Length; i++) // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538
+ for (int i = 0; i < array!.Length; i++) // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected
{
- if (match!(array[i])) // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538
+ if (match!(array[i])) // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected
{
list.Add(array[i]);
}
@@ -729,7 +731,7 @@ public static int FindIndex(T[] array, Predicate match)
ThrowHelper.ThrowArgumentNullException(ExceptionArgument.array);
}
- return FindIndex(array!, 0, array!.Length, match); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538
+ return FindIndex(array!, 0, array!.Length, match); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected
}
public static int FindIndex(T[] array, int startIndex, Predicate match)
@@ -739,7 +741,7 @@ public static int FindIndex(T[] array, int startIndex, Predicate match)
ThrowHelper.ThrowArgumentNullException(ExceptionArgument.array);
}
- return FindIndex(array!, startIndex, array!.Length - startIndex, match); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538
+ return FindIndex(array!, startIndex, array!.Length - startIndex, match); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected
}
public static int FindIndex(T[] array, int startIndex, int count, Predicate match)
@@ -749,12 +751,12 @@ public static int FindIndex(T[] array, int startIndex, int count, Predicate array!.Length) // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538
+ if (startIndex < 0 || startIndex > array!.Length) // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected
{
ThrowHelper.ThrowStartIndexArgumentOutOfRange_ArgumentOutOfRange_Index();
}
- if (count < 0 || startIndex > array!.Length - count) // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538
+ if (count < 0 || startIndex > array!.Length - count) // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected
{
ThrowHelper.ThrowCountArgumentOutOfRange_ArgumentOutOfRange_Count();
}
@@ -767,12 +769,13 @@ public static int FindIndex(T[] array, int startIndex, int count, Predicate(T[] array, Predicate match)
{
if (array == null)
@@ -785,14 +788,14 @@ public static T FindLast(T[] array, Predicate match)
ThrowHelper.ThrowArgumentNullException(ExceptionArgument.match);
}
- for (int i = array!.Length - 1; i >= 0; i--) // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538
+ for (int i = array!.Length - 1; i >= 0; i--) // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected
{
- if (match!(array[i])) // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538
+ if (match!(array[i])) // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected
{
return array[i];
}
}
- return default!; // TODO-NULLABLE-GENERIC
+ return default!;
}
public static int FindLastIndex(T[] array, Predicate match)
@@ -802,7 +805,7 @@ public static int FindLastIndex(T[] array, Predicate match)
ThrowHelper.ThrowArgumentNullException(ExceptionArgument.array);
}
- return FindLastIndex(array!, array!.Length - 1, array.Length, match); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538
+ return FindLastIndex(array!, array!.Length - 1, array.Length, match); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected
}
public static int FindLastIndex(T[] array, int startIndex, Predicate match)
@@ -812,7 +815,7 @@ public static int FindLastIndex(T[] array, int startIndex, Predicate match
ThrowHelper.ThrowArgumentNullException(ExceptionArgument.array);
}
- return FindLastIndex(array!, startIndex, startIndex + 1, match); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538
+ return FindLastIndex(array!, startIndex, startIndex + 1, match); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected
}
public static int FindLastIndex(T[] array, int startIndex, int count, Predicate match)
@@ -827,7 +830,7 @@ public static int FindLastIndex(T[] array, int startIndex, int count, Predica
ThrowHelper.ThrowArgumentNullException(ExceptionArgument.match);
}
- if (array!.Length == 0) // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538
+ if (array!.Length == 0) // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected
{
// Special case for 0 length List
if (startIndex != -1)
@@ -853,7 +856,7 @@ public static int FindLastIndex(T[] array, int startIndex, int count, Predica
int endIndex = startIndex - count;
for (int i = startIndex; i > endIndex; i--)
{
- if (match!(array[i])) // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538
+ if (match!(array[i])) // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected
{
return i;
}
@@ -873,9 +876,9 @@ public static void ForEach(T[] array, Action action)
ThrowHelper.ThrowArgumentNullException(ExceptionArgument.action);
}
- for (int i = 0; i < array!.Length; i++) // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538
+ for (int i = 0; i < array!.Length; i++) // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected
{
- action!(array[i]); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538
+ action!(array[i]); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected
}
}
@@ -887,7 +890,7 @@ public static int IndexOf(Array array, object? value)
{
if (array == null)
ThrowHelper.ThrowArgumentNullException(ExceptionArgument.array);
- return IndexOf(array!, value, array!.GetLowerBound(0), array.Length); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538
+ return IndexOf(array!, value, array!.GetLowerBound(0), array.Length); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected
}
// Returns the index of the first occurrence of a given value in a range of
@@ -900,7 +903,7 @@ public static int IndexOf(Array array, object? value, int startIndex)
{
if (array == null)
ThrowHelper.ThrowArgumentNullException(ExceptionArgument.array);
- int lb = array!.GetLowerBound(0); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538
+ int lb = array!.GetLowerBound(0); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected
return IndexOf(array, value, startIndex, array.Length - startIndex + lb);
}
@@ -914,7 +917,7 @@ public static int IndexOf(Array array, object? value, int startIndex, int count)
{
if (array == null)
ThrowHelper.ThrowArgumentNullException(ExceptionArgument.array);
- if (array!.Rank != 1) // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538
+ if (array!.Rank != 1) // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected
ThrowHelper.ThrowRankException(ExceptionResource.Rank_MultiDimNotSupported);
int lb = array.GetLowerBound(0);
@@ -984,7 +987,7 @@ public static int IndexOf(T[] array, T value)
ThrowHelper.ThrowArgumentNullException(ExceptionArgument.array);
}
- return IndexOf(array!, value, 0, array!.Length); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538
+ return IndexOf(array!, value, 0, array!.Length); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected
}
public static int IndexOf(T[] array, T value, int startIndex)
@@ -994,7 +997,7 @@ public static int IndexOf(T[] array, T value, int startIndex)
ThrowHelper.ThrowArgumentNullException(ExceptionArgument.array);
}
- return IndexOf(array!, value, startIndex, array!.Length - startIndex); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538
+ return IndexOf(array!, value, startIndex, array!.Length - startIndex); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected
}
public static int IndexOf(T[] array, T value, int startIndex, int count)
@@ -1004,7 +1007,7 @@ public static int IndexOf(T[] array, T value, int startIndex, int count)
ThrowHelper.ThrowArgumentNullException(ExceptionArgument.array);
}
- if ((uint)startIndex > (uint)array!.Length) // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538
+ if ((uint)startIndex > (uint)array!.Length) // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected
{
ThrowHelper.ThrowStartIndexArgumentOutOfRange_ArgumentOutOfRange_Index();
}
@@ -1016,24 +1019,40 @@ public static int IndexOf(T[] array, T value, int startIndex, int count)
// Hits a code generation bug on ProjectN
#if !PROJECTN
- if (typeof(T) == typeof(byte))
+ if (RuntimeHelpers.IsBitwiseEquatable())
{
- int result = SpanHelpers.IndexOf(
- ref Unsafe.Add(ref array.GetRawSzArrayData(), startIndex),
- Unsafe.As(ref value),
- count);
-
- return (result >= 0 ? startIndex : 0) + result;
- }
-
- if (typeof(T) == typeof(char))
- {
- int result = SpanHelpers.IndexOf(
- ref Unsafe.Add(ref Unsafe.As(ref array.GetRawSzArrayData()), startIndex),
- Unsafe.As(ref value),
- count);
-
- return (result >= 0 ? startIndex : 0) + result;
+ if (Unsafe.SizeOf() == sizeof(byte))
+ {
+ int result = SpanHelpers.IndexOf(
+ ref Unsafe.Add(ref array.GetRawSzArrayData(), startIndex),
+ Unsafe.As(ref value),
+ count);
+ return (result >= 0 ? startIndex : 0) + result;
+ }
+ else if (Unsafe.SizeOf() == sizeof(char))
+ {
+ int result = SpanHelpers.IndexOf(
+ ref Unsafe.Add(ref Unsafe.As(ref array.GetRawSzArrayData()), startIndex),
+ Unsafe.As(ref value),
+ count);
+ return (result >= 0 ? startIndex : 0) + result;
+ }
+ else if (Unsafe.SizeOf() == sizeof(int))
+ {
+ int result = SpanHelpers.IndexOf(
+ ref Unsafe.Add(ref Unsafe.As(ref array.GetRawSzArrayData()), startIndex),
+ Unsafe.As(ref value),
+ count);
+ return (result >= 0 ? startIndex : 0) + result;
+ }
+ else if (Unsafe.SizeOf() == sizeof(long))
+ {
+ int result = SpanHelpers.IndexOf(
+ ref Unsafe.Add(ref Unsafe.As(ref array.GetRawSzArrayData()), startIndex),
+ Unsafe.As(ref value),
+ count);
+ return (result >= 0 ? startIndex : 0) + result;
+ }
}
#endif
@@ -1052,7 +1071,7 @@ public static int LastIndexOf(Array array, object? value)
{
if (array == null)
ThrowHelper.ThrowArgumentNullException(ExceptionArgument.array);
- int lb = array!.GetLowerBound(0); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538
+ int lb = array!.GetLowerBound(0); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected
return LastIndexOf(array, value, array.Length - 1 + lb, array.Length);
}
@@ -1065,7 +1084,7 @@ public static int LastIndexOf(Array array, object? value, int startIndex)
{
if (array == null)
ThrowHelper.ThrowArgumentNullException(ExceptionArgument.array);
- int lb = array!.GetLowerBound(0); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538
+ int lb = array!.GetLowerBound(0); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected
return LastIndexOf(array, value, startIndex, startIndex + 1 - lb);
}
@@ -1079,7 +1098,7 @@ public static int LastIndexOf(Array array, object? value, int startIndex, int co
{
if (array == null)
ThrowHelper.ThrowArgumentNullException(ExceptionArgument.array);
- int lb = array!.GetLowerBound(0); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538
+ int lb = array!.GetLowerBound(0); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected
if (array.Length == 0)
{
return lb - 1;
@@ -1151,7 +1170,7 @@ public static int LastIndexOf(T[] array, T value)
ThrowHelper.ThrowArgumentNullException(ExceptionArgument.array);
}
- return LastIndexOf(array!, value, array!.Length - 1, array.Length); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538
+ return LastIndexOf(array!, value, array!.Length - 1, array.Length); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected
}
public static int LastIndexOf(T[] array, T value, int startIndex)
@@ -1161,7 +1180,7 @@ public static int LastIndexOf(T[] array, T value, int startIndex)
ThrowHelper.ThrowArgumentNullException(ExceptionArgument.array);
}
// if array is empty and startIndex is 0, we need to pass 0 as count
- return LastIndexOf(array!, value, startIndex, (array!.Length == 0) ? 0 : (startIndex + 1)); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538
+ return LastIndexOf(array!, value, startIndex, (array!.Length == 0) ? 0 : (startIndex + 1)); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected
}
public static int LastIndexOf(T[] array, T value, int startIndex, int count)
@@ -1171,7 +1190,7 @@ public static int LastIndexOf(T[] array, T value, int startIndex, int count)
ThrowHelper.ThrowArgumentNullException(ExceptionArgument.array);
}
- if (array!.Length == 0) // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538
+ if (array!.Length == 0) // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected
{
//
// Special case for 0 length List
@@ -1204,27 +1223,50 @@ public static int LastIndexOf(T[] array, T value, int startIndex, int count)
// Hits a code generation bug on ProjectN
#if !PROJECTN
- if (typeof(T) == typeof(byte))
+ if (RuntimeHelpers.IsBitwiseEquatable())
{
- int endIndex = startIndex - count + 1;
- int result = SpanHelpers.LastIndexOf(
- ref Unsafe.Add(ref array.GetRawSzArrayData(), endIndex),
- Unsafe.As(ref value),
- count);
+ if (Unsafe.SizeOf() == sizeof(byte))
+ {
+ int endIndex = startIndex - count + 1;
+ int result = SpanHelpers.LastIndexOf(
+ ref Unsafe.Add(ref array.GetRawSzArrayData(), endIndex),
+ Unsafe.As(ref value),
+ count);
- return (result >= 0 ? endIndex : 0) + result;
- }
+ return (result >= 0 ? endIndex : 0) + result;
+ }
+ else if (Unsafe.SizeOf() == sizeof(char))
+ {
+ int endIndex = startIndex - count + 1;
+ int result = SpanHelpers.LastIndexOf(
+ ref Unsafe.Add(ref Unsafe.As(ref array.GetRawSzArrayData()), endIndex),
+ Unsafe.As(ref value),
+ count);
- if (typeof(T) == typeof(char))
- {
- int endIndex = startIndex - count + 1;
- int result = SpanHelpers.LastIndexOf(
- ref Unsafe.Add(ref Unsafe.As(ref array.GetRawSzArrayData()), endIndex),
- Unsafe.As(ref value),
- count);
+ return (result >= 0 ? endIndex : 0) + result;
+ }
+ else if (Unsafe.SizeOf() == sizeof(int))
+ {
+ int endIndex = startIndex - count + 1;
+ int result = SpanHelpers.LastIndexOf(
+ ref Unsafe.Add(ref Unsafe.As(ref array.GetRawSzArrayData()), endIndex),
+ Unsafe.As(ref value),
+ count);
+
+ return (result >= 0 ? endIndex : 0) + result;
+ }
+ else if (Unsafe.SizeOf() == sizeof(long))
+ {
+ int endIndex = startIndex - count + 1;
+ int result = SpanHelpers.LastIndexOf(
+ ref Unsafe.Add(ref Unsafe.As(ref array.GetRawSzArrayData()), endIndex),
+ Unsafe.As(ref value),
+ count);
- return (result >= 0 ? endIndex : 0) + result;
+ return (result >= 0 ? endIndex : 0) + result;
+ }
}
+
#endif
#if CORECLR
@@ -1243,7 +1285,7 @@ public static void Reverse(Array array)
{
if (array == null)
ThrowHelper.ThrowArgumentNullException(ExceptionArgument.array);
- Reverse(array!, array!.GetLowerBound(0), array.Length); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538
+ Reverse(array!, array!.GetLowerBound(0), array.Length); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected
}
// Reverses the elements in a range of an array. Following a call to this
@@ -1256,7 +1298,7 @@ public static void Reverse(Array array, int index, int length)
{
if (array == null)
ThrowHelper.ThrowArgumentNullException(ExceptionArgument.array);
- int lowerBound = array!.GetLowerBound(0); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538
+ int lowerBound = array!.GetLowerBound(0); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected
if (index < lowerBound)
ThrowHelper.ThrowIndexArgumentOutOfRange_NeedNonNegNumException();
if (length < 0)
@@ -1299,7 +1341,7 @@ public static void Reverse(T[] array)
{
if (array == null)
ThrowHelper.ThrowArgumentNullException(ExceptionArgument.array);
- Reverse(array!, 0, array!.Length); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538
+ Reverse(array!, 0, array!.Length); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected
}
public static void Reverse(T[] array, int index, int length)
@@ -1310,7 +1352,7 @@ public static void Reverse(T[] array, int index, int length)
ThrowHelper.ThrowIndexArgumentOutOfRange_NeedNonNegNumException();
if (length < 0)
ThrowHelper.ThrowLengthArgumentOutOfRange_ArgumentOutOfRange_NeedNonNegNum();
- if (array!.Length - index < length) // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538
+ if (array!.Length - index < length) // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected
ThrowHelper.ThrowArgumentException(ExceptionResource.Argument_InvalidOffLen);
if (length <= 1)
@@ -1336,7 +1378,7 @@ public static void Sort(Array array)
{
if (array == null)
ThrowHelper.ThrowArgumentNullException(ExceptionArgument.array);
- Sort(array!, null, array!.GetLowerBound(0), array.Length, null); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538
+ Sort(array!, null, array!.GetLowerBound(0), array.Length, null); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected
}
// Sorts the elements of two arrays based on the keys in the first array.
@@ -1349,7 +1391,7 @@ public static void Sort(Array keys, Array? items)
{
if (keys == null)
ThrowHelper.ThrowArgumentNullException(ExceptionArgument.keys);
- Sort(keys!, items, keys!.GetLowerBound(0), keys.Length, null); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538
+ Sort(keys!, items, keys!.GetLowerBound(0), keys.Length, null); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected
}
// Sorts the elements in a section of an array. The sort compares the
@@ -1397,7 +1439,7 @@ public static void Sort(Array keys, Array? items, IComparer? comparer)
{
if (keys == null)
ThrowHelper.ThrowArgumentNullException(ExceptionArgument.keys);
- Sort(keys!, items, keys!.GetLowerBound(0), keys.Length, comparer); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538
+ Sort(keys!, items, keys!.GetLowerBound(0), keys.Length, comparer); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected
}
// Sorts the elements in a section of an array. The sort compares the
@@ -1423,7 +1465,7 @@ public static void Sort(Array keys, Array? items, int index, int length, ICompar
{
if (keys == null)
ThrowHelper.ThrowArgumentNullException(ExceptionArgument.keys);
- if (keys!.Rank != 1 || (items != null && items.Rank != 1)) // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538
+ if (keys!.Rank != 1 || (items != null && items.Rank != 1)) // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected
ThrowHelper.ThrowRankException(ExceptionResource.Rank_MultiDimNotSupported);
int keysLowerBound = keys.GetLowerBound(0);
if (items != null && keysLowerBound != items.GetLowerBound(0))
@@ -1446,14 +1488,14 @@ public static void Sort(T[] array)
{
if (array == null)
ThrowHelper.ThrowArgumentNullException(ExceptionArgument.array);
- Sort(array!, 0, array!.Length, null); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538
+ Sort(array!, 0, array!.Length, null); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected
}
public static void Sort(TKey[] keys, TValue[]? items)
{
if (keys == null)
ThrowHelper.ThrowArgumentNullException(ExceptionArgument.keys);
- Sort(keys!, items, 0, keys!.Length, null); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538
+ Sort(keys!, items, 0, keys!.Length, null); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected
}
public static void Sort(T[] array, int index, int length)
@@ -1470,14 +1512,14 @@ public static void Sort(T[] array, System.Collections.Generic.IComparer? c
{
if (array == null)
ThrowHelper.ThrowArgumentNullException(ExceptionArgument.array);
- Sort(array!, 0, array!.Length, comparer); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538
+ Sort(array!, 0, array!.Length, comparer); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected
}
public static void Sort(TKey[] keys, TValue[]? items, System.Collections.Generic.IComparer? comparer)
{
if (keys == null)
ThrowHelper.ThrowArgumentNullException(ExceptionArgument.keys);
- Sort(keys!, items, 0, keys!.Length, comparer); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538
+ Sort(keys!, items, 0, keys!.Length, comparer); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected
}
public static void Sort(T[] array, int index, int length, System.Collections.Generic.IComparer? comparer)
@@ -1488,7 +1530,7 @@ public static void Sort(T[] array, int index, int length, System.Collections.
ThrowHelper.ThrowIndexArgumentOutOfRange_NeedNonNegNumException();
if (length < 0)
ThrowHelper.ThrowLengthArgumentOutOfRange_ArgumentOutOfRange_NeedNonNegNum();
- if (array!.Length - index < length) // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538
+ if (array!.Length - index < length) // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected
ThrowHelper.ThrowArgumentException(ExceptionResource.Argument_InvalidOffLen);
if (length > 1)
@@ -1515,7 +1557,7 @@ public static void Sort(TKey[] keys, TValue[]? items, int index, i
ThrowHelper.ThrowIndexArgumentOutOfRange_NeedNonNegNumException();
if (length < 0)
ThrowHelper.ThrowLengthArgumentOutOfRange_ArgumentOutOfRange_NeedNonNegNum();
- if (keys!.Length - index < length || (items != null && index > items.Length - length)) // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538
+ if (keys!.Length - index < length || (items != null && index > items.Length - length)) // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected
ThrowHelper.ThrowArgumentException(ExceptionResource.Argument_InvalidOffLen);
if (length > 1)
@@ -1552,7 +1594,7 @@ public static void Sort(T[] array, Comparison comparison)
ThrowHelper.ThrowArgumentNullException(ExceptionArgument.comparison);
}
- ArraySortHelper.Sort(array!, 0, array!.Length, comparison); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538
+ ArraySortHelper.Sort(array!, 0, array!.Length, comparison!); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected
}
public static bool TrueForAll(T[] array, Predicate match)
@@ -1567,9 +1609,9 @@ public static bool TrueForAll(T[] array, Predicate match)
ThrowHelper.ThrowArgumentNullException(ExceptionArgument.match);
}
- for (int i = 0; i < array!.Length; i++) // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538
+ for (int i = 0; i < array!.Length; i++) // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected
{
- if (!match!(array[i])) // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538
+ if (!match!(array[i])) // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected
{
return false;
}
diff --git a/src/Common/src/CoreLib/System/ArraySegment.cs b/src/Common/src/CoreLib/System/ArraySegment.cs
index 58eb506f67d6..0f6e05f892a2 100644
--- a/src/Common/src/CoreLib/System/ArraySegment.cs
+++ b/src/Common/src/CoreLib/System/ArraySegment.cs
@@ -13,7 +13,6 @@
**
===========================================================*/
-#nullable enable
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
@@ -44,7 +43,7 @@ public ArraySegment(T[] array)
_array = array;
_offset = 0;
- _count = array!.Length; // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538
+ _count = array!.Length; // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected
}
public ArraySegment(T[] array, int offset, int count)
@@ -324,7 +323,7 @@ internal Enumerator(ArraySegment arraySegment)
Debug.Assert(arraySegment.Array != null);
Debug.Assert(arraySegment.Offset >= 0);
Debug.Assert(arraySegment.Count >= 0);
- Debug.Assert(arraySegment.Offset + arraySegment.Count <= arraySegment.Array!.Length); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/34792
+ Debug.Assert(arraySegment.Offset + arraySegment.Count <= arraySegment.Array!.Length); // TODO-NULLABLE: Manually-implemented property (https://github.com/dotnet/roslyn/issues/34792)
_array = arraySegment.Array;
_start = arraySegment.Offset;
diff --git a/src/Common/src/CoreLib/System/ArrayTypeMismatchException.cs b/src/Common/src/CoreLib/System/ArrayTypeMismatchException.cs
index c2a6244e5019..263b69e636cd 100644
--- a/src/Common/src/CoreLib/System/ArrayTypeMismatchException.cs
+++ b/src/Common/src/CoreLib/System/ArrayTypeMismatchException.cs
@@ -11,7 +11,6 @@
**
=============================================================================*/
-#nullable enable
using System.Runtime.Serialization;
namespace System
diff --git a/src/Common/src/CoreLib/System/AssemblyLoadEventArgs.cs b/src/Common/src/CoreLib/System/AssemblyLoadEventArgs.cs
index 43b32d74cfd5..d7e524969330 100644
--- a/src/Common/src/CoreLib/System/AssemblyLoadEventArgs.cs
+++ b/src/Common/src/CoreLib/System/AssemblyLoadEventArgs.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System.Reflection;
namespace System
diff --git a/src/Common/src/CoreLib/System/AssemblyLoadEventHandler.cs b/src/Common/src/CoreLib/System/AssemblyLoadEventHandler.cs
index af89e634b33a..0d5a2823c919 100644
--- a/src/Common/src/CoreLib/System/AssemblyLoadEventHandler.cs
+++ b/src/Common/src/CoreLib/System/AssemblyLoadEventHandler.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
namespace System
{
public delegate void AssemblyLoadEventHandler(object? sender, AssemblyLoadEventArgs args);
diff --git a/src/Common/src/CoreLib/System/AsyncCallback.cs b/src/Common/src/CoreLib/System/AsyncCallback.cs
index f06749f60b21..036d44a4b97d 100644
--- a/src/Common/src/CoreLib/System/AsyncCallback.cs
+++ b/src/Common/src/CoreLib/System/AsyncCallback.cs
@@ -10,7 +10,6 @@
**
===========================================================*/
-#nullable enable
namespace System
{
public delegate void AsyncCallback(IAsyncResult ar);
diff --git a/src/Common/src/CoreLib/System/Attribute.cs b/src/Common/src/CoreLib/System/Attribute.cs
index 755d7722615c..e24797563cff 100644
--- a/src/Common/src/CoreLib/System/Attribute.cs
+++ b/src/Common/src/CoreLib/System/Attribute.cs
@@ -15,7 +15,7 @@ public abstract partial class Attribute
protected Attribute() { }
#if !CORERT
- public override bool Equals(object obj)
+ public override bool Equals(object? obj)
{
if (obj == null)
return false;
@@ -25,7 +25,7 @@ public override bool Equals(object obj)
Type thisType = this.GetType();
object thisObj = this;
- object thisResult, thatResult;
+ object? thisResult, thatResult;
while (thisType != typeof(Attribute))
{
@@ -41,7 +41,7 @@ public override bool Equals(object obj)
return false;
}
}
- thisType = thisType.BaseType;
+ thisType = thisType.BaseType!;
}
return true;
@@ -54,11 +54,11 @@ public override int GetHashCode()
while (type != typeof(Attribute))
{
FieldInfo[] fields = type.GetFields(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.DeclaredOnly);
- object vThis = null;
+ object? vThis = null;
for (int i = 0; i < fields.Length; i++)
{
- object fieldValue = fields[i].GetValue(this);
+ object? fieldValue = fields[i].GetValue(this);
// The hashcode of an array ignores the contents of the array, so it can produce
// different hashcodes for arrays with the same contents.
@@ -74,7 +74,7 @@ public override int GetHashCode()
if (vThis != null)
return vThis.GetHashCode();
- type = type.BaseType;
+ type = type.BaseType!;
}
return type.GetHashCode();
@@ -82,7 +82,7 @@ public override int GetHashCode()
#endif
// Compares values of custom-attribute fields.
- private static bool AreFieldValuesEqual(object thisValue, object thatValue)
+ private static bool AreFieldValuesEqual(object? thisValue, object? thatValue)
{
if (thisValue == null && thatValue == null)
return true;
@@ -99,8 +99,8 @@ private static bool AreFieldValuesEqual(object thisValue, object thatValue)
return false;
}
- Array thisValueArray = thisValue as Array;
- Array thatValueArray = thatValue as Array;
+ Array thisValueArray = (Array)thisValue;
+ Array thatValueArray = (Array)thatValue;
if (thisValueArray.Length != thatValueArray.Length)
{
return false;
@@ -132,7 +132,7 @@ private static bool AreFieldValuesEqual(object thisValue, object thatValue)
public virtual object TypeId => GetType();
- public virtual bool Match(object obj) => Equals(obj);
+ public virtual bool Match(object? obj) => Equals(obj);
public virtual bool IsDefaultAttribute() => false;
}
diff --git a/src/Common/src/CoreLib/System/AttributeTargets.cs b/src/Common/src/CoreLib/System/AttributeTargets.cs
index dbbade3a600e..c33d19e85ea3 100644
--- a/src/Common/src/CoreLib/System/AttributeTargets.cs
+++ b/src/Common/src/CoreLib/System/AttributeTargets.cs
@@ -5,7 +5,6 @@
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
-#nullable enable
namespace System
{
// Enum used to indicate all the elements of the
diff --git a/src/Common/src/CoreLib/System/AttributeUsageAttribute.cs b/src/Common/src/CoreLib/System/AttributeUsageAttribute.cs
index d96e4057cc36..8a4a0a661bf6 100644
--- a/src/Common/src/CoreLib/System/AttributeUsageAttribute.cs
+++ b/src/Common/src/CoreLib/System/AttributeUsageAttribute.cs
@@ -11,7 +11,6 @@
**
===========================================================*/
-#nullable enable
using System.Reflection;
namespace System
diff --git a/src/Common/src/CoreLib/System/BadImageFormatException.cs b/src/Common/src/CoreLib/System/BadImageFormatException.cs
index 183923193268..23aa56453bc6 100644
--- a/src/Common/src/CoreLib/System/BadImageFormatException.cs
+++ b/src/Common/src/CoreLib/System/BadImageFormatException.cs
@@ -11,7 +11,6 @@
**
===========================================================*/
-#nullable enable
using System.Globalization;
using System.IO;
using System.Runtime.Serialization;
diff --git a/src/Common/src/CoreLib/System/BitConverter.cs b/src/Common/src/CoreLib/System/BitConverter.cs
index 196725ecebdb..f6f6b983795c 100644
--- a/src/Common/src/CoreLib/System/BitConverter.cs
+++ b/src/Common/src/CoreLib/System/BitConverter.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
@@ -237,7 +236,7 @@ public static short ToInt16(byte[] value, int startIndex)
{
if (value == null)
ThrowHelper.ThrowArgumentNullException(ExceptionArgument.value);
- if (unchecked((uint)startIndex) >= unchecked((uint)value!.Length)) // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538
+ if (unchecked((uint)startIndex) >= unchecked((uint)value!.Length)) // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected
ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.startIndex, ExceptionResource.ArgumentOutOfRange_Index);
if (startIndex > value.Length - sizeof(short))
ThrowHelper.ThrowArgumentException(ExceptionResource.Arg_ArrayPlusOffTooSmall, ExceptionArgument.value);
@@ -258,7 +257,7 @@ public static int ToInt32(byte[] value, int startIndex)
{
if (value == null)
ThrowHelper.ThrowArgumentNullException(ExceptionArgument.value);
- if (unchecked((uint)startIndex) >= unchecked((uint)value!.Length)) // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538
+ if (unchecked((uint)startIndex) >= unchecked((uint)value!.Length)) // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected
ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.startIndex, ExceptionResource.ArgumentOutOfRange_Index);
if (startIndex > value.Length - sizeof(int))
ThrowHelper.ThrowArgumentException(ExceptionResource.Arg_ArrayPlusOffTooSmall, ExceptionArgument.value);
@@ -279,7 +278,7 @@ public static long ToInt64(byte[] value, int startIndex)
{
if (value == null)
ThrowHelper.ThrowArgumentNullException(ExceptionArgument.value);
- if (unchecked((uint)startIndex) >= unchecked((uint)value!.Length)) // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538
+ if (unchecked((uint)startIndex) >= unchecked((uint)value!.Length)) // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected
ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.startIndex, ExceptionResource.ArgumentOutOfRange_Index);
if (startIndex > value.Length - sizeof(long))
ThrowHelper.ThrowArgumentException(ExceptionResource.Arg_ArrayPlusOffTooSmall, ExceptionArgument.value);
@@ -364,11 +363,11 @@ public static string ToString(byte[] value, int startIndex, int length)
{
if (value == null)
ThrowHelper.ThrowArgumentNullException(ExceptionArgument.value);
- if (startIndex < 0 || startIndex >= value!.Length && startIndex > 0) // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538
+ if (startIndex < 0 || startIndex >= value!.Length && startIndex > 0) // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected
ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.startIndex, ExceptionResource.ArgumentOutOfRange_Index);
if (length < 0)
throw new ArgumentOutOfRangeException(nameof(length), SR.ArgumentOutOfRange_GenericPositive);
- if (startIndex > value!.Length - length) // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538
+ if (startIndex > value!.Length - length) // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected
ThrowHelper.ThrowArgumentException(ExceptionResource.Arg_ArrayPlusOffTooSmall, ExceptionArgument.value);
if (length == 0)
@@ -410,7 +409,7 @@ public static string ToString(byte[] value)
{
if (value == null)
ThrowHelper.ThrowArgumentNullException(ExceptionArgument.value);
- return ToString(value!, 0, value!.Length); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538
+ return ToString(value!, 0, value!.Length); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected
}
// Converts an array of bytes into a String.
@@ -418,7 +417,7 @@ public static string ToString(byte[] value, int startIndex)
{
if (value == null)
ThrowHelper.ThrowArgumentNullException(ExceptionArgument.value);
- return ToString(value!, startIndex, value!.Length - startIndex); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538
+ return ToString(value!, startIndex, value!.Length - startIndex); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected
}
/*==================================ToBoolean===================================
@@ -436,7 +435,7 @@ public static bool ToBoolean(byte[] value, int startIndex)
ThrowHelper.ThrowArgumentNullException(ExceptionArgument.value);
if (startIndex < 0)
ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.startIndex, ExceptionResource.ArgumentOutOfRange_Index);
- if (startIndex > value!.Length - 1) // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538
+ if (startIndex > value!.Length - 1) // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected
ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.startIndex, ExceptionResource.ArgumentOutOfRange_Index); // differs from other overloads, which throw base ArgumentException
return value[startIndex] != 0;
diff --git a/src/Common/src/CoreLib/System/Boolean.cs b/src/Common/src/CoreLib/System/Boolean.cs
index 33e11be0dcdf..a7ac01cd2e06 100644
--- a/src/Common/src/CoreLib/System/Boolean.cs
+++ b/src/Common/src/CoreLib/System/Boolean.cs
@@ -12,7 +12,6 @@
**
===========================================================*/
-#nullable enable
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
diff --git a/src/Common/src/CoreLib/System/Buffer.Unix.cs b/src/Common/src/CoreLib/System/Buffer.Unix.cs
index 7de47fd6a21c..372cf92557d9 100644
--- a/src/Common/src/CoreLib/System/Buffer.Unix.cs
+++ b/src/Common/src/CoreLib/System/Buffer.Unix.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
#if BIT64
using nuint = System.UInt64;
#else
diff --git a/src/Common/src/CoreLib/System/Buffer.Windows.cs b/src/Common/src/CoreLib/System/Buffer.Windows.cs
index 2609e90ad997..ccb577a7e1b6 100644
--- a/src/Common/src/CoreLib/System/Buffer.Windows.cs
+++ b/src/Common/src/CoreLib/System/Buffer.Windows.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
#if BIT64
using nuint = System.UInt64;
#else
diff --git a/src/Common/src/CoreLib/System/Buffer.cs b/src/Common/src/CoreLib/System/Buffer.cs
index da62bc50b47b..f2ffaaea85dc 100644
--- a/src/Common/src/CoreLib/System/Buffer.cs
+++ b/src/Common/src/CoreLib/System/Buffer.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
#if AMD64 || ARM64 || (BIT32 && !ARM)
#define HAS_CUSTOM_BLOCKS
#endif
diff --git a/src/Common/src/CoreLib/System/Buffers/ArrayPool.cs b/src/Common/src/CoreLib/System/Buffers/ArrayPool.cs
index 8e67e2259972..5e01399a3330 100644
--- a/src/Common/src/CoreLib/System/Buffers/ArrayPool.cs
+++ b/src/Common/src/CoreLib/System/Buffers/ArrayPool.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
namespace System.Buffers
{
///
diff --git a/src/Common/src/CoreLib/System/Buffers/ArrayPoolEventSource.cs b/src/Common/src/CoreLib/System/Buffers/ArrayPoolEventSource.cs
index 9ae0e3d913eb..d0563c4977d8 100644
--- a/src/Common/src/CoreLib/System/Buffers/ArrayPoolEventSource.cs
+++ b/src/Common/src/CoreLib/System/Buffers/ArrayPoolEventSource.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System.Diagnostics.Tracing;
namespace System.Buffers
diff --git a/src/Common/src/CoreLib/System/Buffers/Binary/Reader.cs b/src/Common/src/CoreLib/System/Buffers/Binary/Reader.cs
index f4a8142731f4..49d0a2db4218 100644
--- a/src/Common/src/CoreLib/System/Buffers/Binary/Reader.cs
+++ b/src/Common/src/CoreLib/System/Buffers/Binary/Reader.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System.Numerics;
using System.Runtime.CompilerServices;
diff --git a/src/Common/src/CoreLib/System/Buffers/Binary/ReaderBigEndian.cs b/src/Common/src/CoreLib/System/Buffers/Binary/ReaderBigEndian.cs
index 31745dd3cc46..b45dd8913d34 100644
--- a/src/Common/src/CoreLib/System/Buffers/Binary/ReaderBigEndian.cs
+++ b/src/Common/src/CoreLib/System/Buffers/Binary/ReaderBigEndian.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
diff --git a/src/Common/src/CoreLib/System/Buffers/Binary/ReaderLittleEndian.cs b/src/Common/src/CoreLib/System/Buffers/Binary/ReaderLittleEndian.cs
index e4a03c013a42..bd832f8995aa 100644
--- a/src/Common/src/CoreLib/System/Buffers/Binary/ReaderLittleEndian.cs
+++ b/src/Common/src/CoreLib/System/Buffers/Binary/ReaderLittleEndian.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
diff --git a/src/Common/src/CoreLib/System/Buffers/Binary/WriterBigEndian.cs b/src/Common/src/CoreLib/System/Buffers/Binary/WriterBigEndian.cs
index ea56c78a4b36..78be9b5a0356 100644
--- a/src/Common/src/CoreLib/System/Buffers/Binary/WriterBigEndian.cs
+++ b/src/Common/src/CoreLib/System/Buffers/Binary/WriterBigEndian.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
diff --git a/src/Common/src/CoreLib/System/Buffers/Binary/WriterLittleEndian.cs b/src/Common/src/CoreLib/System/Buffers/Binary/WriterLittleEndian.cs
index 201ead0e9fb1..5d63ee5f0b43 100644
--- a/src/Common/src/CoreLib/System/Buffers/Binary/WriterLittleEndian.cs
+++ b/src/Common/src/CoreLib/System/Buffers/Binary/WriterLittleEndian.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
diff --git a/src/Common/src/CoreLib/System/Buffers/ConfigurableArrayPool.cs b/src/Common/src/CoreLib/System/Buffers/ConfigurableArrayPool.cs
index dd49d8a2501b..6dd306325819 100644
--- a/src/Common/src/CoreLib/System/Buffers/ConfigurableArrayPool.cs
+++ b/src/Common/src/CoreLib/System/Buffers/ConfigurableArrayPool.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System.Diagnostics;
using System.Threading;
diff --git a/src/Common/src/CoreLib/System/Buffers/IMemoryOwner.cs b/src/Common/src/CoreLib/System/Buffers/IMemoryOwner.cs
index 19d01166c640..44f16c58273f 100644
--- a/src/Common/src/CoreLib/System/Buffers/IMemoryOwner.cs
+++ b/src/Common/src/CoreLib/System/Buffers/IMemoryOwner.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
namespace System.Buffers
{
///
diff --git a/src/Common/src/CoreLib/System/Buffers/IPinnable.cs b/src/Common/src/CoreLib/System/Buffers/IPinnable.cs
index b8b49d4cd12d..623e716a053c 100644
--- a/src/Common/src/CoreLib/System/Buffers/IPinnable.cs
+++ b/src/Common/src/CoreLib/System/Buffers/IPinnable.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
namespace System.Buffers
{
///
diff --git a/src/Common/src/CoreLib/System/Buffers/MemoryHandle.cs b/src/Common/src/CoreLib/System/Buffers/MemoryHandle.cs
index 23325d5d6e86..9cefbc9158a0 100644
--- a/src/Common/src/CoreLib/System/Buffers/MemoryHandle.cs
+++ b/src/Common/src/CoreLib/System/Buffers/MemoryHandle.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System.Runtime.InteropServices;
namespace System.Buffers
diff --git a/src/Common/src/CoreLib/System/Buffers/MemoryManager.cs b/src/Common/src/CoreLib/System/Buffers/MemoryManager.cs
index 5c4061e9b4bd..1b235b538e47 100644
--- a/src/Common/src/CoreLib/System/Buffers/MemoryManager.cs
+++ b/src/Common/src/CoreLib/System/Buffers/MemoryManager.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System.Runtime.CompilerServices;
namespace System.Buffers
diff --git a/src/Common/src/CoreLib/System/Buffers/OperationStatus.cs b/src/Common/src/CoreLib/System/Buffers/OperationStatus.cs
index c8235f7cc49e..e9ddcab57148 100644
--- a/src/Common/src/CoreLib/System/Buffers/OperationStatus.cs
+++ b/src/Common/src/CoreLib/System/Buffers/OperationStatus.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
namespace System.Buffers
{
///
diff --git a/src/Common/src/CoreLib/System/Buffers/StandardFormat.cs b/src/Common/src/CoreLib/System/Buffers/StandardFormat.cs
index 5675f4ced34a..24a49838308d 100644
--- a/src/Common/src/CoreLib/System/Buffers/StandardFormat.cs
+++ b/src/Common/src/CoreLib/System/Buffers/StandardFormat.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System.Diagnostics;
namespace System.Buffers
diff --git a/src/Common/src/CoreLib/System/Buffers/Text/FormattingHelpers.CountDigits.cs b/src/Common/src/CoreLib/System/Buffers/Text/FormattingHelpers.CountDigits.cs
index a7a1fc24a826..ac45347a5edb 100644
--- a/src/Common/src/CoreLib/System/Buffers/Text/FormattingHelpers.CountDigits.cs
+++ b/src/Common/src/CoreLib/System/Buffers/Text/FormattingHelpers.CountDigits.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System.Diagnostics;
using System.Numerics;
using System.Runtime.CompilerServices;
diff --git a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Constants.cs b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Constants.cs
index 25880fcf95ca..e2f70f0b10e9 100644
--- a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Constants.cs
+++ b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Constants.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
namespace System.Buffers.Text
{
internal static partial class Utf8Constants
diff --git a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/FormattingHelpers.cs b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/FormattingHelpers.cs
index a9f185aae927..1b30d5f01336 100644
--- a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/FormattingHelpers.cs
+++ b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/FormattingHelpers.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System.Diagnostics;
using System.Runtime.CompilerServices;
diff --git a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Boolean.cs b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Boolean.cs
index bc6b894be7a1..31bb6cae5559 100644
--- a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Boolean.cs
+++ b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Boolean.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System.Buffers.Binary;
namespace System.Buffers.Text
diff --git a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Date.G.cs b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Date.G.cs
index 2290a107268d..7c4a2e342d89 100644
--- a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Date.G.cs
+++ b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Date.G.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
namespace System.Buffers.Text
{
public static partial class Utf8Formatter
diff --git a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Date.L.cs b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Date.L.cs
index e817064bf8d1..699f91f39c8d 100644
--- a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Date.L.cs
+++ b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Date.L.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
namespace System.Buffers.Text
{
public static partial class Utf8Formatter
diff --git a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Date.O.cs b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Date.O.cs
index 706c634dddad..d9b7b181bc44 100644
--- a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Date.O.cs
+++ b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Date.O.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
namespace System.Buffers.Text
{
public static partial class Utf8Formatter
diff --git a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Date.R.cs b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Date.R.cs
index aed0795b39d7..dd9ec459b7b8 100644
--- a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Date.R.cs
+++ b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Date.R.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
namespace System.Buffers.Text
{
public static partial class Utf8Formatter
diff --git a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Date.cs b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Date.cs
index 31da577c822e..046885d16270 100644
--- a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Date.cs
+++ b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Date.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
namespace System.Buffers.Text
{
public static partial class Utf8Formatter
diff --git a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Decimal.E.cs b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Decimal.E.cs
index 859adea1ca9f..89b54f2fd59d 100644
--- a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Decimal.E.cs
+++ b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Decimal.E.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System.Diagnostics;
namespace System.Buffers.Text
diff --git a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Decimal.F.cs b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Decimal.F.cs
index 1efe257f541f..51bc20b8d2d1 100644
--- a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Decimal.F.cs
+++ b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Decimal.F.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System.Diagnostics;
namespace System.Buffers.Text
diff --git a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Decimal.G.cs b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Decimal.G.cs
index c73774939470..b867eaec1a1d 100644
--- a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Decimal.G.cs
+++ b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Decimal.G.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System.Diagnostics;
namespace System.Buffers.Text
diff --git a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Decimal.cs b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Decimal.cs
index 72b9fca51bf0..bb93b992efb9 100644
--- a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Decimal.cs
+++ b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Decimal.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System.Diagnostics;
namespace System.Buffers.Text
diff --git a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Float.cs b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Float.cs
index c4d70b4da981..96e70bada945 100644
--- a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Float.cs
+++ b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Float.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System.Diagnostics;
using System.Globalization;
using System.Text;
diff --git a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Guid.cs b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Guid.cs
index 61085b892480..479f1dd1cb19 100644
--- a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Guid.cs
+++ b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Guid.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System.Runtime.InteropServices;
namespace System.Buffers.Text
diff --git a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Integer.Signed.D.cs b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Integer.Signed.D.cs
index 88f4c1602844..7532f0cf15ad 100644
--- a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Integer.Signed.D.cs
+++ b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Integer.Signed.D.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System.Runtime.CompilerServices;
namespace System.Buffers.Text
diff --git a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Integer.Signed.Default.cs b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Integer.Signed.Default.cs
index 1c213e38795d..046f5baf6644 100644
--- a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Integer.Signed.Default.cs
+++ b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Integer.Signed.Default.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System.Diagnostics;
using System.Runtime.CompilerServices;
diff --git a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Integer.Signed.N.cs b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Integer.Signed.N.cs
index 542bd1eeb79c..1c01b8d60d4b 100644
--- a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Integer.Signed.N.cs
+++ b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Integer.Signed.N.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System.Runtime.CompilerServices;
namespace System.Buffers.Text
diff --git a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Integer.Signed.cs b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Integer.Signed.cs
index 025fc8b45ec8..fcd20b312d79 100644
--- a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Integer.Signed.cs
+++ b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Integer.Signed.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System.Runtime.CompilerServices;
namespace System.Buffers.Text
diff --git a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Integer.Unsigned.D.cs b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Integer.Unsigned.D.cs
index 78542eb4cfb6..9cb8d64bc0c0 100644
--- a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Integer.Unsigned.D.cs
+++ b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Integer.Unsigned.D.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
namespace System.Buffers.Text
{
///
diff --git a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Integer.Unsigned.Default.cs b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Integer.Unsigned.Default.cs
index 5d8f1f01180c..d83591ed980e 100644
--- a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Integer.Unsigned.Default.cs
+++ b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Integer.Unsigned.Default.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System.Diagnostics;
using System.Runtime.CompilerServices;
diff --git a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Integer.Unsigned.N.cs b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Integer.Unsigned.N.cs
index b6caaa6cf923..ce21c0d3ddd6 100644
--- a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Integer.Unsigned.N.cs
+++ b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Integer.Unsigned.N.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
namespace System.Buffers.Text
{
///
diff --git a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Integer.Unsigned.X.cs b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Integer.Unsigned.X.cs
index 1db31dfe5925..4cf4d52b5c87 100644
--- a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Integer.Unsigned.X.cs
+++ b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Integer.Unsigned.X.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
namespace System.Buffers.Text
{
///
diff --git a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Integer.Unsigned.cs b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Integer.Unsigned.cs
index b531ba714d58..0040c5075a65 100644
--- a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Integer.Unsigned.cs
+++ b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Integer.Unsigned.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System.Runtime.CompilerServices;
namespace System.Buffers.Text
diff --git a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Integer.cs b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Integer.cs
index 2024551ff971..3b83fb75125f 100644
--- a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Integer.cs
+++ b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Integer.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
namespace System.Buffers.Text
{
///
diff --git a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.TimeSpan.cs b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.TimeSpan.cs
index b41cb75d0ef2..38bb35f7dfa6 100644
--- a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.TimeSpan.cs
+++ b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.TimeSpan.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System.Diagnostics;
namespace System.Buffers.Text
diff --git a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/ParserHelpers.cs b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/ParserHelpers.cs
index 7630277464fd..1bdb01347182 100644
--- a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/ParserHelpers.cs
+++ b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/ParserHelpers.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System.Runtime.CompilerServices;
namespace System.Buffers.Text
diff --git a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Boolean.cs b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Boolean.cs
index 56d88e9d4679..3b039bae2509 100644
--- a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Boolean.cs
+++ b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Boolean.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System.Buffers.Binary;
namespace System.Buffers.Text
diff --git a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Date.Default.cs b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Date.Default.cs
index 4df370337d0a..77d7e1224bee 100644
--- a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Date.Default.cs
+++ b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Date.Default.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
namespace System.Buffers.Text
{
public static partial class Utf8Parser
diff --git a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Date.G.cs b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Date.G.cs
index d930831b60c5..6e8edbcbdf85 100644
--- a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Date.G.cs
+++ b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Date.G.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
namespace System.Buffers.Text
{
public static partial class Utf8Parser
diff --git a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Date.Helpers.cs b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Date.Helpers.cs
index 0d62d818830c..d2fb06829a6f 100644
--- a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Date.Helpers.cs
+++ b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Date.Helpers.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System.Diagnostics;
namespace System.Buffers.Text
diff --git a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Date.O.cs b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Date.O.cs
index 9ea3fa34f195..8d2c681f68e1 100644
--- a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Date.O.cs
+++ b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Date.O.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System.Diagnostics;
namespace System.Buffers.Text
diff --git a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Date.R.cs b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Date.R.cs
index 7a16b07e181a..316bee01b424 100644
--- a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Date.R.cs
+++ b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Date.R.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
namespace System.Buffers.Text
{
public static partial class Utf8Parser
diff --git a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Date.cs b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Date.cs
index 37070ef5cf71..35ad71670595 100644
--- a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Date.cs
+++ b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Date.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System.Diagnostics;
namespace System.Buffers.Text
diff --git a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Decimal.cs b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Decimal.cs
index 84bc7797deb6..5ed385a71be9 100644
--- a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Decimal.cs
+++ b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Decimal.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
namespace System.Buffers.Text
{
public static partial class Utf8Parser
diff --git a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Float.cs b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Float.cs
index c2f84dd2b45b..27780397e327 100644
--- a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Float.cs
+++ b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Float.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System.Buffers.Binary;
namespace System.Buffers.Text
diff --git a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Guid.cs b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Guid.cs
index 18aaf64212da..f0a99dd522f6 100644
--- a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Guid.cs
+++ b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Guid.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
namespace System.Buffers.Text
{
public static partial class Utf8Parser
diff --git a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Integer.Signed.D.cs b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Integer.Signed.D.cs
index fc9eb5ea25a0..bf1871a1c94a 100644
--- a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Integer.Signed.D.cs
+++ b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Integer.Signed.D.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
namespace System.Buffers.Text
{
public static partial class Utf8Parser
diff --git a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Integer.Signed.N.cs b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Integer.Signed.N.cs
index 8cf986b18ee8..fd8ce572f271 100644
--- a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Integer.Signed.N.cs
+++ b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Integer.Signed.N.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
namespace System.Buffers.Text
{
public static partial class Utf8Parser
diff --git a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Integer.Signed.cs b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Integer.Signed.cs
index 0ee5b7e3f96c..2e861b1cfdd9 100644
--- a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Integer.Signed.cs
+++ b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Integer.Signed.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using Internal.Runtime.CompilerServices;
namespace System.Buffers.Text
diff --git a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Integer.Unsigned.D.cs b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Integer.Unsigned.D.cs
index 675231b26f43..46753f5c57d1 100644
--- a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Integer.Unsigned.D.cs
+++ b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Integer.Unsigned.D.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
namespace System.Buffers.Text
{
public static partial class Utf8Parser
diff --git a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Integer.Unsigned.N.cs b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Integer.Unsigned.N.cs
index 72f2831e6219..2db20c127011 100644
--- a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Integer.Unsigned.N.cs
+++ b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Integer.Unsigned.N.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
namespace System.Buffers.Text
{
//
diff --git a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Integer.Unsigned.X.cs b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Integer.Unsigned.X.cs
index 1042faece2f8..7e7867a56fd3 100644
--- a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Integer.Unsigned.X.cs
+++ b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Integer.Unsigned.X.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
namespace System.Buffers.Text
{
public static partial class Utf8Parser
diff --git a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Integer.Unsigned.cs b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Integer.Unsigned.cs
index f420bf1818de..7c4e94e56f12 100644
--- a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Integer.Unsigned.cs
+++ b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Integer.Unsigned.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
namespace System.Buffers.Text
{
public static partial class Utf8Parser
diff --git a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Number.cs b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Number.cs
index 2727747d34bf..799a3fe6a741 100644
--- a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Number.cs
+++ b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Number.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System.Diagnostics;
namespace System.Buffers.Text
diff --git a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.TimeSpan.BigG.cs b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.TimeSpan.BigG.cs
index e05523c45f92..6bcb4d527778 100644
--- a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.TimeSpan.BigG.cs
+++ b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.TimeSpan.BigG.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
namespace System.Buffers.Text
{
public static partial class Utf8Parser
diff --git a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.TimeSpan.C.cs b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.TimeSpan.C.cs
index 94d539fa888a..d0a28969be8d 100644
--- a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.TimeSpan.C.cs
+++ b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.TimeSpan.C.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
namespace System.Buffers.Text
{
public static partial class Utf8Parser
diff --git a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.TimeSpan.LittleG.cs b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.TimeSpan.LittleG.cs
index 7172da4e0c52..19208b9eaced 100644
--- a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.TimeSpan.LittleG.cs
+++ b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.TimeSpan.LittleG.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
namespace System.Buffers.Text
{
public static partial class Utf8Parser
diff --git a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.TimeSpan.cs b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.TimeSpan.cs
index 641a0b3f0302..b49cccb6a2f5 100644
--- a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.TimeSpan.cs
+++ b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.TimeSpan.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System.Diagnostics;
namespace System.Buffers.Text
diff --git a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.TimeSpanSplitter.cs b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.TimeSpanSplitter.cs
index 4340399ec9b8..0c72d1f3a2d3 100644
--- a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.TimeSpanSplitter.cs
+++ b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.TimeSpanSplitter.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System.Diagnostics;
namespace System.Buffers.Text
diff --git a/src/Common/src/CoreLib/System/Buffers/TlsOverPerCoreLockedStacksArrayPool.cs b/src/Common/src/CoreLib/System/Buffers/TlsOverPerCoreLockedStacksArrayPool.cs
index 59e109a0431c..47470715ecf5 100644
--- a/src/Common/src/CoreLib/System/Buffers/TlsOverPerCoreLockedStacksArrayPool.cs
+++ b/src/Common/src/CoreLib/System/Buffers/TlsOverPerCoreLockedStacksArrayPool.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System;
using System.Collections.Generic;
using System.Diagnostics;
@@ -247,7 +246,7 @@ public bool Trim()
// Under high pressure, release all thread locals
if (log.IsEnabled())
{
- foreach (KeyValuePair tlsBuckets in s_allTlsBuckets)
+ foreach (KeyValuePair tlsBuckets in s_allTlsBuckets)
{
T[]?[] buckets = tlsBuckets.Key;
for (int i = 0; i < buckets.Length; i++)
diff --git a/src/Common/src/CoreLib/System/Buffers/Utilities.cs b/src/Common/src/CoreLib/System/Buffers/Utilities.cs
index c49555a6e531..7e1caa039b36 100644
--- a/src/Common/src/CoreLib/System/Buffers/Utilities.cs
+++ b/src/Common/src/CoreLib/System/Buffers/Utilities.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System.Diagnostics;
using System.Numerics;
using System.Runtime.CompilerServices;
diff --git a/src/Common/src/CoreLib/System/ByReference.cs b/src/Common/src/CoreLib/System/ByReference.cs
index bb75753f5be4..5da3c99f41b1 100644
--- a/src/Common/src/CoreLib/System/ByReference.cs
+++ b/src/Common/src/CoreLib/System/ByReference.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
diff --git a/src/Common/src/CoreLib/System/Byte.cs b/src/Common/src/CoreLib/System/Byte.cs
index de3eb7a7db0b..5370fec690e0 100644
--- a/src/Common/src/CoreLib/System/Byte.cs
+++ b/src/Common/src/CoreLib/System/Byte.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System.Globalization;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
diff --git a/src/Common/src/CoreLib/System/CLSCompliantAttribute.cs b/src/Common/src/CoreLib/System/CLSCompliantAttribute.cs
index 9790e935f34e..d895b5ac7166 100644
--- a/src/Common/src/CoreLib/System/CLSCompliantAttribute.cs
+++ b/src/Common/src/CoreLib/System/CLSCompliantAttribute.cs
@@ -11,7 +11,6 @@
**
=============================================================================*/
-#nullable enable
namespace System
{
[AttributeUsage(AttributeTargets.All, Inherited = true, AllowMultiple = false)]
diff --git a/src/Common/src/CoreLib/System/CannotUnloadAppDomainException.cs b/src/Common/src/CoreLib/System/CannotUnloadAppDomainException.cs
index 450a54c96b3a..6d68f08c5c52 100644
--- a/src/Common/src/CoreLib/System/CannotUnloadAppDomainException.cs
+++ b/src/Common/src/CoreLib/System/CannotUnloadAppDomainException.cs
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable enable
using System.Runtime.Serialization;
namespace System
diff --git a/src/Common/src/CoreLib/System/Char.cs b/src/Common/src/CoreLib/System/Char.cs
index 80dce56258b7..3835f8e99600 100644
--- a/src/Common/src/CoreLib/System/Char.cs
+++ b/src/Common/src/CoreLib/System/Char.cs
@@ -12,7 +12,6 @@
**
===========================================================*/
-#nullable enable
using System.Diagnostics;
using System.Globalization;
using System.Runtime.InteropServices;
diff --git a/src/Common/src/CoreLib/System/CharEnumerator.cs b/src/Common/src/CoreLib/System/CharEnumerator.cs
index 0b2caefdfa32..1e775380805d 100644
--- a/src/Common/src/CoreLib/System/CharEnumerator.cs
+++ b/src/Common/src/CoreLib/System/CharEnumerator.cs
@@ -12,7 +12,6 @@
**
============================================================*/
-#nullable enable
using System.Collections;
using System.Collections.Generic;
@@ -55,7 +54,7 @@ public void Dispose()
_str = null;
}
- object? IEnumerator.Current // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/23268
+ object? IEnumerator.Current
{
get { return Current; }
}
diff --git a/src/Common/src/CoreLib/System/Collections/ArrayList.cs b/src/Common/src/CoreLib/System/Collections/ArrayList.cs
index d2ccc23d70a3..ba4a323c4eb9 100644
--- a/src/Common/src/CoreLib/System/Collections/ArrayList.cs
+++ b/src/Common/src/CoreLib/System/Collections/ArrayList.cs
@@ -33,7 +33,7 @@ namespace System.Collections
#endif
public class ArrayList : IList, ICloneable
{
- private object[] _items; // Do not rename (binary serialization)
+ private object?[] _items = null!; // Do not rename (binary serialization)
private int _size; // Do not rename (binary serialization)
private int _version; // Do not rename (binary serialization)
@@ -161,7 +161,7 @@ public virtual bool IsSynchronized
// Sets or Gets the element at the given index.
//
- public virtual object this[int index]
+ public virtual object? this[int index]
{
get
{
@@ -195,7 +195,7 @@ public static ArrayList Adapter(IList list)
// increased by one. If required, the capacity of the list is doubled
// before adding the new element.
//
- public virtual int Add(object value)
+ public virtual int Add(object? value)
{
if (_size == _items.Length) EnsureCapacity(_size + 1);
_items[_size] = value;
@@ -232,7 +232,7 @@ public virtual void AddRange(ICollection c)
// The method uses the Array.BinarySearch method to perform the
// search.
//
- public virtual int BinarySearch(int index, int count, object value, IComparer comparer)
+ public virtual int BinarySearch(int index, int count, object? value, IComparer? comparer)
{
if (index < 0)
throw new ArgumentOutOfRangeException(nameof(index), SR.ArgumentOutOfRange_NeedNonNegNum);
@@ -244,12 +244,12 @@ public virtual int BinarySearch(int index, int count, object value, IComparer co
return Array.BinarySearch((Array)_items, index, count, value, comparer);
}
- public virtual int BinarySearch(object value)
+ public virtual int BinarySearch(object? value)
{
return BinarySearch(0, Count, value, null);
}
- public virtual int BinarySearch(object value, IComparer comparer)
+ public virtual int BinarySearch(object? value, IComparer? comparer)
{
return BinarySearch(0, Count, value, comparer);
}
@@ -283,7 +283,7 @@ public virtual object Clone()
// It does a linear, O(n) search. Equality is determined by calling
// item.Equals().
//
- public virtual bool Contains(object item)
+ public virtual bool Contains(object? item)
{
if (item == null)
{
@@ -295,7 +295,7 @@ public virtual bool Contains(object item)
else
{
for (int i = 0; i < _size; i++)
- if ((_items[i] != null) && (_items[i].Equals(item)))
+ if ((_items[i] != null) && (_items[i]!.Equals(item))) // TODO-NULLABLE: Indexer nullability tracked (https://github.com/dotnet/roslyn/issues/34644)
return true;
return false;
}
@@ -318,7 +318,7 @@ public virtual void CopyTo(Array array, int arrayIndex)
throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array));
// Delegate rest of error checking to Array.Copy.
- Array.Copy(_items, 0, array, arrayIndex, _size);
+ Array.Copy(_items, 0, array!, arrayIndex, _size);
}
// Copies a section of this list to the given array at the given index.
@@ -333,7 +333,7 @@ public virtual void CopyTo(int index, Array array, int arrayIndex, int count)
throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array));
// Delegate rest of error checking to Array.Copy.
- Array.Copy(_items, index, array, arrayIndex, count);
+ Array.Copy(_items, index, array!, arrayIndex, count);
}
// Ensures that the capacity of this list is at least the given minimum
@@ -407,7 +407,7 @@ public virtual IEnumerator GetEnumerator(int index, int count)
// This method uses the Array.IndexOf method to perform the
// search.
//
- public virtual int IndexOf(object value)
+ public virtual int IndexOf(object? value)
{
return Array.IndexOf((Array)_items, value, 0, _size);
}
@@ -421,7 +421,7 @@ public virtual int IndexOf(object value)
// This method uses the Array.IndexOf method to perform the
// search.
//
- public virtual int IndexOf(object value, int startIndex)
+ public virtual int IndexOf(object? value, int startIndex)
{
if (startIndex > _size)
throw new ArgumentOutOfRangeException(nameof(startIndex), SR.ArgumentOutOfRange_Index);
@@ -437,7 +437,7 @@ public virtual int IndexOf(object value, int startIndex)
// This method uses the Array.IndexOf method to perform the
// search.
//
- public virtual int IndexOf(object value, int startIndex, int count)
+ public virtual int IndexOf(object? value, int startIndex, int count)
{
if (startIndex > _size)
throw new ArgumentOutOfRangeException(nameof(startIndex), SR.ArgumentOutOfRange_Index);
@@ -449,7 +449,7 @@ public virtual int IndexOf(object value, int startIndex, int count)
// is increased by one. If required, the capacity of the list is doubled
// before inserting the new element.
//
- public virtual void Insert(int index, object value)
+ public virtual void Insert(int index, object? value)
{
// Note that insertions at the end are legal.
if (index < 0 || index > _size) throw new ArgumentOutOfRangeException(nameof(index), SR.ArgumentOutOfRange_Index);
@@ -501,7 +501,7 @@ public virtual void InsertRange(int index, ICollection c)
// This method uses the Array.LastIndexOf method to perform the
// search.
//
- public virtual int LastIndexOf(object value)
+ public virtual int LastIndexOf(object? value)
{
return LastIndexOf(value, _size - 1, _size);
}
@@ -515,7 +515,7 @@ public virtual int LastIndexOf(object value)
// This method uses the Array.LastIndexOf method to perform the
// search.
//
- public virtual int LastIndexOf(object value, int startIndex)
+ public virtual int LastIndexOf(object? value, int startIndex)
{
if (startIndex >= _size)
throw new ArgumentOutOfRangeException(nameof(startIndex), SR.ArgumentOutOfRange_Index);
@@ -531,7 +531,7 @@ public virtual int LastIndexOf(object value, int startIndex)
// This method uses the Array.LastIndexOf method to perform the
// search.
//
- public virtual int LastIndexOf(object value, int startIndex, int count)
+ public virtual int LastIndexOf(object? value, int startIndex, int count)
{
if (Count != 0 && (startIndex < 0 || count < 0))
throw new ArgumentOutOfRangeException(startIndex < 0 ? nameof(startIndex) : nameof(count), SR.ArgumentOutOfRange_NeedNonNegNum);
@@ -566,7 +566,7 @@ public static ArrayList ReadOnly(ArrayList list)
// Removes the element at the given index. The size of the list is
// decreased by one.
//
- public virtual void Remove(object obj)
+ public virtual void Remove(object? obj)
{
int index = IndexOf(obj);
if (index >= 0)
@@ -615,7 +615,7 @@ public virtual void RemoveRange(int index, int count)
// Returns an IList that contains count copies of value.
//
- public static ArrayList Repeat(object value, int count)
+ public static ArrayList Repeat(object? value, int count)
{
if (count < 0)
throw new ArgumentOutOfRangeException(nameof(count), SR.ArgumentOutOfRange_NeedNonNegNum);
@@ -688,7 +688,7 @@ public virtual void Sort()
// Sorts the elements in this list. Uses Array.Sort with the
// provided comparer.
- public virtual void Sort(IComparer comparer)
+ public virtual void Sort(IComparer? comparer)
{
Sort(0, Count, comparer);
}
@@ -701,7 +701,7 @@ public virtual void Sort(IComparer comparer)
//
// This method uses the Array.Sort method to sort the elements.
//
- public virtual void Sort(int index, int count, IComparer comparer)
+ public virtual void Sort(int index, int count, IComparer? comparer)
{
if (index < 0)
throw new ArgumentOutOfRangeException(nameof(index), SR.ArgumentOutOfRange_NeedNonNegNum);
@@ -734,12 +734,12 @@ public static ArrayList Synchronized(ArrayList list)
// ToArray returns a new Object array containing the contents of the ArrayList.
// This requires copying the ArrayList, which is an O(n) operation.
- public virtual object[] ToArray()
+ public virtual object?[] ToArray()
{
if (_size == 0)
return Array.Empty