Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit fe85a32

Browse files
committed
Merge remote-tracking branch 'dotnet/master' into sqltests-updates
2 parents 5456a4c + a820ff4 commit fe85a32

File tree

924 files changed

+54761
-6425
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

924 files changed

+54761
-6425
lines changed

.azure-ci.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
# Disable triggers for now. TODO: add right merge triggers.
2-
trigger: none
2+
trigger:
3+
- master
34

45
# TODO: add paths to exclude CI when modifying docs or stuff not affecting the build
5-
# TODO: enable PR triggers when helix SDK issues are fixed
6-
pr: none
6+
pr:
7+
- master
78

89
resources:
910
containers:
@@ -47,7 +48,7 @@ jobs:
4748
- template: /eng/pipelines/redhat6.yml
4849

4950
# FreeBSD leg is only for official builds
50-
- template: /eng/pipelines/freebsd.yml
51+
# - template: /eng/pipelines/freebsd.yml
5152

5253
# Publish step
5354
- template: /eng/pipelines/publish.yml
@@ -60,4 +61,4 @@ jobs:
6061
- LinuxNoTest
6162
- MacOS
6263
- RedHat6
63-
- FreeBSD
64+
# - FreeBSD

Directory.Build.props

Lines changed: 27 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@
5555
<TargetGroup Condition="'$(TargetGroup)' == ''">netcoreapp</TargetGroup>
5656
<OSGroup Condition="'$(OSGroup)' == ''">$(DefaultOSGroup)</OSGroup>
5757
<ConfigurationGroup Condition="'$(ConfigurationGroup)' == ''">Debug</ConfigurationGroup>
58+
<HostArch>$([System.Runtime.InteropServices.RuntimeInformation]::ProcessArchitecture)</HostArch>
59+
<ArchGroup Condition="'$(ArchGroup)' == '' AND '$(HostArch)' == 'Arm'">arm</ArchGroup>
60+
<ArchGroup Condition="'$(ArchGroup)' == '' AND '$(HostArch)' == 'Arm64'">arm64</ArchGroup>
5861
<ArchGroup Condition="'$(ArchGroup)' == ''">x64</ArchGroup>
5962

6063
<!-- Initialize BuildConfiguration from the individual properties if it wasn't already explicitly set -->
@@ -99,6 +102,10 @@
99102
<!-- Properties to remove with buildtools removal -->
100103
<ProjectDir>$(RepoRoot)</ProjectDir>
101104
<BinDir>$(ProjectDir)artifacts\bin\</BinDir>
105+
<ToolsDir Condition="'$(ToolsDir)'==''">$(ProjectDir)Tools/</ToolsDir>
106+
<BuildToolsTaskDir Condition="'$(MSBuildRuntimeType)' != 'core'">$(ToolsDir)net46/</BuildToolsTaskDir>
107+
<BuildToolsTaskDir Condition="'$(MSBuildRuntimeType)' == 'core'">$(ToolsDir)</BuildToolsTaskDir>
108+
102109
<!-- Need to try and keep the same logic as the native builds as we need this for packaging -->
103110
<NativeBinDir>$(BinDir)native/$(BuildConfiguration)</NativeBinDir>
104111

@@ -109,8 +116,6 @@
109116
<PackagesDir>$(DotNetRestorePackagesPath)</PackagesDir>
110117
<PackagesDir Condition="'$(PackagesDir)'=='' AND '$(NuGetPackageRoot)' != ''">$([MSBuild]::EnsureTrailingSlash('$(NuGetPackageRoot)'))</PackagesDir>
111118
<PackagesDir Condition="'$(PackagesDir)'==''">$(ProjectDir).packages/</PackagesDir>
112-
<ToolsDir Condition="'$(ToolsDir)'==''">$(ProjectDir)Tools/</ToolsDir>
113-
<IlasmToolPath>$(ToolsDir)ilasm/ilasm</IlasmToolPath>
114119
<CodeAnalysisRuleset>$(MSBuildThisFileDirectory)CodeAnalysis.ruleset</CodeAnalysisRuleset>
115120
<!-- Respect environment variable for the .NET install directory if set; otherwise, use the current default location -->
116121
<DotNetRoot Condition="'$(DotNetRoot)' == ''">$(DOTNET_INSTALL_DIR)</DotNetRoot>
@@ -122,35 +127,12 @@
122127
<DotNetCmd Condition="'$(OS)' == 'Windows_NT'">$(DotNetCmd).exe</DotNetCmd>
123128
</PropertyGroup>
124129

