Skip to content

Commit

Permalink
Merge pull request #3 from KovtunovSergey/master
Browse files Browse the repository at this point in the history
base merge
  • Loading branch information
Fasjeit committed Oct 26, 2018
2 parents c3f754f + 895e89f commit 4b561af
Show file tree
Hide file tree
Showing 7,089 changed files with 273,870 additions and 184,986 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
5 changes: 5 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,8 @@
# Force bash scripts to always use lf line endings so that if a repo is accessed
# in Unix via a file share from Windows, the scripts will work.
*.sh text eol=lf

# Set linguist language for .h files explicitly based on
# https://github.com/github/linguist/issues/1626#issuecomment-401442069
# this only affects the repo's language statistics
*.h linguist-language=C
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ syntax: glob

# Tool Runtime Dir
/[Tt]ools/
.dotnet/
.packages/

# User-specific files
*.suo
Expand All @@ -12,6 +14,7 @@ syntax: glob
*.sln.docstates

# Build results
artifacts/
.idea/
[Dd]ebug/
[Dd]ebugPublic/
Expand Down Expand Up @@ -278,3 +281,6 @@ Session.vim
# Private test configuration and binaries.
config.ps1
**/IISApplications

# VS debug support files
launchSettings.json
1 change: 0 additions & 1 deletion BuildToolsVersion.txt

This file was deleted.

6 changes: 5 additions & 1 deletion CodeAnalysis.ruleset
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,8 @@
<Rule Id="CA5350" Action="Error" /> <!-- Do not use Weak/Broken cryptographic algorithms -->
<Rule Id="CA5351" Action="Error" />
</Rules>
</RuleSet>
<Rules AnalyzerId="Microsoft.AnalyzerPowerPack.CSharp" RuleNamespace="Microsoft.AnalyzerPowerPack.CSharp">
<!-- Disable analyzer warning 1821 until https://github.com/dotnet/roslyn-analyzers/issues/1804 is resolved -->
<Rule Id="CA1821" Action="None" />
</Rules>
</RuleSet>
412 changes: 412 additions & 0 deletions Directory.Build.props

Large diffs are not rendered by default.

185 changes: 185 additions & 0 deletions Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,185 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" InitialTargets="CheckForBuildTools" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

<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>
</PropertyGroup>

<Target Name="CheckForBuildTools">
<Error Condition="!Exists('$(ToolsDir)') and '$(OverrideToolsDir)'=='true'"
Text="The tools directory [$(ToolsDir)] does not exist. Please run sync in your repo to ensure the tools are installed before attempting to build an individual project." />
<Error Condition="!Exists('$(ToolsDir)') and '$(OverrideToolsDir)'!='true'"
Text="The tools directory [$(ToolsDir)] does not exist. Please run init-tools.cmd in your repo to ensure the tools are installed before attempting to build an individual project." />
</Target>

<Import Project="buildvertical.targets" />

<!-- Corefx-specific binplacing properties -->
<PropertyGroup>
<IsRuntimeAssembly Condition="'$(IsRuntimeAssembly)'=='' AND '$(IsReferenceAssembly)' != 'true' AND '$(BinPlaceRef)' != 'true' AND '$(IsTestProject)' != 'true'">true</IsRuntimeAssembly>
<!-- Try to determine if this is a simple library without a ref project.
https://github.com/dotnet/corefx/issues/14291 is tracking cleaning this up -->
<IsRuntimeAndReferenceAssembly Condition="'$(IsRuntimeAndReferenceAssembly)' == '' and '$(IsRuntimeAssembly)' == 'true' and Exists('$(SourceDir)/$(MSBuildProjectName)') and !Exists('$(SourceDir)/$(MSBuildProjectName)/ref') and !$(MSBuildProjectName.StartsWith('System.Private'))">true</IsRuntimeAndReferenceAssembly>
<IsNETCoreAppRef Condition="'$(IsNETCoreAppRef)' == ''">$(IsNETCoreApp)</IsNETCoreAppRef>
<IsUAPRef Condition="'$(IsUAPRef)' == ''">$(IsUAP)</IsUAPRef>
<IsNetFxNETStandardRef Condition="'$(IsNetFxNETStandardRef)' == ''">$(IsNetFxNETStandard)</IsNetFxNETStandardRef>

