You've already forked linux-packaging-mono
Imported Upstream version 5.2.0.175
Former-commit-id: bb0468d0f257ff100aa895eb5fe583fb5dfbf900
This commit is contained in:
parent
4bdbaf4a88
commit
966bba02bb
@@ -32,6 +32,7 @@
|
||||
<!-- Remove duplicate directories by batching over them -->
|
||||
<_DependencyDirectories Include="%(_DependencyDirectoriesTemp.Identity)" />
|
||||
<_ContractDependencyDirectories Include="@(ResolvedMatchingContract->'%(RootDir)%(Directory)')" />
|
||||
<_ContractDependencyDirectories Include="$(ContractOutputPath)" />
|
||||
</ItemGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
|
||||
@@ -23,10 +23,12 @@
|
||||
|
||||
<!-- Platform detection -->
|
||||
<PropertyGroup>
|
||||
<OsEnvironment Condition="'$(OsEnvironment)'=='' AND '$(OS)'=='Unix' AND Exists('/Applications')">OSX</OsEnvironment>
|
||||
<OsEnvironment Condition="'$(OsEnvironment)'=='' AND '$(OS)'=='Unix'">Linux</OsEnvironment>
|
||||
<OsEnvironment Condition="'$(OsEnvironment)'==''">$(OS)</OsEnvironment>
|
||||
<RunningOnUnix Condition="'$(OS)' != 'Windows_NT'">true</RunningOnUnix>
|
||||
<DefaultOSGroup Condition="'$(OS)'=='Unix' AND Exists('/Applications')">OSX</DefaultOSGroup>
|
||||
<DefaultOSGroup Condition="'$(DefaultOSGroup)'=='' AND '$(OS)'=='Unix'">Linux</DefaultOSGroup>
|
||||
<DefaultOSGroup Condition="'$(DefaultOSGroup)'==''">$(OS)</DefaultOSGroup>
|
||||
<RunningOnUnix Condition="'$(OS)'!='Windows_NT'">true</RunningOnUnix>
|
||||
|
||||
<RunningOnCore Condition="'$(MSBuildRuntimeType)' == 'core'">true</RunningOnCore>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- Common BuildTools properties -->
|
||||
@@ -35,11 +37,13 @@
|
||||
<ToolRuntimePath Condition="'$(ToolRuntimePath)'=='' and '$(ProjectDir)'!=''">$(ProjectDir)Tools/</ToolRuntimePath>
|
||||
<ToolsDir Condition="'$(ToolsDir)'==''">$(MSBuildThisFileDirectory)</ToolsDir>
|
||||
<DotnetCliPath Condition="'$(DotnetCliPath)'==''">$(ToolRuntimePath)dotnetcli/</DotnetCliPath>
|
||||
<OverrideToolHost>$(DotnetCliPath)dotnet</OverrideToolHost>
|
||||
<BuildToolsTaskDir Condition="'$(MSBuildRuntimeType)'!='core'">$(ToolsDir)net45/</BuildToolsTaskDir>
|
||||
<BuildToolsTaskDir Condition="'$(MSBuildRuntimeType)'=='core'">$(ToolsDir)</BuildToolsTaskDir>
|
||||
<OverrideToolHost Condition="'$(RunningOnUnix)' == 'true'">$(DotnetCliPath)dotnet</OverrideToolHost>
|
||||
<OverrideToolHost Condition="'$(RunningOnUnix)' != 'true'">$(DotnetCliPath)dotnet.exe</OverrideToolHost>
|
||||
<BuildToolsTaskDir Condition="'$(RunningOnCore)'!='true'">$(ToolsDir)net46/</BuildToolsTaskDir>
|
||||
<BuildToolsTaskDir Condition="'$(RunningOnCore)'=='true'">$(ToolsDir)</BuildToolsTaskDir>
|
||||
<UseRoslynCompilers Condition="'$(UseRoslynCompilers)'=='' and '$(RunningOnUnix)'=='true'">false</UseRoslynCompilers>
|
||||
<UseSharedCompilation Condition="'$(UseSharedCompilation)' == '' and '$(RunningOnUnix)' != 'true' and '$(UseRoslynCompilers)' != 'false'">true</UseSharedCompilation>
|
||||
<GenFacadesIgnoreBuildAndRevisionMismatch>true</GenFacadesIgnoreBuildAndRevisionMismatch>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- Setting IsTestProject prior to Build.Common.targets -->
|
||||
|
||||
306
external/corefx/Tools-Override/Build.Common.targets
vendored
Normal file
306
external/corefx/Tools-Override/Build.Common.targets
vendored
Normal file
@@ -0,0 +1,306 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" InitialTargets="CheckDesignTime">
|
||||
|
||||
<PropertyGroup>
|
||||
<BuildToolsTaskDir Condition="'$(BuildToolsTaskDir)' == ''">$(ToolsDir)</BuildToolsTaskDir>
|
||||
|
||||
<!-- A number of the imports below depend on these default properties -->
|
||||
<AssemblyVersion Condition="'$(AssemblyVersion)'==''">999.999.999.999</AssemblyVersion>
|
||||
<CLSCompliant Condition="'$(CLSCompliant)'=='' and '$(IsTestProject)'=='true'">false</CLSCompliant>
|
||||
<CLSCompliant Condition="'$(CLSCompliant)'==''">true</CLSCompliant>
|
||||
|
||||
<!--
|
||||
Check if the project has been localized by looking for the existence of the .de.xlf file. By convention, we assume that if
|
||||
a project is localized in German, then it is localized in all languages.
|
||||
-->
|
||||
<ExcludeLocalizationImport Condition="'$(ExcludeLocalizationImport)'=='' And !Exists('$(MSBuildProjectDirectory)/MultilingualResources/$(MSBuildProjectName).de.xlf')">true</ExcludeLocalizationImport>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- used by test projects that need to copy supplemental content to the output directory -->
|
||||
<ItemDefinitionGroup Condition="'$(IsTestProject)'=='true'">
|
||||
<SupplementalTestData>
|
||||
<DestinationDir />
|
||||
</SupplementalTestData>
|
||||
</ItemDefinitionGroup>
|
||||
|
||||
<!-- Assembly metadata indicating that an assembly is a framework (as opposed to user) assembly:
|
||||
Test projects need to not have this because of the way "IsFrameworkAssembly" APIs work to check this. -->
|
||||
<ItemGroup Condition="'$(IsDotNetFrameworkProductAssembly)' == 'true' AND '$(IsTestProject)' != 'true'" >
|
||||
<AssemblyMetadata Include=".NETFrameworkAssembly">
|
||||
<Value></Value>
|
||||
</AssemblyMetadata>
|
||||
<AssemblyMetadata Include="Serviceable">
|
||||
<Value>True</Value>
|
||||
</AssemblyMetadata>
|
||||
</ItemGroup>
|
||||
|
||||
<!--
|
||||
Import the provides support for EnsureBuildToolsRuntime target which will restore a .NET Core based
|
||||
runtime and setup a $(ToolRuntimePath) and $(ToolHost) for others to consume.
|
||||
|
||||
This must be imported before any tools that need to use it are imported.
|
||||
-->
|
||||
<Import Project="$(MSBuildThisFileDirectory)toolruntime.targets" Condition="'$(ExcludeToolRuntimeImport)' != 'true'"/>
|
||||
|
||||
<!--
|
||||
Import the reference assembly targets
|
||||
|
||||
This must be imported early because it modifies OutputPath and IntermediateOutputPath
|
||||
used by other targets
|
||||
|
||||
Depends on Properties:
|
||||
AssemblyVersion - Needed to determine API version used in
|
||||
IsReferenceAssembly - Set if the project is in the ref assm path
|
||||
|
||||
Sets Properties:
|
||||
APIVersion - Major.Minor assembly version for the project
|
||||
-->
|
||||
<Import Project="$(MSBuildThisFileDirectory)ReferenceAssemblies.targets" Condition="'$(ExcludeReferenceAssembliesImport)'!='true'" />
|
||||
|
||||
<!--
|
||||
Import the codeAnalysis.targets file to enable analyzer support during build.
|
||||
This should happen before we import the frameworkTargeting.targets because that import leads to computing a default
|
||||
for the CodeAnalysisRuleset unless one is already specified
|
||||
-->
|
||||
<Import Project="$(MSBuildThisFileDirectory)codeAnalysis.targets" />
|
||||
|
||||
<!--
|
||||
Import the codeOptimization.targets file to enable profile guided code optimization for managed assemblies.
|
||||
-->
|
||||
<Import Project="$(MSBuildThisFileDirectory)codeOptimization.targets" />
|
||||
|
||||
<!--
|
||||
Import the Symbols.targets file to provide access to Symbol Server index/archive tooling.
|
||||
-->
|
||||
<Import Project="$(MSBuildThisFileDirectory)Symbols.targets" />
|
||||
|
||||
<!--
|
||||
Import the default target framework targets.
|
||||
|
||||
Inputs:
|
||||
TargetFrameworkIdentifier - If not set defaults to .NETPortable
|
||||
TargetFrameworkVersion - If not set defaults to v4.5
|
||||
TargetFrameworkProfile - If not set defaults to Profile7
|
||||
|
||||
This Imports portable.csharp/visualbasic.targets if .NETPortable is the identifier otherwise it imports csharp/visualbasic.targets
|
||||
-->
|
||||
<Import Project="$(MSBuildThisFileDirectory)FrameworkTargeting.targets" Condition="'$(ExcludeFrameworkTargetingImport)'!='true'" />
|
||||
|
||||
<!--
|
||||
Import the default assembly info generation targets
|
||||
|
||||
Inputs:
|
||||
GenerateAssemblyInfo - Controls whether or not to generate the assembly info file and defaults to true if not set.
|
||||
AssemblyVersion - If not set defaults to 1.0.0.0 but it is expected to be set in csproj files.
|
||||
CLSCompliant - If not set defaults to true and if it is true then adds the assembly level CLSCompliant(true) attribute.
|
||||
|
||||
File Version Inputs:
|
||||
MajorVersion - If not set defaults to 1.
|
||||
MinorVersion - If not set defaults to 0.
|
||||
BuildNumberMajor - If not set defaults to 0.
|
||||
BuildNumberMinor - If not set defaults to 0.
|
||||
AssemblyFileVersion - If not set defaults to $(MajorVersion).$(MinorVersion).$(BuildNumberMajor).$(BuildNumberMinor).
|
||||
|
||||
BuildNumberTarget - If this property is set it will try to import the file which allows for it to override the properties above.
|
||||
-->
|
||||
<Import Project="$(MSBuildThisFileDirectory)versioning.targets" Condition="'$(ExcludeVersioningImport)'!='true'" />
|
||||
|
||||
<Import Project="$(MSBuildThisFileDirectory)Packaging.targets" Condition="'$(ExcludePackagingImport)'!='true' AND '$(MSBuildProjectExtension)' == '.pkgproj'" />
|
||||
|
||||
<!-- Task to detect the TestNugetRuntimeId of a platform. This target is here to allow both the test build and sync steps to use
|
||||
the same property for asset selection.
|
||||
-->
|
||||
<UsingTask TaskName="GetTargetMachineInfo" AssemblyFile="$(BuildToolsTaskDir)Microsoft.DotNet.Build.Tasks.dll"/>
|
||||
<Target Name="GetDefaultTestRid">
|
||||
<GetTargetMachineInfo>
|
||||
<Output TaskParameter="RuntimeIdentifier" PropertyName="DefaultTestNugetRuntimeId" />
|
||||
</GetTargetMachineInfo>
|
||||
<!-- On Windows, we always use win7-x64 as the default test RID because the build context,
|
||||
usually 32-bit full-framework MSBuild, is not a good default test context. -->
|
||||
<PropertyGroup>
|
||||
<DefaultTestNugetRuntimeId Condition="$(DefaultTestNugetRuntimeId.StartsWith('win'))">win7-x64</DefaultTestNugetRuntimeId>
|
||||
<TestArchitecture Condition="'$(TestArchitecture)' == ''">x64</TestArchitecture>
|
||||
<TestNugetRuntimeId Condition="'$(TestNugetRuntimeId)' == '' And '$(TestArchitecture)'=='x86'">win7-x86</TestNugetRuntimeId>
|
||||
<TestNugetRuntimeId Condition="'$(TestNugetRuntimeId)' == ''">$(DefaultTestNugetRuntimeId)</TestNugetRuntimeId>
|
||||
</PropertyGroup>
|
||||
</Target>
|
||||
|
||||
<PropertyGroup>
|
||||
<ResolvePkgProjReferencesDependsOn>GetDefaultTestRid;$(ResolvePkgProjReferencesDependsOn)</ResolvePkgProjReferencesDependsOn>
|
||||
</PropertyGroup>
|
||||
|
||||
<!--
|
||||
Import the default package restore and resolve targets
|
||||
|
||||
Inputs:
|
||||
ProjectJson - If not set defaults to $(MSBuildProjectDirectory)\project.json
|
||||
RestorePackages - If not set defaults to the existence of the $(ProjectJson)
|
||||
ResolveNuGetPackages - If not set defaults to the existance of $(ProjectJson)
|
||||
|
||||
Depends on properties:
|
||||
NugetRestoreCommand - Used to restore the project packages from packages.config
|
||||
DnuRestoreCommand - Used to restore the project packages from project.json
|
||||
PackagesDir - Packages are restored to and resolved from this location
|
||||
|
||||
Depends on properties set by csharp/visualbasic.targets so needs to be imported after.
|
||||
-->
|
||||
<Import Project="$(MSBuildThisFileDirectory)packageresolve.targets" Condition="'$(ExcludePackageResolveImport)'!='true'" />
|
||||
|
||||
<!--
|
||||
Import the optional tooling restore and resolve targets
|
||||
|
||||
Inputs:
|
||||
OptionalToolSource - If not set, optional tools are not restored
|
||||
OptionalToolSourceUser - If not set, no authentication is used to access the feed
|
||||
OptionalToolSourcePassword - If not set, no authentication is used to access the feed
|
||||
|
||||
Depends on properties:
|
||||
DnuRestoreCommand - Used to restore the optional tool packages
|
||||
PackagesDir - Location to resolve optional tool package assets
|
||||
ToolsDir - Location to find optional-tool-runtime project.json
|
||||
-->
|
||||
<Import Project="$(MSBuildThisFileDirectory)OptionalTooling.targets" />
|
||||
|
||||
<!--
|
||||
Import the partial facade generation targets
|
||||
|
||||
Inputs:
|
||||
GeneratePlatformNotSupportedAssembly - Determines wether to generate not-supported API for this assembly
|
||||
-->
|
||||
<Import Project="$(MSBuildThisFileDirectory)notsupported.targets" Condition="'$(ExcludePartialFacadesImport)' != 'true'"/>
|
||||
|
||||
<!--
|
||||
Import the default SR resource generation targets
|
||||
|
||||
Inputs:
|
||||
ResourcesSourceOutputDirectory - If not set defaults to $(MSBuildProjectDirectory)\Resources.
|
||||
StringResourcesPath - If not set defaults to $(ResourcesSourceOutputDirectory\Strings.resx if it exists. If the file exists
|
||||
then the targets generates the strongly typed $(ResourcesSourceOutputDirectory)\SR.cs/vb file based on resource strings.
|
||||
OmitResources - If set to true will skip resource inclusion even if StringResourcesPath exists.
|
||||
-->
|
||||
<Import Project="$(MSBuildThisFileDirectory)resources.targets" Condition="'$(ExcludeResourcesImport)'!='true'" />
|
||||
|
||||
<!--
|
||||
Import the localization target
|
||||
-->
|
||||
<Import Project="$(MSBuildThisFileDirectory)localization.targets" Condition="'$(ExcludeLocalizationImport)'!='true'" />
|
||||
|
||||
<!--
|
||||
Import the partial facade generation targets
|
||||
|
||||
Inputs:
|
||||
IsPartialFacadeAssembly - Determines whether the partial facade generation targets will be as a post-processing step on the
|
||||
assembly. Also invokes special logic for determining References.
|
||||
-->
|
||||
<Import Project="$(MSBuildThisFileDirectory)partialfacades.targets" Condition="'$(ExcludePartialFacadesImport)' != 'true'"/>
|
||||
|
||||
<!-- Import the ApiCompat targets. -->
|
||||
<Import Project="$(MSBuildThisFileDirectory)ApiCompat.targets" />
|
||||
|
||||
<!--
|
||||
Import the contract resolution targets
|
||||
|
||||
Inputs:
|
||||
AssemblyName - Needed to determine which contract name to map to
|
||||
AssemblyVersion - Needed to determine which contract version to map to
|
||||
-->
|
||||
<Import Project="$(MSBuildThisFileDirectory)resolveContract.targets" Condition="'$(ExcludeResolveContractImport)' != 'true'"/>
|
||||
<!--
|
||||
Import the default signing targets which will setup the authenticode properties and do OpenSourceSigning
|
||||
|
||||
Inputs:
|
||||
SkipSigning - For projects that want to opt-out of strong name signing the can set this to true.
|
||||
-->
|
||||
<Import Project="$(MSBuildThisFileDirectory)sign.targets" Condition="'$(ExcludeSigningImport)'!='true'" />
|
||||
|
||||
<!--
|
||||
Import the tests.targets which controls the publishing and running of the tests, including code coverage options.
|
||||
|
||||
Inputs:
|
||||
RunTestsForProject - Usually set at the project level to disable the tests for a single project.
|
||||
CoverageEnabledForProject - Usually set at the project level to disable code coverage for a single project.
|
||||
SkipTests - Usually set at the root level for builds that want to disable all the tests.
|
||||
ProjectJson - If not set defaults to $(MSBuildProjectDirectory)\project.json
|
||||
CopyTestToTestDirectory - If not set defaults to $(IsTestProject)
|
||||
|
||||
Depends on Properties:
|
||||
TestPath - Controls the root path from where the test assets are published and run from.
|
||||
NugetRestoreCommand - Used to restore the test runtime package
|
||||
DnuRestoreCommand - Used to restore the project packages from project.json
|
||||
PackagesDir - Packages are restored to and resolved from this location
|
||||
-->
|
||||
<Import Project="$(MSBuildThisFileDirectory)tests.targets" Condition="'$(IsTestProject)'=='true' and '$(ExcludeTestsImport)'!='true'"/>
|
||||
|
||||
<!--
|
||||
Import the PackageLibs.targets which exposes targets from library projects to report what
|
||||
assets they contribute to nuget packages.
|
||||
Inputs:
|
||||
PackageTargetFramework - Target moniker to use for harvested dependencies.
|
||||
If PackageTargetPath is not set, PackageTargetPath will be constructed
|
||||
based on PackageTargetFramework.
|
||||
|
||||
Optional Inputs:
|
||||
PackageSourcePath - Source path to the built output to be packaged, default is $(TargetPath)
|
||||
Can be overridden.
|
||||
IsReferenceAssembly - true if this project is a reference assembly.
|
||||
PackageTargetPath - Destination subpath in the package at which all assets from this project
|
||||
should be located. Default is lib\$(PackageTargetFramework) for implementation
|
||||
assemblies, ref\$(PackageTargetFramework) for reference assemblies. Can be
|
||||
overridden. When overridding also override PackageTargetFramework.
|
||||
PackageTargetRuntime - Runtime id to use for harvested dependencies, default is none.
|
||||
Can be overridden. If PackageTargetRuntime is overridden and PackageTargetPath
|
||||
is not, PackageTargetPath will be constructed based on PackageTargetRuntime.
|
||||
@(PackageDestination) - List of items with TargetFramework metadata that represent destination
|
||||
subpaths in the package at which all assets from this project should be
|
||||
located. When specified takes precedence over PackageTargetPath &
|
||||
PackageTargetFramework.
|
||||
DocumentationFile - location of xml doc produced by this project.
|
||||
XmlDocFileRoot - location to pre-authored localized xml doc files
|
||||
PackageIncludeDocs - true to include the docs next to this project's ouput. Default
|
||||
is true for reference assemblies, false for implementation.
|
||||
-->
|
||||
<Import Project="$(MSBuildThisFileDirectory)PackageLibs.targets" Condition="'$(ExcludePackageLibsImport)'!='true'"/>
|
||||
|
||||
<Target Name="CheckDesignTime">
|
||||
<!--
|
||||
Visual Studio does a number of background builds to do a variety of tasks such as resolving references and preparing for intellisense.
|
||||
These are called "design time" builds. You can only determine this state within a target as the properties VS sets are added at build time.
|
||||
|
||||
To see design time logs set TRACEDESIGNTIME=true before launching Visual Studio. Logs will go to %TEMP%.
|
||||
|
||||
Note that the existing $(DesignTimeBuild) is not set for all background builds.
|
||||
-->
|
||||
<PropertyGroup>
|
||||
<VSDesignTimeBuild Condition="'$(BuildingInsideVisualStudio)'=='true' and '$(BuildingOutOfProcess)'=='false'">true</VSDesignTimeBuild>
|
||||
</PropertyGroup>
|
||||
</Target>
|
||||
|
||||
<!--
|
||||
import the MicroBuild boot-strapper project (only relevant for shipping binaries)
|
||||
NOTE: we import this at the end as it will override some dummy targets (e.g. SignFiles)
|
||||
-->
|
||||
<Import Project="$(MSBuildThisFileDirectory)MicroBuild.Core.targets" Condition="'$(IsTestProject)'!='true' and '$(SignType)' != 'oss'" />
|
||||
|
||||
<!--
|
||||
Providing a definition for __BlockReflectionAttribute in an assembly is a signal to the .NET Native toolchain
|
||||
to remove the metadata for all non-public APIs. This both reduces size and disables private reflection on those
|
||||
APIs in libraries that include this. The attribute can also be applied to individual public APIs to similarly block them.
|
||||
-->
|
||||
<PropertyGroup>
|
||||
<BlockReflectionAttribute Condition="'$(BlockReflectionAttribute)' == '' and '$(UWPCompatible)' == 'true' and '$(IsTestProject)' != 'true'">true</BlockReflectionAttribute>
|
||||
<BlockReflectionAttribute Condition="'$(MSBuildProjectExtension)' != '.csproj'">false</BlockReflectionAttribute>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(BlockReflectionAttribute)'=='true'">
|
||||
<CoreCompileDependsOn>$(CoreCompileDependsOn);AddBlockReflectionAttribute</CoreCompileDependsOn>
|
||||
<BlockReflectionAtributeFile>$(MSBuildThisFileDirectory)/BlockReflectionAttribute.cs</BlockReflectionAtributeFile>
|
||||
</PropertyGroup>
|
||||
|
||||
<Target Name="AddBlockReflectionAttribute" >
|
||||
<ItemGroup>
|
||||
<Compile Include="$(BlockReflectionAtributeFile)" />
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
<Import Project="$(CustomAfterBuildCommonTargets)" Condition="Exists('$(CustomAfterBuildCommonTargets)')"/>
|
||||
</Project>
|
||||
59
external/corefx/Tools-Override/CloudTest.targets
vendored
59
external/corefx/Tools-Override/CloudTest.targets
vendored
@@ -71,9 +71,7 @@
|
||||
<HelixSource Condition="'$(HelixSource)'=='' And '$(IsOfficial)'!='' And '$(TestProduct)'!='' And '$(Branch)'!=''">official/$(TestProduct)/$(Branch)/</HelixSource>
|
||||
<HelixSource Condition="'$(HelixSource)'=='' And '$(IsOfficial)'=='' And '$(TestProduct)'!='' And '$(Branch)'!=''">pr/$(TestProduct)/$(Branch)/</HelixSource>
|
||||
<HelixSource Condition="'$(HelixSource)'==''">pr/unknown/</HelixSource>
|
||||
<_UseUpdatedHelixApi Condition="'$(HelixJobType)'!=''">true</_UseUpdatedHelixApi>
|
||||
<HelixApiEndpoint Condition="'$(_UseUpdatedHelixApi)'=='true'">https://helix.dot.net/api/2016-06-28/jobs</HelixApiEndpoint>
|
||||
<HelixApiEndpoint Condition="'$(HelixApiEndpoint)'==''">https://helix.dot.net/api/jobs</HelixApiEndpoint>
|
||||
<HelixApiEndpoint>https://helix.dot.net/api/2016-06-28/jobs</HelixApiEndpoint>
|
||||
</PropertyGroup>
|
||||
|
||||
<Import Project="$(MSBuildThisFileDirectory)CloudTest.Perf.targets" Condition="'$(Performance)' == 'true'" />
|
||||
@@ -154,7 +152,14 @@
|
||||
|
||||
<Message Text="Full, Unfiltered Test Archive Collection :: @(UnfilteredTestArchives)" Importance="Low" />
|
||||
|
||||
<!-- If we wish to filter tests that we upload, then altering the FilterToTestTFM and FilterToOSGroup is where to do it at. -->
|
||||
<!-- If we wish to filter tests that we upload, then altering the FilterToTestTFM and FilterToOSGroup is where to do it at.
|
||||
|
||||
Disabled for now; We most likely no longer need this, but with the removal of the FilterToTestTFM and FilterTOOSGroup variables,
|
||||
this is breaking build. For now, the old method of including the zips for upload should work.
|
||||
|
||||
In the near future, this specific knowledge (for instance that the files for upload come from three folders, Regular, AnyOS, and Unix
|
||||
Needs to be in CoreFX specific code, and CloudTest should just take a list of files generated in an external task.
|
||||
|
||||
<FilterForUpload UnfilteredUploadItems="@(UnfilteredTestArchives)"
|
||||
FilterToTestTFM="$(FilterToTestTFM)"
|
||||
FilterToOSGroup="$(FilterToOSGroup)"
|
||||
@@ -165,12 +170,22 @@
|
||||
<CreateItem Include="$(ForUploadList)">
|
||||
<Output TaskParameter="Include" ItemName="ForUpload"/>
|
||||
</CreateItem>
|
||||
-->
|
||||
<ItemGroup>
|
||||
<ForUpload Include="@(UnfilteredTestArchives)" />
|
||||
</ItemGroup>
|
||||
<!-- To work around the removal of the build task, also need to turn the list of test archives to a property
|
||||
like the previous build task would have output -->
|
||||
<PropertyGroup>
|
||||
<ForUploadList>@(UnfilteredTestArchives)</ForUploadList>
|
||||
</PropertyGroup>
|
||||
|
||||
<Message Condition="'$(FilterToTestTFM)' != ''" Text="Using test archives for TFM: $(FilterToTestTFM)" />
|
||||
<Message Text="Using OS-Specific test archives from: $(TestArchivesRoot)" />
|
||||
<Message Text="Using AnyOS test archives from: $(AnyOSTestArchivesRoot)" />
|
||||
<Message Condition="'$(TargetsUnix)' == 'true'" Text="Using Unix test archives from: $(UnixTestArchivesRoot)" />
|
||||
|
||||
<!-- Deprecated property, should clean up / remove when refactoring CloudTest-->
|
||||
<PropertyGroup>
|
||||
<RelativeBlobPathFolderContainingTests Condition="'$(FilterToTestTFM)' != ''" >Tests/$(FilterToTestTFM)</RelativeBlobPathFolderContainingTests>
|
||||
<RelativeBlobPathFolderContainingTests Condition="'$(FilterToTestTFM)' == ''" >Tests</RelativeBlobPathFolderContainingTests>
|
||||
@@ -262,10 +277,17 @@
|
||||
<Target Name="CreateFuncTestListJson"
|
||||
DependsOnTargets="CreateAzureStorage"
|
||||
Condition="'$(Performance)' != 'true' or '$(FuncTestsDisabled)' != 'true'">
|
||||
<!-- create item group of functional tests -->
|
||||
<CreateItem Include="$(ForUploadList)">
|
||||
<Output TaskParameter="Include" ItemName="FunctionalTest"/>
|
||||
</CreateItem>
|
||||
<!-- create item group of functional tests
|
||||
Due to recent refactoring, calculating the right paths for Uris is challenging, so just reuse the previous
|
||||
include approach to get a full list.
|
||||
This allows us to use RecursiveDir as the path to the zip instead of guessing and generating it again.
|
||||
-->
|
||||
<ItemGroup>
|
||||
<FunctionalTest Include="$(TestArchivesRoot)**/*.zip" />
|
||||
<FunctionalTest Include="$(AnyOSTestArchivesRoot)**/*.zip" />
|
||||
<!-- Only include Unix folders if supported by the current target OS -->
|
||||
<FunctionalTest Condition="'$(TargetsUnix)' == 'true'" Include="$(UnixTestArchivesRoot)**/*.zip" />
|
||||
</ItemGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<OtherRunnerScriptArgs Condition="'$(FilterToTargetGroup)' == 'net46'">$(OtherRunnerScriptArgs) --xunit-test-type=desktop </OtherRunnerScriptArgs>
|
||||
@@ -283,6 +305,7 @@
|
||||
</FunctionalTest>
|
||||
</ItemGroup>
|
||||
<WriteItemsToJson JsonFileName="$(FuncTestListFile)" Items="@(FunctionalTest)" />
|
||||
|
||||
<!-- add test lists to the list of items for upload -->
|
||||
<ItemGroup>
|
||||
<ForUpload Include="$(FuncTestListFile)">
|
||||
@@ -442,21 +465,6 @@
|
||||
Outputs="%(TestListFile.BuildCompleteJson)">
|
||||
<!-- signal that the build is ready for testing -->
|
||||
<ItemGroup>
|
||||
<BuildCompleteTemplate Include="%(TestListFile.BuildCompleteJson)">
|
||||
<CorrelationId Condition=" '$(HelixApiAccessKey)' == '' ">%(TestListFile.CorrelationId)</CorrelationId>
|
||||
<Creator Condition=" '$(HelixApiAccessKey)' == '' ">$(Creator)</Creator>
|
||||
<DropContainerSAS>$(DropUriReadOnlyToken)</DropContainerSAS>
|
||||
<ListUri>$(DropUri)%(TestListFile.Filename)%(TestListFile.Extension)$(DropUriReadOnlyToken)</ListUri>
|
||||
<QueueId>$(TargetQueue)</QueueId>
|
||||
<ResultsUri>$(ResultsUri)/%(TestListFile.CorrelationId)</ResultsUri>
|
||||
<ResultsUriRSAS>$(ResultsReadOnlyToken)</ResultsUriRSAS>
|
||||
<ResultsUriWSAS>$(ResultsWriteOnlyToken)</ResultsUriWSAS>
|
||||
<Product>$(TestProduct)</Product>
|
||||
<Architecture>$(Platform)</Architecture>
|
||||
<Configuration>$(ConfigurationGroup)$(ConfigurationSuffix)</Configuration>
|
||||
<BuildNumber>$(BuildMoniker)</BuildNumber>
|
||||
<Branch>$(Branch)</Branch>
|
||||
</BuildCompleteTemplate>
|
||||
<BuildCompleteTemplateV2 Include="%(TestListFile.BuildCompleteJson)">
|
||||
<DropContainerSAS>$(DropUriReadOnlyToken)</DropContainerSAS>
|
||||
<ListUri>$(DropUri)%(TestListFile.Filename)%(TestListFile.Extension)$(DropUriReadOnlyToken)</ListUri>
|
||||
@@ -468,10 +476,9 @@
|
||||
<Build Condition="'$(IsOfficial)'=='true'">$(OfficialBuildId)</Build>
|
||||
<Type>$(HelixJobType)</Type>
|
||||
<Source>$(HelixSource)</Source>
|
||||
<Properties>{ "architecture" : "$(Platform)", "configuration": "$(ConfigurationGroup)", "operatingSystem" : "$(TargetQueue)" }</Properties>
|
||||
<Properties>{ "architecture" : "$(ArchGroup)", "configuration": "$(ConfigurationGroup)", "operatingSystem" : "$(TargetQueue)" }</Properties>
|
||||
</BuildCompleteTemplateV2>
|
||||
<BuildComplete Condition="'$(_UseUpdatedHelixApi)'=='true'" Include="@(BuildCompleteTemplateV2)"/>
|
||||
<BuildComplete Condition="'@(BuildComplete)'==''" Include="@(BuildCompleteTemplate)"/>
|
||||
<BuildComplete Include="@(BuildCompleteTemplateV2)"/>
|
||||
</ItemGroup>
|
||||
<WriteItemsToJson JsonFileName="%(TestListFile.BuildCompleteJson)" Items="@(BuildComplete)" />
|
||||
</Target>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<!-- Coverage options -->
|
||||
<PropertyGroup>
|
||||
<CodeCoverageEnabled>false</CodeCoverageEnabled>
|
||||
<CodeCoverageEnabled Condition="'$(SkipTests)' != 'true' and '$(OS)' == 'Windows_NT' and '$(Coverage)' == 'true' and '$(Performance)' != 'true'">true</CodeCoverageEnabled>
|
||||
<CodeCoverageEnabled Condition="'$(SkipTests)' != 'true' and '$(RunningOnUnix)' != 'true' and '$(Coverage)' == 'true' and '$(Performance)' != 'true'">true</CodeCoverageEnabled>
|
||||
<CoverageReportDir Condition="'$(CoverageReportDir)' == ''">$(TestWorkingDir)coverage\</CoverageReportDir>
|
||||
|
||||
<!-- This targets file has two modes one for individual projects and one for all -->
|
||||
|
||||
@@ -1,64 +0,0 @@
|
||||
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
|
||||
<UsingTask TaskName="GenerateDepsJson" AssemblyFile="$(BuildToolsTaskDir)CoreFx.Tools.dll"/>
|
||||
|
||||
<PropertyGroup>
|
||||
<NewSharedFxVersion>9.9.9</NewSharedFxVersion>
|
||||
<OldSharedFxVersion>1.1.0</OldSharedFxVersion>
|
||||
<TestSharedFxPath>$(TestSharedFxDir)\shared\Microsoft.NETCore.App\$(NewSharedFxVersion)</TestSharedFxPath>
|
||||
<TestSharedFxPathHostFxr>$(TestSharedFxDir)\host\fxr\$(NewSharedFxVersion)</TestSharedFxPathHostFxr>
|
||||
<ToolsDotNetCliSharedFxPath>$(ToolsDir)dotnetcli\shared\Microsoft.NETCore.App\$(OldSharedFxVersion)</ToolsDotNetCliSharedFxPath>
|
||||
<ConstructSharedFxSem>$(ObjDir)constructsharedfxcomplete.sem</ConstructSharedFxSem>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- This will generate a version of the dotnet cli that runs with the live
|
||||
build of corefx using the other components gathered from the stable
|
||||
version consumed from the Tools directory
|
||||
To debug any issues set COREHOST_TRACE=1 and rerun dotnet
|
||||
-->
|
||||
<Target Name="ConstructTestingHost"
|
||||
BeforeTargets="Build;BuildAllProjects"
|
||||
Condition="!Exists('$(ConstructSharedFxSem)') OR '$(ReconstructSharedFx)' == 'true'" >
|
||||
|
||||
<ItemGroup>
|
||||
<!-- This will only copy over the related file -->
|
||||
<HostFxrFile Condition="'$(OS)'=='Windows_NT'" Include="$(RuntimePath)hostfxr.dll" />
|
||||
<HostFxrFile Condition="'$(OS)'=='Unix'" Include="$(RuntimePath)libhostfxr.so" />
|
||||
<HostFxrFile Condition="'$(OS)'=='Unix'" Include="$(RuntimePath)libhostfxr.dylib" />
|
||||
<DotnetExe Condition="'$(OS)'=='Windows_NT'" Include="$(RuntimePath)dotnet.exe" />
|
||||
<DotnetExe Condition="'$(OS)'!='Windows_NT'" Include="$(RuntimePath)dotnet" />
|
||||
</ItemGroup>
|
||||
<MakeDir Directories="$(TestSharedFxPathHostFxr)" />
|
||||
<Copy SourceFiles="@(HostFxrFile)"
|
||||
DestinationFolder="$(TestSharedFxPathHostFxr)"
|
||||
Condition="Exists('%(RootDir)%(Directory)%(Filename)%(Extension)')" />
|
||||
<Copy SourceFiles="@(DotnetExe)"
|
||||
DestinationFolder="$(TestSharedFxDir)"
|
||||
Condition="Exists('%(RootDir)%(Directory)%(Filename)%(Extension)')" />
|
||||
<ItemGroup>
|
||||
<LiveDotNetCliComponents Include="$(RuntimePath)\*.*" Exclude="$(RuntimePath)\xunit.console.netcore.exe" />
|
||||
</ItemGroup>
|
||||
<Copy SourceFiles="@(LiveDotNetCliComponents)"
|
||||
DestinationFiles="@(LiveDotNetCliComponents -> '$(TestSharedFxPath)\%(Filename)%(Extension)')"
|
||||
UseHardlinksIfPossible="true" />
|
||||
<PropertyGroup>
|
||||
<OriginalDepsJsonPath>$(ToolsDotNetCliSharedFxPath)\Microsoft.NETCore.App.deps.json</OriginalDepsJsonPath>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<!-- This is for HostPolicy, CoreCLR and Jit dependencies to continue to remain inside of the dep.json -->
|
||||
<ExceptionForDepsJson Include="Microsoft.NETCore.DotNetHostPolicy" />
|
||||
<ExceptionForDepsJson Include="Microsoft.NETCore.DotNetHostResolver" />
|
||||
<ExceptionForDepsJson Include="Microsoft.NETCore.Runtime.CoreCLR" />
|
||||
<ExceptionForDepsJson Include="Microsoft.NETCore.Jit" />
|
||||
</ItemGroup>
|
||||
<GenerateDepsJson DepsJsonPath="$(OriginalDepsJsonPath)"
|
||||
RuntimeDirectory="$(RuntimePath)"
|
||||
DepsExceptions="@(ExceptionForDepsJson)"
|
||||
OutputPath="$(TestSharedFxPath)\Microsoft.NETCore.App.deps.json"/>
|
||||
<WriteLinesToFile
|
||||
File="$(ConstructSharedFxSem)"
|
||||
Lines="$([System.DateTime]::Now.ToString(yyyyMMdd-mmss))"
|
||||
Overwrite="true" />
|
||||
</Target>
|
||||
|
||||
</Project>
|
||||
@@ -1,17 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
|
||||
<PropertyGroup Condition="'$(IncludeDefaultReferences)' == ''">
|
||||
<IncludeDefaultReferences Condition="'$(MSBuildProjectExtension)' == '.csproj'">true</IncludeDefaultReferences>
|
||||
<IncludeDefaultReferences Condition="'$(MSBuildProjectExtension)' == '.vbproj'">true</IncludeDefaultReferences>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<!-- netstandard is a default reference whenever building for NETStandard or building an implementation assembly -->
|
||||
<DefaultReference Condition="$(NuGetTargetMoniker.StartsWith('.NETStandard')) OR '$(IsReferenceAssembly)' != 'true'"
|
||||
Include="netstandard" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<TargetingPackDirs Include="$(RefPath)" />
|
||||
<AdditionalReferencePaths Include="@(TargetingPackDirs)" />
|
||||
@@ -21,6 +10,8 @@
|
||||
<ContractOutputPath>$(RefPath)</ContractOutputPath>
|
||||
<FrameworkPathOverride>$(ContractOutputPath)</FrameworkPathOverride>
|
||||
<AssemblySearchPaths>$(AssemblySearchPaths);$(ContractOutputPath);{RawFileName}</AssemblySearchPaths>
|
||||
<!-- Disable RAR from transitively discovering depdencies for References -->
|
||||
<_FindDependencies>false</_FindDependencies>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition=" '$(TargetFrameworkIdentifier)' == ''
|
||||
@@ -62,13 +53,33 @@
|
||||
<ResolveAssemblyReferenceIgnoreTargetFrameworkAttributeVersionMismatch>true</ResolveAssemblyReferenceIgnoreTargetFrameworkAttributeVersionMismatch>
|
||||
<NuGetTargetMoniker Condition="'$(NuGetTargetMoniker)' == ''">.NETCoreApp,Version=v1.0</NuGetTargetMoniker>
|
||||
</PropertyGroup>
|
||||
|
||||
<Target Name="AddDefaultReferences"
|
||||
Condition="'$(IncludeDefaultReferences)' =='true'"
|
||||
BeforeTargets="BeforeResolveReferences">
|
||||
|
||||
<PropertyGroup Condition="'$(IncludeDefaultReferences)' == ''">
|
||||
<IncludeDefaultReferences Condition="'$(MSBuildProjectExtension)' == '.csproj'">true</IncludeDefaultReferences>
|
||||
<IncludeDefaultReferences Condition="'$(MSBuildProjectExtension)' == '.vbproj'">true</IncludeDefaultReferences>
|
||||
</PropertyGroup>
|
||||
|
||||
<Target Name="SetupDefaultReferences">
|
||||
<ItemGroup Condition="'$(IncludeDefaultReferences)' =='true'">
|
||||
<!-- netstandard is a default reference whenever building for NETStandard or building an implementation assembly -->
|
||||
<DefaultReference Condition="($(NuGetTargetMoniker.StartsWith('.NETStandard')) OR '$(IsReferenceAssembly)' != 'true') AND Exists('$(RefPath)netstandard.dll')"
|
||||
Include="netstandard" />
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
<Target Name="UpdateReferenceItems"
|
||||
DependsOnTargets="SetupDefaultReferences"
|
||||
BeforeTargets="BeforeResolveReferences"
|
||||
>
|
||||
<ItemGroup>
|
||||
<!-- Include default references when specified and they exist -->
|
||||
<Reference Condition="Exists('$(RefPath)%(Identity).dll')" Include="@(DefaultReference)" />
|
||||
<Reference Include="@(DefaultReference)" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<!-- Simple name references will be resolved from the targeting pack folders and should never be copied to output -->
|
||||
<Reference Condition="'%(Reference.Extension)' != '.dll'">
|
||||
<Private>false</Private>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
@@ -89,6 +100,11 @@
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
<PropertyGroup>
|
||||
<!-- Disable WindowsAppContainer property to prevent importing AppX targets which we don't need -->
|
||||
<WindowsAppContainer Condition="'$(WindowsAppContainer)'==''">false</WindowsAppContainer>
|
||||
</PropertyGroup>
|
||||
|
||||
<Import Project="depProj.targets"
|
||||
Condition="'$(MSBuildProjectExtension)' == '.depproj'" />
|
||||
|
||||
@@ -107,6 +123,28 @@
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets"
|
||||
Condition="'$(TargetFrameworkIdentifier)' != '.NETPortable' and '$(MSBuildProjectExtension)' == '.vbproj'" />
|
||||
|
||||
<PropertyGroup>
|
||||
<ResolveReferencesDependsOn>
|
||||
AddProjectReferencesDynamically;
|
||||
$(ResolveReferencesDependsOn);
|
||||
</ResolveReferencesDependsOn>
|
||||
<CleanDependsOn>
|
||||
AddProjectReferencesDynamically;
|
||||
$(CleanDependsOn);
|
||||
</CleanDependsOn>
|
||||
</PropertyGroup>
|
||||
<!--
|
||||
Common targets don't provide a good place to enable adding new ProjectReference items in targets that work
|
||||
with both clean, build, and rebuild entry point targets. We cannot hook off of AssignProjectConfigurations
|
||||
because it is conditioned on "'@(ProjectReference)'!=''" which gets evalulated before the BeforeTargets run
|
||||
so adding ProjectReference as part of a BeforeTarget make still have the AssignProjectConfiguration skipped.
|
||||
To help with this problem we are creating a new target and correctly hooking it up in the resolve and clean
|
||||
depends on target chains.
|
||||
|
||||
For information on evaulation of targets ordering see https://msdn.microsoft.com/en-us/library/ee216359.aspx.
|
||||
-->
|
||||
<Target Name="AddProjectReferencesDynamically" DependsOnTargets="$(AddProjectReferencesDynamicallyDependsOn)" />
|
||||
|
||||
<PropertyGroup Condition="'$(TargetFrameworkIdentifier)' != '.NETFramework' and '$(OutputType)' == 'exe'">
|
||||
<!-- RAR thinks all EXEs require binding redirects. That's not the case for CoreCLR -->
|
||||
<AutoUnifyAssemblyReferences>true</AutoUnifyAssemblyReferences>
|
||||
@@ -157,7 +195,7 @@
|
||||
<!-- list each append as a seperate item to force re-evaluation of AdditionalProperties metadata -->
|
||||
<ItemGroup>
|
||||
|
||||
<!-- Configuration property shortcuts -->
|
||||
<!-- Configuration property shortcuts -->
|
||||
<ProjectReference>
|
||||
<AdditionalProperties Condition="'%(ProjectReference.Configuration)' != ''">Configuration=%(ProjectReference.Configuration);%(ProjectReference.AdditionalProperties)</AdditionalProperties>
|
||||
</ProjectReference>
|
||||
|
||||
@@ -3,16 +3,17 @@
|
||||
<PropertyGroup>
|
||||
<RoslynVersion>2.0.0-beta3</RoslynVersion>
|
||||
<RoslynPackageName>Microsoft.Net.Compilers</RoslynPackageName>
|
||||
<RoslynTargetsPath>$(ToolRuntimePath)</RoslynTargetsPath>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<RoslynPropsFile Condition="'$(RoslynPropsFile)' == '' and '$(RunningOnUnix)' != 'true'">$(ToolRuntimePath)/net45/roslyn/build/Microsoft.Net.Compilers.props</RoslynPropsFile>
|
||||
<RoslynPropsFile Condition="'$(RoslynPropsFile)' == '' and '$(RunningOnCore)' != 'true'">$(BuildToolsTaskDir)/roslyn/build/Microsoft.Net.Compilers.props</RoslynPropsFile>
|
||||
</PropertyGroup>
|
||||
|
||||
<!--
|
||||
On Unix we always use a version of Roslyn we restore from NuGet and we have to work around some known issues.
|
||||
-->
|
||||
<PropertyGroup Condition="'$(RoslynPropsFile)' == '' and '$(RunningOnUnix)' == 'true'">
|
||||
<PropertyGroup Condition="'$(RoslynPropsFile)' == '' and '$(RunningOnCore)' == 'true'">
|
||||
<RoslynPackageDir>$(PackagesDir)/$(RoslynPackageName).$(RoslynVersion)/</RoslynPackageDir>
|
||||
<RoslynPropsFile>$(RoslynPackageDir)build/$(RoslynPackageName).props</RoslynPropsFile>
|
||||
|
||||
@@ -20,12 +21,5 @@
|
||||
Portable PDBs are now supported in Linux and OSX with .Net Core MSBuild.
|
||||
-->
|
||||
<DebugType>Portable</DebugType>
|
||||
|
||||
<!--
|
||||
Full signing with Open key doesn't work with Portable Csc.
|
||||
https://github.com/dotnet/roslyn/issues/8210
|
||||
-->
|
||||
<UseOpenKey>false</UseOpenKey>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
4
external/corefx/Tools-Override/buildagainstpackages.targets
vendored
Normal file
4
external/corefx/Tools-Override/buildagainstpackages.targets
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<!-- No longer support buildagainstpackages. This file should be deleted when merged back into BuildTools -->
|
||||
</Project>
|
||||
@@ -5,22 +5,18 @@
|
||||
always be net45 (because we use Mono to run our tests and Mono needs to load the net45 version)
|
||||
-->
|
||||
<PropertyGroup>
|
||||
<CodeAnalyzerDir Condition="'$(CodeAnalyzerDir)'=='' and '$(OSEnvironment)'=='Windows_NT'">$(ToolsDir)net45/analyzers/</CodeAnalyzerDir>
|
||||
<CodeAnalyzerDir Condition="'$(CodeAnalyzerDir)'=='' and '$(OSEnvironment)'!='Windows_NT'">$(ToolsDir)analyzers/</CodeAnalyzerDir>
|
||||
<CodeAnalyzerDir Condition="'$(CodeAnalyzerDir)'=='' and '$(RunningOnCore)'!='true'">$(ToolsDir)net46/analyzers/</CodeAnalyzerDir>
|
||||
<CodeAnalyzerDir Condition="'$(CodeAnalyzerDir)'=='' and '$(RunningOnCore)'=='true'">$(ToolsDir)analyzers/</CodeAnalyzerDir>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- PInvokeChecker data files-->
|
||||
<PropertyGroup Condition="'$(OSGroup)'=='Windows_NT' and '$(EnableDotnetAnalyzers)' == 'true'">
|
||||
<!--
|
||||
This file helps us choose the correct allowed pinvoke file.
|
||||
1. In case we are building for windows and TargetGroup is Netcore50 or netcore50aot (Store profile) or SupportsUWP is set to true we use OneCoreUWPApis.txt
|
||||
2. For all other windows configuration we use OneCoreAPIs.txt file.
|
||||
-->
|
||||
<UseWin32Apis Condition="'$(OSGroup)'=='Windows_NT'">true</UseWin32Apis>
|
||||
<ValidPinvokeMappings>$(MSBuildThisFileDirectory)PinvokeAnalyzer_OneCoreApis.txt</ValidPinvokeMappings>
|
||||
<ValidPinvokeMappings Condition="'$(UseWin32Apis)'=='true'">$(MSBuildThisFileDirectory)PinvokeAnalyzer_Win32Apis.txt</ValidPinvokeMappings>
|
||||
<ValidPinvokeMappings Condition="'$(TargetGroup)'=='netcore50' or '$(TargetGroup)'=='netcore50aot' or '$(SupportsUWP)'=='true'">$(MSBuildThisFileDirectory)PinvokeAnalyzer_UWPApis.txt</ValidPinvokeMappings>
|
||||
<ValidPinvokeMappings Condition="('$(TargetGroup)'=='netcore50' or '$(TargetGroup)'=='netcore50aot' or '$(SupportsUWP)'=='true') and '$(UseWin32Apis)'=='true'">$(MSBuildThisFileDirectory)PinvokeAnalyzer_Win32UWPApis.txt</ValidPinvokeMappings>
|
||||
<!-- Just validate for OneCore: default -->
|
||||
<ValidPInvokeMappings>$(MSBuildThisFileDirectory)PinvokeAnalyzer_Win32Apis.txt</ValidPInvokeMappings>
|
||||
|
||||
<!-- Further restrict to API allowed for UWP -->
|
||||
<EnablePinvokeUWPAnalyzer Condition="'$(EnablePinvokeUWPAnalyzer)' == ''">true</EnablePinvokeUWPAnalyzer>
|
||||
<ValidPInvokeMappings Condition="'$(UWPCompatible)'=='true' and '$(EnablePinvokeUWPAnalyzer)' == 'true'">$(MSBuildThisFileDirectory)PinvokeAnalyzer_Win32UWPApis.txt</ValidPInvokeMappings>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
@@ -35,6 +31,9 @@
|
||||
<PropertyGroup Condition="$(EnableFxCopAnalyzers)">
|
||||
<CodeAnalysisRuleSet Condition="'$(CodeAnalysisRuleSet)' == ''">$(MSBuildThisFileDirectory)Default.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<EnablePInvokeAnalyzer Condition="'$(EnablePInvokeAnalyzer)' == ''">true</EnablePInvokeAnalyzer>
|
||||
</PropertyGroup>
|
||||
<ItemGroup Condition="'$(EnableDotnetAnalyzers)' == 'true'">
|
||||
<!-- Enable the Microsoft.Dotnet.CodeAnalysis.dll analyzer -->
|
||||
<Analyzer Include="$(CodeAnalyzerDir)Microsoft.DotNet.CodeAnalysis.dll"/>
|
||||
@@ -43,11 +42,11 @@
|
||||
<AdditionalFiles Include="$(MSBuildProjectDirectory)/*.analyzerdata.$(Platform)" />
|
||||
|
||||
<!-- Add the necessary valid Pinvoke mapping file -->
|
||||
<AdditionalFiles Condition="'$(ValidPinvokeMappings)' != ''" Include="$(ValidPinvokeMappings)"/>
|
||||
<AdditionalFiles Condition="'$(ValidPInvokeMappings)' != ''" Include="$(ValidPInvokeMappings)"/>
|
||||
|
||||
<!-- Disable any analyzers that should not run -->
|
||||
<DisabledAnalyzers Condition="'$(IsTestProject)' == true or '$(TargetsUnix)' == 'true'" Include="PinvokeAnalyzer"/>
|
||||
<DisabledAnalyzers Condition="'$(TargetsWindows)'=='true' and ($(TargetGroup.Contains('net46')) or $(TargetGroup.Contains('net45')))" Include="PinvokeAnalyzer" />
|
||||
<DisabledAnalyzers Condition="'$(IsTestProject)' == 'true' or '$(TargetsUnix)' == 'true' or '$(EnablePInvokeAnalyzer)' != 'true'" Include="PInvokeAnalyzer"/>
|
||||
<DisabledAnalyzers Condition="'$(TargetsWindows)'=='true' and ($(TargetGroup.Contains('net46')) or $(TargetGroup.Contains('net45')))" Include="PInvokeAnalyzer" />
|
||||
</ItemGroup>
|
||||
|
||||
<!-- If we have specified any analyzers that need to be disabled write them into the file -->
|
||||
|
||||
5
external/corefx/Tools-Override/crossgen.sh
vendored
5
external/corefx/Tools-Override/crossgen.sh
vendored
@@ -13,6 +13,11 @@ usage()
|
||||
|
||||
restore_crossgen()
|
||||
{
|
||||
__crossgen=$__sharedFxDir/crossgen
|
||||
if [ -e $__crossgen ]; then
|
||||
return
|
||||
fi
|
||||
|
||||
__pjDir=$__toolsDir/crossgen
|
||||
mkdir -p $__pjDir
|
||||
echo "{\"frameworks\":{\"netcoreapp1.1\":{\"dependencies\":{\"Microsoft.NETCore.Runtime.CoreCLR\":\"$__CoreClrVersion\", \"Microsoft.NETCore.Platforms\": \"$__CoreClrVersion\"}}},\"runtimes\":{\"$__rid\":{}}}" > "$__pjDir/project.json"
|
||||
|
||||
34
external/corefx/Tools-Override/depProj.targets
vendored
34
external/corefx/Tools-Override/depProj.targets
vendored
@@ -94,20 +94,38 @@ See the LICENSE file in the project root for more information.
|
||||
|
||||
<!-- Required by Common.Targets but not used for depproj -->
|
||||
<Target Name="CreateManifestResourceNames" />
|
||||
|
||||
<PropertyGroup>
|
||||
<!-- don't use TargetingPackReference, we do our own filtering -->
|
||||
<SkipFilterTargetingPackResolvedNugetPackages>true</SkipFilterTargetingPackResolvedNugetPackages>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- Support filtering to a subset of packages -->
|
||||
<Target Name="FilterNugetPackages" AfterTargets="ResolveNuGetPackages">
|
||||
<!-- Support filtering to a subset of packages or files -->
|
||||
<Target Name="FilterNugetPackages"
|
||||
AfterTargets="ResolveNuGetPackages"
|
||||
Condition="'@(PackageToInclude)' != '' OR '@(PackageToExclude)' != '' OR '@(FileToInclude)' != '' OR '@(FileToExclude)' != ''">
|
||||
<ItemGroup>
|
||||
<_referenceCopyLocalByPackageId Include="@(ReferenceCopyLocalPaths->'%(NuGetPackageId)')">
|
||||
<_nuGetDeploy Include="@($(NuGetDeploySourceItem))"/>
|
||||
<_nuGetDeployByFileName Include="@(_nuGetDeploy->'%(FileName)')">
|
||||
<OriginalItemSpec>%(Identity)</OriginalItemSpec>
|
||||
</_referenceCopyLocalByPackageId>
|
||||
</_nuGetDeployByFileName>
|
||||
|
||||
<_referenceCopyLocalByPackageIdToRemove Include="@(_referenceCopyLocalByPackageId)" Exclude="@(PackageToInclude)" Condition="'@(PackageToInclude)' != ''" />
|
||||
<_filteredReferenceCopyLocalByPackageId Include="@(_referenceCopyLocalByPackageId)" Exclude="@(_referenceCopyLocalByPackageIdToRemove);@(PackageToExclude)" />
|
||||
<_nuGetDeployByFileNameToRemove Include="@(_nuGetDeployByFileName)" Exclude="@(FileToInclude)" Condition="'@(FileToInclude)' != ''" />
|
||||
<_filteredNuGetDeployByFileName Include="@(_nuGetDeployByFileName)" Exclude="@(_nuGetDeployByFileNameToRemove);@(FileToExclude)" />
|
||||
|
||||
<_nuGetDeployByPackageId Include="@(_filteredNuGetDeployByFileName->'%(NuGetPackageId)')" />
|
||||
|
||||
<ReferenceCopyLocalPaths Remove="@(ReferenceCopyLocalPaths)"/>
|
||||
<ReferenceCopyLocalPaths Include="@(_filteredReferenceCopyLocalByPackageId->'%(OriginalItemSpec)')" />
|
||||
<_nuGetDeployByPackageIdToRemove Include="@(_nuGetDeployByPackageId)" Exclude="@(PackageToInclude)" Condition="'@(PackageToInclude)' != ''" />
|
||||
<_filteredNuGetDeployByPackageId Include="@(_nuGetDeployByPackageId)" Exclude="@(_nuGetDeployByPackageIdToRemove);@(PackageToExclude)" />
|
||||
|
||||
<ReferenceCopyLocalPaths Condition="'$(NuGetDeploySourceItem)' == 'ReferenceCopyLocalPaths'" Remove="@(ReferenceCopyLocalPaths)" />
|
||||
<Reference Condition="'$(NuGetDeploySourceItem)' == 'Reference'" Remove="@(Reference)" />
|
||||
<Analyzer Condition="'$(NuGetDeploySourceItem)' == 'Analyzer'" Remove="@(Analyzer)" />
|
||||
</ItemGroup>
|
||||
|
||||
<CreateItem Include="@(_filteredNuGetDeployByPackageId->'%(OriginalItemSpec)')">
|
||||
<Output TaskParameter="Include" ItemName="$(NuGetDeploySourceItem)" />
|
||||
</CreateItem>
|
||||
</Target>
|
||||
|
||||
</Project>
|
||||
|
||||
189
external/corefx/Tools-Override/packageresolve.targets
vendored
Executable file
189
external/corefx/Tools-Override/packageresolve.targets
vendored
Executable file
@@ -0,0 +1,189 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
|
||||
<UsingTask TaskName="PrereleaseResolveNuGetPackageAssets" AssemblyFile="$(BuildToolsTaskDir)Microsoft.DotNet.Build.Tasks.dll"/>
|
||||
<UsingTask TaskName="ValidateProjectDependencyVersions" AssemblyFile="$(BuildToolsTaskDir)Microsoft.DotNet.Build.Tasks.dll"/>
|
||||
<UsingTask TaskName="IsRestoreRequired" AssemblyFile="$(BuildToolsTaskDir)Microsoft.DotNet.Build.Tasks.dll"/>
|
||||
|
||||
<PropertyGroup>
|
||||
<ProjectJson Condition="'$(ProjectJson)'=='' and Exists('$(MSBuildProjectDirectory)/project.json')">$(MSBuildProjectDirectory)/project.json</ProjectJson>
|
||||
<ProjectLockJson Condition="Exists('$(ProjectJson)') and '$(ProjectLockJson)'==''">$(MSBuildProjectDirectory)/project.lock.json</ProjectLockJson>
|
||||
<ResolveNugetProjectFile Condition="'$(ResolveNugetProjectFile)' == ''">$(MSBuildProjectFullPath)</ResolveNugetProjectFile>
|
||||
<RestorePackages Condition="'$(RestorePackages)'!='false' and Exists('$(ProjectJson)') and '$(DesignTimeBuild)' != 'true'">true</RestorePackages>
|
||||
<PrereleaseResolveNuGetPackages Condition="'$(PrereleaseResolveNuGetPackages)'!='false' and Exists('$(ProjectJson)')">true</PrereleaseResolveNuGetPackages>
|
||||
|
||||
<!--
|
||||
For now, prevent built-in task (if available) from running.
|
||||
More changes are needed to light up on their availability
|
||||
and use them instead of what we have here. See buildtools
|
||||
issue #192.
|
||||
-->
|
||||
<ResolveNugetPackages>false</ResolveNugetPackages>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- Restoring packages during a background (designtime) build will cause VS 2015 (v14) to get into an endless loop of resolving references. -->
|
||||
<Target Name="RestorePackages"
|
||||
BeforeTargets="ResolveNuGetPackages;ValidatePackageVersions"
|
||||
Condition="'$(RestorePackages)'=='true' and !('$(VSDesignTimeBuild)'=='true' and '$(VisualStudioVersion)' >= '14.0')">
|
||||
|
||||
<Error Condition="'$(DnuRestoreCommand)'=='' and Exists('$(ProjectJson)')" Text="RestorePackages target needs a predefined DnuRestoreCommand property set in order to restore $(ProjectJson)" />
|
||||
|
||||
<IsRestoreRequired ProjectJsons="$(ProjectJson)" PackagesFolder="$(PackagesDir)">
|
||||
<Output TaskParameter="RestoreRequired" PropertyName="RestoreRequired" />
|
||||
</IsRestoreRequired>
|
||||
|
||||
<Exec Condition="Exists('$(ProjectJson)') AND '$(RestoreRequired)' == 'true'" Command="$(DnuRestoreCommand) "$(ProjectJson)"" StandardOutputImportance="Low" CustomErrorRegularExpression="^Unable to locate .*" />
|
||||
|
||||
<!-- if lock file exists be sure to update timestamp otherwise we could get in a state of aways calling restore but the lock file not being updated -->
|
||||
<Touch Condition="Exists('$(ProjectLockJson)') AND '$(RestoreRequired)' == 'true'" Files="$(ProjectLockJson)" />
|
||||
</Target>
|
||||
|
||||
<ItemGroup Condition="'$(ResolvePackages)'=='true' or '$(PrereleaseResolveNuGetPackages)'=='true'">
|
||||
<CustomAdditionalCompileInputs Condition="Exists('$(ProjectJson)')" Include="$(ProjectJson)" />
|
||||
</ItemGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<ResolveAssemblyReferencesDependsOn>
|
||||
$(ResolveAssemblyReferencesDependsOn);
|
||||
ResolveNuGetPackages;
|
||||
ValidatePackageVersions;
|
||||
</ResolveAssemblyReferencesDependsOn>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<!-- temporarily accept the old name NuGetTargetFrameworkMoniker until all projects are moved forward -->
|
||||
<NuGetTargetMoniker Condition="'$(NuGetTargetMoniker)' == ''">$(NuGetTargetFrameworkMoniker)</NuGetTargetMoniker>
|
||||
<UseTargetPlatformAsNuGetTargetMoniker Condition="'$(UseTargetPlatformAsNuGetTargetMoniker)' == '' AND '$(TargetFrameworkMoniker)' == '.NETCore,Version=v5.0'">true</UseTargetPlatformAsNuGetTargetMoniker>
|
||||
<NuGetTargetMoniker Condition="'$(NuGetTargetMoniker)' == '' AND '$(UseTargetPlatformAsNuGetTargetMoniker)' == 'true'">$(TargetPlatformIdentifier),Version=v$([System.Version]::Parse('$(TargetPlatformMinVersion)').ToString(3))</NuGetTargetMoniker>
|
||||
<NuGetTargetMoniker Condition="'$(NuGetTargetMoniker)' == '' AND '$(UseTargetPlatformAsNuGetTargetMoniker)' != 'true'">$(TargetFrameworkMoniker)</NuGetTargetMoniker>
|
||||
<BaseNuGetRuntimeIdentifier Condition="'$(BaseNuGetRuntimeIdentifier)' == '' and '$(TargetPlatformIdentifier)' == 'UAP'">win10</BaseNuGetRuntimeIdentifier>
|
||||
<BaseNuGetRuntimeIdentifier Condition="'$(BaseNuGetRuntimeIdentifier)' == ''">win</BaseNuGetRuntimeIdentifier>
|
||||
<CopyNuGetImplementations Condition="'$(CopyNuGetImplementations)' == '' and '$(OutputType)' != 'library' and ('$(OutputType)' != 'winmdobj' or '$(AppxPackage)' == 'true')">true</CopyNuGetImplementations>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- If a RuntimeIndentifier wasn't already specified, let's go generate it -->
|
||||
<PropertyGroup Condition="'$(NuGetRuntimeIdentifier)' == '' and '$(CopyNuGetImplementations)' == 'true'">
|
||||
<_NuGetRuntimeIdentifierWithoutAot>$(BaseNuGetRuntimeIdentifier)-$(PlatformTarget.ToLower())</_NuGetRuntimeIdentifierWithoutAot>
|
||||
<NuGetRuntimeIdentifier>$(_NuGetRuntimeIdentifierWithoutAot)</NuGetRuntimeIdentifier>
|
||||
<NuGetRuntimeIdentifier Condition="'$(UseDotNetNativeToolchain)' == 'true'">$(_NuGetRuntimeIdentifierWithoutAot)-aot</NuGetRuntimeIdentifier>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- Some projects want to explicitly use no runtime identifier, and do not want to receive any default value provided by other targets. -->
|
||||
<PropertyGroup Condition="'$(NuGetRuntimeIdentifier)' == 'None'">
|
||||
<NuGetRuntimeIdentifier></NuGetRuntimeIdentifier>
|
||||
</PropertyGroup>
|
||||
|
||||
<Target Name="ResolveNuGetPackages"
|
||||
Condition="'$(PrereleaseResolveNuGetPackages)'=='true'"
|
||||
DependsOnTargets="$(ResolveNugetPackagesDependsOn)">
|
||||
|
||||
<PrereleaseResolveNuGetPackageAssets Condition="Exists('$(ProjectLockJson)')"
|
||||
AllowFallbackOnTargetSelection="true"
|
||||
IncludeFrameworkReferences="false"
|
||||
NuGetPackagesDirectory="$(PackagesDir)"
|
||||
RuntimeIdentifier="$(NuGetRuntimeIdentifier)"
|
||||
ProjectLanguage="$(Language)"
|
||||
ProjectLockFile="$(ProjectLockJson)"
|
||||
TargetMonikers="$(NuGetTargetMoniker)">
|
||||
<Output TaskParameter="ResolvedAnalyzers" ItemName="Analyzer" />
|
||||
<Output TaskParameter="ResolvedReferences" ItemName="_ReferenceFromPackage" />
|
||||
<Output TaskParameter="ResolvedCopyLocalItems" ItemName="_ReferenceCopyLocalPathsFromPackage" />
|
||||
<Output TaskParameter="ReferencedPackages" ItemName="ReferencedNuGetPackages" />
|
||||
</PrereleaseResolveNuGetPackageAssets>
|
||||
|
||||
<!-- We may have package references that we want to replace with project references -->
|
||||
<ItemGroup>
|
||||
<!-- Intersect project-refs with package-refs.
|
||||
Project refs may be in _ResolvedProjectReferencePaths or Reference items.
|
||||
Copy local may be in _ResolvedProjectReferencePaths or ReferenceCopyLocalPaths.
|
||||
Copy local items may also be in any item like Content but we currently don't strip those.-->
|
||||
<_ReferenceFileNamesToRemove Include="@(_ReferenceFromPackage)" Condition="'@(_ResolvedProjectReferencePaths->'%(FileName)%(Extension)')' == '%(FileName)%(Extension)'" />
|
||||
<_ReferenceFileNamesToRemove Include="@(_ReferenceFromPackage)" Condition="'@(Reference->'%(FileName)%(Extension)')' == '%(FileName)%(Extension)'" />
|
||||
|
||||
<!-- If local copy is disabled remove all references, otherwise remove only project refrerences -->
|
||||
<_ReferenceCopyLocalPathsFileNamesToRemove Include="@(_ReferenceCopyLocalPathsFromPackage)" Condition="'$(DisableReferenceCopyLocal)' == 'true' OR '@(_ResolvedProjectReferencePaths->'%(FileName)%(Extension)')' == '%(FileName)%(Extension)'" />
|
||||
<_ReferenceCopyLocalPathsFileNamesToRemove Include="@(_ReferenceCopyLocalPathsFromPackage)" Condition="'$(DisableReferenceCopyLocal)' == 'true' OR '@(ReferenceCopyLocalPaths->'%(FileName)%(Extension)')' == '%(FileName)%(Extension)'" />
|
||||
|
||||
<!-- strip from the resolved package output -->
|
||||
<_ReferenceFromPackage Remove="@(_ReferenceFileNamesToRemove)" />
|
||||
<_ReferenceCopyLocalPathsFromPackage Remove="@(_ReferenceCopyLocalPathsFileNamesToRemove)" />
|
||||
|
||||
<!-- add the filtered resolved package output -->
|
||||
<Reference Include="@(_ReferenceFromPackage)" />
|
||||
<ReferenceCopyLocalPaths Include="@(_ReferenceCopyLocalPathsFromPackage)" />
|
||||
</ItemGroup>
|
||||
|
||||
<Message Text="Excluding @(_ReferenceFileNamesToRemove);@(_ReferenceCopyLocalPathsFileNamesToRemove) from package references since the same file is provided by a project reference."
|
||||
Condition="'@(_ReferenceFileNamesToRemove)' != '' or '@(_ReferenceCopyLocalPathsFileNamesToRemove)' != ''"/>
|
||||
</Target>
|
||||
|
||||
<Target Name="RemoveTransitiveCompileReferences"
|
||||
AfterTargets="ResolveNuGetPackages">
|
||||
<ItemGroup Condition="'$(OmitTransitiveCompileReferences)' == 'true'">
|
||||
<!-- get all references from nuget packages as ID so that we can substract the direct ref IDs-->
|
||||
<_ReferenceAsPackageId Include="@(Reference->'%(NuGetPackageId)')" Condition="'%(Reference.NuGetPackageId)' != ''">
|
||||
<OriginalIdentity>%(Identity)</OriginalIdentity>
|
||||
</_ReferenceAsPackageId>
|
||||
|
||||
<!-- Indirect references are any references whose PackageId isn't in the direct reference set: ReferencedNuGetPackages -->
|
||||
<_IndirectReferenceAsPackageId Include="@(_ReferenceAsPackageId)" Exclude="@(ReferencedNuGetPackages)"/>
|
||||
|
||||
<!-- Transform back to original -->
|
||||
<IndirectReference Include="@(_IndirectReferenceAsPackageId->'%(OriginalIdentity)')" />
|
||||
|
||||
<Reference Remove="@(IndirectReference)"/>
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
<Target Name="ValidatePackageVersions"
|
||||
Condition="'$(RestorePackages)'=='true' and '$(ValidatePackageVersions)'=='true' and Exists('$(ProjectJson)')">
|
||||
<ValidateProjectDependencyVersions ProjectJsons="$(ProjectJson)"
|
||||
ProhibitFloatingDependencies="$(ProhibitFloatingDependencies)"
|
||||
ValidationPatterns="@(ValidationPattern)" />
|
||||
</Target>
|
||||
|
||||
<Target Name="FilterTargetingPackResolvedNugetPackages"
|
||||
Condition="'$(SkipFilterTargetingPackResolvedNugetPackages)' != 'true'"
|
||||
AfterTargets="ResolveNuGetPackages" >
|
||||
<PropertyGroup>
|
||||
<_TargetingPackPrefix>Microsoft.TargetingPack</_TargetingPackPrefix>
|
||||
<TargetingPackReferenceCoreAssembly Condition="'$(TargetingPackReferenceCoreAssembly)' == '' and '%(TargetingPackReference.Identity)' == 'System.Private.CoreLib'">System.Private.CoreLib</TargetingPackReferenceCoreAssembly>
|
||||
<TargetingPackReferenceCoreAssembly Condition="'$(TargetingPackReferenceCoreAssembly)' == ''">mscorlib</TargetingPackReferenceCoreAssembly>
|
||||
|
||||
<!--
|
||||
S.P.CoreLib is generally architecture specific so disable the msbuild warning about
|
||||
referencing it from an MSIL project.
|
||||
-->
|
||||
<ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch Condition="'$(TargetingPackReferenceCoreAssembly)' == 'System.Private.CoreLib'">None</ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
|
||||
</PropertyGroup>
|
||||
|
||||
<!--
|
||||
Add the mscorlib and windows to the reference set by default to avoid a lot of duplication in projects
|
||||
They only act as a filter so if they aren't present in the packages references it will not impact anything.
|
||||
-->
|
||||
<ItemGroup Condition="'$(ExcludeDefaultTargetingPackReferences)' != 'true'">
|
||||
<TargetingPackReference Include="$(TargetingPackReferenceCoreAssembly)" Condition="'$(TargetingPackReferenceCoreAssembly)' != ''" />
|
||||
<TargetingPackReference Include="Windows" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<!-- Filter out all references coming out of the targeting pack packages except for TargetingPackReferences -->
|
||||
<ResolvedTargetingPackReference Include="@(Reference)"
|
||||
Condition="$([System.String]::new('%(Reference.NuGetPackageId)').StartsWith('$(_TargetingPackPrefix)'))" />
|
||||
<ResolvedTargetingPackReferenceFilename Include="@(ResolvedTargetingPackReference -> '%(Filename)')">
|
||||
<OriginalIdentity>%(Identity)</OriginalIdentity>
|
||||
</ResolvedTargetingPackReferenceFilename>
|
||||
<ResolvedTargetingPackReferenceFilename Remove="@(TargetingPackReference)" />
|
||||
<PackageReferencesToRemove Include="@(ResolvedTargetingPackReferenceFilename -> '%(OriginalIdentity)')" />
|
||||
<Reference Remove="@(PackageReferencesToRemove)" />
|
||||
|
||||
<!-- Filter out the copy-local set of references coming from the targeting pack packages -->
|
||||
<PackageCopyLocalToRemove Include="@(ReferenceCopyLocalPaths)"
|
||||
Condition="$([System.String]::new('%(ReferenceCopyLocalPaths.NuGetPackageId)').StartsWith('$(_TargetingPackPrefix)'))" />
|
||||
<ReferenceCopyLocalPaths Remove="@(PackageCopyLocalToRemove)" />
|
||||
</ItemGroup>
|
||||
|
||||
<Message Importance="Low"
|
||||
Text="Removed all ResolvedTagetingPackReferences that were not specified explicitly as a TargetingPackReference=[@(TargetingPackReference)]. PackageReferencesToRemove=[@(PackageReferencesToRemove)]." />
|
||||
</Target>
|
||||
</Project>
|
||||
@@ -94,7 +94,6 @@
|
||||
DependsOnTargets="GenerateTestExecutionScripts">
|
||||
<PropertyGroup>
|
||||
<TestArchiveDir>$(TestWorkingDir)$(OSPlatformConfig)/archive/tests/$(TargetOutputRelPath)</TestArchiveDir>
|
||||
<TestArchiveDir Condition="'$(TestTFM)' != ''">$(TestArchiveDir)$(TestTFM)/</TestArchiveDir>
|
||||
<ProjectJson Condition="!Exists('$(ProjectJson)')">$(OriginalProjectJson)</ProjectJson>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(TestProjectName)'==''">
|
||||
|
||||
@@ -2,25 +2,32 @@
|
||||
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
|
||||
<PropertyGroup Condition="'$(ResolveMatchingContract)' == 'true'">
|
||||
<AddProjectReferencesDynamicallyDependsOn>
|
||||
ResolveMatchingContract;
|
||||
$(AddProjectReferencesDynamicallyDependsOn);
|
||||
</AddProjectReferencesDynamicallyDependsOn>
|
||||
<ResolveReferencesDependsOn>
|
||||
ResolveMatchingContract;
|
||||
$(ResolveReferencesDependsOn)
|
||||
$(ResolveReferencesDependsOn);
|
||||
VerifyMatchingContract
|
||||
</ResolveReferencesDependsOn>
|
||||
<CleanDependsOn>
|
||||
ResolveMatchingContract;
|
||||
$(CleanDependsOn);
|
||||
</CleanDependsOn>
|
||||
</PropertyGroup>
|
||||
|
||||
<Target Name="ResolveMatchingContract">
|
||||
<PropertyGroup>
|
||||
<HasMatchingContract Condition="'$(HasMatchingContract)' == '' and Exists('$(SourceDir)/$(AssemblyName)/ref')">true</HasMatchingContract>
|
||||
<ContractProject Condition="'$(ContractProject)' == ''">$(SourceDir)/$(AssemblyName)/ref/$(AssemblyName).csproj</ContractProject>
|
||||
<HasMatchingContract Condition="'$(HasMatchingContract)' == '' and Exists('$(ContractProject)')">true</HasMatchingContract>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup Condition="'$(HasMatchingContract)' == 'true'">
|
||||
<ResolvedMatchingContract Include="$(ContractOutputPath)/$(MSBuildProjectName).dll" />
|
||||
<!-- add contract project as project reference to get target path -->
|
||||
<ProjectReference Include="$(ContractProject)">
|
||||
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
||||
<OutputItemType>ResolvedMatchingContract</OutputItemType>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
<Target Name="VerifyMatchingContract">
|
||||
<Error Condition="'$(HasMatchingContract)' == 'true' and !Exists('%(ResolvedMatchingContract.Identity)')" Text="ResolveMatchingContract could not find a matching contract '%(ResolvedMatchingContract.Identity)' not found." />
|
||||
</Target>
|
||||
</Project>
|
||||
|
||||
80
external/corefx/Tools-Override/sign.targets
vendored
Normal file
80
external/corefx/Tools-Override/sign.targets
vendored
Normal file
@@ -0,0 +1,80 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
|
||||
<PropertyGroup>
|
||||
<AuthenticodeSig Condition="'$(AuthenticodeSig)' == ''">Microsoft</AuthenticodeSig>
|
||||
<StrongNameSig Condition="'$(StrongNameSig)' == '' and '$(SignType)' == 'real' and '$(UseOpenKey)' != 'true'">StrongName</StrongNameSig>
|
||||
</PropertyGroup>
|
||||
|
||||
<UsingTask AssemblyFile="$(BuildToolsTaskDir)Microsoft.DotNet.Build.Tasks.dll" TaskName="OpenSourceSign" />
|
||||
<UsingTask AssemblyFile="$(BuildToolsTaskDir)Microsoft.DotNet.Build.Tasks.dll" TaskName="WriteSigningRequired" />
|
||||
|
||||
<PropertyGroup Condition="'$(SkipSigning)'!='true'">
|
||||
<AssemblyOriginatorKeyFile Condition="'$(AssemblyOriginatorKeyFile)' == ''">$(ToolsDir)MSFT.snk</AssemblyOriginatorKeyFile>
|
||||
<AssemblyOriginatorKeyFile Condition="'$(UseECMAKey)' == 'true'">$(ToolsDir)ECMA.snk</AssemblyOriginatorKeyFile>
|
||||
<AssemblyOriginatorKeyFile Condition="'$(UseOpenKey)' == 'true'">$(ToolsDir)Open.snk</AssemblyOriginatorKeyFile>
|
||||
|
||||
<!-- Don't sign test assemblies with the Microsoft Key, as this affects APIs checking if the test assembly is an MS Key -->
|
||||
<AssemblyOriginatorKeyFile Condition="'$(IsTestProject)' == 'true'">$(ToolsDir)Test.snk</AssemblyOriginatorKeyFile>
|
||||
|
||||
<SignAssembly>true</SignAssembly>
|
||||
<DelaySign>true</DelaySign>
|
||||
|
||||
<!-- For full keys we should disable delay signing -->
|
||||
<FullPublicPrivateKey Condition="'$(AssemblyOriginatorKeyFile)' == '$(ToolsDir)Open.snk'">true</FullPublicPrivateKey>
|
||||
<FullPublicPrivateKey Condition="'$(AssemblyOriginatorKeyFile)' == '$(ToolsDir)Test.snk'">true</FullPublicPrivateKey>
|
||||
|
||||
<DelaySign Condition="'$(FullPublicPrivateKey)' == 'true'">false</DelaySign>
|
||||
|
||||
<!--
|
||||
Setting DelaySign to true when running build on unix because of Roslyn doesn't support full signing on non-windows.
|
||||
See issue https://github.com/dotnet/roslyn/issues/8210.
|
||||
-->
|
||||
<DelaySign Condition="'$(RunningOnUnix)' == 'true'">true</DelaySign>
|
||||
|
||||
<DefineConstants>$(DefineConstants);SIGNED</DefineConstants>
|
||||
<!-- applicable values for SignType are oss, test or real -->
|
||||
<SignType Condition="'$(SignType)' == ''">oss</SignType>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- stub for signing. for official builds this is replaced with the real one -->
|
||||
<Target Name="SignFiles" AfterTargets="AfterBuild" />
|
||||
|
||||
<!-- writes a signing marker file containing the required signatures -->
|
||||
<Target Name="WriteSigningRequired"
|
||||
AfterTargets="AfterBuild"
|
||||
Condition="'$(SkipSigning)' != 'true' and '$(FullPublicPrivateKey)' != 'true' and '$(SignType)' != 'oss'"
|
||||
Inputs="$(TargetPath)"
|
||||
Outputs="$(TargetPath).requires_signing">
|
||||
<WriteSigningRequired AuthenticodeSig="$(AuthenticodeSig)"
|
||||
StrongNameSig="$(StrongNameSig)"
|
||||
MarkerFile="$(TargetPath).requires_signing" />
|
||||
<ItemGroup>
|
||||
<FileWrites Include="%(IntermediateAssembly.Identity).requires_signing" />
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
<!--
|
||||
NOTE: This mechanism for wiring in the OpenSourceSign target can't be changed to any of the following:
|
||||
|
||||
* AfterTargets=Compile -> hit by intellisense builds while @(IntermediateAssembly) doesn't exist yet.
|
||||
* AfterTargets=PrepareForRun -> hit after @(IntermediateAssembly) has already been copied to output.
|
||||
* BeforeTargets=CopyFilesToOutputDirectory -> does not work on Mono.
|
||||
-->
|
||||
<PropertyGroup>
|
||||
<PrepareForRunDependsOn>OpenSourceSign;$(PrepareForRunDependsOn)</PrepareForRunDependsOn>
|
||||
</PropertyGroup>
|
||||
|
||||
<Target Name="OpenSourceSign"
|
||||
Condition="'$(DelaySign)' == 'true' and '@(IntermediateAssembly)' != '' and '$(SkipSigning)' != 'true' and '$(SignType)' == 'oss'"
|
||||
Inputs="@(IntermediateAssembly)"
|
||||
Outputs="%(IntermediateAssembly.Identity).oss_signed"
|
||||
>
|
||||
<OpenSourceSign AssemblyPath="%(IntermediateAssembly.Identity)" />
|
||||
<Touch Files="%(IntermediateAssembly.Identity).oss_signed" AlwaysCreate="true" />
|
||||
<ItemGroup>
|
||||
<FileWrites Include="%(IntermediateAssembly.Identity).oss_signed" />
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
</Project>
|
||||
123
external/corefx/Tools-Override/tests.targets
vendored
123
external/corefx/Tools-Override/tests.targets
vendored
@@ -3,6 +3,7 @@
|
||||
|
||||
<!-- This is the target that copies the test assets to the test output -->
|
||||
<Import Project="$(MSBuildThisFileDirectory)publishtest.targets" />
|
||||
<Import Project="$(ToolsDir)PerfTesting.targets" Condition="Exists('$(ToolsDir)PerfTesting.targets') and '$(Performance)' == 'true'"/>
|
||||
<UsingTask TaskName="GenerateTestExecutionScripts" AssemblyFile="$(BuildToolsTaskDir)Microsoft.DotNet.Build.Tasks.dll"/>
|
||||
<UsingTask TaskName="GetTargetMachineInfo" AssemblyFile="$(BuildToolsTaskDir)Microsoft.DotNet.Build.Tasks.dll"/>
|
||||
|
||||
@@ -11,7 +12,6 @@
|
||||
<TestDisabled>false</TestDisabled>
|
||||
<TestDisabled Condition="'$(IsTestProject)'!='true' Or '$(SkipTests)'=='true' Or '$(RunTestsForProject)'=='false'">true</TestDisabled>
|
||||
<TestsSuccessfulSemaphore>tests.passed</TestsSuccessfulSemaphore>
|
||||
<RunningOnNetFx Condition="'$(_bc_TargetGroup)' == 'netfx'">true</RunningOnNetFx>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- In case that TestPath is not yet set, default it here -->
|
||||
@@ -27,19 +27,19 @@
|
||||
<UnsupportedPlatformsItems Include="$(UnsupportedPlatforms)"/>
|
||||
</ItemGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(RunningOnNetFx)' != 'true'">
|
||||
<PropertyGroup Condition="'$(BuildingNETFxVertical)' != 'true'">
|
||||
<XunitRuntimeConfig>$(ToolsDir)\xunit.console.netcore.runtimeconfig.json</XunitRuntimeConfig>
|
||||
<TestRuntimeEnvVar Condition="'$(OS)' == 'Windows_NT'">%RUNTIME_PATH%\</TestRuntimeEnvVar>
|
||||
<TestRuntimeEnvVar Condition="'$(OS)' != 'Windows_NT'">$RUNTIME_PATH/</TestRuntimeEnvVar>
|
||||
<TestHostExecutablePath Condition="'$(OS)'=='Windows_NT' AND '$(TestHostExecutablePath)' == ''">$(TestRuntimeEnvVar)dotnet.exe</TestHostExecutablePath>
|
||||
<TestHostExecutablePath Condition="'$(OS)'!='Windows_NT' AND '$(TestHostExecutablePath)' == ''">$(TestRuntimeEnvVar)dotnet</TestHostExecutablePath>
|
||||
<TestHostExecutablePath Condition="'$(OS)'=='Windows_NT' AND '$(TestHostExecutablePath)' == '' AND '$(BuildingUAPAOTVertical)' != 'true'">$(TestRuntimeEnvVar)dotnet.exe</TestHostExecutablePath>
|
||||
<TestHostExecutablePath Condition="'$(OS)'!='Windows_NT' AND '$(TestHostExecutablePath)' == '' AND '$(BuildingUAPAOTVertical)' != 'true'">$(TestRuntimeEnvVar)dotnet</TestHostExecutablePath>
|
||||
|
||||
<XunitExecutable Condition="'$(XunitExecutable)' == ''">xunit.console.netcore.exe</XunitExecutable>
|
||||
|
||||
<DebugEngines>{2E36F1D4-B23C-435D-AB41-18E608940038}</DebugEngines>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(RunningOnNetFx)' == 'true'">
|
||||
<PropertyGroup Condition="'$(BuildingNETFxVertical)' == 'true'">
|
||||
<XunitExecutable Condition="'$(XunitExecutable)' == ''">xunit.console.exe</XunitExecutable>
|
||||
</PropertyGroup>
|
||||
|
||||
@@ -47,15 +47,14 @@
|
||||
<PropertyGroup>
|
||||
<XunitResultsFileName>testResults.xml</XunitResultsFileName>
|
||||
|
||||
<XunitOptions Condition="'$(RunningOnNetFx)' == 'true'">$(XunitOptions) -noshadow </XunitOptions>
|
||||
<XunitOptions Condition="'$(BuildingNETFxVertical)' == 'true'">$(XunitOptions) -noshadow</XunitOptions>
|
||||
<XunitOptions Condition="'$(BuildingNETFxVertical)' == 'true' and '$(XUnitNoAppdomain)' == 'true'">$(XunitOptions) -noappdomain </XunitOptions>
|
||||
<XunitOptions>$(XunitOptions) -xml $(XunitResultsFileName)</XunitOptions>
|
||||
|
||||
<XunitOptions Condition="'$(Performance)'!='true'">$(XunitOptions) -notrait Benchmark=true</XunitOptions>
|
||||
<XunitOptions Condition="'$(BuildingUAPAOTVertical)'=='true'">$(XunitOptions) -redirectoutput</XunitOptions>
|
||||
|
||||
<XunitOptions Condition="'$(UseDotNetNativeToolchain)'=='true'">$(XunitOptions) -redirectoutput</XunitOptions>
|
||||
|
||||
<!-- Temporary till we fix the whole filtering with TargetGroup -->
|
||||
<XunitOptions Condition="'$(RunningOnNetFx)' != 'true'">$(XunitOptions) -notrait category=nonnetcoreapp1.1tests</XunitOptions>
|
||||
<XunitOptions>$(XunitOptions) -notrait category=non$(_bc_TargetGroup)tests</XunitOptions>
|
||||
|
||||
<XunitOptions Condition="'$(XunitMaxThreads)'!=''">$(XunitOptions) -maxthreads $(XunitMaxThreads)</XunitOptions>
|
||||
<XunitTestAssembly Condition="'$(XunitTestAssembly)' == ''">$(TargetFileName)</XunitTestAssembly>
|
||||
@@ -68,6 +67,11 @@
|
||||
<TestArguments Condition="'$(TestHostExecutablePath)'==''">$(XunitArguments)</TestArguments>
|
||||
|
||||
<TestCommandLine Condition="'$(Performance)'!='true'">$(TestProgram) $(TestArguments) {XunitTraitOptions}</TestCommandLine>
|
||||
|
||||
<!-- set $(TestDebugger) to eg c:\debuggers\windbg.exe to run tests under a debugger -->
|
||||
<TestCommandLine Condition="'$(TestDebugger)' != '' and !$(TestDebugger.Contains('devenv'))">$(TestDebugger) $(TestCommandLine)</TestCommandLine>
|
||||
<TestCommandLine Condition="'$(TestDebugger)' != '' and $(TestDebugger.Contains('devenv'))">$(TestDebugger) /debugexe $(TestCommandLine)</TestCommandLine>
|
||||
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- The Code Coverage targets will override TestHost and TestCommandLine if coverage is enabled -->
|
||||
@@ -77,7 +81,7 @@
|
||||
<PropertyGroup Condition="'$(IsTestProject)'=='true'">
|
||||
<StartWorkingDirectory Condition="'$(StartWorkingDirectory)'==''">$(TestPath)</StartWorkingDirectory>
|
||||
<StartAction Condition="'$(StartAction)'==''">Program</StartAction>
|
||||
<StartProgram Condition="'$(StartProgram)'==''">$(TestSharedFxDir)\dotnet.exe</StartProgram>
|
||||
<StartProgram Condition="'$(StartProgram)'==''">$(TestSharedFxDir)dotnet.exe</StartProgram>
|
||||
<StartArguments Condition="'$(StartArguments)'==''">$(TestArguments) -wait -parallel none</StartArguments>
|
||||
</PropertyGroup>
|
||||
|
||||
@@ -89,16 +93,47 @@
|
||||
<RunTestsForProjectInputs Include="@(_DebugSymbolsIntermediatePath)" />
|
||||
<RunTestsForProjectInputs Include="@(AllItemsFullPathWithTargetPath)" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition="'$(RunningOnNetFx)' != 'true'">
|
||||
<ItemGroup Condition="'$(BuildingNETFxVertical)' != 'true'">
|
||||
<SupplementalTestData Include="$(XunitRuntimeConfig)" />
|
||||
<SupplementalTestData Include="$(RuntimePath)xunit.console.netcore.exe" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition="'$(RunningOnNetFx)' == 'true'">
|
||||
<SupplementalTestData Include="$(RuntimePath)xunit*.*" />
|
||||
<SupplementalTestData Include="$(RuntimePath)*.xslt" />
|
||||
<ItemGroup Condition="'$(BuildingNETFxVertical)' == 'true'">
|
||||
<SupplementalTestData Include="$(RuntimePath)xunit.console.exe" />
|
||||
<SupplementalTestData Include="$(RuntimePath)xunit.console.exe.config" />
|
||||
<SupplementalTestData Include="$(RuntimePath)xunit.execution.desktop.dll" />
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
<Target Name="AddDefaultTestReferences" BeforeTargets="SetupDefaultReferences">
|
||||
<ItemGroup Condition="'$(IsTestProject)'=='true' and '$(IncludeDefaultReferences)' == 'true'">
|
||||
<TargetingPackExclusions Include="System.Runtime.WindowsRuntime.UI.Xaml" /> <!-- Harmless, but causes PRI targets to run -->
|
||||
<TargetingPackExclusions Include="@(ReferenceFromRuntime)"/>
|
||||
|
||||
<!-- Whitelisted runtime assemblies that are OK to reference. -->
|
||||
<ReferenceFromRuntime Include="xunit.core" />
|
||||
<ReferenceFromRuntime Include="Xunit.NetCore.Extensions" />
|
||||
<ReferenceFromRuntime Include="xunit.assert" />
|
||||
<ReferenceFromRuntime Include="xunit.abstractions" />
|
||||
<ReferenceFromRuntime Include="xunit.performance.core" />
|
||||
<ReferenceFromRuntime Include="xunit.performance.api" />
|
||||
|
||||
<!-- Reference everything in the targeting pack directory -->
|
||||
<TargetingPackItems Include="%(TargetingPackDirs.Identity)/*.dll" />
|
||||
|
||||
<DefaultReference Include="%(TargetingPackItems.Filename)" Exclude="@(TargetingPackExclusions)" />
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
<Target Name="CopyRemoteExecutionConfigFile"
|
||||
BeforeTargets="GenerateTestExecutionScripts"
|
||||
Condition="'$(BuildingNETFxVertical)' == 'true' And Exists('$(TestPath)\RemoteExecutorConsoleApp.exe')">
|
||||
|
||||
<Copy SourceFiles="$(RuntimePath)\xunit.console.exe.config"
|
||||
DestinationFiles="$(TestPath)\RemoteExecutorConsoleApp.exe.config"
|
||||
SkipUnchangedFiles="true"
|
||||
/>
|
||||
</Target>
|
||||
|
||||
<!-- Generate the script to run the tests. The script performs two high-level steps:
|
||||
1. Copies the common test runtime dependencies calculated in DiscoverTestDependencies to the test
|
||||
execution directory. Each copy command no-ops if the file already exists in the test execution
|
||||
@@ -163,26 +198,63 @@
|
||||
Overwrite="true"
|
||||
Encoding="Ascii" />
|
||||
|
||||
<PropertyGroup Condition="'$(UseDotNetNativeToolchain)' == 'true'">
|
||||
<ILCBuildType Condition="'$(ILCBuildType)' == ''">ret</ILCBuildType>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- For .NET Native compilation, we first need to generate a native executable if possible. -->
|
||||
<ItemGroup Condition="'$(UseDotNetNativeToolchain)' == 'true' AND '$(Performance)'!='true'" >
|
||||
<IlcInputFolderContents Include="$(ILCFXInputFolder)/*" />
|
||||
<TestCommandLines Include="mklink /H %(IlcInputFolderContents.Filename)%(IlcInputFolderContents.Extension) %(IlcInputFolderContents.FullPath)" />
|
||||
<TestCommandLines Include="copy /y $(TestILCFolder)\default.rd.xml %EXECUTION_DIR%" />
|
||||
<TestCommandLines Include="$(TestILCFolder)\ilc.exe -usecustomframework -ExeName xunit.console.netcore.exe -in %EXECUTION_DIR% -out %EXECUTION_DIR%\native -usedefaultpinvoke -buildtype ret -v diag || exit /b %ERRORLEVEL%"/>
|
||||
<TestCommandLines Include="call $(TestILCFolder)\ilc.exe -ExeName xunit.console.netcore.exe -in %EXECUTION_DIR% -out %EXECUTION_DIR%\native -usedefaultpinvoke -buildtype $(ILCBuildType) -v diag || exit /b %ERRORLEVEL%"/>
|
||||
<TestCommandLines Include="copy /y $(TestILCFolder)\CRT\vcruntime140_app.dll %EXECUTION_DIR%\native" />
|
||||
<TestCommandLines Include="echo > %EXECUTION_DIR%\native\$(XunitTestAssembly)"/>
|
||||
<TestCommandLines Include="cd native"/>
|
||||
<PostExecutionTestCommandLines Include="type Xunit.Console.Output.txt" />
|
||||
<PostExecutionTestCommandLines Include="copy /y testResults.xml %EXECUTION_DIR%\" />
|
||||
</ItemGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(BuildingUAPVertical)' == 'true'">
|
||||
<!-- The location where the logs will be written by the test runner -->
|
||||
<UAP_Results_Path Condition="'$(UAP_Results_Path)'==''">%USERPROFILE%\Documents\TestResults\</UAP_Results_Path>
|
||||
|
||||
<_Runtime_Path>%RUNTIME_PATH%\UAPLayout\</_Runtime_Path>
|
||||
<!-- Make sure the path only has one type of slashes -->
|
||||
<_Runtime_Path>$(_Runtime_Path.Replace('/', '\'))</_Runtime_Path>
|
||||
|
||||
<!-- The test execution command is different for UAP. -->
|
||||
<TestCommandLine>%RUNTIME_PATH%\Launcher\WindowsStoreAppLauncher.exe -test appxmanifest.xml $(XunitArguments) $(XunitTraitOptions)</TestCommandLine>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup Condition="'$(BuildingUAPVertical)' == 'true'" >
|
||||
<!-- Copy the runner files into the test directory -->
|
||||
<RunnerFolderContents Include="$(NETCoreAppTestRootPath)\Runner\**\*" />
|
||||
|
||||
<TestCommandLines Include="mkdir Assets" />
|
||||
<TestCommandLines Include="mkdir entrypoint" />
|
||||
<TestCommandLines Include="mkdir Properties" />
|
||||
<TestCommandLines Include="mkdir WinMetadata" />
|
||||
<TestCommandLines Include="mklink /H %(RunnerFolderContents.RecursiveDir)%(RunnerFolderContents.Filename)%(RunnerFolderContents.Extension) %RUNTIME_PATH%\Runner\%(RunnerFolderContents.RecursiveDir)%(RunnerFolderContents.Filename)%(RunnerFolderContents.Extension)" />
|
||||
|
||||
<!-- Copy the runtime binaries over -->
|
||||
<RuntimePathContents Include="$(RuntimePath)\**\*" />
|
||||
<TestCommandLines Include="mklink /H %(RuntimePathContents.RecursiveDir)%(RuntimePathContents.Filename)%(RuntimePathContents.Extension) $(_Runtime_Path)%(RuntimePathContents.Filename)%(RuntimePathContents.Extension)" />
|
||||
|
||||
<!-- Copy the log files and the results files from the Documents folder to the test folder -->
|
||||
<PostExecutionTestCommandLines Include="move $(UAP_Results_Path)$(XunitTestAssembly).xml .\$(XunitResultsFileName)" />
|
||||
<PostExecutionTestCommandLines Include="move $(UAP_Results_Path)$(XunitTestAssembly).txt .\logs.txt" />
|
||||
<PostExecutionTestCommandLines Include="type logs.txt" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition="'$(Performance)'!='true'">
|
||||
<!-- On Windows, call prevents the test command from making execution end prematurely -->
|
||||
<TestCommandLines Condition="'$(TargetOS)'=='Windows_NT'" Include="call $(TestCommandLine)"/>
|
||||
<TestCommandLines Condition="'$(TargetOS)'!='Windows_NT'" Include="$(TestCommandLine)"/>
|
||||
</ItemGroup>
|
||||
|
||||
<!-- Currently all netcore50 implementations of System.Console actually write to a noop stream -->
|
||||
<!-- Workaround is to have the exe detect this and use Console.SetOut to write to a text file. -->
|
||||
<ItemGroup Condition="'$(UseDotNetNativeToolchain)' == 'true' AND '$(Performance)'!='true'" >
|
||||
<TestCommandLines Include="type Xunit.Console.Output.txt" />
|
||||
<TestCommandLines Include="copy /y testResults.xml %EXECUTION_DIR%\" />
|
||||
<ItemGroup Condition ="'$(Performance)'=='true'">
|
||||
<TestCommandLines Include="@(PerfTestCommandLines)" />
|
||||
</ItemGroup>
|
||||
|
||||
<!-- Do not put anything between this Item Group and the GenerateTestExecutionScripts invocation -->
|
||||
@@ -206,6 +278,11 @@
|
||||
>
|
||||
|
||||
<MakeDir Condition="'$(CoverageEnabledForProject)'=='true'" Directories="$(CoverageReportDir)" />
|
||||
<Error Text="TestILCFolder property is required for running uapaot tests. Please pass in the full path to the directory that contains ilc.exe to msbuild using /p:TestILCFolder=path_to_ilc_dir.exe" Condition="'$(BuildingUAPAOTVertical)' == 'true' AND '$(TestILCFolder)' == ''" />
|
||||
|
||||
<!-- For UAP, make sure the Runner and Launcher folder exist, otherwise the tests cannot run -->
|
||||
<Error Text="We cannot run the tests for UAP because either the Runner or the Launcher could not be found. You need to specify the UAPToolsFolder property when calling build.cmd to fix this."
|
||||
Condition="'$(BuildingUAPVertical)'=='true' and (!Exists('$(NETCoreAppTestRootPath)\Runner') or !Exists('$(NETCoreAppTestRootPath)\Launcher'))" />
|
||||
|
||||
<Exec Command="$(TestPath)/$(RunnerScriptName) $(TestSharedFxDir)"
|
||||
CustomErrorRegularExpression="Failed: [^0]"
|
||||
@@ -246,10 +323,8 @@
|
||||
</Target>
|
||||
|
||||
<Target Name="CheckTestPlatforms">
|
||||
<GetTargetMachineInfo Condition="'$(TargetOS)' == ''">
|
||||
<Output TaskParameter="TargetOS" PropertyName="TargetOS" />
|
||||
</GetTargetMachineInfo>
|
||||
<PropertyGroup>
|
||||
<TargetOS Condition="'$(TargetOS)' == ''">$(DefaultOSGroup)</TargetOS>
|
||||
<TestDisabled Condition="'%(UnsupportedPlatformsItems.Identity)' == '$(TargetOS)' Or '$(ConfigurationErrorMsg)' != ''">true</TestDisabled>
|
||||
</PropertyGroup>
|
||||
<Message Text="CheckTestPlatforms found TargetOS of [$(TargetOS)]." Importance="Low" />
|
||||
|
||||
@@ -263,10 +263,10 @@
|
||||
</ItemGroup>
|
||||
<!-- Windows Exec command requires DOS escaping for the percent sign since it secretly runs the process in a shell instead of calling createprocess. -->
|
||||
<PropertyGroup>
|
||||
<LatestDateCommand Condition="'$(OsEnvironment)'=='Windows_NT'">git show -s --format=^%25%25cd --date=short HEAD</LatestDateCommand>
|
||||
<LatestDateCommand Condition="'$(OsEnvironment)'!='Windows_NT'">git show -s --format=%25cd --date=short HEAD</LatestDateCommand>
|
||||
<LatestDateCommand Condition="'$(RunningOnUnix)'!='true'">git show -s --format=^%25%25cd --date=short HEAD</LatestDateCommand>
|
||||
<LatestDateCommand Condition="'$(RunningOnUnix)'=='true'">git show -s --format=%25cd --date=short HEAD</LatestDateCommand>
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
<Exec Command="$(LatestDateCommand)" StandardOutputImportance="Low" IgnoreExitCode="true" IgnoreStandardErrorWarningFormat="true" ConsoleToMSBuild="true">
|
||||
<Output TaskParameter="ConsoleOutput" PropertyName="VersionSeedDate" />
|
||||
<Output TaskParameter="ExitCode" PropertyName="LatestDateCommandExitCode" />
|
||||
|
||||
Reference in New Issue
Block a user