125-
<!-- Choose .targets files that come from Arcade rather than from buildtools -->
126-
<!-- TODO: Remove when buildtools dependency removed. -->
127-
<PropertyGroup>
128-
<ExcludeNotSupportedImport>true</ExcludeNotSupportedImport>
129-
<ExcludePartialFacadesImport>true</ExcludePartialFacadesImport>
130-
<ExcludeApiCompatImport>true</ExcludeApiCompatImport>
131-
<ExcludeReferenceAssembliesImport>true</ExcludeReferenceAssembliesImport>
132-
<ExcludePackagingImport>true</ExcludePackagingImport>
133-
<ExcludePackageLibsImport>true</ExcludePackageLibsImport>
134-
<ExcludeCodeAnalysisImport>true</ExcludeCodeAnalysisImport>
135-
<ExcludeResourcesImport>true</ExcludeResourcesImport>
136-
<ExcludeVersioningImport>true</ExcludeVersioningImport>
137-
<ExcludeSigningImport>true</ExcludeSigningImport>
138-
<ExcludeDepProjImport>true</ExcludeDepProjImport>
139-
<ExcludeResolveContractImport>true</ExcludeResolveContractImport>
140-
<ExcludePackageResolveImport>true</ExcludePackageResolveImport>
141-
<ExcludeTestsImport>true</ExcludeTestsImport>
142-
<ExcludeBinPlaceImport>true</ExcludeBinPlaceImport>
143-
</PropertyGroup>
144-
145130
<!-- workaround https://github.com/dotnet/sdk/issues/2288
146131
remove once we have a new CLI -->
147132
<PropertyGroup>
148133
<LanguageTargets Condition="'$(LanguageTargets)' == '' AND '$(MSBuildProjectExtension)' != '.csproj' AND '$(MSBuildProjectExtension)' != '.vbproj' AND '$(MSBuildProjectExtension)' != '.fsproj'">$(MSBuildToolsPath)\Microsoft.Common.targets</LanguageTargets>
149134
</PropertyGroup>
150135

151-
<!-- Import Build tools common props file where repo-independent properties are found -->
152-
<Import Project="$(ToolsDir)Build.Common.props" Condition="Exists('$(ToolsDir)Build.Common.props')" />
153-
154136
<!-- Enable the analyzers for this repo -->
155137
<PropertyGroup>
156138
<EnableAnalyzers Condition="'$(EnableAnalyzers)' == '' AND '$(IsSourceProject)' == 'true'">true</EnableAnalyzers>
@@ -160,10 +142,10 @@
160142
<PropertyGroup Condition="'$(IsTestProject)' == 'true' and '$(ContinuousIntegrationBuild)' == 'true' and '$(OfficialBuildId)' == ''">
161143
<WithoutCategories>IgnoreForCI</WithoutCategories>
162144
<EnableDumpling>false</EnableDumpling>
163-
<CrashDumpFolder Condition="'$(RunningOnUnix)' != 'true'">%TMP%\CoreRunCrashDumps</CrashDumpFolder>
145+
<CrashDumpFolder Condition="'$(OS)' == 'Windows_NT'">%TMP%\CoreRunCrashDumps</CrashDumpFolder>
164146
</PropertyGroup>
165-
<PropertyGroup Condition="'$(ContinuousIntegrationBuild)' == 'true' and '$(OfficialBuildId)' == ''">
166-
<!-- Disable F5 and test explorer support for CI builds. -->
147+
<!-- Disable VS support files on CI and official builds. -->
148+
<PropertyGroup Condition="'$(ContinuousIntegrationBuild)' == 'true' or '$(OfficialBuildId)' != ''">
167149
<EnableLaunchSettings>false</EnableLaunchSettings>
168150
<EnableVSTestReferences>false</EnableVSTestReferences>
169151
</PropertyGroup>
@@ -175,6 +157,7 @@
175157
<PropertyGroup>
176158
<RestoreSources Condition="'$(DotNetBuildOffline)' != 'true'">
177159
https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json;
160+
https://dotnetfeed.blob.core.windows.net/dotnet-coreclr/index.json;
178161
https://dotnet.myget.org/F/dotnet-buildtools/api/v3/index.json;
179162
https://dotnet.myget.org/F/dotnet-core/api/v3/index.json;
180163
https://api.nuget.org/v3/index.json;
@@ -211,7 +194,8 @@
211194
<_runtimeOSVersionIndex>$(RuntimeOS.IndexOfAny(".-0123456789"))</_runtimeOSVersionIndex>
212195
<_runtimeOSFamily Condition="'$(_runtimeOSVersionIndex)' != '-1'">$(RuntimeOS.SubString(0, $(_runtimeOSVersionIndex)))</_runtimeOSFamily>
213196
<_portableOS>linux</_portableOS>
214-
<_portableOS Condition="'$(_runtimeOSFamily)' == 'win'">win</_portableOS>
197+
<_portableOS Condition="'$(RuntimeOS)' == 'linux-musl'">linux-musl</_portableOS>
198+
<_portableOS Condition="'$(_runtimeOSFamily)' == 'win' OR '$(OSGroup)' == 'Windows_NT'">win</_portableOS>
215199
<_portableOS Condition="'$(_runtimeOSFamily)' == 'osx'">osx</_portableOS>
216200
<_portableOS Condition="'$(_runtimeOSFamily)' == 'FreeBSD'">freebsd</_portableOS>
217201
<_portableOS Condition="'$(RuntimeOS)' == 'WebAssembly'">webassembly</_portableOS>
@@ -227,8 +211,7 @@
227211
<MicrosoftNetCoreIlasmPackageRuntimeId Condition="'$(MicrosoftNetCoreIlasmPackageRuntimeId)' == ''">$(ToolRuntimeRID)</MicrosoftNetCoreIlasmPackageRuntimeId>
228212

