Merge pull request #19144 from BruceForstall/Fix13796
[platform/upstream/coreclr.git] / tests / dir.props
1 <?xml version="1.0" encoding="utf-8"?>
2 <Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3   <!--
4     $(OS) is set to Unix/Windows_NT. This comes from an environment variable on Windows and MSBuild on Unix.
5   -->
6   <PropertyGroup>
7     <OsEnvironment Condition="'$(OsEnvironment)'=='' and '$(OS)'=='OSX'">Unix</OsEnvironment>
8     <OsEnvironment Condition="'$(OsEnvironment)'==''">$(OS)</OsEnvironment>
9   </PropertyGroup>
10   
11   <Import Project="dir.sdkbuild.props" Condition="'$(UsingMicrosoftNETSdk)' == 'true'"  />
12   
13   <!-- Build Tools Versions -->
14   <PropertyGroup>
15     <RoslynVersion>1.0.0-rc3-20150510-01</RoslynVersion>
16     <RoslynPackageName>Microsoft.Net.ToolsetCompilers</RoslynPackageName>
17   </PropertyGroup>
18
19     <!--
20      Switching to the .NET Core version of the BuildTools tasks seems to break numerous scenarios, such as VS intellisense and resource designer
21      as well as running the build on mono. Until we can get these sorted out we will continue using the .NET 4.5 version of the tasks.
22      
23      It also breaks building any C# project with dotnet.exe on Windows. The windows version of BuildTools doesn't appear to download the .Net Core
24      Roslyn NuGet package which has a Csc task supporting OverrideToolHost, but the default BuildTools CSharpCore targets file does specify 
25      OverrideToolHost. The result is that building anything in C# when RunningOnCore=true on Windows fails in Csc task with a parameter not supported error.
26      
27      Given that the Windows Core scenario is pretty broken on BuildTools it is currently configured not to use BuildTools at all. This allows ad-hoc usage
28      of the dotnet tool to work in the test tree as a developer convenience. Its not clear that we should invest in improving BuildTools Core support and
29      instead we could just move to using dotnet officially.
30      -->  
31   <PropertyGroup>  
32     <RunningOnCore>false</RunningOnCore>
33     <RunningOnCore Condition="'$(MSBuildRuntimeType)' == 'Core'">true</RunningOnCore>
34     <BuildToolsTargetsDesktop>false</BuildToolsTargetsDesktop>
35     <BuildToolsTargetsDesktop Condition="'$(RunningOnCore)' != 'true'">true</BuildToolsTargetsDesktop>
36     <BuildToolsTargets45>$(BuildToolsTargetsDesktop)</BuildToolsTargets45>
37     <RunningOnUnix Condition="('$(RunningOnUnix)' == '') And ('$(MSBuildRuntimeType)' == 'Core') And ('$(OS)'!='Windows_NT')">true</RunningOnUnix>
38     <UseBuildTools>true</UseBuildTools>
39   </PropertyGroup>  
40
41   <!-- Common repo directories -->
42   <PropertyGroup>
43     <CopyNuGetImplementations Condition="'$(CopyNuGetImplementations)'==''">false</CopyNuGetImplementations>
44     <ProjectDir>$(MSBuildThisFileDirectory)</ProjectDir>
45     <SourceDir>$(ProjectDir)src\</SourceDir>
46     <PackagesDir>$(ProjectDir)..\packages\</PackagesDir>
47     <ToolsDir Condition="'$(ToolsDir)'==''">$(ProjectDir)..\Tools\</ToolsDir>
48     <DotnetCliPath Condition="'$(DotnetCliPath)'==''">$(ToolsDir)dotnetcli\</DotnetCliPath>
49     <BuildToolsTaskDir Condition="'$(BuildToolsTargets45)' == 'true'">$(ToolsDir)net46\</BuildToolsTaskDir>
50     <OverrideToolHost Condition="'$(OS)' != 'Windows_NT'">$(DotnetCliPath)dotnet</OverrideToolHost>
51     <!-- We don't use any of MSBuild's resolution logic for resolving the framework, so just set these two properties to any folder that exists to skip
52          the GenerateReferenceAssemblyPaths task (not target) and to prevent it from outputting a warning (MSB3644). -->
53     <_TargetFrameworkDirectories Condition="'$(BuildToolsTargetsDesktop)' != 'true'">$(MSBuildThisFileDirectory)/Documentation</_TargetFrameworkDirectories>
54     <_FullFrameworkReferenceAssemblyPaths Condition="'$(BuildToolsTargetsDesktop)' != 'true'">$(MSBuildThisFileDirectory)/Documentation</_FullFrameworkReferenceAssemblyPaths>
55     <ExcludeSigningImport>true</ExcludeSigningImport>
56   </PropertyGroup>
57
58   <!-- Common properties -->
59   <PropertyGroup>
60     <RootBinDir>$(__RootBinDir)\</RootBinDir>
61     <RootBinDir Condition="'$(__RootBinDir)'==''">$(ProjectDir)..\bin\</RootBinDir>
62
63     <BinDir>$(__BinDir)\</BinDir>
64     <BinDir Condition="'$(__BinDir)'==''">$(RootBinDir)Product\$(BuildOS).$(BuildArch).$(BuildType)\</BinDir>
65
66     <CoreCLRBinDir>$(RootBinDir)Product\$(__BuildOS).$(__BuildArch).$(__BuildType)\</CoreCLRBinDir>
67   </PropertyGroup>
68
69 <!-- Default Test platform to deploy the netstandard compiled tests to -->
70   <PropertyGroup>
71     <!-- we default TestTFM and FilterToTestTFM to netcoreapp1.0 if they are not explicity defined -->
72     <DefaultTestTFM Condition="'$(DefaultTestTFM)'==''">netcoreapp1.0</DefaultTestTFM>
73     <TestTFM Condition="'$(TestTFM)'==''">$(DefaultTestTFM)</TestTFM>
74     <FilterToTestTFM Condition="'$(FilterToTestTFM)'==''">$(DefaultTestTFM)</FilterToTestTFM>
75   </PropertyGroup>
76
77   <!-- Output paths -->
78   <PropertyGroup>
79     <BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)' == ''">$(RootBinDir)obj\</BaseIntermediateOutputPath>
80     <IntermediateOutputPath Condition="'$(IntermediateOutputPath)' == ''">$(BaseIntermediateOutputPath)\$(BuildOS).$(BuildArch).$(BuildType)</IntermediateOutputPath>
81     <OutputPath Condition="'$(OutputPath)' == ''">$(BaseIntermediateOutputPath)\$(BuildOS).$(BuildArch).$(BuildType)</OutputPath>
82   </PropertyGroup>
83
84     <!-- Targeting Package paths -->
85   <PropertyGroup>
86     <TargetingPackPath Condition="'$(BaseTargetingPackPath)' == ''">$(RootBinDir)TargetingPack\</TargetingPackPath>
87   </PropertyGroup>
88
89   <!-- Import Build tools common props file where repo-independent properties are found -->
90   <Import Condition="Exists('$(ToolsDir)Build.Common.props') And '$(UseBuildTools)'=='true'" Project="$(ToolsDir)Build.Common.props" />
91
92   <!-- Provides properties for dependency versions and configures dependency verification/auto-upgrade. -->
93   <Import Project="$(ProjectDir)..\dependencies.props" />
94
95   <!-- Add test-specific package restore sources. -->
96   <PropertyGroup>
97     <RestoreSources Condition="'$(DotNetBuildOffline)' != 'true'">
98       https://dotnet.myget.org/F/dotnet-corefxlab/api/v3/index.json;
99       $(RestoreSources)
100     </RestoreSources>
101     <RestoreSources Condition="'$(IntermediateAzureFeed)' != ''">
102       $(IntermediateAzureFeed);
103       $(RestoreSources)
104     </RestoreSources>
105   </PropertyGroup>
106
107   <!-- Use Roslyn Compilers to build -->
108   <Import Project="$(RoslynPropsFile)" Condition="Exists('$(RoslynPropsFile)') and '$(RoslynIncompatibleMsbuildVersion)' != 'true'" />
109
110   <PropertyGroup Condition="'$(BuildAllProjects)'=='true'">
111     <!-- When we do a traversal build we get all packages up front, don't restore them again -->
112     <RestorePackages>false</RestorePackages>
113   </PropertyGroup>
114
115   <PropertyGroup Condition="'$(OverwriteCoreClrPackageVersion)' == 'true'">
116     <BuildVersionFile>$(BaseIntermediateOutputPath)BuildVersion-$(OfficialBuildId).props</BuildVersionFile>
117   </PropertyGroup>
118
119   <!-- If we want to overwrite the desired CoreCLR package version, we need to get the new version from the generated props file in bin/obj -->
120   <Import Condition="'$(OverwriteCoreClrPackageVersion)' == 'true'" Project="$(BuildVersionFile)" />
121
122   <PropertyGroup Condition="'$(OverwriteCoreClrPackageVersion)' == 'true'">
123     <VersionToRestore Condition="'$(StableVersion)' != ''">$(StableVersion)</VersionToRestore>
124     <VersionToRestore Condition="'$(VersionToRestore)' == ''">$(PackageVersion)-$(PreReleaseLabel)-$(BuildNumberMajor)-$(BuildNumberMinor)</VersionToRestore>
125     <PackageVersionArg>/p:MicrosoftNETCoreRuntimeCoreCLRPackageVersion=$(VersionToRestore)</PackageVersionArg>
126   </PropertyGroup>
127
128   <!-- Which tests shall we build? Default: Priority 0 tests.
129     At the command-line, the user can specify /p:CLRTestPriorityToBuild=666 (for example), and
130     all tests with CLRTestPriority 666,..., 1 AND 0 will build. 
131     
132     Consequently, specifying CLRTestPriorityToBuild=1 will build all tests with CLRTestPriority 1 and 0.
133     
134     CLRTestPriority = 0 will build only priority 0 cases. 
135   
136     In other words, the CLRTestPriority cases of 0 are *essential* testcases. The higher the value,
137     the less priority we give them.
138    -->
139   <PropertyGroup>
140     <CLRTestPriorityToBuild>0</CLRTestPriorityToBuild>
141   </PropertyGroup>
142   
143 </Project>