<BinPlaceRef Condition="'$(BinPlaceRef)' == '' And ('$(IsReferenceAssembly)' == 'true' OR '$(IsRuntimeAndReferenceAssembly)' == 'true')">true</BinPlaceRef>
<BinPlaceRuntime Condition="'$(BinPlaceRuntime)' == '' And ('$(IsRuntimeAssembly)' == 'true' OR '$(IsRuntimeAndReferenceAssembly)' == 'true')">true</BinPlaceRuntime>
<BinPlaceTest Condition="'$(BinPlaceTest)' == '' And '$(IsTestProject)' == 'true'">true</BinPlaceTest>
</PropertyGroup>

<ItemGroup Condition="'@(BinPlaceConfiguration)' == ''">
<!-- binplace to directories for the target vertical -->
<BinPlaceConfiguration Include="$(_bc_TargetGroup)-$(_bc_OSGroup)">
<RefPath>$(BuildConfigurationRefPath)</RefPath>
<RuntimePath>$(RuntimePath)</RuntimePath>
<!-- we want to bin place the test output into the working directory -->
<TestPath>$(TestPath)</TestPath>
</BinPlaceConfiguration>
<!-- binplace to directories for packages -->
<BinPlaceConfiguration Condition="'$(IsNETCoreApp)' == 'true' AND '$(BuildingNETCoreAppVertical)' == 'true'" Include="netcoreapp-$(_bc_OSGroup)">
<PackageFileRefPath Condition="'$(IsNETCoreAppRef)' == 'true'">$(NETCoreAppPackageRefPath)</PackageFileRefPath>
<PackageFileRuntimePath>$(NETCoreAppPackageRuntimePath)</PackageFileRuntimePath>
<RuntimePath Condition="'$(BinPlaceNETCoreAppPackage)' == 'true'">$(NETCoreAppPackageRuntimePath)\..\runtime</RuntimePath>
<RefPath Condition="'$(BinPlaceNETCoreAppPackage)' == 'true' AND '$(IsNETCoreAppRef)' == 'true'">$(RefRootPath)microsoft.netcore.app</RefPath>
<!-- enable trimming for any runtime project that's part of the shared framework and hasn't already set ILLinkTrimAssembly -->
<SetProperties Condition="'$(BinPlaceRuntime)' == 'true' AND '$(ILLinkTrimAssembly)' == ''">ILLinkTrimAssembly=true</SetProperties>
</BinPlaceConfiguration>
<BinPlaceConfiguration Condition="'$(IsNETCoreApp)' == 'true' AND '$(BuildingNETCoreAppVertical)' == 'true'" Include="netcoreappaot-$(_bc_OSGroup)">
<PackageFileRuntimePath>$(NETCoreAppAotPackageRuntimePath)</PackageFileRuntimePath>
<!-- enable trimming for any runtime project that's part of the shared framework and hasn't already set ILLinkTrimAssembly -->
<SetProperties Condition="'$(BinPlaceRuntime)' == 'true' AND '$(ILLinkTrimAssembly)' == ''">ILLinkTrimAssembly=true</SetProperties>
</BinPlaceConfiguration>
<BinPlaceConfiguration Condition="'$(IsUAPRef)'=='true' AND ('$(BuildingUAPVertical)' == 'true' OR '$(BuildingUAPAOTVertical)' == 'true')" Include="uap-$(_bc_OSGroup)">
<PackageFileRefPath>$(UAPPackageRefPath)</PackageFileRefPath>
</BinPlaceConfiguration>
<BinPlaceConfiguration Condition="'$(IsUAP)' == 'true' AND '$(BuildingUAPVertical)' == 'true'" Include="uap-$(_bc_OSGroup)">
<PackageFileRuntimePath>$(UAPPackageRuntimePath)</PackageFileRuntimePath>
</BinPlaceConfiguration>
<BinPlaceConfiguration Condition="'$(IsUAP)' == 'true' AND '$(BuildingUAPAOTVertical)' == 'true'" Include="uapaot-$(_bc_OSGroup)">
<PackageFileRuntimePath>$(UAPAOTPackageRuntimePath)</PackageFileRuntimePath>
</BinPlaceConfiguration>