229213
<!-- support cross-targeting by choosing a RID to restore when running on a different machine that what we're build for -->
230-
<_portableOS Condition="'$(OSGroup)' == 'Unix' AND '$(_runtimeOSFamily)' != 'osx' AND '$(_runtimeOSFamily)' != 'FreeBSD'">linux</_portableOS>
231-
<_portableOS Condition="'$(OSGroup)' == 'Windows_NT'">win</_portableOS>
214+
<_portableOS Condition="'$(OSGroup)' == 'Unix' AND '$(_runtimeOSFamily)' != 'osx' AND '$(_runtimeOSFamily)' != 'FreeBSD' AND '$(_runtimeOS)' != 'linux-musl'">linux</_portableOS>
232215

233216
<_packageRID/>
234217
<_packageRID Condition="'$(PortableBuild)' == 'true'">$(_portableOS)-$(ArchGroup)</_packageRID>
@@ -281,10 +264,14 @@
281264
<DebugType>portable</DebugType>
282265

283266
<!-- Empty DebugType when building for netfx and in windows so that it is set to full or pdbonly later -->
284-
<DebugType Condition="'$(TargetsNetFx)' == 'true' AND '$(RunningOnUnix)' != 'true'"></DebugType>
267+
<DebugType Condition="'$(TargetsNetFx)' == 'true' AND '$(OS)' == 'Windows_NT'"></DebugType>
285268

286269
<!-- Rhel 6 and FreeBSD doesn't support the source control git package so disable SourceLink -->
287270
<EnableSourceLink Condition="$(RuntimeOS.StartsWith('rhel.6')) OR '$(_runtimeOSFamily)' == 'FreeBSD'">false</EnableSourceLink>
271+
<!-- is is not supported on ARM platforms either. -->
272+
<EnableSourceLink Condition="'$(HostArch)' == 'Arm' OR '$(HostArch)' == 'Arm64'">false</EnableSourceLink>
273+
<!-- Disable source link on local builds. -->
274+
<EnableSourceLink Condition="'$(ContinuousIntegrationBuild)' != 'true' and '$(OfficialBuildId)' == ''">false</EnableSourceLink>
288275
</PropertyGroup>
289276

290277
<!-- Set up Default symbol and optimization for Configuration -->
@@ -314,6 +301,8 @@
314301
<AddAdditionalExplicitAssemblyReferences>false</AddAdditionalExplicitAssemblyReferences>
315302
<GenerateTargetFrameworkAttribute>false</GenerateTargetFrameworkAttribute>
316303
<CopyNuGetImplementations>false</CopyNuGetImplementations>
304+
<!-- Don't reference implicit framework packages, all projects in this repo must be explicit -->
305+
<DisableImplicitFrameworkReferences>true</DisableImplicitFrameworkReferences>
317306
</PropertyGroup>
318307

