Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterSolMS committed Jan 7, 2021
2 parents 0ba8f94 + 81b9558 commit 6bc4d50
Show file tree
Hide file tree
Showing 747 changed files with 16,402 additions and 13,955 deletions.
2 changes: 1 addition & 1 deletion .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
]
},
"microsoft.dotnet.xharness.cli": {
"version": "1.0.0-prerelease.20615.1",
"version": "1.0.0-prerelease.20630.1",
"commands": [
"xharness"
]
Expand Down
278 changes: 210 additions & 68 deletions Directory.Build.props

Large diffs are not rendered by default.

51 changes: 46 additions & 5 deletions Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -1,24 +1,65 @@
<Project>

<Project InitialTargets="ErrorForMissingPackageDescription;_OverridePackDependsOn">
<PropertyGroup>
<!--
For non-SDK projects that import this file and then import Microsoft.Common.targets,
tell Microsoft.Common.targets not to import Directory.Build.targets again
-->
<ImportDirectoryBuildTargets>false</ImportDirectoryBuildTargets>

<EnableNETAnalyzers Condition="'$(EnableAnalyzers)' != 'true'">false</EnableNETAnalyzers>
</PropertyGroup>

<Import Project="Sdk.targets" Sdk="Microsoft.DotNet.Arcade.Sdk" />
<Import Project="$(RepositoryEngineeringDir)liveBuilds.targets" />
<Import Project="$(RepositoryEngineeringDir)python.targets" />
<Import Project="Sdk.targets" Sdk="Microsoft.DotNet.Arcade.Sdk" Condition="'$(SkipImportArcadeSdkFromRoot)' != 'true'" />

<PropertyGroup>
<!--
Define this here (not just in Versions.props) because the SDK resets it
unconditionally in Microsoft.NETCoreSdk.BundledVersions.props.
-->
<NETCoreAppMaximumVersion>$(MajorVersion).$(MinorVersion)</NETCoreAppMaximumVersion>
<EnableNETAnalyzers Condition="'$(EnableAnalyzers)' != 'true'">false</EnableNETAnalyzers>
<!-- SDK sets product to assembly but we want it to be our product name -->
<Product>Microsoft%AE .NET</Product>
<!-- Use the .NET product branding version for informational version description -->
<InformationalVersion Condition="'$(InformationalVersion)' == '' and '$(VersionSuffix)' == ''">$(ProductVersion)</InformationalVersion>
<InformationalVersion Condition="'$(InformationalVersion)' == '' and '$(VersionSuffix)' != ''">$(ProductVersion)-$(VersionSuffix)</InformationalVersion>
</PropertyGroup>

<!-- Packaging -->
<ItemGroup Condition="'$(IsPackable)' == 'true'">
<!-- The sfxproj files add the license themselves. -->
<None Include="$(LicenseFile)"
PackagePath="$([System.IO.Path]::GetFileName('$(LicenseFile)'))"
Pack="true"
Condition="'$(MSBuildProjectExtension)' != '.sfxproj'" />
<None Include="$(PackageThirdPartyNoticesFile)"
PackagePath="$([System.IO.Path]::GetFileName('$(PackageThirdPartyNoticesFile)'))"
Pack="true" />
</ItemGroup>

<PropertyGroup>
<PackageDescription Condition="'$(PackageDescription)' == '' and '$(Description)' != ''">$(Description)</PackageDescription>
<RuntimePackageDisclaimer>Internal implementation package not meant for direct consumption. Please do not reference directly.</RuntimePackageDisclaimer>
<UseRuntimePackageDisclaimer Condition="'$(UseRuntimePackageDisclaimer)' == '' and
($(MSBuildProjectName.StartsWith('runtime.native')) or '$(PackageTargetRuntime)' != '')">true</UseRuntimePackageDisclaimer>
<PackageDescription Condition="'$(PackageDescription)' != '' and '$(UseRuntimePackageDisclaimer)' == 'true'">$(RuntimePackageDisclaimer) %0A$(PackageDescription)</PackageDescription>
<PackageDescription Condition="'$(PackageDescription)' == '' and '$(UseRuntimePackageDisclaimer)' == 'true'">$(RuntimePackageDisclaimer)</PackageDescription>
<!-- Keep in sync as required by the Packaging SDK in Arcade. -->
<Description>$(PackageDescription)</Description>
</PropertyGroup>

<!-- Remove when https://github.com/NuGet/Home/issues/10405 is implemented and consumed. -->
<Target Name="ErrorForMissingPackageDescription"
Condition="'$(IsPackable)' == 'true' and '$(PackageDescription)' == ''">
<Error Text="Required property 'PackageDescription' is missing for $(MSBuildProjectName)." />
</Target>

<!-- <GeneratePackage /> controls if a package should be created by clearing out <PackDependsOn />. -->
<Target Name="_OverridePackDependsOn"
Condition="'$(IsPackable)' == 'true' and
'$(GeneratePackage)' != 'true'">
<PropertyGroup>
<PackDependsOn />
</PropertyGroup>
</Target>
</Project>
2 changes: 1 addition & 1 deletion docs/coding-guidelines/project-guidelines.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ The following are the properties associated with each build pivot
- `$(TargetOS) -> Windows | Linux | OSX | FreeBSD | [defaults to running OS when empty]`
- `$(Configuration) -> Release | [defaults to Debug when empty]`
- `$(TargetArchitecture) - x86 | x64 | arm | arm64 | [defaults to x64 when empty]`
- `$(RuntimeOS) - win7 | osx10.10 | ubuntu.14.04 | [any other RID OS+version] | [defaults to running OS when empty]` See [RIDs](https://github.com/dotnet/runtime/tree/master/src/libraries/pkg/Microsoft.NETCore.Platforms) for more info.
- `$(RuntimeOS) - win7 | osx10.10 | ubuntu.14.04 | [any other RID OS+version] | [defaults to running OS when empty]` See [RIDs](https://github.com/dotnet/runtime/tree/master/src/libraries/Microsoft.NETCore.Platforms) for more info.

## Aggregate build properties
Each project will define a set of supported TargetFrameworks
Expand Down
2 changes: 1 addition & 1 deletion docs/design/features/DotNetCore-SharedPackageStore.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ The layout is composed from a list of package names and versions specified as xm
<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis" Version="1.3.2" />
<PackageReference Include="Microsoft.CodeAnalysis.VisualBasic" Version="1.3.2" />
<PackageReference Include=""Microsoft.CodeAnalysis.VisualBasic.Features" Version="1.3.2" />
<PackageReference Include="Microsoft.CodeAnalysis.VisualBasic.Features" Version="1.3.2" />
</ItemGroup>
</Project>
```
Expand Down
2 changes: 1 addition & 1 deletion docs/workflow/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ For Linux and macOS
```

For Windows:
```bat
```cmd
build.cmd
```

Expand Down
4 changes: 2 additions & 2 deletions docs/workflow/building/libraries/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

Here is one example of a daily workflow for a developer working mainly on the libraries, in this case using Windows:

```bat
```cmd
:: From root:
git clean -xdf
git pull upstream master & git push origin master
Expand Down Expand Up @@ -60,7 +60,7 @@ For Linux:
```

For Windows:
```bat
```cmd
./build.cmd -rc Release
```

Expand Down
6 changes: 3 additions & 3 deletions docs/workflow/building/mono/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ To build a complete runtime environment, you need to build both the Mono runtime
./build.sh --subset mono+libs
```
or on Windows,
```bat
```cmd
build.cmd -subset mono+libs
```
Note that the debug configuration is the default option. It generates a 'debug' output and that includes asserts, fewer code optimizations, and is easier for debugging. If you want to make performance measurements, or just want tests to execute more quickly, you can also build the 'release' version which does not have these checks by adding the flag `-configuration release` (or `-c release`).
Expand All @@ -28,7 +28,7 @@ Once you've built the complete runtime and assuming you want to work with just m
./build.sh --subset mono
```
or on Windows,
```bat
```cmd
build.cmd -subset mono
```
When the build completes, product binaries will be dropped in the `artifacts\bin\mono\<OS>.<arch>.<flavor>` folder.
Expand Down Expand Up @@ -69,7 +69,7 @@ To generate nuget packages:
./build.sh --subset mono -pack (with optional release configuration)
```
or on Windows,
```bat
```cmd
build.cmd -subset mono -pack (with optional release configuration)
```

Expand Down
2 changes: 1 addition & 1 deletion docs/workflow/requirements/windows-requirements.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ You must install several components to build the dotnet/runtime repository. Thes

## Enable Long Paths

The runtime repository requires long paths to be enabled. Follow [the instructions provided here](https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file#enable-long-paths-in-windows-10-version-1607-and-later) to enable that feature.
The runtime repository requires long paths to be enabled. Follow [the instructions provided here](https://docs.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation#enable-long-paths-in-windows-10-version-1607-and-later) to enable that feature.

If using Git for Windows you might need to also configure long paths there. Using an admin terminal simply type:
```cmd
Expand Down
2 changes: 1 addition & 1 deletion docs/workflow/testing/mono/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Before running tests, [build Mono](../../building/mono/README.md) using the desi
## Runtime Tests
### Desktop Mono:

To build the runtime tests for Mono JIT or interpreter, execute the following command from `$(REPO_ROOT)/src/tests`
To build the runtime tests for Mono JIT or interpreter, build CoreCLR and execute the following command from `$(REPO_ROOT)/src/tests`
```
./build.sh excludemonofailures <release|debug>
```
Expand Down
8 changes: 4 additions & 4 deletions docs/workflow/testing/using-corerun.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Consider that you already have a .NET application DLL called HelloWorld.dll and
(You could make such a DLL by using 'dotnet new' 'dotnet restore' 'dotnet build' in a 'HelloWorld' directory).

If you execute the following
```bat
```cmd
set PATH=%PATH%;%CoreCLR%\artifacts\tests\coreclr\windows.x64.Debug\Tests\Core_Root\
set CORE_LIBRARIES=%ProgramFiles%\dotnet\shared\Microsoft.NETCore.App\1.0.0
Expand Down Expand Up @@ -64,20 +64,20 @@ your new runtime.
When you execute 'runtime/src/tests/build.cmd' one of the things that it does is set up a directory where it
gathers the CoreCLR that has just been built with the pieces of the class library that tests need.
It places this runtime in the directory
```bat
```cmd
runtime\artifacts\tests\coreclr\<OS>.<Arch>.<BuildType>\Tests\Core_Root
```
off the CoreCLR Repository. The way the tests are expected to work is that you set the environment
variable CORE_ROOT to this directory
(you don't have to set CORE_LIBRARIES) and you can run any tests. For example after building the tests
(running src\tests\build from the repository base) and running 'src\tests\run') you can do the following

```bat
```cmd
set PATH=%PATH%;%CoreCLR%\artifacts\Product\windows.x64.Debug
set CORE_ROOT=%CoreCLR%\artifacts\tests\coreclr\windows.x64.Debug\Tests\Core_Root
```
sets you up so that corerun can run any of the test. For example
```bat
```cmd
corerun artifacts\tests\coreclr\windows.X64.Debug\GC\Features\Finalizer\finalizeio\finalizeio\finalizeio.exe
```
runs the finalizerio test.
8 changes: 4 additions & 4 deletions docs/workflow/testing/using-your-build.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ For another small walkthrough see [Dogfooding .NET SDK](https://github.com/dotne

At this point, you can create a new 'Hello World' program in the standard way.

```bat
```cmd
mkdir HelloWorld
cd HelloWorld
dotnet new console
Expand All @@ -57,7 +57,7 @@ For Windows you will want `win-x64`, for macOS `osx-x64` and `linux-x64` for Lin
Now is the time to publish. The publish step will trigger restore and build. You can iterate on build by calling `dotnet build` as
needed.

```bat
```cmd
dotnet publish
```

Expand Down Expand Up @@ -106,11 +106,11 @@ deploy your new bits. In a lot of cases it is easiest to just copy everything fr

You can build just the .NET Library part of the build by doing (debug, for release add 'release' qualifier)
(on Linux / OSX us ./build.sh)
```bat
```cmd
.\build skiptests skipnative
```
Which builds System.Private.CoreLib.dll if you modify C# code. If you wish to only compile the coreclr.dll you can do
```bat
```cmd
.\build skiptests skipmscorlib
```
Note that this technique does not work on .NET Apps that have not been published (that is you have not created
Expand Down
8 changes: 4 additions & 4 deletions docs/workflow/using-dotnet-cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ static void Main(string[] args)
Now is the time to publish. The publish step will trigger restore and build. You can iterate on build by calling `dotnet build` as
needed.

```bat
```cmd
dotnet publish
```

Expand Down Expand Up @@ -179,21 +179,21 @@ So the steps are:

### 1. Build the package again

```bat
```cmd
build.cmd clr+libs+host+packs -c release
```

If you only changed libraries, `build.cmd libs+host+packs -c release` is a little faster; if you only changed clr, then `build.cmd clr+host+packs -c release`

### 2. Delete your local package cache

```bat
```cmd
rd /s /q c:\localcache
```

### 3. Publish again

```bat
```cmd
dotnet publish
```

Expand Down
3 changes: 2 additions & 1 deletion eng/Build.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<Project>
<PropertyGroup>
<RestoreUseStaticGraphEvaluation>true</RestoreUseStaticGraphEvaluation>
<RestoreUseStaticGraphEvaluation>true</RestoreUseStaticGraphEvaluation>
<GenerateRestoreUseStaticGraphEvaluationBinlog>true</GenerateRestoreUseStaticGraphEvaluationBinlog>
</PropertyGroup>
<ItemGroup>
<ProjectToBuild Include="$(RepoRoot)Build.proj" />
Expand Down
Loading

0 comments on commit 6bc4d50

Please sign in to comment.