<!-- Setup the shared framework directory for testing -->
<BinPlaceConfiguration Condition="'$(BinPlaceTestSharedFramework)' == 'true'" Include="netcoreapp-$(_bc_OSGroup)">
<RuntimePath>$(NETCoreAppTestSharedFrameworkPath)</RuntimePath>
</BinPlaceConfiguration>
<!-- Setup the ILCInputFolder directory for testing aot -->
<BinPlaceConfiguration Condition="'$(BinPlaceILCInputFolder)' == 'true'" Include="uapaot-$(_bc_OSGroup)">
<RuntimePath>$(ILCFXInputFolder)</RuntimePath>
</BinPlaceConfiguration>
<BinPlaceConfiguration Condition="'$(BinPlaceILCInputFolder)' == 'true'" Include="netcoreappaot-$(_bc_OSGroup)">
<RuntimePath>$(ILCFXInputFolder)</RuntimePath>
</BinPlaceConfiguration>
<!-- And the UAP folder for the F5 (CoreCLR UAP-debugging) scenario -->
<BinPlaceConfiguration Condition="'$(BinPlaceUAPFramework)' == 'true'" Include="uap-$(_bc_OSGroup)">
<RuntimePath>$(UAPTestSharedFrameworkPath)</RuntimePath>
</BinPlaceConfiguration>
<BinPlaceConfiguration Condition="'$(BinPlaceNETFXRuntime)' == 'true'" Include="netfx-$(_bc_OSGroup)">
<RuntimePath>$(TestHostRootPath)</RuntimePath>
</BinPlaceConfiguration>

<!-- binplace netstandard test suite -->
<BinPlaceConfiguration Condition="'$(BuildingNETStandardVertical)' == 'true' AND '$(IsTestProject)' == 'true'" Include="netstandard-$(_bc_OSGroup)">
<TestPath>$(NETStandardTestSuiteOutputPath)$(AssemblyName)/</TestPath>
</BinPlaceConfiguration>

<!-- binplace targeting packs which may be different from BuildConfiguration -->
<BinPlaceConfiguration Include="netstandard">
<RefPath>$(RefRootPath)netstandard/</RefPath>
</BinPlaceConfiguration>
<!-- some libraries that produce packages will remain targeting netcoreapp2.0 -->
<BinPlaceConfiguration Condition="'$(BuildingNETCoreAppVertical)' == 'true'" Include="netcoreapp2.0">
<RefPath>$(RefRootPath)netcoreapp2.0/</RefPath>
</BinPlaceConfiguration>
<BinPlaceConfiguration Include="netcoreapp2.0-Windows_NT">
<RuntimePath>$(ShimsTargetRuntimeRoot)netcoreapp2.0/</RuntimePath>
</BinPlaceConfiguration>
<!-- some libraries that produce packages will remain targeting uap10.0.16299 -->
<BinPlaceConfiguration Condition="'$(BuildingUAPVertical)' == 'true' OR '$(BuildingUAPAOTVertical)' == 'true'" Include="uap10.0.16299">
<RefPath>$(RefRootPath)uap10.0.16299/</RefPath>
</BinPlaceConfiguration>
<!-- for BuildAllConfigurations make sure all refpaths are created. -->
<_TargetGroupsWithIsAot Condition="'$(BuildAllConfigurations)' == 'true'" Include="@(TargetGroups)">
<IsAot>$([System.String]::new('%(Identity)').Contains('aot'))</IsAot>
</_TargetGroupsWithIsAot>
<BinPlaceConfiguration Condition="'$(BuildAllConfigurations)' == 'true'"
Include="@(_TargetGroupsWithIsAot->WithMetadataValue('IsAot', 'false'))">
<RefPath>$(RefRootPath)%(Identity)/</RefPath>
</BinPlaceConfiguration>
</ItemGroup>