319308
<!-- Language configuration -->
@@ -332,6 +321,10 @@
332321

333322
<!-- Suppress preview message as we are usually using preview SDK versions. -->
334323
<SuppressNETCoreSdkPreviewMessage>true</SuppressNETCoreSdkPreviewMessage>
324+
325+
<CLSCompliant Condition="'$(CLSCompliant)'=='' and '$(IsTestProject)'=='true'">false</CLSCompliant>
326+
<CLSCompliant Condition="'$(CLSCompliant)'==''">true</CLSCompliant>
327+
<GenFacadesIgnoreBuildAndRevisionMismatch>true</GenFacadesIgnoreBuildAndRevisionMismatch>
335328
</PropertyGroup>
336329

337330
<!-- Set up some common paths -->
@@ -360,6 +353,7 @@
360353
<RefPath>$(RefRootPath)$(TargetGroup)/</RefPath>
361354
<RefPath Condition="$(TargetGroup.EndsWith('aot'))">$(RefRootPath)$(TargetGroup.TrimEnd('aot'))/</RefPath>
362355
<NetStandardRefPath>$(RefRootPath)netstandard/</NetStandardRefPath>
356+
<NetStandard21RefPath>$(RefRootPath)netstandard2.1/</NetStandard21RefPath>
363357
<NetFxRefPath>$(RefRootPath)netfx/</NetFxRefPath>
364358
<GlobalToolsDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsDir)', 'tools'))</GlobalToolsDir>
365359

@@ -471,17 +465,13 @@
471465
</ItemDefinitionGroup>
472466

473467
<!-- Import it at the end of the props file to override the OutputPath for reference assemblies and use common directory props -->
474-
<Import Project="$(MSBuildThisFileDirectory)eng\ReferenceAssemblies.props" />
468+
<Import Project="$(RepositoryEngineeringDir)ReferenceAssemblies.props" />
475469

476470
<PropertyGroup Condition="'$(IsSourceProject)' == 'true'">
477471
<!-- Set the documentation output file globally. -->
478472
<DocumentationFile Condition="'$(DocumentationFile)' == ''">$(OutputPath)$(MSBuildProjectName).xml</DocumentationFile>
479473
</PropertyGroup>
480474

481-
<!-- Use Roslyn Compilers to build -->
482-
<Import Project="$(RoslynPropsFile)" Condition="'$(RunningOnUnix)'!='true' and Exists('$(RoslynPropsFile)') and '$(UseRoslynCompilers)'!='false' and '$(RoslynIncompatibleMsbuildVersion)' != 'true'" />
483-
<Import Project="$(RoslynPropsFile)" Condition="'$(RunningOnUnix)'=='true' and Exists('$(RoslynPropsFile)') and '$(RoslynIncompatibleMsbuildVersion)' != 'true'" />
484-
485475
<!-- Additional optimizations -->
486476
<PropertyGroup>
487477
<!-- Clear the init locals flag on all src projects, except those in VB, where we can't use spans. -->

Directory.Build.targets

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,10 +141,21 @@
141141
<BinPlaceConfiguration Include="@(AdditionalBinPlaceConfiguration)" />
142142
</ItemGroup>
143143

144-
<Import Project="$(MSBuildThisFileDirectory)eng/depProj.targets" Condition="'$(MSBuildProjectExtension)' == '.depproj'" />
145-
<Import Project="$(ToolsDir)/Build.Common.targets" Condition="Exists('$(ToolsDir)/Build.Common.targets')" />
144+
<Import Project="$(RepositoryEngineeringDir)blockReflectionAttribute.targets" />
145+
<Import Project="$(RepositoryEngineeringDir)depProj.targets" Condition="'$(MSBuildProjectExtension)' == '.depproj'" />
146146
<Import Project="$(RepositoryEngineeringDir)Resources.targets" />
147+
<Import Project="$(RepositoryEngineeringDir)references.targets" />
147148
<Import Project="$(RepositoryEngineeringDir)resolveContract.targets" />
149+
150+
<!-- TODO: remove remaining functionality from buildtools -->
151+
<PropertyGroup>
152+
<!-- codeOptimization uses DnuRestoreCommand -->
153+
<DnuRestoreCommand>$(DotnetTool) restore</DnuRestoreCommand>
154+
<!-- optionalTooling uses DotnetToolCommand -->
155+
<DotnetToolCommand>$(DotnetTool)</DotnetToolCommand>
156+
</PropertyGroup>
157+
<Import Project="$(ToolsDir)codeOptimization.targets" />
158+
<Import Project="$(ToolsDir)OptionalTooling.targets" />
148159

