summaryrefslogtreecommitdiff
path: root/dir.props
diff options
context:
space:
mode:
authorJacek Blaszczynski <biosciencenow@outlook.com>2017-07-19 17:36:41 +0200
committerJan Kotas <jkotas@microsoft.com>2017-07-19 17:36:41 +0200
commit96997df404bbf1b30969aeed6303bc1fead43ed7 (patch)
tree43420c7de8c05069bdac0e7995489da62a7d73d6 /dir.props
parenta14608efbad1bcb4e9d36a418e1e5ac267c083fb (diff)
downloadcoreclr-96997df404bbf1b30969aeed6303bc1fead43ed7.tar.gz
coreclr-96997df404bbf1b30969aeed6303bc1fead43ed7.tar.bz2
coreclr-96997df404bbf1b30969aeed6303bc1fead43ed7.zip
Fix errors in MSBuild prperties initialization in System.Private.CoreLib.csproj (#12356)
Fixes issue #12355 Project System.Private.CoreLib.csproj imports directly Microsoft.Net.Compilers.props at line# 4 before including dir.props from repo root. $(RepoRoot)/dir.props imports Microsoft.Net.Compilers.props at line# 186. As a result of this sequence of duplicated project imports and lack of safeguards against importing the same .props file twice MSBuild reports that Microsoft.Net.Compilers.props file is included twice with warning that second import will be ignored - in this case not evaluated. This results in initialization of Microsoft.Net.Compilers.props values to defaults because MSBuild evaluates Microsoft.Net.Compilers.props only once before $(RepoRoot)/dir.props are included. Removing import of Microsoft.Net.Compilers.props from System.Private.CoreLib.csproj and moving $(RepoRoot)/dir.props file import to top of System.Private.CoreLib.csproj solves these problems by ensuring expected order of evaluation of Microsoft.Net.Compilers.props file by MSBuild after all project wide values are initialized in $(RepoRoot)/dir.props.
Diffstat (limited to 'dir.props')
-rw-r--r--dir.props3
1 files changed, 2 insertions, 1 deletions
diff --git a/dir.props b/dir.props
index bdba8141da..5f2f987bdf 100644
--- a/dir.props
+++ b/dir.props
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-
+ <Import Condition="Exists('..\dir.props')" Project="..\dir.props" />
+
<!--
$(OS) is set to Unix/Windows_NT. This comes from an environment variable on Windows and MSBuild on Unix.
-->