<PropertyGroup Condition="'$(BlockStable)' == 'true'">
<!--
If BlockStable is set to true then always include the label and build number in the package version.
This needs to be set before we import packaging.targets which comes in the Build.Common.targets.
-->
<IncludePreReleaseLabelInPackageVersion>true</IncludePreReleaseLabelInPackageVersion>
<IncludeBuildNumberInPackageVersion>true</IncludeBuildNumberInPackageVersion>
</PropertyGroup>

<Import Project="$(ToolsDir)/Build.Common.targets" Condition="Exists('$(ToolsDir)/Build.Common.targets')" />

<Import Project="$(ProjectDir)artifacts\toolset\Common\Tools.proj.nuget.g.targets" Condition="Exists('$(ProjectDir)artifacts\toolset\Common\Tools.proj.nuget.g.targets')" />

<!-- permit a wrapping build system to contribute targets to this build -->
<Import Condition="Exists('$(MSBuildThisFileDirectory)..\open.targets')" Project="$(MSBuildThisFileDirectory)..\open.targets" />

<Import Project="$(MSBuildThisFileDirectory)referenceFromRuntime.targets" />
<Import Project="$(MSBuildThisFileDirectory)illink.targets" />

<ItemGroup Condition="'$(NuGetTargetMoniker)'=='.NETStandard,Version=v1.7'">
<!-- Temporarily suppress the message until we get a nuget version that knows about the mapping between netstandard1.7 and uapvNext -->
<SuppressPackageTargetFrameworkCompatibility Include="$(UAPvNextTFM)" />
</ItemGroup>

<!--
Import Test SDK props and targets.
This needs to happen here as the IsInvokableTestProject prop is required
which isn't available before Directory.Build.targets.
TODO: Fix VB test project reference to Test SDK.
-->
<Import Condition="'$(IncludeVSTestReferences)' == 'true' AND Exists('$(PackagesDir)\microsoft.net.test.sdk\$(MicrosoftDotNetTestSdkVersion)\buildMultiTargeting\Microsoft.Net.Test.Sdk.props') AND '$(Language)' != 'VB'" Project="$(PackagesDir)\microsoft.net.test.sdk\$(MicrosoftDotNetTestSdkVersion)\buildMultiTargeting\Microsoft.Net.Test.Sdk.props" />
<Import Condition="'$(IncludeVSTestReferences)' == 'true' AND Exists('$(PackagesDir)\microsoft.net.test.sdk\$(MicrosoftDotNetTestSdkVersion)\build\netcoreapp1.0\Microsoft.Net.Test.Sdk.targets') AND ('$(BuildingNETCoreAppVertical)' == 'true' OR '$(BuildingNETFxVertical)' == 'true') AND '$(Language)' != 'VB'" Project="$(PackagesDir)\microsoft.net.test.sdk\$(MicrosoftDotNetTestSdkVersion)\build\netcoreapp1.0\Microsoft.Net.Test.Sdk.targets" />

<Target Name="ProducesPackageId"
Returns="@(PackageIds)">
<ItemGroup>
<PackageIds Include="$(Id)" />
</ItemGroup>
</Target>

<Target Name="ReportConfigurationErrorMessage"
BeforeTargets="AssignProjectConfiguration"
Condition="'$(BuildConfigurations)' != ''" >
<Message Importance="Low" Text="$(MSBuildProjectFullPath), C: $(Configuration) BC: $(BuildConfiguration) BCs: $(BuildConfigurations)" />
<Message Importance="High" Condition="'$(ConfigurationErrorMsg)' != ''" Text="$(MSBuildProjectFullPath) ConfigurationErrorMessage: $(ConfigurationErrorMsg)" />
</Target>

<Target Name="GenerateReferenceSource">
<PropertyGroup>
<_GenApiExePath>$(ToolsDir)GenApi.exe</_GenApiExePath>
<_RefSourceFileOutputPath>$(MSBuildProjectDirectory)/../ref/$(AssemblyName).cs</_RefSourceFileOutputPath>
<_ExcludeAPIList>$(MSBuildThisFileDirectory)tools-local/DefaultGenApiDocIds.txt</_ExcludeAPIList>
<_LicenseHeaderTxtPath>$(MSBuildThisFileDirectory)tools-local/LicenseHeader.txt</_LicenseHeaderTxtPath>
</PropertyGroup>

