Unpack dotnet sdk zipfile and add documentation file to nupkg
[platform/core/dotnet/build-tools.git] / dotnet / sdk / 2.0.0-preview1-005700 / Microsoft.CSharp.targets
1 <!--\r
2 ***********************************************************************************************\r
3 Microsoft.CSharp.targets\r
4 \r
5 WARNING:  DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have\r
6           created a backup copy.  Incorrect changes to this file will make it\r
7           impossible to load or build your projects from the command-line or the IDE.\r
8 \r
9 This file defines the steps in the standard build process specific for C# .NET projects.\r
10 For example, it contains the step that actually calls the C# compiler.  The remainder\r
11 of the build process is defined in Microsoft.Common.targets, which is imported by \r
12 this file.\r
13 \r
14 Copyright (C) Microsoft Corporation. All rights reserved.\r
15 ***********************************************************************************************\r
16 -->\r
17 \r
18 <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
19    <!-- \r
20         We are doing a cross-targeting build if there is no list of target frameworks specified\r
21         nor is there a current target framework being built individually. In that case, this import is\r
22         redirected to Microsoft.CSharp.CrossTargeting.targets.\r
23    -->\r
24    <PropertyGroup Condition="'$(TargetFrameworks)' != '' and '$(TargetFramework)' == ''">\r
25       <IsCrossTargetingBuild>true</IsCrossTargetingBuild>\r
26    </PropertyGroup>\r
27 \r
28    <!--\r
29         In VS 2010 SP1 and VS 2012, both supported for asset compatibility, the MSBuild installed \r
30         as part of them did not enforce using the local ToolsVersion (4.0) in all cases, but instead \r
31         just used whatever ToolsVersion was in the project file if it existed on the machine, and \r
32         only forced 4.0 if that ToolsVersion did not exist.  \r
33 \r
34         Moving forward, we do want to enforce a single acting ToolsVersion per version of Visual Studio, \r
35         but in order to approximate this behavior on VS 2010 SP1 and VS 2012 as well, we've redirected \r
36         the targets:  If we're building using 4.X MSBuild (which doesn't define the new reserved \r
37         property, MSBuildAssemblyVersion), we'll point right back at the 4.0 targets, which still exist \r
38         as part of the .NET Framework.  Only if we're using the new MSBuild will we point to the current\r
39         targets. \r
40    -->\r
41 \r
42    <Choose>\r
43       <When Condition="'$(MSBuildAssemblyVersion)' == ''">\r
44          <PropertyGroup>\r
45             <CSharpTargetsPath>$(MSBuildFrameworkToolsPath)\Microsoft.CSharp.targets</CSharpTargetsPath>\r
46 \r
47             <!-- Same condition as in .NET 4.5 C# targets so that we can override the behavior where it defaults to \r
48                  MSBuildToolsPath, which would be incorrect in this case -->\r
49             <CscToolPath Condition="'$(CscToolPath)' == '' and '$(BuildingInsideVisualStudio)' != 'true'">$(MsBuildFrameworkToolsPath)</CscToolPath>\r
50          </PropertyGroup>\r
51       </When>\r
52       <When Condition="'$(IsCrossTargetingBuild)' == 'true'">\r
53          <PropertyGroup>\r
54             <CSharpTargetsPath>$(MSBuildToolsPath)\Microsoft.CSharp.CrossTargeting.targets</CSharpTargetsPath>\r
55           </PropertyGroup>\r
56       </When>\r
57       <Otherwise>\r
58          <PropertyGroup>\r
59             <CSharpTargetsPath>$(MSBuildToolsPath)\Microsoft.CSharp.CurrentVersion.targets</CSharpTargetsPath>\r
60          </PropertyGroup>\r
61       </Otherwise>\r
62    </Choose>\r
63 \r
64 \r
65    <PropertyGroup Condition="'$(MSBuildAssemblyVersion)' == ''">\r
66       <!-- \r
67            Overrides for the Microsoft.Common.targets extension targets. Used to make sure that only the imports we specify \r
68            (hard-coded to 4.0 locations) are used, not the 12.0 locations that would be used by default. Defined here because \r
69            Microsoft.CSharp.targets imports Microsoft.Common.targets from the current directory rather than using MSBuildToolsPath, \r
70            so defining these in Microsoft.Common.targets alone would not suffice for C# projects.\r
71 \r
72            NOTE: This logic is duplicated in Microsoft.VisualBasic.targets (VB has the same problem) and in Microsoft.Common.targets\r
73            (for anyone who DOES import it directly), so for any changes to this logic in this file, please also edit the other two. \r
74        -->\r
75       <ImportByWildcardBefore40MicrosoftCommonTargets Condition="'$(ImportByWildcardBefore40MicrosoftCommonTargets)' == ''">$(ImportByWildcardBeforeMicrosoftCommonTargets)</ImportByWildcardBefore40MicrosoftCommonTargets>\r
76       <ImportByWildcardBefore40MicrosoftCommonTargets Condition="'$(ImportByWildcardBefore40MicrosoftCommonTargets)' == ''">true</ImportByWildcardBefore40MicrosoftCommonTargets>\r
77 \r
78       <ImportByWildcardAfter40MicrosoftCommonTargets Condition="'$(ImportByWildcardAfter40MicrosoftCommonTargets)' == ''">$(ImportByWildcardAfterMicrosoftCommonTargets)</ImportByWildcardAfter40MicrosoftCommonTargets>\r
79       <ImportByWildcardAfter40MicrosoftCommonTargets Condition="'$(ImportByWildcardAfter40MicrosoftCommonTargets)' == ''">true</ImportByWildcardAfter40MicrosoftCommonTargets>\r
80 \r
81       <ImportUserLocationsByWildcardBefore40MicrosoftCommonTargets Condition="'$(ImportUserLocationsByWildcardBefore40MicrosoftCommonTargets)' == ''">$(ImportUserLocationsByWildcardBeforeMicrosoftCommonTargets)</ImportUserLocationsByWildcardBefore40MicrosoftCommonTargets>\r
82       <ImportUserLocationsByWildcardBefore40MicrosoftCommonTargets Condition="'$(ImportUserLocationsByWildcardBefore40MicrosoftCommonTargets)' == ''">true</ImportUserLocationsByWildcardBefore40MicrosoftCommonTargets>\r
83 \r
84       <ImportUserLocationsByWildcardAfter40MicrosoftCommonTargets Condition="'$(ImportUserLocationsByWildcardAfter40MicrosoftCommonTargets)' == ''">$(ImportUserLocationsByWildcardAfterMicrosoftCommonTargets)</ImportUserLocationsByWildcardAfter40MicrosoftCommonTargets>\r
85       <ImportUserLocationsByWildcardAfter40MicrosoftCommonTargets Condition="'$(ImportUserLocationsByWildcardAfter40MicrosoftCommonTargets)' == ''">true</ImportUserLocationsByWildcardAfter40MicrosoftCommonTargets>\r
86 \r
87       <ImportByWildcardBeforeMicrosoftCommonTargets>false</ImportByWildcardBeforeMicrosoftCommonTargets>\r
88       <ImportByWildcardAfterMicrosoftCommonTargets>false</ImportByWildcardAfterMicrosoftCommonTargets>\r
89       <ImportUserLocationsByWildcardBeforeMicrosoftCommonTargets>false</ImportUserLocationsByWildcardBeforeMicrosoftCommonTargets>\r
90       <ImportUserLocationsByWildcardAfterMicrosoftCommonTargets>false</ImportUserLocationsByWildcardAfterMicrosoftCommonTargets>\r
91 \r
92       <CustomBeforeMicrosoftCommonTargets Condition="'$(CustomBeforeMicrosoftCommonTargets)' == ''">$(MSBuildExtensionsPath)\v4.0\Custom.Before.Microsoft.Common.targets</CustomBeforeMicrosoftCommonTargets>\r
93       <CustomAfterMicrosoftCommonTargets Condition="'$(CustomAfterMicrosoftCommonTargets)' == ''">$(MSBuildExtensionsPath)\v4.0\Custom.After.Microsoft.Common.targets</CustomAfterMicrosoftCommonTargets>\r
94 \r
95       <!-- Overrides for the Microsoft.CSharp.targets extension targets -->\r
96       <ImportByWildcardBefore40MicrosoftCSharpTargets Condition="'$(ImportByWildcardBefore40MicrosoftCSharpTargets)' == ''">$(ImportByWildcardBeforeMicrosoftCSharpTargets)</ImportByWildcardBefore40MicrosoftCSharpTargets>\r
97       <ImportByWildcardBefore40MicrosoftCSharpTargets Condition="'$(ImportByWildcardBefore40MicrosoftCSharpTargets)' == ''">true</ImportByWildcardBefore40MicrosoftCSharpTargets>\r
98 \r
99       <ImportByWildcardAfter40MicrosoftCSharpTargets Condition="'$(ImportByWildcardAfter40MicrosoftCSharpTargets)' == ''">$(ImportByWildcardAfterMicrosoftCSharpTargets)</ImportByWildcardAfter40MicrosoftCSharpTargets>\r
100       <ImportByWildcardAfter40MicrosoftCSharpTargets Condition="'$(ImportByWildcardAfter40MicrosoftCSharpTargets)' == ''">true</ImportByWildcardAfter40MicrosoftCSharpTargets>\r
101 \r
102       <ImportUserLocationsByWildcardBefore40MicrosoftCSharpTargets Condition="'$(ImportUserLocationsByWildcardBefore40MicrosoftCSharpTargets)' == ''">$(ImportUserLocationsByWildcardBeforeMicrosoftCSharpTargets)</ImportUserLocationsByWildcardBefore40MicrosoftCSharpTargets>\r
103       <ImportUserLocationsByWildcardBefore40MicrosoftCSharpTargets Condition="'$(ImportUserLocationsByWildcardBefore40MicrosoftCSharpTargets)' == ''">true</ImportUserLocationsByWildcardBefore40MicrosoftCSharpTargets>\r
104 \r
105       <ImportUserLocationsByWildcardAfter40MicrosoftCSharpTargets Condition="'$(ImportUserLocationsByWildcardAfter40MicrosoftCSharpTargets)' == ''">$(ImportUserLocationsByWildcardAfterMicrosoftCSharpTargets)</ImportUserLocationsByWildcardAfter40MicrosoftCSharpTargets>\r
106       <ImportUserLocationsByWildcardAfter40MicrosoftCSharpTargets Condition="'$(ImportUserLocationsByWildcardAfter40MicrosoftCSharpTargets)' == ''">true</ImportUserLocationsByWildcardAfter40MicrosoftCSharpTargets>\r
107 \r
108       <ImportByWildcardBeforeMicrosoftCSharpTargets>false</ImportByWildcardBeforeMicrosoftCSharpTargets>\r
109       <ImportByWildcardAfterMicrosoftCSharpTargets>false</ImportByWildcardAfterMicrosoftCSharpTargets>\r
110       <ImportUserLocationsByWildcardBeforeMicrosoftCSharpTargets>false</ImportUserLocationsByWildcardBeforeMicrosoftCSharpTargets>\r
111       <ImportUserLocationsByWildcardAfterMicrosoftCSharpTargets>false</ImportUserLocationsByWildcardAfterMicrosoftCSharpTargets>\r
112 \r
113       <CustomBeforeMicrosoftCSharpTargets Condition="'$(CustomBeforeMicrosoftCSharpTargets)' == ''">$(MSBuildExtensionsPath)\v4.0\Custom.Before.Microsoft.CSharp.targets</CustomBeforeMicrosoftCSharpTargets>\r
114       <CustomAfterMicrosoftCSharpTargets Condition="'$(CustomAfterMicrosoftCSharpTargets)' == ''">$(MSBuildExtensionsPath)\v4.0\Custom.After.Microsoft.CSharp.targets</CustomAfterMicrosoftCSharpTargets>\r
115    </PropertyGroup>\r
116 \r
117    <PropertyGroup Condition="'$(MSBuildAssemblyVersion)' == '' and ('$(TargetFrameworkIdentifier)' == '.NETFramework' or '$(TargetFrameworkIdentifier)' == 'Silverlight' or ('$(TargetFrameworkIdentifier)' == '' and ('$(TargetRuntime)' == 'Managed' or '$(TargetRuntime)' == '')))">\r
118        <!-- \r
119             Overrides for the Microsoft.NETFramework.props extension targets. Used to make sure that only the imports we specify \r
120             (hard-coded to 4.0 locations) are used, not the 12.0 locations that would be used by default. Required because \r
121             Microsoft.Common.targets imports it from the current directory, so we don't get a chance to redirect these in its \r
122             own redirection targets.\r
123 \r
124             NOTE: This logic is duplicated in Microsoft.VisualBasic.targets and in Microsoft.Common.targets because VB and C#\r
125             import Microsoft.Common.targets from the current directory and thus don't get the benefit of these redirections either, \r
126             so for any changes to this logic in this file, please also edit the other two. \r
127         -->\r
128       <ImportByWildcardBefore40MicrosoftNetFrameworkProps Condition="'$(ImportByWildcardBefore40MicrosoftNetFrameworkProps)' == ''">$(ImportByWildcardBeforeMicrosoftNetFrameworkProps)</ImportByWildcardBefore40MicrosoftNetFrameworkProps>\r
129       <ImportByWildcardBefore40MicrosoftNetFrameworkProps Condition="'$(ImportByWildcardBefore40MicrosoftNetFrameworkProps)' == ''">true</ImportByWildcardBefore40MicrosoftNetFrameworkProps>\r
130 \r
131       <ImportByWildcardAfter40MicrosoftNetFrameworkProps Condition="'$(ImportByWildcardAfter40MicrosoftNetFrameworkProps)' == ''">$(ImportByWildcardAfterMicrosoftNetFrameworkProps)</ImportByWildcardAfter40MicrosoftNetFrameworkProps>\r
132       <ImportByWildcardAfter40MicrosoftNetFrameworkProps Condition="'$(ImportByWildcardAfter40MicrosoftNetFrameworkProps)' == ''">true</ImportByWildcardAfter40MicrosoftNetFrameworkProps>\r
133 \r
134       <ImportUserLocationsByWildcardBefore40MicrosoftNetFrameworkProps Condition="'$(ImportUserLocationsByWildcardBefore40MicrosoftNetFrameworkProps)' == ''">$(ImportUserLocationsByWildcardBeforeMicrosoftNetFrameworkProps)</ImportUserLocationsByWildcardBefore40MicrosoftNetFrameworkProps>\r
135       <ImportUserLocationsByWildcardBefore40MicrosoftNetFrameworkProps Condition="'$(ImportUserLocationsByWildcardBefore40MicrosoftNetFrameworkProps)' == ''">true</ImportUserLocationsByWildcardBefore40MicrosoftNetFrameworkProps>\r
136 \r
137       <ImportUserLocationsByWildcardAfter40MicrosoftNetFrameworkProps Condition="'$(ImportUserLocationsByWildcardAfter40MicrosoftNetFrameworkProps)' == ''">$(ImportUserLocationsByWildcardAfterMicrosoftNetFrameworkProps)</ImportUserLocationsByWildcardAfter40MicrosoftNetFrameworkProps>\r
138       <ImportUserLocationsByWildcardAfter40MicrosoftNetFrameworkProps Condition="'$(ImportUserLocationsByWildcardAfter40MicrosoftNetFrameworkProps)' == ''">true</ImportUserLocationsByWildcardAfter40MicrosoftNetFrameworkProps>\r
139 \r
140       <ImportByWildcardBeforeMicrosoftNetFrameworkProps>false</ImportByWildcardBeforeMicrosoftNetFrameworkProps>\r
141       <ImportByWildcardAfterMicrosoftNetFrameworkProps>false</ImportByWildcardAfterMicrosoftNetFrameworkProps>\r
142       <ImportUserLocationsByWildcardBeforeMicrosoftNetFrameworkProps>false</ImportUserLocationsByWildcardBeforeMicrosoftNetFrameworkProps>\r
143       <ImportUserLocationsByWildcardAfterMicrosoftNetFrameworkProps>false</ImportUserLocationsByWildcardAfterMicrosoftNetFrameworkProps>\r
144    </PropertyGroup>\r
145 \r
146    <ImportGroup Condition="'$(MSBuildAssemblyVersion)' == ''">\r
147       <Import Project="$(MSBuildUserExtensionsPath)\4.0\Microsoft.CSharp.targets\ImportBefore\*" Condition="'$(ImportUserLocationsByWildcardBefore40MicrosoftCSharpTargets)' == 'true' and exists('$(MSBuildUserExtensionsPath)\4.0\Microsoft.CSharp.targets\ImportBefore')"/>\r
148       <Import Project="$(MSBuildExtensionsPath)\4.0\Microsoft.CSharp.targets\ImportBefore\*" Condition="'$(ImportByWildcardBefore40MicrosoftCSharpTargets)' == 'true' and exists('$(MSBuildExtensionsPath)\4.0\Microsoft.CSharp.targets\ImportBefore')"/>\r
149    </ImportGroup> \r
150 \r
151    <!-- Really should be imported right before Microsoft.Common.targets, but because Microsoft.CSharp.targets imports \r
152         Microsoft.Common.targets from the current directory rather than using MSBuildToolsPath (which would redirect to our\r
153         targets), we're stuck doing it this way instead. --> \r
154    <ImportGroup Condition="'$(MSBuildAssemblyVersion)' == ''">\r
155       <Import Project="$(MSBuildUserExtensionsPath)\4.0\Microsoft.Common.targets\ImportBefore\*" Condition="'$(ImportUserLocationsByWildcardBefore40MicrosoftCommonTargets)' == 'true' and exists('$(MSBuildUserExtensionsPath)\4.0\Microsoft.Common.targets\ImportBefore')"/>\r
156       <Import Project="$(MSBuildExtensionsPath)\4.0\Microsoft.Common.targets\ImportBefore\*" Condition="'$(ImportByWildcardBefore40MicrosoftCommonTargets)' == 'true' and exists('$(MSBuildExtensionsPath)\4.0\Microsoft.Common.targets\ImportBefore')"/>\r
157    </ImportGroup> \r
158 \r
159    <!-- Really should be imported right before Microsoft.NETFramework.props, but because Microsoft.CSharp.targets imports \r
160         Microsoft.Common.targets from the current directory rather than using MSBuildToolsPath (which would redirect to our\r
161         targets), and Microsoft.Common.targets does likewise with Microsoft.NETFramework.props, we're stuck doing it this \r
162         way instead. --> \r
163    <ImportGroup Condition="'$(MSBuildAssemblyVersion)' == ''">\r
164       <Import Project="$(MSBuildUserExtensionsPath)\4.0\Microsoft.NETFramework.props\ImportBefore\*" Condition="'$(ImportUserLocationsByWildcardBefore40MicrosoftNetFrameworkProps)' == 'true' and exists('$(MSBuildUserExtensionsPath)\4.0\Microsoft.NETFramework.props\ImportBefore')"/>\r
165       <Import Project="$(MSBuildExtensionsPath)\4.0\Microsoft.NETFramework.props\ImportBefore\*" Condition="'$(ImportByWildcardBefore40MicrosoftNetFrameworkProps)' == 'true' and exists('$(MSBuildExtensionsPath)\4.0\Microsoft.NETFramework.props\ImportBefore')"/>\r
166    </ImportGroup> \r
167 \r
168    <Import Project="$(CSharpTargetsPath)" />\r
169 \r
170    <!-- Really should be imported right after Microsoft.NETFramework.props, but because Microsoft.CSharp.targets imports \r
171         Microsoft.Common.targets from the current directory rather than using MSBuildToolsPath (which would redirect to our\r
172         targets), and Microsoft.Common.targets does likewise with Microsoft.NETFramework.props, we're stuck doing it this \r
173         way instead. --> \r
174    <ImportGroup Condition="'$(MSBuildAssemblyVersion)' == ''">\r
175       <Import Project="$(MSBuildExtensionsPath)\4.0\Microsoft.NETFramework.props\ImportAfter\*" Condition="'$(ImportByWildcardAfter40MicrosoftNetFrameworkProps)' == 'true' and exists('$(MSBuildExtensionsPath)\4.0\Microsoft.NETFramework.props\ImportAfter')"/>\r
176       <Import Project="$(MSBuildUserExtensionsPath)\4.0\Microsoft.NETFramework.props\ImportAfter\*" Condition="'$(ImportUserLocationsByWildcardAfter40MicrosoftNetFrameworkProps)' == 'true' and exists('$(MSBuildUserExtensionsPath)\4.0\Microsoft.NETFramework.props\ImportAfter')"/>\r
177    </ImportGroup> \r
178 \r
179    <!-- Really should be imported right after Microsoft.Common.targets, but because Microsoft.CSharp.targets imports \r
180         Microsoft.Common.targets from the current directory rather than using MSBuildToolsPath (which would redirect to our\r
181         targets), we're stuck doing it this way instead. --> \r
182    <ImportGroup Condition="'$(MSBuildAssemblyVersion)' == ''">\r
183       <Import Project="$(MSBuildExtensionsPath)\4.0\Microsoft.Common.targets\ImportAfter\*" Condition="'$(ImportByWildcardAfter40MicrosoftCommonTargets)' == 'true' and exists('$(MSBuildExtensionsPath)\4.0\Microsoft.Common.targets\ImportAfter')"/>\r
184       <Import Project="$(MSBuildUserExtensionsPath)\4.0\Microsoft.Common.targets\ImportAfter\*" Condition="'$(ImportUserLocationsByWildcardAfter40MicrosoftCommonTargets)' == 'true' and exists('$(MSBuildUserExtensionsPath)\4.0\Microsoft.Common.targets\ImportAfter')"/>\r
185     </ImportGroup> \r
186 \r
187    <ImportGroup Condition="'$(MSBuildAssemblyVersion)' == ''">\r
188       <Import Project="$(MSBuildExtensionsPath)\4.0\Microsoft.CSharp.targets\ImportAfter\*" Condition="'$(ImportByWildcardAfter40MicrosoftCSharpTargets)' == 'true' and exists('$(MSBuildExtensionsPath)\4.0\Microsoft.CSharp.targets\ImportAfter')"/>\r
189       <Import Project="$(MSBuildUserExtensionsPath)\4.0\Microsoft.CSharp.targets\ImportAfter\*" Condition="'$(ImportUserLocationsByWildcardAfter40MicrosoftCSharpTargets)' == 'true' and exists('$(MSBuildUserExtensionsPath)\4.0\Microsoft.CSharp.targets\ImportAfter')"/>\r
190    </ImportGroup> \r
191 \r
192    <!-- Fix up FrameworkPathOverride, which is primarily used to determine the location of mscorlib.dll in the \r
193         (relatively uncommon) situation where the reference assemblies, in which it's usually found, are not \r
194         installed.  Defined here rather than in Microsoft.Common.targets because the .NET Microsoft.CSharp.targets \r
195         imports Microsoft.Common.targets from the current directory. -->\r
196    <PropertyGroup Condition="'$(MSBuildAssemblyVersion)' == ''">\r
197       <FrameworkPathOverride Condition="!Exists('$(FrameworkPathOverride)\mscorlib.dll')">$(MSBuildFrameworkToolsPath)</FrameworkPathOverride>\r
198    </PropertyGroup>\r
199 </Project>\r