149160
<Import Project="$(ToolSetCommonDirectory)Tools.proj.nuget.g.targets" Condition="Exists('$(ToolSetCommonDirectory)Tools.proj.nuget.g.targets')" />
150161

Documentation/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ Project Docs
2727

2828
- [Developer Guide](project-docs/developer-guide.md)
2929
- [Performance Testing](project-docs/performance-tests.md)
30-
- [Project priorities](https://github.com/dotnet/coreclr/blob/master/Documentation/project-docs/project-priorities.md)
3130
- [Contributing to CoreFX](project-docs/contributing.md)
3231
- [Contributing to .NET Core](https://github.com/dotnet/coreclr/blob/master/Documentation/project-docs/contributing.md)
3332
- [Contributing Workflow](https://github.com/dotnet/coreclr/blob/master/Documentation/project-docs/contributing-workflow.md)

Documentation/building/code-coverage.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,11 @@ And then once the run completes:
6161

6262
$(TestPath)\report\index.htm
6363

64+
**Note:** If you only want to measure the coverage of your local changes (that haven't been pushed to git), run:
65+
66+
dotnet msbuild /t:BuildAndTest /p:Coverage=true /p:CoverageSourceLink=false
67+
68+
6469
## Code coverage with System.Private.CoreLib code
6570

6671
Some of the libraries for which contracts and tests live in the corefx repo are actually fully or partially implemented in the core runtime library in another repo, e.g. the implementation that backs the System.Runtime contract is in System.Private.CoreLib.dll in either the coreclr or corert repo. Test projects for code that lives, fully or partially, in System.Private.CoreLib, should have the property `TestRuntime` set to `true` in order to obtain proper code coverage reports.

Documentation/coding-guidelines/interop-guidelines.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ Using enums instead of partial, static classes can lead to needing lots of casts
174174

175175
### Definition
176176

177-
When defining the P/Invoke signatures and structs, the following guidelines should be followed. More details on P/Invoke behavior and these guidelines can be found here: [P/Invokes](interop-pinvokes)
177+
When defining the P/Invoke signatures and structs, the following guidelines should be followed. More details on P/Invoke behavior and these guidelines can be found here: [P/Invokes](interop-pinvokes.md)
178178

179179
- Interop signatures / structs / constants should be defined using the same name / capitalization / etc. that's used in the corresponding native code.
180180
- Avoid using `StringBuilder`, particularly as an output buffer to avoid over allocating.

Documentation/project-docs/api-review-process.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ APIs and some code samples that show how it should be used. If changes are neces
3030
* **Close as won't fix as proposed**. Sometimes, the issue that is raised is a good one but the owner thinks the concrete proposal is not the right way to tackle the problem. In most cases, the owner will try to steer the discussion in a direction that results in a design that we believe is appropriate. However, for some proposals the problem is at the heart of the design which can't easily be changed without starting a new proposal. In those cases, the owner will close the issue and explain the issue the design has.
3131
* **Close as won't fix**. Similarly, if proposal is taking the product in a direction we simply don't want to go, the issue might also get closed. In that case, the problem isn't the proposed design but in the issue itself.
3232

33-
5. **API gets reviewed**. The group conducting the review is called *FXDC*, which stands for *framework design core*. In the review, we'll take notes and provide feedback. After the review, we'll publish the notes in the [API Review repository](https://github.com/dotnet/apireviews). A good example is the [review of immutable collections](https://github.com/dotnet/apireviews/tree/master/2015-01-07-immutable). Multiple outcomes are possible:
33+
5. **API gets reviewed**. The group conducting the review is called *FXDC*, which stands for *framework design core*. In the review, we'll take notes and provide feedback. After the review, we'll publish the notes in the [API Review repository](https://github.com/dotnet/apireviews). A good example is the [review of immutable collections](https://github.com/dotnet/apireviews/tree/master/2015/01-07-immutable). Multiple outcomes are possible:
3434

3535
* **Approved**. In this case the label `api-ready-for-review` is replaced
3636
with `api-approved`.

0 commit comments

Comments
 (0)