<PropertyGroup>
<_GenAPICmd>$(DotnetToolCommand) $(_GenApiExePath)</_GenAPICmd>
<_GenAPICmd>$(_GenAPICmd) -assembly:@(IntermediateAssembly)</_GenAPICmd>
<_GenAPICmd>$(_GenAPICmd) -libPath:$(RefPath)</_GenAPICmd>
<_GenAPICmd>$(_GenAPICmd) -out:$(_RefSourceFileOutputPath)</_GenAPICmd>
<_GenAPICmd>$(_GenAPICmd) -excludeAttributesList:$(_ExcludeAPIList)</_GenAPICmd>
<_GenAPICmd>$(_GenAPICmd) -headerFile:$(_LicenseHeaderTxtPath)</_GenAPICmd>
</PropertyGroup>

<Exec Command="$(_GenAPICmd)" />
<Message Text="Generated reference assembly source code: $(_RefSourceFileOutputPath)" />
</Target>

</Project>
5 changes: 3 additions & 2 deletions Documentation/architecture/cross-platform-cryptography.md
Original file line number Diff line number Diff line change
Expand Up @@ -244,8 +244,9 @@ The LocalMachine\My store is System.keychain.
The CurrentUser\Root store on macOS is an interpretation of the SecTrustSettings results for the user trust domain.
The LocalMachine\Root store on macOS is an interpretation of the SecTrustSettings results for the admin and system trust domains.
The CurrentUser\Disallowed and LocalMachine\Disallowed stores are interpretations of the appropriate SecTrustSettings results for certificates whose trust is set to Always Deny.
Keychain creation on macOS requires more input than is captured with the X509Store API, so attempting to create a new store will fail with a `PlatformNotSupportedException`.
If a keychain is opened by P/Invoke to SecKeychainOpen, the resulting `IntPtr` can be passed to `new X509Store(IntPtr)` to obtain a read/write-capable store (subject to the current user's permissions).
Custom store creation on macOS with the X509Store API is supported only for CurrentUser location. It will create a new keychain with no password in the user's keychain
directory (~/Library/Keychains). To create a keychain with password a P/Invoke to SecKeychainCreate could be used. Similarly, SecKeychainOpen could be used to open keychains
in different locations. The resulting `IntPtr` can be passed to `new X509Store(IntPtr)` to obtain a read/write-capable store (subject to the current user's permissions).

### X509Chain

Expand Down
2 changes: 1 addition & 1 deletion Documentation/architecture/globalization-invariant-mode.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Globalization support has the following potential challenges for applications:
* Different behavior across OSes (and potentially OS versions).
* Installing/carrying the [ICU](http://icu-project.org) package on Linux (~28 MB).

Note: On Linux, .NET Core relies on globalization data from ICU. For example, [.NET Core Linux Docker images](https://github.com/dotnet/dotnet-docker/blob/master/2.0/runtime-deps/stretch/Dockerfile) install this component. Globalization data is available on Windows and macOS as part of their base installs.
Note: On Linux, .NET Core relies on globalization data from ICU. For example, [.NET Core Linux Docker images](https://github.com/dotnet/dotnet-docker/blob/master/2.0/runtime-deps/stretch/amd64/Dockerfile) install this component. Globalization data is available on Windows and macOS as part of their base installs.

## Cultures and culture data

Expand Down
2 changes: 1 addition & 1 deletion Documentation/building/advanced-inner-loop-testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

This tutorial describes how to build and run application code that targets self-compiled .NET Core binaries without using Visual Studio, the .NET Core SDK Host (`dotnet.exe`) or a project file (e.g. `csproj`). Follow these steps to quickly validate changes you've made in the product e.g. by running benchmarks or tests on it.

If you are on Windows you currently need to use the `Developer Command Prompt for VS 2017` to build corefx/coreclr! For the sake of completeness, we have placed our repositories under `d:\git\`.
For the sake of completeness, we have placed our repositories under `d:\git\`.

## Compile corefx with self-compiled coreclr binaries
If you've made changes to coreclr make sure to also build it and pass its binaries to corefx.
Expand Down
Loading

0 comments on commit 4b561af

Please sign in to comment.