2 ***********************************************************************************************
\r
3 Microsoft.Common.CurrentVersion.targets
\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
9 This file defines the steps in the standard build process for .NET projects. It
\r
10 contains all the steps that are common among the different .NET languages, such as
\r
11 Visual Basic, and Visual C#.
\r
13 Copyright (C) Microsoft Corporation. All rights reserved.
\r
14 ***********************************************************************************************
\r
17 <Project DefaultTargets="Build" TreatAsLocalProperty="OutDir" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
\r
19 <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="'$(MicrosoftCommonPropsHasBeenImported)' != 'true' and Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
\r
22 <ImportByWildcardBeforeMicrosoftCommonTargets Condition="'$(ImportByWildcardBeforeMicrosoftCommonTargets)' == ''">true</ImportByWildcardBeforeMicrosoftCommonTargets>
\r
23 <ImportByWildcardAfterMicrosoftCommonTargets Condition="'$(ImportByWildcardAfterMicrosoftCommonTargets)' == ''">true</ImportByWildcardAfterMicrosoftCommonTargets>
\r
24 <ImportUserLocationsByWildcardBeforeMicrosoftCommonTargets Condition="'$(ImportUserLocationsByWildcardBeforeMicrosoftCommonTargets)' == ''">true</ImportUserLocationsByWildcardBeforeMicrosoftCommonTargets>
\r
25 <ImportUserLocationsByWildcardAfterMicrosoftCommonTargets Condition="'$(ImportUserLocationsByWildcardAfterMicrosoftCommonTargets)' == ''">true</ImportUserLocationsByWildcardAfterMicrosoftCommonTargets>
\r
28 <Import Project="$(MSBuildUserExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.targets\ImportBefore\*" Condition="'$(ImportUserLocationsByWildcardBeforeMicrosoftCommonTargets)' == 'true' and exists('$(MSBuildUserExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.targets\ImportBefore')"/>
\r
29 <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.targets\ImportBefore\*" Condition="'$(ImportByWildcardBeforeMicrosoftCommonTargets)' == 'true' and exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.targets\ImportBefore')"/>
\r
31 <Import Project="$(MSBuildProjectFullPath).user" Condition="Exists('$(MSBuildProjectFullPath).user')"/>
\r
34 <!-- VS10 without SP1 and without VS11 will not have VisualStudioVersion set, so do that here -->
\r
36 <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
\r
40 <CustomBeforeMicrosoftCommonTargets Condition="'$(CustomBeforeMicrosoftCommonTargets)'==''">$(MSBuildExtensionsPath)\v$(MSBuildToolsVersion)\Custom.Before.Microsoft.Common.targets</CustomBeforeMicrosoftCommonTargets>
\r
41 <CustomAfterMicrosoftCommonTargets Condition="'$(CustomAfterMicrosoftCommonTargets)'==''">$(MSBuildExtensionsPath)\v$(MSBuildToolsVersion)\Custom.After.Microsoft.Common.targets</CustomAfterMicrosoftCommonTargets>
\r
42 <ReportingServicesTargets Condition="'$(ReportingServicesTargets)'==''">$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v$(VisualStudioVersion)\ReportingServices\Microsoft.ReportingServices.targets</ReportingServicesTargets>
\r
45 <Import Project="$(CustomBeforeMicrosoftCommonTargets)" Condition="'$(CustomBeforeMicrosoftCommonTargets)' != '' and Exists('$(CustomBeforeMicrosoftCommonTargets)')"/>
\r
47 <!-- By default, we are creating a managed app because .NET 2.0 projects did not have this property. -->
\r
48 <PropertyGroup Condition="'$(TargetRuntime)' == ''">
\r
49 <TargetRuntime>Managed</TargetRuntime>
\r
52 <!-- Because .NET 2.0 apps did not set TargetFrameworkIdentifier, we need to set it for them here by default. If
\r
53 the runtime is set to Managed, we also need to set these. Otherwise they should be blank (for instance Javascript or
\r
54 Native apps) because they do not target a .NET Framework. -->
\r
55 <PropertyGroup Condition="'$(TargetRuntime)' == 'Managed'">
\r
56 <TargetFrameworkIdentifier Condition="'$(TargetFrameworkIdentifier)' == ''">.NETFramework</TargetFrameworkIdentifier>
\r
57 <TargetFrameworkVersion Condition=" '$(TargetFrameworkVersion)' == '' ">v4.0</TargetFrameworkVersion>
\r
60 <!-- AvailablePlatforms is the list of platform targets available. -->
\r
62 <AvailablePlatforms Condition="'$(VisualStudioVersion)' == '10.0' or '$(VisualStudioVersion)' == ''">Any CPU,x86,x64,Itanium</AvailablePlatforms>
\r
63 <AvailablePlatforms Condition="'$(VisualStudioVersion)' != '' and '$(VisualStudioVersion)' > '10.0'">Any CPU,x86,x64</AvailablePlatforms>
\r
66 <!-- Import does NOT apply to .NETCore -->
\r
67 <Import Project="Microsoft.NETFramework.props" Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework' or '$(TargetFrameworkIdentifier)' == 'Silverlight'"/>
\r
70 <!-- Yield optimization properties -->
\r
71 <YieldDuringToolExecution Condition="'$(YieldDuringToolExecution)' == ''">true</YieldDuringToolExecution>
\r
74 <PropertyGroup Condition="'$(TargetFrameworkIdentifier)' != '' and '$(TargetFrameworkVersion)' != ''">
\r
75 <TargetFrameworkMoniker Condition="'$(TargetFrameworkMoniker)' == '' and '$(TargetFrameworkProfile)' != ''">$(TargetFrameworkIdentifier),Version=$(TargetFrameworkVersion),Profile=$(TargetFrameworkProfile)</TargetFrameworkMoniker>
\r
76 <TargetFrameworkMoniker Condition="'$(TargetFrameworkMoniker)' == ''">$(TargetFrameworkIdentifier),Version=$(TargetFrameworkVersion)</TargetFrameworkMoniker>
\r
78 <!-- The FrameworkPathOverride is required for the inproc visual basic compiler to initialize when targeting target frameworks less than 4.0. If .net 2.0 is not installed then the property value above will not provide the location
\r
79 of mscorlib. This is also true if the build author overrides this property to some other directory which does not contain mscorlib.dll. In the case we cannot find mscorlib.dll at the correct location
\r
80 we need to find a directory which does contain mscorlib to allow the inproc compiler to initialize and give us the chance to show certain dialogs in the IDE (which only happen after initialization).-->
\r
81 <FrameworkPathOverride Condition="'$(FrameworkPathOverride)' == ''">$([Microsoft.Build.Utilities.ToolLocationHelper]::GetPathToStandardLibraries($(TargetFrameworkIdentifier), $(TargetFrameworkVersion), $(TargetFrameworkProfile), $(PlatformTarget), $(TargetFrameworkRootPath)))</FrameworkPathOverride>
\r
82 <FrameworkPathOverride Condition="!Exists('$(FrameworkPathOverride)\mscorlib.dll')">$(MSBuildFrameworkToolsPath)</FrameworkPathOverride>
\r
86 <TargetPlatformIdentifier Condition="'$(TargetPlatformIdentifier)' == ''">Windows</TargetPlatformIdentifier>
\r
87 <TargetPlatformVersion Condition="'$(TargetPlatformVersion)' == ''">7.0</TargetPlatformVersion>
\r
88 <TargetPlatformSdkPath Condition="'$(TargetPlatformSdkPath)' == '' and '$(TargetPlatformSdkRootOverride)' != ''">$(TargetPlatformSdkRootOverride)\</TargetPlatformSdkPath>
\r
89 <TargetPlatformSdkPath Condition="'$(TargetPlatformSdkPath)' == '' and '$(TargetPlatformIdentifier)' == 'Windows' and '$(OS)' == 'Windows_NT' and '$(MSBuildRuntimeType)' != 'Core'">$([MSBuild]::GetRegistryValueFromView('HKEY_LOCAL_MACHINE\Software\Microsoft\Microsoft SDKs\Windows\v$(TargetPlatformVersion)', InstallationFolder, null, RegistryView.Registry32, RegistryView.Default))</TargetPlatformSdkPath>
\r
90 <TargetPlatformSdkPath Condition="'$(TargetPlatformSdkPath)' == ''">$([Microsoft.Build.Utilities.ToolLocationHelper]::GetPlatformSDKLocation($(TargetPlatformIdentifier), $(TargetPlatformVersion)))</TargetPlatformSdkPath>
\r
91 <TargetPlatformSdkMetadataLocation Condition="'$(TargetPlatformSdkMetadataLocation)' == '' and Exists('$(TargetPlatformSdkPath)')">$(TargetPlatformSdkPath)Windows Metadata</TargetPlatformSdkMetadataLocation>
\r
92 <TargetPlatformSdkMetadataLocation Condition="Exists('$(TargetPlatformSdkPath)') and ('$(TargetPlatformSdkMetadataLocation)' == '' or !Exists('$(TargetPlatformSdkMetadataLocation)'))">$(TargetPlatformSdkPath)References\CommonConfiguration\Neutral</TargetPlatformSdkMetadataLocation>
\r
93 <TargetPlatformWinMDLocation Condition="'$(TargetPlatformWinMDLocation)' == '' and Exists('$(TargetPlatformSdkMetadataLocation)')">$(TargetPlatformSdkMetadataLocation)</TargetPlatformWinMDLocation>
\r
94 <UseOSWinMdReferences Condition="'$(UseOSWinMdReferences)' == '' and ('$(TargetPlatformWinMDLocation)' == '' and '$(TargetPlatformIdentifier)' == 'Windows' and '$(TargetPlatformVersion)' > '7.0')">true</UseOSWinMdReferences>
\r
95 <TargetPlatformWinMDLocation Condition="'$(UseOsWinMdReferences)' == 'true'">$(WinDir)\System32\WinMetadata</TargetPlatformWinMDLocation>
\r
96 <TargetPlatformMoniker Condition="'$(TargetPlatformMoniker)' == ''">$(TargetPlatformIdentifier),Version=$(TargetPlatformVersion)</TargetPlatformMoniker>
\r
97 <TargetPlatformDisplayName Condition="'$(TargetPlatformDisplayName)' == ''">$([Microsoft.Build.Utilities.ToolLocationHelper]::GetPlatformSDKDisplayName($(TargetPlatformIdentifier), $(TargetPlatformVersion)))</TargetPlatformDisplayName>
\r
101 Several properties must be set in the main project file, before using this .TARGETS file.
\r
102 However, if the properties are not set, we pick some defaults.
\r
105 Indicates the final output location for the project or solution. When building a solution,
\r
106 OutDir can be used to gather multiple project outputs in one location. In addition,
\r
107 OutDir is included in AssemblySearchPaths used for resolving references.
\r
110 This property is usually specified in the project file and is used to initialize OutDir.
\r
111 OutDir and OutputPath are distinguished for legacy reasons, and OutDir should be used if at all possible.
\r
113 BaseIntermediateOutputPath:
\r
114 This is the top level folder where all configuration specific intermediate output folders will be created.
\r
115 Default value is obj\
\r
117 IntermediateOutputPath:
\r
118 This is the full intermediate Output Path, and is derived from BaseIntermediateOutputPath, if none specified
\r
119 (eg. obj\debug). If this property is overridden, then setting BaseIntermediateOutputPath has no effect.
\r
123 <!-- Ensure any OutputPath has a trailing slash, so it can be concatenated -->
\r
124 <OutputPath Condition="'$(OutputPath)' != '' and !HasTrailingSlash('$(OutputPath)')">$(OutputPath)\</OutputPath>
\r
125 <AssemblyName Condition=" '$(AssemblyName)'=='' ">$(MSBuildProjectName)</AssemblyName>
\r
127 Be careful not to give OutputPath a default value in the case of an invalid Configuration/Platform.
\r
128 We use OutputPath specifically to check for invalid configurations/platforms.
\r
130 <OutputPath Condition=" '$(Platform)'=='' and '$(Configuration)'=='' and '$(OutputPath)'=='' ">bin\Debug\</OutputPath>
\r
131 <_OriginalConfiguration>$(Configuration)</_OriginalConfiguration>
\r
132 <_OriginalPlatform>$(Platform)</_OriginalPlatform>
\r
133 <Configuration Condition=" '$(Configuration)'=='' ">Debug</Configuration>
\r
134 <ConfigurationName Condition=" '$(ConfigurationName)' == '' ">$(Configuration)</ConfigurationName>
\r
135 <!-- Example, Debug -->
\r
136 <Platform Condition=" '$(Platform)'=='' ">AnyCPU</Platform>
\r
138 <OutputType Condition=" '$(TargetType)' != ''">$(TargetType)</OutputType>
\r
139 <OutputType Condition=" '$(TargetType)' == 'Container' or '$(TargetType)' == 'DocumentContainer' ">library</OutputType>
\r
140 <OutputType Condition=" '$(OutputType)' == '' ">exe</OutputType>
\r
142 <DebugSymbols Condition=" '$(ConfigurationName)' == 'Debug' and '$(DebugSymbols)' == '' and '$(DebugType)'==''">true</DebugSymbols>
\r
144 <!-- Whether or not a .pdb file is produced. -->
\r
145 <_DebugSymbolsProduced>false</_DebugSymbolsProduced>
\r
146 <_DebugSymbolsProduced Condition="'$(DebugSymbols)'=='true'">true</_DebugSymbolsProduced>
\r
147 <_DebugSymbolsProduced Condition="'$(DebugType)'=='none'">false</_DebugSymbolsProduced>
\r
148 <_DebugSymbolsProduced Condition="'$(DebugType)'=='pdbonly'">true</_DebugSymbolsProduced>
\r
149 <_DebugSymbolsProduced Condition="'$(DebugType)'=='full'">true</_DebugSymbolsProduced>
\r
150 <_DebugSymbolsProduced Condition="'$(DebugType)'=='portable'">true</_DebugSymbolsProduced>
\r
151 <_DebugSymbolsProduced Condition="'$(DebugType)'=='embedded'">false</_DebugSymbolsProduced>
\r
153 <!-- Whether or not a .xml file is produced. -->
\r
154 <_DocumentationFileProduced>true</_DocumentationFileProduced>
\r
155 <_DocumentationFileProduced Condition="'$(DocumentationFile)'==''">false</_DocumentationFileProduced>
\r
159 <PropertyGroup Condition=" '$(OutputPath)' == '' ">
\r
161 A blank OutputPath at this point means that the user passed in an invalid Configuration/Platform
\r
162 combination. Whether this is considered an error or a warning depends on the value of
\r
163 $(SkipInvalidConfigurations).
\r
165 <_InvalidConfigurationError Condition=" '$(SkipInvalidConfigurations)' != 'true' ">true</_InvalidConfigurationError>
\r
166 <_InvalidConfigurationWarning Condition=" '$(SkipInvalidConfigurations)' == 'true' ">true</_InvalidConfigurationWarning>
\r
170 IDE Macros available from both integrated builds and from command line builds.
\r
171 The following properties are 'macros' that are available via IDE for
\r
172 pre and post build steps.
\r
175 <TargetExt Condition="'$(TargetExt)' == '' and '$(OutputType)'=='exe'">.exe</TargetExt>
\r
176 <TargetExt Condition="'$(TargetExt)' == '' and '$(OutputType)'=='winexe'">.exe</TargetExt>
\r
177 <TargetExt Condition="'$(TargetExt)' == '' and '$(OutputType)'=='appcontainerexe'">.exe</TargetExt>
\r
178 <TargetExt Condition="'$(TargetExt)' == '' and '$(OutputType)'=='library'">.dll</TargetExt>
\r
179 <TargetExt Condition="'$(TargetExt)' == '' and '$(OutputType)'=='module'">.netmodule</TargetExt>
\r
180 <TargetExt Condition="'$(TargetExt)' == '' and '$(OutputType)'=='winmdobj'">.winmdobj</TargetExt>
\r
185 <!-- Required for enabling Team Build for packaging app package-generating projects -->
\r
186 <OutDirWasSpecified Condition=" '$(OutDir)'!='' and '$(OutDirWasSpecified)'=='' ">true</OutDirWasSpecified>
\r
188 <OutDir Condition=" '$(OutDir)' == '' ">$(OutputPath)</OutDir>
\r
189 <!-- Example, bin\Debug\ -->
\r
190 <!-- Ensure OutDir has a trailing slash, so it can be concatenated -->
\r
191 <OutDir Condition="'$(OutDir)' != '' and !HasTrailingSlash('$(OutDir)')">$(OutDir)\</OutDir>
\r
192 <ProjectName Condition=" '$(ProjectName)' == '' ">$(MSBuildProjectName)</ProjectName>
\r
193 <!-- Example, MyProject -->
\r
195 <!-- For projects that generate app packages or ones that want a per-project output directory, update OutDir to include the project name -->
\r
196 <OutDir Condition="'$(OutDir)' != '' and '$(OutDirWasSpecified)' == 'true' and (('$(WindowsAppContainer)' == 'true' and '$(GenerateProjectSpecificOutputFolder)' != 'false') or '$(GenerateProjectSpecificOutputFolder)' == 'true')">$(OutDir)$(ProjectName)\</OutDir>
\r
198 <TargetName Condition="'$(TargetName)' == '' and '$(OutputType)' == 'winmdobj' and '$(RootNamespace)' != ''">$(RootNamespace)</TargetName>
\r
199 <TargetName Condition=" '$(TargetName)' == '' ">$(AssemblyName)</TargetName>
\r
200 <!-- Example, MyAssembly -->
\r
201 <ProjectFileName Condition=" '$(ProjectFileName)' == '' ">$(MSBuildProjectFile)</ProjectFileName>
\r
202 <!-- Example, MyProject.csproj -->
\r
203 <ProjectExt Condition=" '$(ProjectExt)' == '' ">$(MSBuildProjectExtension)</ProjectExt>
\r
204 <!-- Example, .csproj -->
\r
205 <WinMDExpOutputWindowsMetadataFilename Condition="'$(WinMDExpOutputWindowsMetadataFilename)' == '' and '$(OutputType)' == 'winmdobj'">$(TargetName).winmd</WinMDExpOutputWindowsMetadataFilename>
\r
206 <TargetFileName Condition=" '$(TargetFileName)' == '' and '$(OutputType)' == 'winmdobj'">$(WinMDExpOutputWindowsMetadataFilename)</TargetFileName>
\r
207 <TargetFileName Condition=" '$(TargetFileName)' == '' ">$(TargetName)$(TargetExt)</TargetFileName>
\r
209 <!-- Example, MyAssembly.dll -->
\r
214 The PublishableProject property is used when invoking the publish target on a solution that
\r
215 contains multiple projects. The property determines which projects should be published, and
\r
216 which projects should be skipped in the publish target. By default any "Windows Application"
\r
217 or "Console Application" project type is publishable. However, a project that would otherwise
\r
218 be published can be skipped by defining the PublishableProject property in the project itself.
\r
220 <_DeploymentPublishableProjectDefault Condition="'$(OutputType)'=='winexe' or '$(OutputType)'=='exe' or '$(OutputType)'=='appcontainerexe'">true</_DeploymentPublishableProjectDefault>
\r
221 <PublishableProject Condition="'$(PublishableProject)'==''">$(_DeploymentPublishableProjectDefault)</PublishableProject>
\r
223 <_DeploymentTargetApplicationManifestFileName Condition="'$(OutputType)'=='library'">Native.$(AssemblyName).manifest</_DeploymentTargetApplicationManifestFileName>
\r
224 <!-- Example, Native.MyAssembly.manifest -->
\r
225 <_DeploymentTargetApplicationManifestFileName Condition="'$(OutputType)'=='winexe'">$(TargetFileName).manifest</_DeploymentTargetApplicationManifestFileName>
\r
226 <!-- Example, MyAssembly.exe.manifest -->
\r
227 <_DeploymentTargetApplicationManifestFileName Condition="'$(OutputType)'=='exe'">$(TargetFileName).manifest</_DeploymentTargetApplicationManifestFileName>
\r
228 <!-- Example, MyAssembly.exe.manifest -->
\r
229 <_DeploymentTargetApplicationManifestFileName Condition="'$(OutputType)'=='appcontainerexe'">$(TargetFileName).manifest</_DeploymentTargetApplicationManifestFileName>
\r
230 <!-- Example, MyAssembly.exe.manifest -->
\r
231 <TargetDeployManifestFileName Condition="'$(TargetDeployManifestFileName)' == '' and '$(HostInBrowser)' != 'true'">$(AssemblyName).application</TargetDeployManifestFileName>
\r
232 <!-- Example, MyAssembly.application -->
\r
233 <TargetDeployManifestFileName Condition="'$(TargetDeployManifestFileName)' == '' and '$(HostInBrowser)' == 'true'">$(AssemblyName).xbap</TargetDeployManifestFileName>
\r
234 <!-- Example, MyAssembly.xbap -->
\r
235 <GenerateClickOnceManifests Condition="'$(OutputType)'=='winexe' or '$(OutputType)'=='exe' or '$(OutputType)'=='appcontainerexe'">$(GenerateManifests)</GenerateClickOnceManifests>
\r
237 <_DeploymentApplicationManifestIdentity Condition="'$(OutputType)'=='library'">Native.$(AssemblyName)</_DeploymentApplicationManifestIdentity>
\r
238 <_DeploymentApplicationManifestIdentity Condition="'$(OutputType)'=='winexe'">$(AssemblyName).exe</_DeploymentApplicationManifestIdentity>
\r
239 <_DeploymentApplicationManifestIdentity Condition="'$(OutputType)'=='exe'">$(AssemblyName).exe</_DeploymentApplicationManifestIdentity>
\r
240 <_DeploymentApplicationManifestIdentity Condition="'$(OutputType)'=='appcontainerexe'">$(AssemblyName).exe</_DeploymentApplicationManifestIdentity>
\r
241 <_DeploymentDeployManifestIdentity Condition="'$(HostInBrowser)' != 'true'">$(AssemblyName).application</_DeploymentDeployManifestIdentity>
\r
242 <_DeploymentDeployManifestIdentity Condition="'$(HostInBrowser)' == 'true'">$(AssemblyName).xbap</_DeploymentDeployManifestIdentity>
\r
244 <_DeploymentFileMappingExtension Condition="'$(MapFileExtensions)'=='true'">.deploy</_DeploymentFileMappingExtension>
\r
245 <_DeploymentFileMappingExtension Condition="'$(MapFileExtensions)'!='true'"></_DeploymentFileMappingExtension>
\r
247 <_DeploymentBuiltUpdateInterval Condition="'$(UpdatePeriodically)'=='true'">$(UpdateInterval)</_DeploymentBuiltUpdateInterval>
\r
248 <_DeploymentBuiltUpdateIntervalUnits Condition="'$(UpdatePeriodically)'=='true'">$(UpdateIntervalUnits)</_DeploymentBuiltUpdateIntervalUnits>
\r
249 <_DeploymentBuiltUpdateInterval Condition="'$(UpdatePeriodically)'!='true'">0</_DeploymentBuiltUpdateInterval>
\r
250 <_DeploymentBuiltUpdateIntervalUnits Condition="'$(UpdatePeriodically)'!='true'">Days</_DeploymentBuiltUpdateIntervalUnits>
\r
251 <_DeploymentBuiltMinimumRequiredVersion Condition="'$(UpdateRequired)'=='true' and '$(Install)'=='true'">$(MinimumRequiredVersion)</_DeploymentBuiltMinimumRequiredVersion>
\r
253 <MaxTargetPath Condition="'$(MaxTargetPath)'==''">100</MaxTargetPath>
\r
258 By default, GenerateApplicationManifest puts all satellite assemblies to the manifest
\r
259 record by default by setting TargetCulture to *.
\r
261 <TargetCulture Condition="'$(TargetCulture)'==''">*</TargetCulture>
\r
262 <FallbackCulture Condition="'$(UICulture)'!='' and '$(FallbackCulture)'==''">$(UICulture)</FallbackCulture>
\r
266 <!-- Not used any more-->
\r
267 <_OutputPathItem Include="$(OutDir)"/>
\r
269 <_UnmanagedRegistrationCache Include="$(BaseIntermediateOutputPath)$(MSBuildProjectFile).UnmanagedRegistration.cache"/>
\r
270 <_ResolveComReferenceCache Include="$(IntermediateOutputPath)$(MSBuildProjectFile).ResolveComReference.cache"/>
\r
274 <!-- Example, c:\MyProjects\MyProject\bin\debug\ -->
\r
276 Condition intentionally omitted on this one, because it causes problems
\r
277 when we pick up the value of an environment variable named TargetDir
\r
279 <TargetDir Condition="'$(OutDir)' != ''">$([MSBuild]::Escape($([System.IO.Path]::GetFullPath(`$([System.IO.Path]::Combine(`$(MSBuildProjectDirectory)`, `$(OutDir)`))`))))</TargetDir>
\r
281 <!-- Example, c:\MyProjects\MyProject\bin\debug\MyAssembly.dll -->
\r
282 <TargetPath Condition=" '$(TargetPath)' == '' ">$(TargetDir)$(TargetFileName)</TargetPath>
\r
284 <!-- Example, c:\MyProjects\MyProject\ -->
\r
285 <ProjectDir Condition=" '$(ProjectDir)' == '' ">$(MSBuildProjectDirectory)\</ProjectDir>
\r
287 <!-- Example, c:\MyProjects\MyProject\MyProject.csproj -->
\r
288 <ProjectPath Condition=" '$(ProjectPath)' == '' ">$(ProjectDir)$(ProjectFileName)</ProjectPath>
\r
290 <!-- Example, AnyCPU -->
\r
291 <PlatformName Condition=" '$(PlatformName)' == '' ">$(Platform)</PlatformName>
\r
295 <!-- This is not used here but remains for backwards compatibility -->
\r
296 <AppConfigFileDestination Include="$(OutDir)$(TargetFileName).config"/>
\r
300 IDE Macros available only from integrated builds.
\r
301 The following properties are 'macros' that are available via IDE for
\r
302 pre and post build steps. However, they are not defined when directly building
\r
303 a project from the command line, only when building a solution.
\r
306 <DevEnvDir Condition="'$(DevEnvDir)'==''">*Undefined*</DevEnvDir>
\r
307 <SolutionName Condition="'$(SolutionName)'==''">*Undefined*</SolutionName>
\r
308 <!-- Example, MySolution -->
\r
309 <SolutionFileName Condition="'$(SolutionFileName)'==''">*Undefined*</SolutionFileName>
\r
310 <!-- Example, MySolution.sln -->
\r
311 <SolutionPath Condition="'$(SolutionPath)'==''">*Undefined*</SolutionPath>
\r
312 <!-- Example, f:\MySolutions\MySolution\MySolution.sln -->
\r
313 <SolutionDir Condition="'$(SolutionDir)'==''">*Undefined*</SolutionDir>
\r
314 <!-- Example, f:\MySolutions\MySolution\ -->
\r
315 <SolutionExt Condition="'$(SolutionExt)'==''">*Undefined*</SolutionExt>
\r
316 <!-- Example, .sln -->
\r
320 <GenerateBindingRedirectsOutputType Condition="'$(OutputType)'=='exe' or '$(OutputType)'=='winexe'">true</GenerateBindingRedirectsOutputType>
\r
322 <PropertyGroup Condition="'$(AutoUnifyAssemblyReferences)' == ''">
\r
323 <AutoUnifyAssemblyReferences>true</AutoUnifyAssemblyReferences>
\r
324 <AutoUnifyAssemblyReferences Condition="'$(GenerateBindingRedirectsOutputType)' == 'true' and '$(AutoGenerateBindingRedirects)' != 'true'">false</AutoUnifyAssemblyReferences>
\r
327 <BaseIntermediateOutputPath Condition="!HasTrailingSlash('$(BaseIntermediateOutputPath)')">$(BaseIntermediateOutputPath)\</BaseIntermediateOutputPath>
\r
328 <CleanFile Condition="'$(CleanFile)'==''">$(MSBuildProjectFile).FileListAbsolute.txt</CleanFile>
\r
329 <!-- During DesignTime Builds, skip project reference build as Design time is only queueing information.-->
\r
330 <BuildProjectReferences Condition="'$(BuildProjectReferences)' == '' and '$(DesignTimeBuild)' == 'true'">false</BuildProjectReferences>
\r
331 <!-- By default we will build (and if applicable, clean) all project references. But this can be used to disable that-->
\r
332 <BuildProjectReferences Condition="'$(BuildProjectReferences)' == ''">true</BuildProjectReferences>
\r
333 <BuildInParallel Condition="'$(BuildInParallel)' == ''">true</BuildInParallel>
\r
334 <_ResolveReferenceDependencies Condition="'$(_ResolveReferenceDependencies)' == ''">false</_ResolveReferenceDependencies>
\r
335 <_GetChildProjectCopyToOutputDirectoryItems Condition="'$(_GetChildProjectCopyToOutputDirectoryItems)' == ''">true</_GetChildProjectCopyToOutputDirectoryItems>
\r
336 <OverwriteReadOnlyFiles Condition="'$(OverwriteReadOnlyFiles)' == ''">false</OverwriteReadOnlyFiles>
\r
337 <ComReferenceNoClassMembers Condition="'$(ComReferenceNoClassMembers)' == ''">false</ComReferenceNoClassMembers>
\r
340 <PropertyGroup Condition=" $(IntermediateOutputPath) == '' ">
\r
341 <IntermediateOutputPath Condition=" '$(PlatformName)' == 'AnyCPU' ">$(BaseIntermediateOutputPath)$(Configuration)\</IntermediateOutputPath>
\r
342 <IntermediateOutputPath Condition=" '$(PlatformName)' != 'AnyCPU' ">$(BaseIntermediateOutputPath)$(PlatformName)\$(Configuration)\</IntermediateOutputPath>
\r
345 <IntermediateOutputPath Condition="!HasTrailingSlash('$(IntermediateOutputPath)')">$(IntermediateOutputPath)\</IntermediateOutputPath>
\r
346 <_GenerateBindingRedirectsIntermediateAppConfig>$(IntermediateOutputPath)$(MSBuildProjectFile).$(TargetFileName).config</_GenerateBindingRedirectsIntermediateAppConfig>
\r
349 <IntermediateAssembly Include="$(IntermediateOutputPath)$(TargetName)$(TargetExt)"/>
\r
350 <FinalDocFile Include="@(DocFileItem->'$(OutDir)%(Filename)%(Extension)')"/>
\r
353 <ItemGroup Condition="'$(_DebugSymbolsProduced)' == 'true'">
\r
354 <_DebugSymbolsIntermediatePath Include="$(IntermediateOutputPath)$(TargetName).compile.pdb" Condition="'$(OutputType)' == 'winmdobj' and '@(_DebugSymbolsIntermediatePath)' == ''"/>
\r
355 <_DebugSymbolsIntermediatePath Include="$(IntermediateOutputPath)$(TargetName).pdb" Condition="'$(OutputType)' != 'winmdobj' and '@(_DebugSymbolsIntermediatePath)' == ''"/>
\r
356 <_DebugSymbolsOutputPath Include="@(_DebugSymbolsIntermediatePath->'$(OutDir)%(Filename)%(Extension)')" />
\r
359 <PropertyGroup Condition="'$(_DebugSymbolsProduced)' == 'true' and '$(OutputType)' == 'winmdobj'">
\r
360 <WinMDExpOutputPdb Condition="'$(WinMDExpOutputPdb)' == ''">$(IntermediateOutputPath)$(TargetName).pdb</WinMDExpOutputPdb>
\r
361 <_WinMDDebugSymbolsOutputPath>$([System.IO.Path]::Combine('$(OutDir)', $([System.IO.Path]::GetFileName('$(WinMDExpOutputPdb)'))))</_WinMDDebugSymbolsOutputPath>
\r
364 <PropertyGroup Condition="'$(OutputType)' == 'winmdobj' and '$(DocumentationFile)'!=''">
\r
365 <WinMDOutputDocumentationFile Condition="'$(WinMDOutputDocumentationFile)' == ''">$(IntermediateOutputPath)$(TargetName).xml</WinMDOutputDocumentationFile>
\r
366 <_WinMDDocFileOutputPath>$([System.IO.Path]::Combine('$(OutDir)', $([System.IO.Path]::GetFileName('$(WinMDOutputDocumentationFile)'))))</_WinMDDocFileOutputPath>
\r
369 <PropertyGroup Condition="'$(WinMDExpOutputWindowsMetadataFilename)' != ''">
\r
370 <_IntermediateWindowsMetadataPath>$(IntermediateOutputPath)$(WinMDExpOutputWindowsMetadataFilename)</_IntermediateWindowsMetadataPath>
\r
371 <_WindowsMetadataOutputPath>$(OutDir)$(WinMDExpOutputWindowsMetadataFilename)</_WindowsMetadataOutputPath>
\r
375 <!-- Create an item for entry point of the ClickOnce application (Example: WindowsApplication1.exe) -->
\r
376 <_DeploymentManifestEntryPoint Include="@(IntermediateAssembly)">
\r
377 <TargetPath>$(TargetFileName)</TargetPath>
\r
378 </_DeploymentManifestEntryPoint>
\r
380 <!-- Create an item for the application icon if one exists in the project (Example: app.ico) -->
\r
381 <!-- NOTE: The item Include and the Exists function are operating relative to the PROJECT (.csproj, .vbproj etc.) directory in this case -->
\r
382 <_DeploymentManifestIconFile Include="$(ApplicationIcon)" Condition="Exists('$(ApplicationIcon)')">
\r
383 <TargetPath>$(ApplicationIcon)</TargetPath>
\r
384 </_DeploymentManifestIconFile>
\r
386 <!-- Create an item for the output application manifest (Example: WindowsApplication1.exe.manifeset) -->
\r
387 <ApplicationManifest Include="$(IntermediateOutputPath)$(_DeploymentTargetApplicationManifestFileName)">
\r
388 <TargetPath>$(_DeploymentTargetApplicationManifestFileName)</TargetPath>
\r
389 </ApplicationManifest>
\r
391 <!-- Create an item for the final application manifest (Example: WindowsApplication1.exe.manifeset)
\r
392 This item represents the final output application manifest used for project-to-project
\r
393 references and for copying to the publish output location. -->
\r
394 <_ApplicationManifestFinal Include="$(OutDir)$(_DeploymentTargetApplicationManifestFileName)">
\r
395 <TargetPath>$(_DeploymentTargetApplicationManifestFileName)</TargetPath>
\r
396 </_ApplicationManifestFinal>
\r
398 <!-- Create an item for the output deploy manifest (Example: WindowsApplication1.application) -->
\r
399 <DeployManifest Include="$(IntermediateOutputPath)$(TargetDeployManifestFileName)">
\r
400 <TargetPath>$(TargetDeployManifestFileName)</TargetPath>
\r
403 <!-- Create an item for the intermediate trust info file -->
\r
404 <_DeploymentIntermediateTrustInfoFile Include="$(IntermediateOutputPath)$(TargetName).TrustInfo.xml" Condition="'$(TargetZone)'!=''"/>
\r
408 Determine the <deploymentProvider> (_DeploymentUrl) for the ClickOnce deployment manifest.
\r
409 Prefer the UpdateUrl, falling back to InstallUrl or PublishUrl if not specified.
\r
410 If the UpdateUrl is specified then _DeploymentUrl is always set to the UpdateUrl.
\r
411 Otherwise, only set the _DeploymentUrl if it's an installed app and updates are enabled.
\r
414 <_DeploymentUrl Condition="'$(_DeploymentUrl)'==''">$(UpdateUrl)</_DeploymentUrl>
\r
415 <_DeploymentUrl Condition="'$(_DeploymentUrl)'==''">$(InstallUrl)</_DeploymentUrl>
\r
416 <_DeploymentUrl Condition="'$(_DeploymentUrl)'==''">$(PublishUrl)</_DeploymentUrl>
\r
417 <_DeploymentUrl Condition="!('$(UpdateUrl)'=='') and '$(Install)'=='false'"></_DeploymentUrl>
\r
418 <_DeploymentUrl Condition="'$(_DeploymentUrl)'!=''">$(_DeploymentUrl)$(TargetDeployManifestFileName)</_DeploymentUrl>
\r
420 Need to explicitly blank out the _DeploymentUrl when it's not used. Otherwise an
\r
421 inappropriate value may be used. For example a local path from the PublishUrl
\r
422 is something we never want to see in the manifest because it means you could
\r
423 only install the app from that machine.
\r
425 <_DeploymentUrl Condition="'$(UpdateUrl)'=='' and !('$(Install)'=='true' and '$(UpdateEnabled)'=='true')"></_DeploymentUrl>
\r
426 <_DeploymentUrl Condition="'$(ExcludeDeploymentUrl)'=='true'"></_DeploymentUrl>
\r
429 <!-- Determine the URLs for the bootstrapper. -->
\r
431 <_DeploymentApplicationUrl Condition="'$(IsWebBootstrapper)'=='true'">$(InstallUrl)</_DeploymentApplicationUrl>
\r
432 <_DeploymentApplicationUrl Condition="'$(IsWebBootstrapper)'=='true' and '$(InstallUrl)'==''">$(PublishUrl)</_DeploymentApplicationUrl>
\r
433 <_DeploymentComponentsUrl Condition="'$(BootstrapperComponentsLocation)'=='Absolute'">$(BootstrapperComponentsUrl)</_DeploymentComponentsUrl>
\r
436 <!-- Output location for publish target. -->
\r
438 <PublishDir Condition="'$(PublishDir)' != '' and !HasTrailingSlash('$(PublishDir)')">$(PublishDir)\</PublishDir>
\r
439 <PublishDir Condition="'$(PublishDir)'==''">$(OutputPath)app.publish\</PublishDir>
\r
443 ProcessorArchitecture is the target processor architecture.
\r
445 <PropertyGroup Condition="'$(ProcessorArchitecture)'==''">
\r
447 If ProcessorArchitecture is not set, set it to PlatformTarget
\r
448 Note: if $(PlatformTarget) is also blank resolve assembly reference defaults to msil which is the
\r
449 desired behavior in this case
\r
451 <ProcessorArchitecture>$(PlatformTarget)</ProcessorArchitecture>
\r
454 If Processor architecture is not set and PlatformTarget is a known target translate the
\r
455 PlatformTarget into something ResolveAssemblyReference knows about
\r
457 <ProcessorArchitecture Condition=" '$(PlatformTarget)' == 'AnyCpu' ">msil</ProcessorArchitecture>
\r
458 <ProcessorArchitecture Condition=" '$(PlatformTarget)' == 'x64' ">amd64</ProcessorArchitecture>
\r
459 <ProcessorArchitecture Condition=" '$(PlatformTarget)' == 'Itanium' ">ia64</ProcessorArchitecture>
\r
460 <ProcessorArchitecture Condition=" '$(PlatformTarget)' == 'x86' ">x86</ProcessorArchitecture>
\r
461 <ProcessorArchitecture Condition=" '$(PlatformTarget)' == 'ARM' ">arm</ProcessorArchitecture>
\r
465 <ConsiderPlatformAsProcessorArchitecture Condition="'$(ConsiderPlatformAsProcessorArchitecture)' == ''">true</ConsiderPlatformAsProcessorArchitecture>
\r
468 <PropertyGroup Condition="'$(ProcessorArchitecture)' == '' and '$(ConsiderPlatformAsProcessorArchitecture)' == 'true'">
\r
469 <!-- We need to do this here because if we were to just compare against platform visual would parse them out as available platforms which may not be the case -->
\r
470 <ProcessorArchitectureAsPlatform>$(Platform)</ProcessorArchitectureAsPlatform>
\r
471 <ProcessorArchitecture Condition=" '$(ProcessorArchitectureAsPlatform)' == 'AnyCpu' or '$(ProcessorArchitectureAsPlatform)' == 'Any Cpu'">msil</ProcessorArchitecture>
\r
472 <ProcessorArchitecture Condition=" '$(ProcessorArchitectureAsPlatform)' == 'x64' or '$(ProcessorArchitectureAsPlatform)' == 'amd64'">amd64</ProcessorArchitecture>
\r
473 <ProcessorArchitecture Condition=" '$(ProcessorArchitectureAsPlatform)' == 'Itanium' ">ia64</ProcessorArchitecture>
\r
474 <ProcessorArchitecture Condition=" '$(ProcessorArchitectureAsPlatform)' == 'x86' or '$(ProcessorArchitectureAsPlatform)' == 'win32'">x86</ProcessorArchitecture>
\r
475 <ProcessorArchitecture Condition=" '$(ProcessorArchitectureAsPlatform)' == 'ARM' ">arm</ProcessorArchitecture>
\r
477 <!--For compatibility with the 4.0 behavior, if not set above, default to the environment. To override this, set ProcessorArchitecture explicitly. We also need to disable the warning since we do not know if what the environment is set to is correct-->
\r
478 <ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch Condition="'$(ProcessorArchitecture)'==''">None</ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
\r
479 <ProcessorArchitecture Condition="'$(ProcessorArchitecture)'==''">$(PROCESSOR_ARCHITECTURE)</ProcessorArchitecture>
\r
483 <!-- Sensible defaults for the most-commonly-desired MSBuildRuntime and MSBuildArchitecture values -->
\r
484 <PropertyGroup Condition="'$(DisableOutOfProcTaskHost)' == ''">
\r
485 <TargetFrameworkAsMSBuildRuntime Condition="'$(TargetFrameworkVersion)' == 'v2.0' or '$(TargetFrameworkVersion)' == 'v3.0' or '$(TargetFrameworkVersion)' == 'v3.5'">CLR2</TargetFrameworkAsMSBuildRuntime>
\r
486 <TargetFrameworkAsMSBuildRuntime Condition="'$(TargetFrameworkVersion)' == 'v4.0' or '$(TargetFrameworkVersion)' == 'v4.5'">CLR4</TargetFrameworkAsMSBuildRuntime>
\r
487 <TargetFrameworkAsMSBuildRuntime Condition="'$(TargetFrameworkAsMSBuildRuntime)' == ''">CurrentRuntime</TargetFrameworkAsMSBuildRuntime>
\r
489 <PlatformTargetAsMSBuildArchitectureExplicitlySet Condition="'$(PlatformTargetAsMSBuildArchitecture)' != ''">true</PlatformTargetAsMSBuildArchitectureExplicitlySet>
\r
490 <PlatformTargetAsMSBuildArchitectureExplicitlySet Condition="'$(PlatformTargetAsMSBuildArchitecture)' == ''">false</PlatformTargetAsMSBuildArchitectureExplicitlySet>
\r
492 <PlatformTargetAsMSBuildArchitecture Condition="'$(PlatformTarget)' == 'x86' or ('$(PlatformTarget)' == 'x64' and '$(MSBuildExtensionsPath64)' != '')">$(PlatformTarget)</PlatformTargetAsMSBuildArchitecture>
\r
493 <PlatformTargetAsMSBuildArchitecture Condition="'$(PlatformTarget)' == 'arm'">x86</PlatformTargetAsMSBuildArchitecture>
\r
494 <PlatformTargetAsMSBuildArchitecture Condition="('$(PlatformTarget)' == 'ia64' and '$(MSBuildExtensionsPath64)' != '')">x64</PlatformTargetAsMSBuildArchitecture>
\r
495 <PlatformTargetAsMSBuildArchitecture Condition="'$(PlatformTargetAsMSBuildArchitecture)' == ''">CurrentArchitecture</PlatformTargetAsMSBuildArchitecture>
\r
498 <!-- Flavor is the project flavor. For example, Client, Smart Devices, SQL Server, etc. -->
\r
500 <ProjectFlavor Condition="'$(ProjectFlavor)'==''">Client</ProjectFlavor>
\r
504 The default for compilers is to not delay-sign. If $(DelaySign) is false, let the compiler
\r
505 use its default rather than forcing a no-delay-sign flag to be passed in. This is so that
\r
506 attributes in the source code can override this decision.
\r
509 <DelaySign Condition="'$(SignAssembly)' != 'true'">false</DelaySign>
\r
510 <DelaySign Condition="'$(DelaySign)'!='true'"></DelaySign>
\r
513 <!-- These properties control web reference proxy generation. -->
\r
515 <WebReference_EnableProperties Condition=" '$(WebReference_EnableProperties)' == '' ">true</WebReference_EnableProperties>
\r
516 <WebReference_EnableSQLTypes Condition=" '$(WebReference_EnableSQLTypes)' == '' ">true</WebReference_EnableSQLTypes>
\r
517 <WebReference_EnableLegacyEventingModel Condition=" '$(WebReference_EnableLegacyEventingModel)' == '' ">false</WebReference_EnableLegacyEventingModel>
\r
521 <MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildProjectFullPath);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
\r
522 <MSBuildAllProjects Condition="Exists('$(MSBuildProjectFullPath).user')">$(MSBuildAllProjects);$(MSBuildProjectFullPath).user</MSBuildAllProjects>
\r
526 These parameters control where to look in the registry for directories to search for
\r
527 assemblies in the assembly resolution tasks.
\r
530 <AssemblyFoldersSuffix Condition=" '$(AssemblyFoldersSuffix)' == '' ">AssemblyFoldersEx</AssemblyFoldersSuffix>
\r
531 <FrameworkRegistryBase Condition=" '$(FrameworkRegistryBase)' == '' ">Software\Microsoft\$(TargetFrameworkIdentifier)</FrameworkRegistryBase>
\r
532 <TargetPlatformRegistryBase Condition="'$(TargetPlatformRegistryBase)' == ''">Software\Microsoft\Microsoft SDKs\$(TargetPlatformIdentifier)</TargetPlatformRegistryBase>
\r
533 <AssemblyFoldersConfigFile Condition="'$(AssemblyFoldersConfigFile)' == ''">$(MSBuildToolsPath32)\AssemblyFolders.config</AssemblyFoldersConfigFile>
\r
534 <AssemblyFoldersConfigFileSearchPath Condition="Exists('$(AssemblyFoldersConfigFile)')">{AssemblyFoldersFromConfig:$(AssemblyFoldersConfigFile),$(TargetFrameworkVersion)};</AssemblyFoldersConfigFileSearchPath>
\r
536 The SearchPaths property is set to find assemblies in the following order:
\r
538 (1) Files from current project - indicated by {CandidateAssemblyFiles}
\r
539 (2) $(ReferencePath) - the reference path property, which comes from the .USER file.
\r
540 (3) The hintpath from the referenced item itself, indicated by {HintPathFromItem}.
\r
541 (4) The directory of MSBuild's "target" runtime from GetFrameworkPath.
\r
542 The "target" runtime folder is the folder of the runtime that MSBuild is a part of.
\r
543 (5) Registered assembly folders, indicated by {Registry:*,*,*}
\r
544 (6) Assembly folders from AssemblyFolders.config file (provided by Visual Studio Dev15+).
\r
545 (7) Legacy registered assembly folders, indicated by {AssemblyFolders}
\r
546 (8) Resolve to the GAC.
\r
547 (9) Treat the reference's Include as if it were a real file name.
\r
548 (10) Look in the application's output folder (like bin\debug)
\r
550 <AssemblySearchPaths Condition=" '$(AssemblySearchPaths)' == ''">
\r
551 {CandidateAssemblyFiles};
\r
553 {HintPathFromItem};
\r
554 {TargetFrameworkDirectory};
\r
555 $(AssemblyFoldersConfigFileSearchPath)
\r
556 {Registry:$(FrameworkRegistryBase),$(TargetFrameworkVersion),$(AssemblyFoldersSuffix)$(AssemblyFoldersExConditions)};
\r
561 </AssemblySearchPaths>
\r
564 These are the extensions that assembly reference resolution will consider for resolution.
\r
565 Add new extensions here if you want to add new file types to consider (for example, .metadata_dll).
\r
566 Put the most likely extensions first for reference resolution speed.
\r
568 <AllowedReferenceAssemblyFileExtensions Condition=" '$(AllowedReferenceAssemblyFileExtensions)' == '' ">
\r
572 </AllowedReferenceAssemblyFileExtensions>
\r
575 These are the extensions that reference resolution will consider when looking for files related
\r
576 to resolved references. Add new extensions here if you want to add new file types to consider.
\r
578 <AllowedReferenceRelatedFileExtensions Condition=" '$(AllowedReferenceRelatedFileExtensions)' == '' ">
\r
584 </AllowedReferenceRelatedFileExtensions>
\r
587 These names are used when determining which TargetFramework subset to use. If the any of the FullReferenceAssemblyNames
\r
588 are seen in the list of client subsets, RAR will assume that no client subset is being used. The list is semicolon seperated
\r
589 For example : Full;Complete;AllThere
\r
591 <FullReferenceAssemblyNames Condition="'$(FullReferenceAssemblyNames)' == ''">Full</FullReferenceAssemblyNames>
\r
594 <!-- ContinueOnError takes 3 values: WarnAndContinue (true), ErrorAndStop (false), and ErrorAndContinue.
\r
595 Default to ErrorAndStop, since that matches the behaviour in previous versions, and what users
\r
596 typically expect -->
\r
598 <ContinueOnError Condition="'$(ContinueOnError)' == ''">false</ContinueOnError>
\r
601 <!-- Common Project System support -->
\r
603 <CommonXamlResourcesDirectory Condition=" '$(CommonXamlResourcesDirectory)' == '' ">$(MSBuildThisFileDirectory)$(LangName)\</CommonXamlResourcesDirectory>
\r
606 <!-- We need to fallback to en-US in case the xaml rules are not localized (possibly happen on community languages). -->
\r
607 <PropertyGroup Condition="!Exists('$(CommonXamlResourcesDirectory)')">
\r
608 <CommonXamlResourcesDirectory>$(MSBuildThisFileDirectory)en-US\</CommonXamlResourcesDirectory>
\r
611 <ItemGroup Condition=" '$(DefineCommonItemSchemas)' == 'true' ">
\r
612 <PropertyPageSchema Include="$(CommonXamlResourcesDirectory)ProjectItemsSchema.xaml"/>
\r
614 <PropertyPageSchema Include="
\r
615 $(CommonXamlResourcesDirectory)General.xaml;
\r
616 $(CommonXamlResourcesDirectory)Debugger_General.xaml">
\r
617 <Context>Project</Context>
\r
618 </PropertyPageSchema>
\r
620 <PropertyPageSchema Include="$(CommonXamlResourcesDirectory)General.BrowseObject.xaml">
\r
621 <Context>BrowseObject</Context>
\r
622 </PropertyPageSchema>
\r
624 <PropertyPageSchema Include="$(CommonXamlResourcesDirectory)General_File.xaml">
\r
625 <Context>File</Context>
\r
626 </PropertyPageSchema>
\r
628 <PropertyPageSchema Include="$(CommonXamlResourcesDirectory)SCC.xaml">
\r
629 <Context>Invisible</Context>
\r
630 </PropertyPageSchema>
\r
632 <PropertyPageSchema Include="
\r
633 $(CommonXamlResourcesDirectory)Folder.xaml;
\r
634 $(CommonXamlResourcesDirectory)None.xaml;
\r
635 $(CommonXamlResourcesDirectory)Content.xaml;
\r
636 $(CommonXamlResourcesDirectory)EmbeddedResource.xaml;
\r
638 <Context>File;BrowseObject</Context>
\r
639 </PropertyPageSchema>
\r
641 <PropertyPageSchema Include="$(CommonXamlResourcesDirectory)SpecialFolder.xaml;">
\r
642 <Context>File;ProjectSubscriptionService</Context>
\r
643 </PropertyPageSchema>
\r
647 <DefineCommonReferenceSchemas Condition=" '$(DefineCommonReferenceSchemas)' == '' ">$(DefineCommonItemSchemas)</DefineCommonReferenceSchemas>
\r
650 <ItemGroup Condition=" '$(DefineCommonReferenceSchemas)' == 'true' ">
\r
651 <!-- Assembly references -->
\r
652 <PropertyPageSchema Include="$(CommonXamlResourcesDirectory)assemblyreference.xaml">
\r
653 <Context>;BrowseObject</Context>
\r
654 </PropertyPageSchema>
\r
655 <PropertyPageSchema Include="$(CommonXamlResourcesDirectory)ResolvedAssemblyReference.xaml">
\r
656 <Context>ProjectSubscriptionService;BrowseObject</Context>
\r
657 </PropertyPageSchema>
\r
659 <!-- COM references -->
\r
660 <PropertyPageSchema Include="$(CommonXamlResourcesDirectory)COMReference.xaml">
\r
661 <Context>;BrowseObject</Context>
\r
662 </PropertyPageSchema>
\r
663 <PropertyPageSchema Include="$(CommonXamlResourcesDirectory)ResolvedCOMReference.xaml">
\r
664 <Context>ProjectSubscriptionService;BrowseObject</Context>
\r
665 </PropertyPageSchema>
\r
667 <!-- Project references -->
\r
668 <PropertyPageSchema Include="$(CommonXamlResourcesDirectory)ProjectReference.xaml">
\r
669 <Context>;BrowseObject</Context>
\r
670 </PropertyPageSchema>
\r
671 <PropertyPageSchema Include="$(CommonXamlResourcesDirectory)ResolvedProjectReference.xaml">
\r
672 <Context>ProjectSubscriptionService;BrowseObject</Context>
\r
673 </PropertyPageSchema>
\r
676 <ItemGroup Condition=" '$(DefineCommonCapabilities)' == 'true' ">
\r
677 <ProjectCapability Include="
\r
678 AssemblyReferences;
\r
681 SharedProjectReferences;
\r
683 AllTargetOutputGroups;
\r
684 VisualStudioWellKnownOutputGroups;
\r
685 SingleFileGenerators;
\r
686 DeclaredSourceItems;
\r
689 <ProjectCapability Condition=" '$(TargetPlatformIdentifier)' == 'Windows' and '$(TargetPlatformVersion)' < 8.0 "
\r
690 Include="BuildWindowsDesktopTarget" />
\r
693 <ItemDefinitionGroup Condition=" '$(DefineExplicitDefaults)' == 'true' ">
\r
695 <CopyToOutputDirectory>Never</CopyToOutputDirectory>
\r
698 <CopyToOutputDirectory>Never</CopyToOutputDirectory>
\r
701 <CopyToOutputDirectory>Never</CopyToOutputDirectory>
\r
704 <CopyToOutputDirectory>Never</CopyToOutputDirectory>
\r
705 </EmbeddedResource>
\r
706 </ItemDefinitionGroup>
\r
709 ***********************************************************************************************
\r
710 ***********************************************************************************************
\r
712 ***********************************************************************************************
\r
713 ***********************************************************************************************
\r
717 ============================================================
\r
718 _CheckForInvalidConfigurationAndPlatform
\r
720 This target checks for errors in statically defined properties. By setting BeforeTargets, we try
\r
721 to ensure that the target runs before any build related targets.
\r
722 If your target requires this check and is running as a BeforeTargets of one of the first targets
\r
723 of $(BuildDependsOn), $(RebuildDependsOn), or $(CleanDependsOn) you will need to set your DependsOn
\r
725 ============================================================
\r
728 Name="_CheckForInvalidConfigurationAndPlatform"
\r
729 BeforeTargets="$(BuildDependsOn);Build;$(RebuildDependsOn);Rebuild;$(CleanDependsOn);Clean">
\r
732 <_InvalidConfigurationMessageText>The OutputPath property is not set for project '$(MSBuildProjectFile)'. Please check to make sure that you have specified a valid combination of Configuration and Platform for this project. Configuration='$(_OriginalConfiguration)' Platform='$(_OriginalPlatform)'.</_InvalidConfigurationMessageText>
\r
733 <_InvalidConfigurationMessageText Condition="'$(BuildingInsideVisualStudio)' == 'true'">$(_InvalidConfigurationMessageText) This error may also appear if some other project is trying to follow a project-to-project reference to this project, this project has been unloaded or is not included in the solution, and the referencing project does not build using the same or an equivalent Configuration or Platform.</_InvalidConfigurationMessageText>
\r
734 <_InvalidConfigurationMessageText Condition="'$(BuildingInsideVisualStudio)' != 'true'">$(_InvalidConfigurationMessageText) You may be seeing this message because you are trying to build a project without a solution file, and have specified a non-default Configuration or Platform that doesn't exist for this project.</_InvalidConfigurationMessageText>
\r
737 <Error Condition=" '$(_InvalidConfigurationError)' == 'true' " Text="$(_InvalidConfigurationMessageText)"/>
\r
738 <Warning Condition=" '$(_InvalidConfigurationWarning)' == 'true' " Text="$(_InvalidConfigurationMessageText)"/>
\r
740 <Message Condition="'$(DesignTimeBuild)' != 'true'" Text="Configuration=$(Configuration)" Importance="Low" />
\r
741 <Message Condition="'$(DesignTimeBuild)' != 'true'" Text="Platform=$(Platform)" Importance="Low" />
\r
743 <!-- Although we try to ensure a trailing slash, it's possible to circumvent this if the property is set on the command line -->
\r
744 <Error Condition="'$(OutDir)' != '' and !HasTrailingSlash('$(OutDir)')" Text="The OutDir property must end with a trailing slash." />
\r
745 <Error Condition="'$(BaseIntermediateOutputPath)' != '' and !HasTrailingSlash('$(BaseIntermediateOutputPath)')" Text="The BaseIntermediateOutputPath must end with a trailing slash." />
\r
746 <Error Condition="'$(IntermediateOutputPath)' != '' and !HasTrailingSlash('$(IntermediateOutputPath)')" Text="The IntermediateOutputPath must end with a trailing slash." />
\r
748 <!-- Also update the value of PlatformTargetAsMSBuildArchitecture per the value of Prefer32Bit. We are doing
\r
749 this here because Prefer32Bit may be set anywhere in the targets, so we can't depend on it having the
\r
750 correct value when we're trying to figure out PlatformTargetAsMSBuildArchitecture -->
\r
751 <PropertyGroup Condition="'$(Prefer32Bit)' == 'true' and ('$(PlatformTarget)' == 'AnyCPU' or '$(PlatformTarget)' == '') and '$(PlatformTargetAsMSBuildArchitectureExplicitlySet)' != 'true'">
\r
752 <PlatformTargetAsMSBuildArchitecture>x86</PlatformTargetAsMSBuildArchitecture>
\r
757 ============================================================
\r
760 The main build entry point.
\r
761 ============================================================
\r
772 Condition=" '$(_InvalidConfigurationWarning)' != 'true' "
\r
773 DependsOnTargets="$(BuildDependsOn)"
\r
774 Returns="$(TargetPath)" />
\r
777 ============================================================
\r
780 Redefine this target in your project in order to run tasks just before Build
\r
781 ============================================================
\r
783 <Target Name="BeforeBuild"/>
\r
786 ============================================================
\r
789 Redefine this target in your project in order to run tasks just after Build
\r
790 ============================================================
\r
792 <Target Name="AfterBuild"/>
\r
795 ============================================================
\r
798 The core build step calls each of the build targets.
\r
799 ============================================================
\r
802 <CoreBuildDependsOn>
\r
810 ExportWindowsMDFile;
\r
811 UnmanagedUnregistration;
\r
812 GenerateSerializationAssemblies;
\r
813 CreateSatelliteAssemblies;
\r
817 UnmanagedRegistration;
\r
820 </CoreBuildDependsOn>
\r
824 DependsOnTargets="$(CoreBuildDependsOn)">
\r
826 <OnError ExecuteTargets="_TimeStampAfterCompile;PostBuildEvent" Condition="'$(RunPostBuildEvent)'=='Always' or '$(RunPostBuildEvent)'=='OnOutputUpdated'"/>
\r
827 <OnError ExecuteTargets="_CleanRecordFileWrites"/>
\r
832 ============================================================
\r
835 Delete all intermediate and final build outputs, and then build the project from scratch.
\r
836 ============================================================
\r
840 <_ProjectDefaultTargets Condition="'$(MSBuildProjectDefaultTargets)' != ''">$(MSBuildProjectDefaultTargets)</_ProjectDefaultTargets>
\r
841 <_ProjectDefaultTargets Condition="'$(MSBuildProjectDefaultTargets)' == ''">Build</_ProjectDefaultTargets>
\r
846 $(_ProjectDefaultTargets);
\r
848 </RebuildDependsOn>
\r
850 <RebuildDependsOn Condition=" '$(MSBuildProjectDefaultTargets)' == 'Rebuild' " >
\r
855 </RebuildDependsOn>
\r
860 Condition=" '$(_InvalidConfigurationWarning)' != 'true' "
\r
861 DependsOnTargets="$(RebuildDependsOn)"
\r
862 Returns="$(TargetPath)"/>
\r
865 ============================================================
\r
868 Redefine this target in your project in order to run tasks just before Rebuild
\r
869 ============================================================
\r
871 <Target Name="BeforeRebuild"/>
\r
874 ============================================================
\r
877 Redefine this target in your project in order to run tasks just after Rebuild
\r
878 ============================================================
\r
880 <Target Name="AfterRebuild"/>
\r
883 ============================================================
\r
884 BuildGenerateSources
\r
886 Redefine this target in your project in order to run tasks for BuildGenerateSources
\r
888 Set BuildPassReferences to enable P2P builds
\r
889 ============================================================
\r
892 <BuildGenerateSourcesAction>Build</BuildGenerateSourcesAction>
\r
895 <Target Name="BuildGenerateSources" DependsOnTargets="BuildGenerateSourcesTraverse;$(BuildGenerateSourcesAction)" />
\r
897 <Target Name="BuildGenerateSourcesTraverse" DependsOnTargets="PrepareProjectReferences">
\r
899 Projects="@(_MSBuildProjectReferenceExistent)"
\r
900 Targets="BuildGenerateSources"
\r
901 BuildInParallel="$(BuildInParallel)"
\r
902 Properties="%(_MSBuildProjectReferenceExistent.SetConfiguration); %(_MSBuildProjectReferenceExistent.SetPlatform); %(_MSBuildProjectReferenceExistent.SetTargetFramework);"
\r
903 Condition="'$(BuildPassReferences)' == 'true' and '@(ProjectReferenceWithConfiguration)' != '' and '@(_MSBuildProjectReferenceExistent)' != '' and '%(_MSBuildProjectReferenceExistent.BuildReference)' == 'true'"
\r
904 ContinueOnError="!$(BuildingProject)"
\r
905 RemoveProperties="%(_MSBuildProjectReferenceExistent.GlobalPropertiesToRemove)">
\r
910 ============================================================
\r
913 Redefine this target in your project in order to run tasks for BuildCompile
\r
914 ============================================================
\r
917 <BuildCompileAction>Build</BuildCompileAction>
\r
920 <Target Name="BuildCompile" DependsOnTargets="BuildCompileTraverse;$(BuildCompileAction)" />
\r
922 <Target Name="BuildCompileTraverse" DependsOnTargets="PrepareProjectReferences">
\r
924 Projects="@(_MSBuildProjectReferenceExistent)"
\r
925 Targets="BuildCompile"
\r
926 BuildInParallel="$(BuildInParallel)"
\r
927 Properties="%(_MSBuildProjectReferenceExistent.SetConfiguration); %(_MSBuildProjectReferenceExistent.SetPlatform); %(_MSBuildProjectReferenceExistent.SetTargetFramework)"
\r
928 Condition="'$(BuildPassReferences)' == 'true' and '@(ProjectReferenceWithConfiguration)' != '' and '@(_MSBuildProjectReferenceExistent)' != '' and '%(_MSBuildProjectReferenceExistent.BuildReference)' == 'true'"
\r
929 ContinueOnError="!$(BuildingProject)"
\r
930 RemoveProperties="%(_MSBuildProjectReferenceExistent.GlobalPropertiesToRemove)">
\r
935 ============================================================
\r
938 Redefine this target in your project in order to run tasks for BuildLink
\r
939 ============================================================
\r
942 <BuildLinkAction>Build</BuildLinkAction>
\r
945 <Target Name="BuildLink" DependsOnTargets="BuildLinkTraverse;$(BuildLinkAction)" />
\r
947 <Target Name="BuildLinkTraverse" DependsOnTargets="PrepareProjectReferences" >
\r
949 Projects="@(_MSBuildProjectReferenceExistent)"
\r
950 Targets="BuildLink"
\r
951 BuildInParallel="$(BuildInParallel)"
\r
952 Properties="%(_MSBuildProjectReferenceExistent.SetConfiguration); %(_MSBuildProjectReferenceExistent.SetPlatform); %(_MSBuildProjectReferenceExistent.SetTargetFramework)"
\r
953 Condition="'$(BuildPassReferences)' == 'true' and '@(ProjectReferenceWithConfiguration)' != '' and '@(_MSBuildProjectReferenceExistent)' != '' and '%(_MSBuildProjectReferenceExistent.BuildReference)' == 'true'"
\r
954 ContinueOnError="!$(BuildingProject)"
\r
955 RemoveProperties="%(_MSBuildProjectReferenceExistent.GlobalPropertiesToRemove)">
\r
960 ============================================================
\r
961 CopyRunEnvironmentFiles
\r
963 Copy environment files necessary to run the user's app to the final directory.
\r
964 This is a public target that can be invoked by an IDE.
\r
966 This may be used by an IDE to make the app.config file available for running
\r
968 ============================================================
\r
971 Name="CopyRunEnvironmentFiles"
\r
972 DependsOnTargets="PrepareForBuild;SetWin32ManifestProperties;_CopyAppConfigFile;_CleanRecordFileWrites"/>
\r
975 ============================================================
\r
978 Run the final build output if it is a .EXE
\r
979 ============================================================
\r
982 <RunDependsOn></RunDependsOn>
\r
986 DependsOnTargets="$(RunDependsOn)">
\r
988 <Error Text="Cannot run '$(TargetPath)' because project output type is not '.exe'" Condition="'$(TargetExt)'!='.exe'"/>
\r
989 <Exec Command="$(TargetPath) $(StartArguments)" WorkingDirectory="$(OutDir)" Condition=" '$(StartWorkingDirectory)' == '' "/>
\r
990 <Exec Command="$(TargetPath) $(StartArguments)" WorkingDirectory="$(StartWorkingDirectory)" Condition=" '$(StartWorkingDirectory)' != '' "/>
\r
998 ***********************************************************************************************
\r
999 ***********************************************************************************************
\r
1000 BuildOnlySettings Section
\r
1001 ***********************************************************************************************
\r
1002 ***********************************************************************************************
\r
1006 ============================================================
\r
1009 This target is called only when doing a real build. It is specifically not called during project load.
\r
1010 ============================================================
\r
1013 <BuildingProject>false</BuildingProject>
\r
1016 Name="BuildOnlySettings">
\r
1018 <BuildingProject>true</BuildingProject>
\r
1026 ***********************************************************************************************
\r
1027 ***********************************************************************************************
\r
1028 PrepareForBuild Section
\r
1029 ***********************************************************************************************
\r
1030 ***********************************************************************************************
\r
1034 ============================================================
\r
1037 Prepare the prerequisites for building.
\r
1038 ============================================================
\r
1041 <PrepareForBuildDependsOn>GetFrameworkPaths;GetReferenceAssemblyPaths;AssignLinkMetadata</PrepareForBuildDependsOn>
\r
1044 Name="PrepareForBuild"
\r
1045 DependsOnTargets="$(PrepareForBuildDependsOn)">
\r
1048 <AppConfigWithTargetPath Include="$(AppConfig)" Condition="'$(AppConfig)'!=''">
\r
1049 <TargetPath>$(TargetFileName).config</TargetPath>
\r
1050 </AppConfigWithTargetPath>
\r
1053 <FindAppConfigFile PrimaryList="@(None)" SecondaryList="@(Content)" TargetPath="$(TargetFileName).config" Condition="'$(AppConfig)'==''">
\r
1054 <Output TaskParameter="AppConfigFile" ItemName="AppConfigWithTargetPath"/>
\r
1055 <Output TaskParameter="AppConfigFile" PropertyName="AppConfig"/>
\r
1056 </FindAppConfigFile>
\r
1058 <!-- Create the directories for intermediate and final build products, and any other arbitrary directories. -->
\r
1059 <!-- We are going to continue on error here so that if the tree is read only we will still get intellisense -->
\r
1060 <MakeDir Directories="$(OutDir);$(IntermediateOutputPath);@(DocFileItem->'%(RelativeDir)');@(CreateDirectory)" ContinueOnError="True"/>
\r
1065 ============================================================
\r
1068 Get the paths for the .NET Framework installation directory
\r
1070 These paths are not used directly by this .targets file but are available for pre and
\r
1072 ============================================================
\r
1075 <Framework40Dir>@(_TargetFramework40DirectoryItem)</Framework40Dir>
\r
1076 <Framework35Dir>@(_TargetFramework35DirectoryItem)</Framework35Dir>
\r
1077 <Framework30Dir>@(_TargetFramework30DirectoryItem)</Framework30Dir>
\r
1078 <Framework20Dir>@(_TargetFramework20DirectoryItem)</Framework20Dir>
\r
1079 <!-- Note we need to make the 4.0 FrameworkDir point to the 2.0 location by default since we shipped msbuild 4.0 that way and to change it would be a breaking change.-->
\r
1080 <FrameworkDir Condition="'$(FrameworkDir)' == '' and ('$(TargetFrameworkVersion)' == 'v2.0' or '$(TargetFrameworkVersion)' == 'v3.5' or '$(TargetFrameworkVersion)' == 'v4.0')">@(_TargetFramework20DirectoryItem)</FrameworkDir>
\r
1081 <FrameworkDir Condition="'$(FrameworkDir)' == ''">@(_TargetFramework40DirectoryItem)</FrameworkDir>
\r
1082 <TargetedFrameworkDir Condition="'$(TargetedFrameworkDir)' == ''">@(_TargetedFrameworkDirectoryItem)</TargetedFrameworkDir>
\r
1083 <FrameworkSDKDir Condition="'$(FrameworkSDKDir)' == ''">@(_TargetFrameworkSDKDirectoryItem)</FrameworkSDKDir>
\r
1084 <GetFrameworkPathsDependsOn></GetFrameworkPathsDependsOn>
\r
1087 <!-- This is a generally overriden target, for example it is overriden in the Microsoft.NETFramework.targets file -->
\r
1088 <Target Name="GetFrameworkPaths"/>
\r
1091 ============================================================
\r
1092 GetReferenceAssemblyPaths
\r
1094 Get the paths for the Reference Assemblies for the known versions of the
\r
1097 These paths are used by the build process in order to resolve the correct
\r
1098 assemblies from the various directories, and to support multi-targeting
\r
1099 ============================================================
\r
1102 Name="GetReferenceAssemblyPaths"
\r
1103 DependsOnTargets="$(GetReferenceAssemblyPathsDependsOn)">
\r
1105 <!-- if TargetFrameworkDirectory doesn't have a custom value, clear it out; that way we can get reference paths and target framework directories all in the right order -->
\r
1107 <TargetFrameworkDirectory Condition="'@(_CombinedTargetFrameworkDirectoriesItem)' == '$(TargetFrameworkDirectory)'"/>
\r
1110 <!-- By default if there is no root path set then the task will assume it is Program Files\Reference Assemblies\Microsoft\Framework-->
\r
1111 <GetReferenceAssemblyPaths
\r
1112 Condition="'$(TargetFrameworkMoniker)' != '' and ('$(_TargetFrameworkDirectories)' == '' or '$(_FullFrameworkReferenceAssemblyPaths)' == '')"
\r
1113 TargetFrameworkMoniker="$(TargetFrameworkMoniker)"
\r
1114 RootPath="$(TargetFrameworkRootPath)"
\r
1115 BypassFrameworkInstallChecks="$(BypassFrameworkInstallChecks)"
\r
1117 <Output TaskParameter="ReferenceAssemblyPaths" PropertyName="_TargetFrameworkDirectories"/>
\r
1118 <Output TaskParameter="FullFrameworkReferenceAssemblyPaths" PropertyName="_FullFrameworkReferenceAssemblyPaths"/>
\r
1119 <Output TaskParameter="TargetFrameworkMonikerDisplayName" PropertyName="TargetFrameworkMonikerDisplayName" Condition="'$(TargetFrameworkMonikerDisplayName)' == ''"/>
\r
1120 </GetReferenceAssemblyPaths>
\r
1123 <TargetFrameworkDirectory>$(_TargetFrameworkDirectories);$(TargetFrameworkDirectory);$(WinFXAssemblyDirectory)</TargetFrameworkDirectory>
\r
1124 <TargetFrameworkDirectory Condition="'$(TargetPlatformWinMDLocation)' != '' and Exists('$(TargetPlatformWinMDLocation)')">$(TargetFrameworkDirectory);$(TargetPlatformWinMDLocation)</TargetFrameworkDirectory>
\r
1127 <!-- Remove the AssemblyFolders if no target framework directories could be found. This is to prevent us from
\r
1128 resolving from the assemblyfolders global location if we are not acutally targeting a framework-->
\r
1131 <RemoveAssemblyFoldersIfNoTargetFramework Condition="'$(RemoveAssemblyFoldersIfNoTargetFramework)' == ''">true</RemoveAssemblyFoldersIfNoTargetFramework>
\r
1134 <PropertyGroup Condition="'$(_TargetFrameworkDirectories)' == '' and '$(AssemblySearchPaths)' != '' and '$(RemoveAssemblyFoldersIfNoTargetFramework)' == 'true'">
\r
1135 <AssemblySearchPaths>$(AssemblySearchPaths.Replace('{AssemblyFolders}', '').Split(';'))</AssemblySearchPaths>
\r
1138 <ItemGroup Condition="'$(ImplicitlyExpandDesignTimeFacades)' == 'true'">
\r
1139 <DesignTimeFacadeDirectoryRoots Include="$(TargetFrameworkDirectory)" />
\r
1140 <DesignTimeFacadeDirectories Include="%(DesignTimeFacadeDirectoryRoots.Identity)Facades\" Condition="Exists('%(DesignTimeFacadeDirectoryRoots.Identity)Facades\')" />
\r
1143 <PropertyGroup Condition="'@(DesignTimeFacadeDirectories)' != ''">
\r
1144 <TargetFrameworkDirectory>$(TargetFrameworkDirectory);@(DesignTimeFacadeDirectories)</TargetFrameworkDirectory>
\r
1147 <PropertyGroup Condition="'$(_TargetFrameworkDirectories)' == ''">
\r
1148 <TargetFrameworkProfile/>
\r
1152 <!-- Returns target framework moniker. E.g. ".NETFramework,Version=v4.0.1" -->
\r
1153 <Target Name="GetTargetFrameworkMoniker"
\r
1154 Returns="$(TargetFrameworkMoniker)"/>
\r
1156 <!-- Returns target framework moniker display name. E.g. ".NET Framework 4 Platform Update 1 (KB2478063)" -->
\r
1157 <Target Name="GetTargetFrameworkMonikerDisplayName"
\r
1158 DependsOnTargets="GetFrameworkPaths;GetReferenceAssemblyPaths"
\r
1159 Returns="$(TargetFrameworkMonikerDisplayName)"/>
\r
1161 <!-- Returns semicolon separated list of target framework directories.
\r
1162 E.g "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0.1\;C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\" -->
\r
1163 <Target Name="GetTargetFrameworkDirectories"
\r
1164 DependsOnTargets="GetFrameworkPaths;GetReferenceAssemblyPaths"
\r
1165 Returns="$(TargetFrameworkDirectory)"/>
\r
1168 ============================================================
\r
1169 AssignLinkMetadata
\r
1171 For items of a certain set of whitelisted types, make sure that
\r
1172 if they are defined in a file other than the project file, that
\r
1173 they have "Link" metadata set to an appropriate default.
\r
1174 ============================================================
\r
1176 <Target Name="AssignLinkMetadata" Condition=" '$(SynthesizeLinkMetadata)' == 'true' ">
\r
1177 <!-- NONE ITEMS -->
\r
1178 <AssignLinkMetadata Items="@(None)"
\r
1179 Condition="'@(None)' != '' and '%(None.DefiningProjectFullPath)' != '$(MSBuildProjectFullPath)'">
\r
1180 <Output TaskParameter="OutputItems" ItemName="_Temp" />
\r
1181 </AssignLinkMetadata>
\r
1184 <None Remove="@(_Temp)" />
\r
1185 <None Include="@(_Temp)" />
\r
1186 <_Temp Remove="@(_Temp)" />
\r
1189 <!-- CONTENT ITEMS -->
\r
1190 <AssignLinkMetadata Items="@(Content)"
\r
1191 Condition="'@(Content)' != '' and '%(Content.DefiningProjectFullPath)' != '$(MSBuildProjectFullPath)'">
\r
1192 <Output TaskParameter="OutputItems" ItemName="_Temp" />
\r
1193 </AssignLinkMetadata>
\r
1196 <Content Remove="@(_Temp)" />
\r
1197 <Content Include="@(_Temp)" />
\r
1198 <_Temp Remove="@(_Temp)" />
\r
1202 <!-- PAGE ITEMS -->
\r
1203 <AssignLinkMetadata Items="@(Page)"
\r
1204 Condition="'@(Page)' != '' and '%(Page.DefiningProjectFullPath)' != '$(MSBuildProjectFullPath)'">
\r
1205 <Output TaskParameter="OutputItems" ItemName="_Temp" />
\r
1206 </AssignLinkMetadata>
\r
1209 <Page Remove="@(_Temp)" />
\r
1210 <Page Include="@(_Temp)" />
\r
1211 <_Temp Remove="@(_Temp)" />
\r
1215 <!-- APPLICATIONDEFINITION ITEMS -->
\r
1216 <AssignLinkMetadata Items="@(ApplicationDefinition)"
\r
1217 Condition="'@(ApplicationDefinition)' != '' and '%(ApplicationDefinition.DefiningProjectFullPath)' != '$(MSBuildProjectFullPath)'">
\r
1218 <Output TaskParameter="OutputItems" ItemName="_Temp" />
\r
1219 </AssignLinkMetadata>
\r
1222 <ApplicationDefinition Remove="@(_Temp)" />
\r
1223 <ApplicationDefinition Include="@(_Temp)" />
\r
1224 <_Temp Remove="@(_Temp)" />
\r
1227 <!-- EMBEDDEDRESOURCE ITEMS -->
\r
1228 <AssignLinkMetadata Items="@(EmbeddedResource)"
\r
1229 Condition="'@(EmbeddedResource)' != '' and '%(EmbeddedResource.DefiningProjectFullPath)' != '$(MSBuildProjectFullPath)'">
\r
1230 <Output TaskParameter="OutputItems" ItemName="_Temp" />
\r
1231 </AssignLinkMetadata>
\r
1234 <EmbeddedResource Remove="@(_Temp)" />
\r
1235 <EmbeddedResource Include="@(_Temp)" />
\r
1236 <_Temp Remove="@(_Temp)" />
\r
1241 ***********************************************************************************************
\r
1242 ***********************************************************************************************
\r
1243 PreBuildEvent Section
\r
1244 ***********************************************************************************************
\r
1245 ***********************************************************************************************
\r
1249 ============================================================
\r
1252 Run the pre-build event if there is one.
\r
1253 ============================================================
\r
1256 <PreBuildEventDependsOn></PreBuildEventDependsOn>
\r
1259 Name="PreBuildEvent"
\r
1260 Condition="'$(PreBuildEvent)'!=''"
\r
1261 DependsOnTargets="$(PreBuildEventDependsOn)">
\r
1263 <Exec WorkingDirectory="$(OutDir)" Command="$(PreBuildEvent)" />
\r
1271 ***********************************************************************************************
\r
1272 ***********************************************************************************************
\r
1273 UnmanagedUnregistration Section
\r
1274 ***********************************************************************************************
\r
1275 ***********************************************************************************************
\r
1279 ============================================================
\r
1280 UnmanagedUnregistration
\r
1282 If the main assembly had previously been registered for COM interop, unregister it now.
\r
1283 We will re-register the new version after it has been built.
\r
1284 ============================================================
\r
1287 <UnmanagedUnregistrationDependsOn></UnmanagedUnregistrationDependsOn>
\r
1290 Name="UnmanagedUnregistration"
\r
1291 Condition="(('$(_AssemblyTimestampBeforeCompile)' != '$(_AssemblyTimestampAfterCompile)' or '$(RegisterForComInterop)' != 'true' or '$(OutputType)' != 'library') or
\r
1292 ('$(_AssemblyTimestampBeforeCompile)' == '')) and
\r
1293 Exists('@(_UnmanagedRegistrationCache)')"
\r
1294 DependsOnTargets="$(UnmanagedUnregistrationDependsOn)">
\r
1297 <UnregisterAssemblyMSBuildArchitecture Condition="'$(UnregisterAssemblyMSBuildArchitecture)' == ''">$(PlatformTargetAsMSBuildArchitecture)</UnregisterAssemblyMSBuildArchitecture>
\r
1300 <PropertyGroup Condition="'$(TargetFrameworkAsMSBuildRuntime)' != '' and '$(UnregisterAssemblyMSBuildArchitecture)' != ''">
\r
1301 <!-- Falling back to the current runtime if we are targeting CLR2 and the task host doesn't exist will lead to
\r
1302 incorrect behavior in some cases, but it's the same incorrect behavior as Visual Studio 2010, and thus better
\r
1303 than causing build breaks on upgrade to Win8 the way not doing so would. For more details, see the
\r
1304 corresponding comment in GenerateResource. -->
\r
1305 <UnregisterAssemblyMSBuildRuntime
\r
1306 Condition="'$(UnregisterAssemblyMSBuildRuntime)' == '' and
\r
1307 $([MSBuild]::DoesTaskHostExist(`$(TargetFrameworkAsMSBuildRuntime)`, `$(UnregisterAssemblyMSBuildArchitecture)`))">$(TargetFrameworkAsMSBuildRuntime)</UnregisterAssemblyMSBuildRuntime>
\r
1309 <!-- If the targeted runtime doesn't exist, fall back to current -->
\r
1310 <UnregisterAssemblyMSBuildRuntime Condition="'$(UnregisterAssemblyMSBuildRuntime)' == ''">CurrentRuntime</UnregisterAssemblyMSBuildRuntime>
\r
1314 <UnregisterAssembly AssemblyListFile="@(_UnmanagedRegistrationCache)"
\r
1315 MSBuildArchitecture="$(UnregisterAssemblyMSBuildArchitecture)"
\r
1316 MSBuildRuntime="$(UnregisterAssemblyMSBuildRuntime)" />
\r
1324 ***********************************************************************************************
\r
1325 ***********************************************************************************************
\r
1326 ResolveReferences Section
\r
1327 ***********************************************************************************************
\r
1328 ***********************************************************************************************
\r
1331 ============================================================
\r
1332 GetTargetFrameworkVersion
\r
1334 This stand-alone target returns the target framework version (i.e. v3.5, v4.0, etc.)
\r
1335 that would be used if we built this project.
\r
1337 ============================================================
\r
1341 Name="GetTargetFrameworkVersion"
\r
1342 Returns="$(TargetFrameworkVersion)">
\r
1346 ============================================================
\r
1348 ============================================================
\r
1351 <ResolveReferencesDependsOn>
\r
1352 BeforeResolveReferences;
\r
1353 AssignProjectConfiguration;
\r
1354 ResolveProjectReferences;
\r
1355 FindInvalidProjectReferences;
\r
1356 ResolveNativeReferences;
\r
1357 ResolveAssemblyReferences;
\r
1358 GenerateBindingRedirects;
\r
1359 ResolveComReferences;
\r
1360 AfterResolveReferences
\r
1361 </ResolveReferencesDependsOn>
\r
1364 Name="ResolveReferences"
\r
1365 DependsOnTargets="$(ResolveReferencesDependsOn)"/>
\r
1368 ============================================================
\r
1369 BeforeResolveReferences
\r
1371 Redefine this target in your project in order to run tasks just before ResolveReferences
\r
1372 ============================================================
\r
1374 <Target Name="BeforeResolveReferences"/>
\r
1377 ============================================================
\r
1378 AfterResolveReferences
\r
1380 Redefine this target in your project in order to run tasks just after ResolveReferences
\r
1381 ============================================================
\r
1383 <Target Name="AfterResolveReferences"/>
\r
1386 ============================================================
\r
1387 AssignProjectConfiguration
\r
1389 Assigns the appropriate configuration to each project in the list of project references passed in.
\r
1390 Adds to the project references passed in any project references implied by dependencies expressed in the solution file, if any.
\r
1393 @(ProjectReference) - the list of all project references
\r
1396 @(ProjectReferenceWithConfiguration) - the list of project references (MSBuild and potentially VSIP projects)
\r
1397 with metadata values FullConfiguration, Configuration, Platform,
\r
1398 SetConfiguration, and SetPlatform
\r
1399 ============================================================
\r
1402 Name="AssignProjectConfiguration"
\r
1403 Condition="'$(CurrentSolutionConfigurationContents)' != '' or '@(ProjectReference)'!=''">
\r
1406 <OnlyReferenceAndBuildProjectsEnabledInSolutionConfiguration Condition="'$(OnlyReferenceAndBuildProjectsEnabledInSolutionConfiguration)' == ''">true</OnlyReferenceAndBuildProjectsEnabledInSolutionConfiguration>
\r
1407 <ShouldUnsetParentConfigurationAndPlatform Condition="'$(ShouldUnsetParentConfigurationAndPlatform)' == '' and ('$(BuildingInsideVisualStudio)' == 'true' or '$(BuildingSolutionFile)' == 'true')">true</ShouldUnsetParentConfigurationAndPlatform>
\r
1408 <ShouldUnsetParentConfigurationAndPlatform Condition="'$(ShouldUnsetParentConfigurationAndPlatform)' == ''">false</ShouldUnsetParentConfigurationAndPlatform>
\r
1410 <!-- Web Application projects can "secretly" reference Silverlight projects, which can take project dependencies on that same Web Application. If the project
\r
1411 dependencies are promoted to project references, this ends up creating a situation where we have a circular reference between the two projects. We don't
\r
1412 want this to happen, so just turn off synthetic project reference generation for Silverlight projects. -->
\r
1413 <AddSyntheticProjectReferencesForSolutionDependencies Condition="'$(AddSyntheticProjectReferencesForSolutionDependencies)' == '' and '$(TargetFrameworkIdentifier)' == 'Silverlight'">false</AddSyntheticProjectReferencesForSolutionDependencies>
\r
1415 <!-- Inside VS, we do not need to add synthetic references, as VS already organizes the build per any solution-level dependencies; we only do this on the command line-->
\r
1416 <AddSyntheticProjectReferencesForSolutionDependencies Condition="'$(AddSyntheticProjectReferencesForSolutionDependencies)' == '' and '$(BuildingInsideVisualStudio)' != 'true'">true</AddSyntheticProjectReferencesForSolutionDependencies>
\r
1419 <!-- Assign a project configuration to each project reference if we're building a solution file. -->
\r
1420 <AssignProjectConfiguration
\r
1421 ProjectReferences="@(ProjectReference)"
\r
1422 CurrentProject="$(MSBuildProjectFullPath)"
\r
1423 CurrentProjectConfiguration="$(Configuration)"
\r
1424 CurrentProjectPlatform="$(Platform)"
\r
1425 DefaultToVcxPlatformMapping="$(DefaultToVcxPlatformMapping)"
\r
1426 VcxToDefaultPlatformMapping="$(VcxToDefaultPlatformMapping)"
\r
1427 OutputType="$(OutputType)"
\r
1428 ResolveConfigurationPlatformUsingMappings="false"
\r
1429 SolutionConfigurationContents="$(CurrentSolutionConfigurationContents)"
\r
1430 AddSyntheticProjectReferencesForSolutionDependencies="$(AddSyntheticProjectReferencesForSolutionDependencies)"
\r
1431 OnlyReferenceAndBuildProjectsEnabledInSolutionConfiguration = "$(OnlyReferenceAndBuildProjectsEnabledInSolutionConfiguration)"
\r
1432 ShouldUnsetParentConfigurationAndPlatform = "$(ShouldUnsetParentConfigurationAndPlatform)" >
\r
1434 <!-- EMITTED FOR COMPATIBILITY REASONS ONLY. CONSUME PROJECTREFERENCEWITHCONFIGURATION INSTEAD -->
\r
1435 <Output TaskParameter="AssignedProjects" ItemName="_ProjectReferenceWithConfiguration"/>
\r
1436 <Output TaskParameter="UnassignedProjects" ItemName="_ProjectReferenceWithConfiguration"/>
\r
1438 <Output TaskParameter="AssignedProjects" ItemName="ProjectReferenceWithConfiguration"/>
\r
1439 <Output TaskParameter="UnassignedProjects" ItemName="ProjectReferenceWithConfiguration"/>
\r
1440 </AssignProjectConfiguration>
\r
1443 <_ProjectReferenceWithConfiguration>
\r
1444 <BuildReference Condition="'%(_ProjectReferenceWithConfiguration.BuildReference)' == ''">true</BuildReference>
\r
1445 <ReferenceOutputAssembly Condition="'%(_ProjectReferenceWithConfiguration.ReferenceOutputAssembly)' == ''">true</ReferenceOutputAssembly>
\r
1446 </_ProjectReferenceWithConfiguration>
\r
1447 <ProjectReferenceWithConfiguration>
\r
1448 <BuildReference Condition="'%(ProjectReferenceWithConfiguration.BuildReference)' == ''">true</BuildReference>
\r
1449 <ReferenceOutputAssembly Condition="'%(ProjectReferenceWithConfiguration.ReferenceOutputAssembly)' == ''">true</ReferenceOutputAssembly>
\r
1450 </ProjectReferenceWithConfiguration>
\r
1455 ============================================================
\r
1456 _SplitProjectReferencesByFileExistence
\r
1458 Split referenced projects into two lists: those that exist on
\r
1459 disk and those that don't.
\r
1460 ============================================================
\r
1464 Name="_SplitProjectReferencesByFileExistence">
\r
1467 Use this task for matching projects with pre-resolved project outputs set by the IDE
\r
1468 if building inside the IDE. The IDE only includes non-MSBuild projects in the output list. We'll
\r
1469 use MSBuild to resolve MSBuild projects.
\r
1470 This task will resolve VSIP (3rd party) project references and create a new item list with only project references
\r
1471 to projects in the MSBuild format.
\r
1473 <ResolveNonMSBuildProjectOutput
\r
1474 ProjectReferences="@(ProjectReferenceWithConfiguration)"
\r
1475 PreresolvedProjectOutputs="$(VSIDEResolvedNonMSBuildProjectOutputs)"
\r
1476 Condition="'$(BuildingInsideVisualStudio)'=='true' and '@(ProjectReferenceWithConfiguration)'!=''">
\r
1478 <Output TaskParameter="ResolvedOutputPaths" ItemName="_ResolvedProjectReferencePaths"/>
\r
1479 <Output TaskParameter="UnresolvedProjectReferences" ItemName="_MSBuildProjectReference"/>
\r
1481 </ResolveNonMSBuildProjectOutput>
\r
1484 If building from the command line, simply copy the ProjectReferenceWithConfiguration item list to _MSBuildProjectReference,
\r
1485 since we have to assume all projects are in the MSBuild format. We have no way of building
\r
1486 VSIP (3rd party) projects from the command line.
\r
1489 <_MSBuildProjectReference Include="@(ProjectReferenceWithConfiguration)" Condition="'$(BuildingInsideVisualStudio)'!='true' and '@(ProjectReferenceWithConfiguration)'!=''"/>
\r
1492 <!-- Break the project list into two lists: those that exist on disk and those that don't. -->
\r
1494 <_MSBuildProjectReferenceExistent Include="@(_MSBuildProjectReference)" Condition="Exists('%(Identity)')"/>
\r
1495 <_MSBuildProjectReferenceNonexistent Include="@(_MSBuildProjectReference)" Condition="!Exists('%(Identity)')"/>
\r
1501 ====================================================================================
\r
1502 _GetProjectReferenceTargetFrameworkProperties
\r
1504 Builds the GetTargetFrameworkProperties target of all existent project references,
\r
1505 passing $(TargetFrameworkMoniker) as $(ReferringTargetFramework) and sets the
\r
1506 SetTargetFramework metadata of the project reference to the value that is returned.
\r
1508 This allows a cross-targeting project to select how it should be configured to
\r
1509 build against the most appropriate target for the referring target framework.
\r
1511 ======================================================================================
\r
1513 <Target Name="_GetProjectReferenceTargetFrameworkProperties"
\r
1514 Outputs="%(_MSBuildProjectReferenceExistent.Identity)">
\r
1516 Honor SkipGetTargetFrameworkProperties=true metadata on project references
\r
1517 to mean that the project reference is known not to target multiple frameworks
\r
1518 and the mechanism here for selecting the best one can be skipped as an optimization.
\r
1520 We give this treatment to .vcxproj by default since no .vcxproj can target more
\r
1521 than one framework.
\r
1524 <_MSBuildProjectReferenceExistent Condition="'%(_MSBuildProjectReferenceExistent.SkipGetTargetFrameworkProperties)' == '' and '%(Extension)' == '.vcxproj'">
\r
1525 <SkipGetTargetFrameworkProperties>true</SkipGetTargetFrameworkProperties>
\r
1526 </_MSBuildProjectReferenceExistent>
\r
1530 Allow project references to specify which target framework properties to set and their values
\r
1531 without consulting the referenced project. This has two use cases:
\r
1533 1. A caller may wish to pick a compatible but sub-optimal target framework. For example,
\r
1534 to unit test the .NETStandard implementation using a .NETFramework caller even though
\r
1535 there is also a .NETFramework implementation.
\r
1537 2. As an escape hatch for cases where the compatibility check performed by
\r
1538 GetTargetFrameworkProperties is faulty.
\r
1541 <_MSBuildProjectReferenceExistent Condition="'%(_MSBuildProjectReferenceExistent.SetTargetFramework)' != ''">
\r
1542 <SkipGetTargetFrameworkProperties>true</SkipGetTargetFrameworkProperties>
\r
1543 </_MSBuildProjectReferenceExistent>
\r
1547 Select the moniker to send to each project reference if not already set. NugetTargetMoniker (NTM) is preferred by default over
\r
1548 TargetFrameworkMoniker (TFM) because it is required to disambiguate the UWP case where TFM is fixed at .NETCore,Version=v5.0 and
\r
1549 has floating NTM=UAP,Version=vX.Y.Z. However, in other cases (classic PCLs), NTM contains multiple values and that will cause the MSBuild
\r
1550 invocation below to fail by passing invalid properties. Therefore we do not use the NTM if it contains a semicolon.
\r
1552 <PropertyGroup Condition="'$(ReferringTargetFrameworkForProjectReferences)' == ''">
\r
1553 <ReferringTargetFrameworkForProjectReferences Condition="'$(NugetTargetMoniker)' != '' and !$(NuGetTargetMoniker.Contains(';'))">$(NugetTargetMoniker)</ReferringTargetFrameworkForProjectReferences>
\r
1554 <ReferringTargetFrameworkForProjectReferences Condition="'$(NugetTargetMoniker)' == ''">$(TargetFrameworkMoniker)</ReferringTargetFrameworkForProjectReferences>
\r
1558 Projects="%(_MSBuildProjectReferenceExistent.Identity)"
\r
1559 Targets="GetTargetFrameworkProperties"
\r
1560 BuildInParallel="$(BuildInParallel)"
\r
1561 Properties="%(_MSBuildProjectReferenceExistent.SetConfiguration); %(_MSBuildProjectReferenceExistent.SetPlatform); ReferringTargetFramework=$(ReferringTargetFrameworkForProjectReferences)"
\r
1562 ContinueOnError="!$(BuildingProject)"
\r
1563 RemoveProperties="%(_MSBuildProjectReferenceExistent.GlobalPropertiesToRemove);TargetFramework;RuntimeIdentifier"
\r
1564 Condition="'%(_MSBuildProjectReferenceExistent.SkipGetTargetFrameworkProperties)' != 'true'">
\r
1566 <Output TaskParameter="TargetOutputs" PropertyName="_ProjectReferenceTargetFrameworkProperties" />
\r
1570 <_MSBuildProjectReferenceExistent Condition="'%(_MSBuildProjectReferenceExistent.Identity)' == '%(Identity)' and '$(_ProjectReferenceTargetFrameworkProperties)' != ''">
\r
1571 <SetTargetFramework>$(_ProjectReferenceTargetFrameworkProperties)</SetTargetFramework>
\r
1573 <UndefineProperties Condition="$(_ProjectReferenceTargetFrameworkProperties.Contains(`ProjectHasSingleTargetFramework=true`))">%(_MSBuildProjectReferenceExistent.UndefineProperties);TargetFramework;ProjectHasSingleTargetFramework</UndefineProperties>
\r
1574 <!-- Unconditionally remove the property that was set as a marker to indicate that for this call we should remove TargetFramework -->
\r
1575 <UndefineProperties Condition="!$(_ProjectReferenceTargetFrameworkProperties.Contains(`ProjectHasSingleTargetFramework=true`))">%(_MSBuildProjectReferenceExistent.UndefineProperties);ProjectHasSingleTargetFramework</UndefineProperties>
\r
1576 </_MSBuildProjectReferenceExistent>
\r
1580 <_MSBuildProjectReferenceExistent Condition="'%(_MSBuildProjectReferenceExistent.Identity)' == '%(Identity)' and '$(_ProjectReferenceTargetFrameworkProperties)' != ''">
\r
1581 <UndefineProperties Condition="$(_ProjectReferenceTargetFrameworkProperties.Contains(`ProjectIsRidAgnostic=true`))">%(_MSBuildProjectReferenceExistent.UndefineProperties);RuntimeIdentifier;ProjectIsRidAgnostic</UndefineProperties>
\r
1582 <!-- Unconditionally remove the property that was set as a marker to indicate that for this call we should remove RuntimeIdentifier -->
\r
1583 <UndefineProperties Condition="!$(_ProjectReferenceTargetFrameworkProperties.Contains(`ProjectIsRidAgnostic=true`))">%(_MSBuildProjectReferenceExistent.UndefineProperties);ProjectIsRidAgnostic</UndefineProperties>
\r
1584 </_MSBuildProjectReferenceExistent>
\r
1588 <_ProjectReferenceTargetFrameworkProperties />
\r
1593 ============================================================
\r
1594 GetTargetFrameworkProperties
\r
1596 Overrridden by cross-targeting projects to return the set of
\r
1597 properties (in the form "key1=value1;...keyN=valueN") needed
\r
1598 to build it with the best target for the referring project's
\r
1601 The referring project's $(TargetFrameworkMoniker) is passed
\r
1602 in as $(ReferringTargetFramework)
\r
1604 <Target Name="GetTargetFrameworkProperties" />
\r
1607 ============================================================
\r
1608 PrepareProjectReferences
\r
1610 Prepares project references for consumption by other targets.
\r
1613 @(ProjectReference) - The list of project references.
\r
1616 @(ProjectReferenceWithConfiguration) - Project references with apporpriate metadata
\r
1617 @(_MSBuildProjectReferenceExistent) - Subset of @(ProjectReferenceWithConfiguration) that exist
\r
1618 with added SetTargetFramework metadata for cross-targeting
\r
1619 @(_MSBuildProjectReferenceNonExistent) - Subset of @(ProjectReferenceWithConfiguration) that do not exist
\r
1620 ============================================================
\r
1623 <PrepareProjectReferencesDependsOn>
\r
1624 AssignProjectConfiguration;
\r
1625 _SplitProjectReferencesByFileExistence;
\r
1626 _GetProjectReferenceTargetFrameworkProperties
\r
1627 </PrepareProjectReferencesDependsOn>
\r
1629 <Target Name="PrepareProjectReferences" DependsOnTargets="$(PrepareProjectReferencesDependsOn)" />
\r
1632 ============================================================
\r
1633 ResolveProjectReferences
\r
1635 Build referenced projects:
\r
1638 @(ProjectReferenceWithConfiguration) - The list of project references.
\r
1641 @(_ResolvedNativeProjectReferencePaths) - Paths to referenced native projects.
\r
1642 @(_ResolvedProjectReferencePaths) - Paths to referenced managed projects.
\r
1643 ============================================================
\r
1645 <!-- By default, the outputs of project references are passed to the compiler -->
\r
1646 <ItemDefinitionGroup>
\r
1647 <ProjectReference>
\r
1648 <!-- Target to build in the project reference; by default, this property is blank, indicating the default targets-->
\r
1649 <Targets>$(ProjectReferenceBuildTargets)</Targets>
\r
1650 <!-- Extra item type to emit outputs of the destination into. Defaults to blank. To emit only into this list, set the ReferenceOutputAssembly metadata to false as well. -->
\r
1652 <ReferenceSourceTarget>ProjectReference</ReferenceSourceTarget>
\r
1653 </ProjectReference>
\r
1654 </ItemDefinitionGroup>
\r
1657 Name="ResolveProjectReferences"
\r
1658 DependsOnTargets="PrepareProjectReferences"
\r
1659 Returns="@(_ResolvedNativeProjectReferencePaths);@(_ResolvedProjectReferencePaths)">
\r
1662 When building this project from the IDE, just gather the referenced build outputs.
\r
1663 The IDE will already have built the project, so there's no need to do it again here.
\r
1665 The ContinueOnError setting is here so that, during project load, as
\r
1666 much information as possible will be passed to the compilers.
\r
1670 Projects="@(_MSBuildProjectReferenceExistent)"
\r
1671 Targets="GetTargetPath"
\r
1672 BuildInParallel="$(BuildInParallel)"
\r
1673 Properties="%(_MSBuildProjectReferenceExistent.SetConfiguration); %(_MSBuildProjectReferenceExistent.SetPlatform); %(_MSBuildProjectReferenceExistent.SetTargetFramework)"
\r
1674 Condition="'%(_MSBuildProjectReferenceExistent.BuildReference)' == 'true' and '@(ProjectReferenceWithConfiguration)' != '' and ('$(BuildingInsideVisualStudio)' == 'true' or '$(BuildProjectReferences)' != 'true') and '$(VisualStudioVersion)' != '10.0' and '@(_MSBuildProjectReferenceExistent)' != ''"
\r
1675 ContinueOnError="!$(BuildingProject)"
\r
1676 RemoveProperties="%(_MSBuildProjectReferenceExistent.GlobalPropertiesToRemove)">
\r
1678 <Output TaskParameter="TargetOutputs" ItemName="_ResolvedProjectReferencePaths" Condition="'%(_MSBuildProjectReferenceExistent.ReferenceOutputAssembly)'=='true'"/>
\r
1679 <Output TaskParameter="TargetOutputs" ItemName="%(_MSBuildProjectReferenceExistent.OutputItemType)" Condition="'%(_MSBuildProjectReferenceExistent.OutputItemType)' != ''"/>
\r
1684 QUIRKING FOR DEV10
\r
1686 In the 4.0 version of the targets, we built the targets specified in the Targets metadata in addition to
\r
1687 GetTargetPath when building in the IDE. In 4.5, we changed this to just GetTargetPath because it was
\r
1688 causing performance trouble with certain systems that specified targets that did a significant amount of
\r
1689 work in the Targets metadata, expecting them to only build when doing a real build.
\r
1691 However, that change broke C++ unit testing in Dev10 + 4.5 scenarios, because they required use of the
\r
1692 Targets metadata in order to get design time builds to work properly. Thus, we need to make sure we
\r
1693 restore the Dev10 behavior when building on Dev10.
\r
1697 Projects="@(_MSBuildProjectReferenceExistent)"
\r
1698 Targets="%(_MSBuildProjectReferenceExistent.Targets);GetTargetPath"
\r
1699 BuildInParallel="$(BuildInParallel)"
\r
1700 Properties="%(_MSBuildProjectReferenceExistent.SetConfiguration); %(_MSBuildProjectReferenceExistent.SetPlatform); %(_MSBuildProjectReferenceExistent.SetTargetFramework)"
\r
1701 Condition="'%(_MSBuildProjectReferenceExistent.BuildReference)' == 'true' and '@(ProjectReferenceWithConfiguration)' != '' and ('$(BuildingInsideVisualStudio)' == 'true' or '$(BuildProjectReferences)' != 'true') and '$(VisualStudioVersion)' == '10.0' and '@(_MSBuildProjectReferenceExistent)' != ''"
\r
1702 ContinueOnError="!$(BuildingProject)"
\r
1703 RemoveProperties="%(_MSBuildProjectReferenceExistent.GlobalPropertiesToRemove)">
\r
1705 <Output TaskParameter="TargetOutputs" ItemName="_ResolvedProjectReferencePaths" Condition="'%(_MSBuildProjectReferenceExistent.ReferenceOutputAssembly)'=='true'"/>
\r
1706 <Output TaskParameter="TargetOutputs" ItemName="%(_MSBuildProjectReferenceExistent.OutputItemType)" Condition="'%(_MSBuildProjectReferenceExistent.OutputItemType)' != ''"/>
\r
1711 Build referenced projects when building from the command line.
\r
1714 Projects="@(_MSBuildProjectReferenceExistent)"
\r
1715 Targets="%(_MSBuildProjectReferenceExistent.Targets)"
\r
1716 BuildInParallel="$(BuildInParallel)"
\r
1717 Properties="%(_MSBuildProjectReferenceExistent.SetConfiguration); %(_MSBuildProjectReferenceExistent.SetPlatform); %(_MSBuildProjectReferenceExistent.SetTargetFramework)"
\r
1718 Condition="'%(_MSBuildProjectReferenceExistent.BuildReference)' == 'true' and '@(ProjectReferenceWithConfiguration)' != '' and '$(BuildingInsideVisualStudio)' != 'true' and '$(BuildProjectReferences)' == 'true' and '@(_MSBuildProjectReferenceExistent)' != ''"
\r
1719 ContinueOnError="$(ContinueOnError)"
\r
1720 RemoveProperties="%(_MSBuildProjectReferenceExistent.GlobalPropertiesToRemove)">
\r
1722 <Output TaskParameter="TargetOutputs" ItemName="_ResolvedProjectReferencePaths" Condition="'%(_MSBuildProjectReferenceExistent.ReferenceOutputAssembly)'=='true' or '$(DesignTimeBuild)' == 'true'"/>
\r
1723 <Output TaskParameter="TargetOutputs" ItemName="%(_MSBuildProjectReferenceExistent.OutputItemType)" Condition="'%(_MSBuildProjectReferenceExistent.OutputItemType)' != ''"/>
\r
1728 Get manifest items from the (non-exe) built project references (to feed them into ResolveNativeReference).
\r
1731 Projects="@(_MSBuildProjectReferenceExistent)"
\r
1732 Targets="GetNativeManifest"
\r
1733 BuildInParallel="$(BuildInParallel)"
\r
1734 Properties="%(_MSBuildProjectReferenceExistent.SetConfiguration); %(_MSBuildProjectReferenceExistent.SetPlatform); %(_MSBuildProjectReferenceExistent.SetTargetFramework)"
\r
1735 Condition="'%(_MSBuildProjectReferenceExistent.BuildReference)' == 'true' and '@(ProjectReferenceWithConfiguration)' != '' and '$(BuildingProject)' == 'true' and '@(_MSBuildProjectReferenceExistent)' != ''"
\r
1736 ContinueOnError="$(ContinueOnError)"
\r
1737 RemoveProperties="%(_MSBuildProjectReferenceExistent.GlobalPropertiesToRemove)">
\r
1739 <Output TaskParameter="TargetOutputs" ItemName="NativeReference" Condition="'%(_MSBuildProjectReferenceExistent.ReferenceOutputAssembly)' == 'true'"/>
\r
1743 <_ResolvedProjectReferencePaths Remove="@(_ResolvedProjectReferencePaths)" Condition="'%(_ResolvedProjectReferencePaths.ResolveableAssembly)' == 'false'" />
\r
1745 Copy OriginalItemSpec to OriginalProjectReferenceItemSpec, so that when ResolveAssemblyReferences
\r
1746 takes these items and resolves them to ReferencePath, we can still recover the _real_ OriginalItemSpec
\r
1747 for the unresolved reference items.
\r
1749 <_ResolvedProjectReferencePaths>
\r
1750 <OriginalProjectReferenceItemSpec>%(_ResolvedProjectReferencePaths.OriginalItemSpec)</OriginalProjectReferenceItemSpec>
\r
1751 </_ResolvedProjectReferencePaths>
\r
1754 <!-- Issue a warning for each non-existent project. -->
\r
1756 Text="The referenced project '%(_MSBuildProjectReferenceNonexistent.Identity)' does not exist."
\r
1757 Condition="'@(ProjectReferenceWithConfiguration)' != '' and '@(_MSBuildProjectReferenceNonexistent)' != ''"/>
\r
1762 Name="ResolveProjectReferencesDesignTime"
\r
1763 Returns="@(_ProjectReferencesFromRAR);@(_ResolvedNativeProjectReferencePaths)"
\r
1764 DependsOnTargets="ResolveProjectReferences;ResolveAssemblyReferences">
\r
1765 <!-- We need to do this here because we only want project references which have passed through rar and have not been unresolved due to violating some MT rule
\r
1766 which means we need to pull the project references out of the referencepath item because they will only exist there if they were correctly resolved.
\r
1769 <_ProjectReferencesFromRAR Include="@(ReferencePath->WithMetadataValue('ReferenceSourceTarget', 'ProjectReference'))">
\r
1770 <OriginalItemSpec>%(ReferencePath.ProjectReferenceOriginalItemSpec)</OriginalItemSpec>
\r
1771 </_ProjectReferencesFromRAR>
\r
1776 Name="ExpandSDKReferencesDesignTime"
\r
1777 Returns="@(ReferencesFromSDK)"
\r
1778 DependsOnTargets="ExpandSDKReferences"/>
\r
1781 ============================================================
\r
1784 This stand-alone target returns the name of the build product (i.e. EXE, DLL)
\r
1785 that would be produced if we built this project.
\r
1786 ============================================================
\r
1789 <GetTargetPathDependsOn>$(GetTargetPathDependsOn)</GetTargetPathDependsOn>
\r
1793 Name="GetTargetPath"
\r
1794 DependsOnTargets="$(GetTargetPathDependsOn)"
\r
1795 Returns="@(TargetPathWithTargetPlatformMoniker)">
\r
1797 <TargetPathWithTargetPlatformMoniker Include="$(TargetPath)">
\r
1798 <TargetPlatformMoniker>$(TargetPlatformMoniker)</TargetPlatformMoniker>
\r
1799 <TargetPlatformIdentifier>$(TargetPlatformIdentifier)</TargetPlatformIdentifier>
\r
1800 </TargetPathWithTargetPlatformMoniker>
\r
1805 ============================================================
\r
1806 GetTargetPathWithTargetPlatformMoniker
\r
1808 This stand-alone target returns the name and version of the target platform for this project.
\r
1810 NOTE: The functionality of this target has been subsumed by GetTargetPath. This target is
\r
1811 provided purely for compat reasons.
\r
1812 ============================================================
\r
1815 <GetTargetPathWithTargetPlatformMonikerDependsOn>$(GetTargetPathDependsOn); GetTargetPath</GetTargetPathWithTargetPlatformMonikerDependsOn>
\r
1819 Name="GetTargetPathWithTargetPlatformMoniker"
\r
1820 DependsOnTargets="$(GetTargetPathWithTargetPlatformMonikerDependsOn)"
\r
1821 Returns="@(TargetPathWithTargetPlatformMoniker)" />
\r
1824 ============================================================
\r
1827 Compute the manifest item for this project.
\r
1830 $(_DeploymentApplicationManifestIdentity) - the manifest identity
\r
1831 @(ApplicationManifest) - the original application manifest item
\r
1834 @(ComputedApplicationManifest) - application manifest item with full hint path, if generated
\r
1835 ============================================================
\r
1838 Name="GetNativeManifest"
\r
1839 Returns="@(ComputedApplicationManifest)">
\r
1842 <ComputedApplicationManifest Include="$(_DeploymentApplicationManifestIdentity)" Condition="'$(OutputType)'!='winexe' and '$(OutputType)'!='exe' and '$(OutputType)'!='appcontainerexe' and Exists('%(_ApplicationManifestFinal.FullPath)')">
\r
1843 <HintPath>%(_ApplicationManifestFinal.FullPath)</HintPath>
\r
1844 </ComputedApplicationManifest>
\r
1850 ============================================================
\r
1851 ResolveNativeReferences
\r
1853 Resolve native references
\r
1856 @(NativeReference) - The manifest reference (or list of manifest references)
\r
1859 @(NativeReferenceFile) - List of manifest files referenced.
\r
1860 @(_DeploymentNativePrerequisite) - List of native assembly prerequisites contained in the manifest.
\r
1861 @(ComClassReference) - List of COM components contained in the manifest.
\r
1862 @(COMReferenceFromNative) List of type libraries contained in the manifest.
\r
1863 @(COMFileReference) - List of loose files contained in the manifest.
\r
1864 @(_DeploymentLooseManifestFile) - List of extra files that should be published.
\r
1865 ============================================================
\r
1868 Name="ResolveNativeReferences"
\r
1869 Condition="'@(NativeReference)'!=''"
\r
1870 DependsOnTargets="ResolveProjectReferences">
\r
1872 <ResolveNativeReference
\r
1873 NativeReferences="@(NativeReference)"
\r
1874 AdditionalSearchPaths="$(ReferencePath);$(OutDir)"
\r
1876 <Output TaskParameter="ContainingReferenceFiles" ItemName="NativeReferenceFile"/>
\r
1877 <Output TaskParameter="ContainedPrerequisiteAssemblies" ItemName="_DeploymentNativePrerequisite"/>
\r
1878 <Output TaskParameter="ContainedComComponents" ItemName="ComClassReference"/>
\r
1879 <Output TaskParameter="ContainedTypeLibraries" ItemName="COMReferenceFromNative"/>
\r
1880 <Output TaskParameter="ContainedLooseTlbFiles" ItemName="COMFileReference"/>
\r
1881 <Output TaskParameter="ContainedLooseEtcFiles" ItemName="_DeploymentLooseManifestFile"/>
\r
1882 </ResolveNativeReference>
\r
1887 ============================================================
\r
1889 ResolveAssemblyReferences
\r
1891 Given the list of assemblies, find the closure of all assemblies that they depend on. These are
\r
1892 what we need to copy to the output directory.
\r
1895 @(Reference) - List of assembly references as fusion names.
\r
1896 @(_ResolvedProjectReferencePaths) - List of project references produced by projects that this project depends on.
\r
1898 The 'Private' attribute on the reference corresponds to the Copy Local flag in IDE.
\r
1899 The 'Private' flag can have three possible values:
\r
1900 - 'True' means the reference should be Copied Local
\r
1901 - 'False' means the reference should not be Copied Local
\r
1902 - [Missing] means this task will decide whether to treat this reference as CopyLocal or not.
\r
1905 @(ReferencePath) - Paths to resolved primary files.
\r
1906 @(ReferenceDependencyPaths) - Paths to resolved dependency files.
\r
1907 @(_ReferenceRelatedPaths) - Paths to .xmls and .pdbs.
\r
1908 @(ReferenceSatellitePaths) - Paths to satellites.
\r
1909 @(_ReferenceSerializationAssemblyPaths) - Paths to XML serialization assemblies created by sgen.
\r
1910 @(_ReferenceScatterPaths) - Paths to scatter files.
\r
1911 @(ReferenceCopyLocalPaths) - Paths to files that should be copied to the local directory.
\r
1912 ============================================================
\r
1915 <ResolveAssemblyReferencesDependsOn>
\r
1916 GetFrameworkPaths;
\r
1917 GetReferenceAssemblyPaths;
\r
1919 ResolveSDKReferences;
\r
1920 ExpandSDKReferences;
\r
1921 </ResolveAssemblyReferencesDependsOn>
\r
1924 Name="ResolveAssemblyReferences"
\r
1925 Returns="@(ReferencePath)"
\r
1926 DependsOnTargets="$(ResolveAssemblyReferencesDependsOn)">
\r
1929 <_ReferenceInstalledAssemblyDirectory Include="$(TargetFrameworkDirectory)" />
\r
1930 <_ReferenceInstalledAssemblySubsets Include="$(TargetFrameworkSubset)" />
\r
1934 Only read and write cache file at build time, skip it for load time because its more
\r
1935 expensive to write the newly created cache file.
\r
1938 <ResolveAssemblyReferencesStateFile Condition="'$(BuildingProject)'=='true'">$(IntermediateOutputPath)$(MSBuildProjectFile)ResolveAssemblyReference.cache</ResolveAssemblyReferencesStateFile>
\r
1941 <!-- Make an App.Config item that exists when AutoUnify is false. -->
\r
1943 <_ResolveAssemblyReferencesApplicationConfigFileForExes Include="@(AppConfigWithTargetPath)" Condition="'$(AutoGenerateBindingRedirects)'=='true' or '$(AutoUnifyAssemblyReferences)'=='false'"/>
\r
1947 <!-- Default in task is true -->
\r
1948 <_FindDependencies Condition="'$(BuildingProject)' != 'true' and '$(_ResolveReferenceDependencies)' != 'true'">false</_FindDependencies>
\r
1949 <ResolveAssemblyReferencesSilent Condition="'$(ResolveAssemblyReferencesSilent)' == '' and '$(TraceDesignTime)' != 'true' and '$(BuildingProject)' == 'false'">true</ResolveAssemblyReferencesSilent>
\r
1950 <ResolveAssemblyReferencesSilent Condition="'$(ResolveAssemblyReferencesSilent)' == ''">false</ResolveAssemblyReferencesSilent>
\r
1951 <ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch Condition="'$(ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch)' == ''">Warning</ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
\r
1955 <!-- Remove any references which we have added as explicit reference so that we do not get duplicates. We need to make sure we do not have duplicates
\r
1956 because this confuses the IDE when it tries to compare the list of references passed in to the list of resolved references. If it does not match then the
\r
1957 ide will show one of the references as not resolved, this will not break the build but is a display issue -->
\r
1958 <Reference Remove="$(AdditionalExplicitAssemblyReferences)"/>
\r
1959 <Reference Include="$(AdditionalExplicitAssemblyReferences)">
\r
1960 <Implicit>true</Implicit>
\r
1964 <ResolveAssemblyReference
\r
1965 Assemblies="@(Reference)"
\r
1966 AssemblyFiles="@(_ResolvedProjectReferencePaths);@(_ExplicitReference)"
\r
1967 TargetFrameworkDirectories="@(_ReferenceInstalledAssemblyDirectory)"
\r
1968 InstalledAssemblyTables="@(InstalledAssemblyTables);@(RedistList)"
\r
1969 IgnoreDefaultInstalledAssemblyTables="$(IgnoreDefaultInstalledAssemblyTables)"
\r
1970 IgnoreDefaultInstalledAssemblySubsetTables="$(IgnoreInstalledAssemblySubsetTables)"
\r
1971 CandidateAssemblyFiles="@(Content);@(None)"
\r
1972 SearchPaths="$(AssemblySearchPaths)"
\r
1973 AllowedAssemblyExtensions="$(AllowedReferenceAssemblyFileExtensions)"
\r
1974 AllowedRelatedFileExtensions="$(AllowedReferenceRelatedFileExtensions)"
\r
1975 TargetProcessorArchitecture="$(ProcessorArchitecture)"
\r
1976 AppConfigFile="@(_ResolveAssemblyReferencesApplicationConfigFileForExes)"
\r
1977 AutoUnify="$(AutoUnifyAssemblyReferences)"
\r
1978 SupportsBindingRedirectGeneration="$(GenerateBindingRedirectsOutputType)"
\r
1979 IgnoreVersionForFrameworkReferences="$(IgnoreVersionForFrameworkReferences)"
\r
1980 FindDependencies="$(_FindDependencies)"
\r
1981 FindSatellites="$(BuildingProject)"
\r
1982 FindSerializationAssemblies="$(BuildingProject)"
\r
1983 FindRelatedFiles="$(BuildingProject)"
\r
1984 Silent="$(ResolveAssemblyReferencesSilent)"
\r
1985 TargetFrameworkVersion="$(TargetFrameworkVersion)"
\r
1986 TargetFrameworkMoniker="$(TargetFrameworkMoniker)"
\r
1987 TargetFrameworkMonikerDisplayName="$(TargetFrameworkMonikerDisplayName)"
\r
1988 TargetedRuntimeVersion="$(TargetedRuntimeVersion)"
\r
1989 StateFile="$(ResolveAssemblyReferencesStateFile)"
\r
1990 InstalledAssemblySubsetTables="@(InstalledAssemblySubsetTables)"
\r
1991 TargetFrameworkSubsets="@(_ReferenceInstalledAssemblySubsets)"
\r
1992 FullTargetFrameworkSubsetNames="$(FullReferenceAssemblyNames)"
\r
1993 FullFrameworkFolders="$(_FullFrameworkReferenceAssemblyPaths)"
\r
1994 FullFrameworkAssemblyTables="@(FullFrameworkAssemblyTables)"
\r
1995 ProfileName="$(TargetFrameworkProfile)"
\r
1996 LatestTargetFrameworkDirectories="@(LatestTargetFrameworkDirectories)"
\r
1997 CopyLocalDependenciesWhenParentReferenceInGac="$(CopyLocalDependenciesWhenParentReferenceInGac)"
\r
1998 DoNotCopyLocalIfInGac="$(DoNotCopyLocalIfInGac)"
\r
1999 ResolvedSDKReferences="@(ResolvedSDKReference)"
\r
2000 WarnOrErrorOnTargetArchitectureMismatch="$(ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch)"
\r
2001 IgnoreTargetFrameworkAttributeVersionMismatch ="$(ResolveAssemblyReferenceIgnoreTargetFrameworkAttributeVersionMismatch)"
\r
2002 ContinueOnError="$(ContinueOnError)"
\r
2003 Condition="'@(Reference)'!='' or '@(_ResolvedProjectReferencePaths)'!='' or '@(_ExplicitReference)' != ''"
\r
2006 <Output TaskParameter="ResolvedFiles" ItemName="ReferencePath"/>
\r
2007 <Output TaskParameter="ResolvedFiles" ItemName="_ResolveAssemblyReferenceResolvedFiles"/>
\r
2008 <Output TaskParameter="ResolvedDependencyFiles" ItemName="ReferenceDependencyPaths"/>
\r
2009 <Output TaskParameter="RelatedFiles" ItemName="_ReferenceRelatedPaths"/>
\r
2010 <Output TaskParameter="SatelliteFiles" ItemName="ReferenceSatellitePaths"/>
\r
2011 <Output TaskParameter="SerializationAssemblyFiles" ItemName="_ReferenceSerializationAssemblyPaths"/>
\r
2012 <Output TaskParameter="ScatterFiles" ItemName="_ReferenceScatterPaths"/>
\r
2013 <Output TaskParameter="CopyLocalFiles" ItemName="ReferenceCopyLocalPaths"/>
\r
2014 <Output TaskParameter="SuggestedRedirects" ItemName="SuggestedBindingRedirects"/>
\r
2015 <Output TaskParameter="FilesWritten" ItemName="FileWrites"/>
\r
2016 <Output TaskParameter="DependsOnSystemRuntime" PropertyName="DependsOnSystemRuntime"/>
\r
2017 </ResolveAssemblyReference>
\r
2021 ====================================================================================================
\r
2023 GenerateBindingRedirects
\r
2024 Inject the binding redirects into the app config file based on suggested redirects as output from
\r
2025 ResolveAssemblyReferences.
\r
2028 @(AppConfigWithTargetPath) - Path to the source app config file. This can be null if the project
\r
2029 doesn't contain an app config file.
\r
2030 $(TargetFileName) - The file name of the build target.
\r
2033 @(OutputAppConfigFile) - Path to the output app config file in the intermediate directory.
\r
2035 ====================================================================================================
\r
2037 <Target Name="GenerateBindingRedirects"
\r
2038 Inputs="$(MSBuildAllProjects);@(AppConfigFile);$(ResolveAssemblyReferencesStateFile);$(IntermediateOutputPath);@(SuggestedBindingRedirects)"
\r
2039 Outputs="$(_GenerateBindingRedirectsIntermediateAppConfig)"
\r
2040 Condition="'$(AutoGenerateBindingRedirects)' == 'true' and '$(GenerateBindingRedirectsOutputType)' == 'true'">
\r
2042 <GenerateBindingRedirects
\r
2043 AppConfigFile="@(AppConfigWithTargetPath)"
\r
2044 TargetName="$(TargetFileName).config"
\r
2045 OutputAppConfigFile="$(_GenerateBindingRedirectsIntermediateAppConfig)"
\r
2046 SuggestedRedirects="@(SuggestedBindingRedirects)"
\r
2049 <Output TaskParameter="OutputAppConfigFile" ItemName="FileWrites" />
\r
2051 </GenerateBindingRedirects>
\r
2056 ====================================================================================================
\r
2058 GenerateBindingRedirectsUpdateAppConfig
\r
2059 Updates the project to use the generated app.config content. This needs to run regardless of
\r
2060 inputs/outputs so it is seperate from GenerateBindingRedirects.
\r
2061 ====================================================================================================
\r
2063 <Target Name="GenerateBindingRedirectsUpdateAppConfig"
\r
2064 AfterTargets="GenerateBindingRedirects"
\r
2065 Condition="'$(AutoGenerateBindingRedirects)' == 'true' and '$(GenerateBindingRedirectsOutputType)' == 'true' and Exists('$(_GenerateBindingRedirectsIntermediateAppConfig)')">
\r
2068 <AppConfig>$(_GenerateBindingRedirectsIntermediateAppConfig)</AppConfig>
\r
2071 <AppConfigWithTargetPath Remove="@(AppConfigWithTargetPath)" />
\r
2072 <AppConfigWithTargetPath Include="$(AppConfig)">
\r
2073 <TargetPath>$(TargetFileName).config</TargetPath>
\r
2074 </AppConfigWithTargetPath>
\r
2080 ===========================================================================================
\r
2083 Gets the list of SDKs installed in the SDKDirectoryRoot and SDKRegistryRoot locations
\r
2085 These paths are used by the ResolveSDKReference task and the ResolveAssemblyReference task.
\r
2086 ===========================================================================================
\r
2089 <SDKReferenceRegistryRoot Condition="'$(SDKReferenceRegistryRoot)' == ''">Software\Microsoft\Microsoft SDKs</SDKReferenceRegistryRoot>
\r
2090 <SDKReferenceDirectoryRoot Condition="'$(SDKReferenceDirectoryRoot)' == ''">$(LocalAppData)\Microsoft SDKs;$(MSBuildProgramFiles32)\Microsoft SDKs</SDKReferenceDirectoryRoot>
\r
2091 <!-- Manifest driven extension SDK locations -->
\r
2092 <SDKExtensionDirectoryRoot Condition="'$(SDKExtensionDirectoryRoot)' == '' and '$(SDKIdentifier)' != ''">$(MSBuildProgramFiles32)\Microsoft SDKs\Windows Kits\10;$(MSBuildProgramFiles32)\Windows Kits\10</SDKExtensionDirectoryRoot>
\r
2094 <!-- UAP projects by default should support Windows 8.1 SDKs -->
\r
2095 <SupportWindows81SDKs Condition="'$(SupportWindows81SDKs)' == '' and '$(Support81SDKs)' != 'false' and '$(TargetPlatformIdentifier)' == 'UAP'">true</SupportWindows81SDKs>
\r
2096 <TargetPlatformIdentifierWindows81 Condition="'$(TargetPlatformIdentifierWindows81)' == '' and '$(SupportWindows81SDKs)' == 'true'">Windows</TargetPlatformIdentifierWindows81>
\r
2097 <TargetPlatformVersionWindows81 Condition="'$(TargetPlatformVersionWindows81)' == '' and '$(SupportWindows81SDKs)' == 'true'">8.1</TargetPlatformVersionWindows81>
\r
2099 <!-- Desktop and phone SDKs often have the exact same identifiers, don't enable phone by default -->
\r
2100 <SupportWindowsPhone81SDKs Condition="'$(SupportWindowsPhone81SDKs)' == '' and '$(Support81SDKs)' != 'false' and '$(TargetPlatformIdentifier)' == 'UAP'">false</SupportWindowsPhone81SDKs>
\r
2101 <TargetPlatformIdentifierWindowsPhone81 Condition="'$(TargetPlatformIdentifierWindowsPhone81)' == '' and '$(SupportWindowsPhone81SDKs)' == 'true'">WindowsPhoneApp</TargetPlatformIdentifierWindowsPhone81>
\r
2102 <TargetPlatformVersionWindowsPhone81 Condition="'$(TargetPlatformVersionWindowsPhone81)' == '' and '$(SupportWindowsPhone81SDKs)' == 'true'">8.1</TargetPlatformVersionWindowsPhone81>
\r
2106 Name="GetInstalledSDKLocations"
\r
2107 DependsOnTargets="$(GetInstalledSDKLocationsDependsOn)"
\r
2108 Returns="@(InstalledSDKLocations)"
\r
2111 <GetInstalledSDKLocations
\r
2112 SDKDirectoryRoots="$(SDKReferenceDirectoryRoot)"
\r
2113 SDKExtensionDirectoryRoots="$(SDKExtensionDirectoryRoot)"
\r
2114 SDKRegistryRoot="$(SDKReferenceRegistryRoot)"
\r
2115 TargetPlatformVersion="$(TargetPlatformVersion)"
\r
2116 TargetPlatformIdentifier="$(TargetPlatformIdentifier)"
\r
2117 Condition="'@(SDKReference)' != ''"
\r
2119 <Output TaskParameter="InstalledSDKs" ItemName="InstalledSDKLocations"/>
\r
2120 </GetInstalledSDKLocations>
\r
2122 <!-- Also lookup 8.1 SDKs if requested -->
\r
2123 <GetInstalledSDKLocations
\r
2124 SDKDirectoryRoots="$(SDKReferenceDirectoryRoot)"
\r
2125 SDKExtensionDirectoryRoots=""
\r
2126 SDKRegistryRoot="$(SDKReferenceRegistryRoot)"
\r
2127 TargetPlatformVersion="$(TargetPlatformVersionWindows81)"
\r
2128 TargetPlatformIdentifier="$(TargetPlatformIdentifierWindows81)"
\r
2129 Condition="'@(SDKReference)' != '' and '$(SupportWindows81SDKs)' == 'true' and '$(TargetPlatformIdentifierWindows81)' != '' and '$(TargetPlatformVersionWindows81)' != ''"
\r
2130 WarnWhenNoSDKsFound="false"
\r
2132 <Output TaskParameter="InstalledSDKs" ItemName="InstalledSDKLocations"/>
\r
2133 </GetInstalledSDKLocations>
\r
2135 <GetInstalledSDKLocations
\r
2136 SDKDirectoryRoots="$(SDKReferenceDirectoryRoot)"
\r
2137 SDKExtensionDirectoryRoots=""
\r
2138 SDKRegistryRoot="$(SDKReferenceRegistryRoot)"
\r
2139 TargetPlatformVersion="$(TargetPlatformVersionWindowsPhone81)"
\r
2140 TargetPlatformIdentifier="$(TargetPlatformIdentifierWindowsPhone81)"
\r
2141 Condition="'@(SDKReference)' != '' and '$(SupportWindowsPhone81SDKs)' == 'true' and '$(TargetPlatformIdentifierWindowsPhone81)' != '' and '$(TargetPlatformVersionWindowsPhone81)' != ''"
\r
2142 WarnWhenNoSDKsFound="false"
\r
2144 <Output TaskParameter="InstalledSDKs" ItemName="InstalledSDKLocations"/>
\r
2145 </GetInstalledSDKLocations>
\r
2150 ============================================================
\r
2152 ResolveSDKReferences
\r
2154 Given a list of SDKReference items and a list of resolved winmd files which may contain metadata as to which sdk they came from
\r
2155 we need to find the sdk root folders on disk and populate a ResolvedSDKReference item which has the full path to the SDK ROOT
\r
2156 and the sdk identity as a piece of metadata.
\r
2159 @(SDKReference) - List of sdk references (the identity in the sdk manifest file).
\r
2160 @(ReferencePath) -List of resolved assemblies, we are interested in the ones which have IsWinMDFile set to true.
\r
2163 @(ResolvedSDKReference) - Full path to the root of the SDK
\r
2164 ============================================================
\r
2167 <ResolveSDKReferencesDependsOn>
\r
2168 GetInstalledSDKLocations
\r
2169 </ResolveSDKReferencesDependsOn>
\r
2173 <TargetedSDKConfiguration Condition="'$(TargetedSDKConfiguration)' == '' and '_$(Configuration)' == '_Debug'">Debug</TargetedSDKConfiguration>
\r
2174 <TargetedSDKConfiguration Condition="'$(TargetedSDKConfiguration)' == '' and '_$(Configuration)' == '_Release'">Retail</TargetedSDKConfiguration>
\r
2175 <TargetedSDKConfiguration Condition="'$(TargetedSDKConfiguration)' == ''">Retail</TargetedSDKConfiguration>
\r
2176 <TargetedSDKArchitecture Condition="'$(TargetedSDKArchitecture)' == ''">$(ProcessorArchitecture)</TargetedSDKArchitecture>
\r
2177 <TargetedSDKArchitecture Condition="'$(TargetedSDKArchitecture)' == ''">Neutral</TargetedSDKArchitecture>
\r
2181 <ShouldMarkCertainSDKReferencesAsRuntimeOnly Condition="'$(ShouldMarkCertainSDKReferencesAsRuntimeOnly)' == ''">true</ShouldMarkCertainSDKReferencesAsRuntimeOnly>
\r
2184 <ItemGroup Condition="'$(ShouldMarkCertainSDKReferencesAsRuntimeOnly)' == 'true'">
\r
2185 <!-- Dependencies that are specified as runtime-only dependencies. Therefore the associated files are not used to build Appx package. -->
\r
2186 <!-- TODO: Do we need to do anything like this for the new SDK? -->
\r
2187 <RuntimeReferenceOnlySDKDependencies Condition = "'$(TargetPlatformVersion)' == '8.1'" Include="Microsoft.VCLibs, Version=11.0"/>
\r
2191 Name="ResolveSDKReferences"
\r
2192 Returns="@(ResolvedSDKReference)"
\r
2193 DependsOnTargets="$(ResolveSDKReferencesDependsOn)">
\r
2195 <ResolveSDKReference
\r
2196 SDKReferences="@(SDKReference)"
\r
2197 RuntimeReferenceOnlySDKDependencies="@(RuntimeReferenceOnlySDKDependencies)"
\r
2198 References="@(Reference)"
\r
2199 TargetPlatformVersion="$(TargetPlatformVersion)"
\r
2200 TargetPlatformIdentifier="$(TargetPlatformIdentifier)"
\r
2201 WarnOnMissingPlatformVersion="$(SDKReferenceWarnOnMissingMaxPlatformVersion)"
\r
2202 ProjectName="$(MSBuildProjectName)"
\r
2203 TargetedSDKConfiguration="$(TargetedSDKConfiguration)"
\r
2204 TargetedSDKArchitecture="$(TargetedSDKArchitecture)"
\r
2205 InstalledSDKs ="@(InstalledSDKLocations)"
\r
2206 LogResolutionErrorsAsWarnings ="$(LogSDKReferenceResolutionErrorsAsWarnings)"
\r
2207 Prefer32Bit ="$(Prefer32Bit)"
\r
2208 ContinueOnError="$(ContinueOnError)"
\r
2209 Condition="'@(SDKReference)'!=''">
\r
2210 <Output TaskParameter="ResolvedSDKReferences" ItemName="ResolvedSDKReference"/>
\r
2211 </ResolveSDKReference>
\r
2215 Name="ResolveSDKReferencesDesignTime"
\r
2216 Returns="@(ResolvedSDKReference)"
\r
2217 DependsOnTargets="ResolveSDKReferences" />
\r
2220 ============================================================
\r
2222 FindInvalidProjectReferences
\r
2224 Find project to project references with target platform version higher than the one used by the current project and
\r
2225 creates a list of invalid references to be unresolved. It issues a warning for each invalid reference.
\r
2228 $(TargetPlatformVersion) - Project's target platform version
\r
2229 @(_ProjectReferenceTargetPlatformMonikers) - List of monikers of all referenced projects gathered by the helper
\r
2230 target GetTargetPlatformMonikers.
\r
2233 @(InvalidProjectReferences) - List of invalid project references
\r
2235 ============================================================
\r
2239 <FindInvalidProjectReferencesDependsOn>
\r
2240 GetReferenceTargetPlatformMonikers
\r
2241 </FindInvalidProjectReferencesDependsOn>
\r
2245 Name="FindInvalidProjectReferences"
\r
2246 Condition ="'$(FindInvalidProjectReferences)' == 'true'"
\r
2247 DependsOnTargets="$(FindInvalidProjectReferencesDependsOn)">
\r
2249 <FindInvalidProjectReferences
\r
2250 TargetPlatformVersion="$(TargetPlatformVersion)"
\r
2251 TargetPlatformIdentifier="$(TargetPlatformIdentifier)"
\r
2252 ProjectReferences="@(TargetPathWithTargetPlatformMoniker)">
\r
2253 <Output TaskParameter="InvalidReferences" ItemName="InvalidProjectReferences" />
\r
2254 </FindInvalidProjectReferences>
\r
2257 <_ResolvedProjectReferencePaths Remove="@(InvalidProjectReferences)" />
\r
2261 <Target Name="GetReferenceTargetPlatformMonikers" DependsOnTargets="PrepareProjectReferences">
\r
2263 Projects="@(_MSBuildProjectReferenceExistent)"
\r
2264 Properties="%(_MSBuildProjectReferenceExistent.SetConfiguration); %(_MSBuildProjectReferenceExistent.SetPlatform); %(_MSBuildProjectReferenceExistent.SetTargetFramework)"
\r
2265 Targets="GetTargetPathWithTargetPlatformMoniker"
\r
2266 BuildInParallel="$(BuildInParallel)"
\r
2267 ContinueOnError="!$(BuildingProject)"
\r
2268 RemoveProperties="%(_MSBuildProjectReferenceExistent.GlobalPropertiesToRemove)">
\r
2270 <Output TaskParameter="TargetOutputs" ItemName="TargetPathWithTargetPlatformMoniker" />
\r
2275 ============================================================
\r
2277 ExpandSDKReferences
\r
2279 After we have resolved the sdk refrence we need to make sure that we automatically include the references which are part of the SDK (both winmd and dll)
\r
2280 as part of the assemblies passed to the compiler.
\r
2282 Project systems or project which do not want to reference all dlls or winmd files should override this target to do nothing.
\r
2283 ============================================================
\r
2286 <ExpandSDKReferencesDependsOn>
\r
2287 ResolveSDKReferences
\r
2288 </ExpandSDKReferencesDependsOn>
\r
2290 <ExpandSDKAllowedReferenceExtensions Condition="'$(ExpandSDKAllowedReferenceExtensions)' == ''">
\r
2293 </ExpandSDKAllowedReferenceExtensions>
\r
2296 <Target Name="ExpandSDKReferences"
\r
2297 Returns="@(ReferencesFromSDK)"
\r
2298 DependsOnTargets="$(ExpandSDKReferencesDependsOn)"
\r
2300 <GetSDKReferenceFiles
\r
2301 ResolvedSDKReferences="@(ResolvedSDKReference)"
\r
2302 ReferenceExtensions="$(ExpandSDKAllowedReferenceExtensions)"
\r
2303 TargetSDKIdentifier="$(SDKIdentifier)"
\r
2304 TargetSDKVersion="$(SDKVersion)"
\r
2305 LogRedistFilesList="$(GetSDKReferenceFilesLogRedistFilesList)"
\r
2306 LogRedistConflictWithinSDKAsWarning ="$(GetSDKReferenceFilesLogRedistConflictsWithinSDKAsWarning)"
\r
2307 LogRedistConflictBetweenSDKsAsWarning ="$(GetSDKReferenceFilesLogRedistConflictsBetweenSDKsAsWarning)"
\r
2308 LogReferencesList="$(GetSDKReferenceFilesLogReferencesList)"
\r
2309 LogReferenceConflictWithinSDKAsWarning ="$(GetSDKReferenceFilesLogReferenceConflictsWithinSDKAsWarning)"
\r
2310 LogReferenceConflictBetweenSDKsAsWarning ="$(GetSDKReferenceFilesLogReferenceConflictsBetweenSDKsAsWarning)"
\r
2311 CacheFileFolderPath ="$(GetSDKReferenceFilesCacheFolder)"
\r
2312 LogCacheFileExceptions="$(GetSDKReferenceFilesLogCacheFileExceptions)"
\r
2313 Condition="'@(ResolvedSDKReference)'!=''">
\r
2315 <Output TaskParameter="References" ItemName="ReferencePath"/>
\r
2316 <Output TaskParameter="References" ItemName="ReferencesFromSDK"/>
\r
2317 <Output TaskParameter="References" ItemName="_ResolveAssemblyReferenceResolvedFiles"/>
\r
2318 <Output TaskParameter="CopyLocalFiles" ItemName="ReferenceCopyLocalPaths"/>
\r
2319 <Output TaskParameter="RedistFiles" ItemName="ResolvedRedistFiles"/>
\r
2320 </GetSDKReferenceFiles>
\r
2324 ============================================================
\r
2326 ExportWindowsMDFile
\r
2328 When a project is generating a a winmd file through c# or vb, ect the compiler will create a WinMDModule file. This file needs to be run
\r
2329 through the winmdexp tool in order to generate the resulting WinMD file.
\r
2331 ===========================================================
\r
2334 <Target Name="ExportWindowsMDFile"
\r
2335 DependsOnTargets="Compile"
\r
2336 Condition="'$(ExportWinMDFile)' == 'true'"
\r
2337 Inputs="@(IntermediateAssembly);@(DocFileItem);@(_DebugSymbolsIntermediatePath);@(ReferencePath);$(MSBuildAllProjects)"
\r
2338 Outputs="$(_IntermediateWindowsMetadataPath);$(WinMDExpOutputPdb);$(WinMDOutputDocumentationFile)"
\r
2342 <!-- Will be copied by the "copy WinMD artifacts" step instead -->
\r
2343 <CopyBuildOutputToOutputDirectory>false</CopyBuildOutputToOutputDirectory>
\r
2344 <CopyOutputSymbolsToOutputDirectory>false</CopyOutputSymbolsToOutputDirectory>
\r
2346 <WinMdExpToolPath Condition="'$(WinMdExpToolPath)' == ''">$(TargetFrameworkSDKToolsDirectory)</WinMdExpToolPath>
\r
2347 <WinMdExpUTF8Ouput Condition="'$(WinMdExpUTF8Ouput)' == ''">true</WinMdExpUTF8Ouput>
\r
2350 <WinMDExp WinMDModule="@(IntermediateAssembly)"
\r
2351 References="@(ReferencePath)"
\r
2352 DisabledWarnings="$(WinMdExpNoWarn)"
\r
2353 InputDocumentationFile="@(DocFileItem)"
\r
2354 OutputDocumentationFile="$(WinMDOutputDocumentationFile)"
\r
2355 TreatWarningsAsErrors="$(TreatWarningsAsErrors)"
\r
2356 InputPDBFile="@(_DebugSymbolsIntermediatePath)"
\r
2357 OutputPDBFile="$(WinMDExpOutputPdb)"
\r
2358 OutputWindowsMetadataFile="$(_IntermediateWindowsMetadataPath)"
\r
2359 EnvironmentVariables="$(WinMDExpEnvironment)"
\r
2360 UTF8Output="$(WinMdExpUTF8Ouput)"
\r
2361 SdkToolsPath="$(WinMdExpToolPath)"
\r
2362 AssemblyUnificationPolicy="$(WinMDExpAssemblyUnificationPolicy)">
\r
2363 <Output TaskParameter="OutputWindowsMetadataFile" ItemName="FileWrites"/>
\r
2367 <WinMDExpArtifacts Include="$(_IntermediateWindowsMetadataPath)"/>
\r
2368 <WinMDExpArtifacts Include="$(WinMDOutputDocumentationFile)"/>
\r
2369 <WinMDExpArtifacts Include="$(WinMDExpOutputPdb)"/>
\r
2370 <FileWrites Include="$(WinMDOutputDocumentationFile);$(WinMDExpOutputPdb)"/>
\r
2375 Name="ResolveAssemblyReferencesDesignTime"
\r
2376 Returns="@(_ReferencesFromRAR)"
\r
2377 DependsOnTargets="ResolveProjectReferences;ResolveAssemblyReferences">
\r
2379 <!-- We need to do this here because we only want references which have been passed into rar but are not project to project references. -->
\r
2381 <_ReferencesFromRAR Include="@(ReferencePath->WithMetadataValue('ReferenceSourceTarget', 'ResolveAssemblyReference'))"/>
\r
2386 <ProjectDesignTimeAssemblyResolutionSearchPaths Condition=" '$(ProjectDesignTimeAssemblyResolutionSearchPaths)' == '' ">
\r
2387 {CandidateAssemblyFiles};
\r
2389 {HintPathFromItem};
\r
2390 {TargetFrameworkDirectory};
\r
2391 {Registry:$(FrameworkRegistryBase),$(TargetFrameworkVersion),$(AssemblyFoldersSuffix)$(AssemblyFoldersExConditions)};
\r
2394 </ProjectDesignTimeAssemblyResolutionSearchPaths>
\r
2398 ==============================================================
\r
2400 DesignTimeResolveAssemblyReferences
\r
2402 Given the list of assemblies, resolve their reference paths.
\r
2403 This target is called by Visual Studio at run time in order to filter references
\r
2404 according to the targeted framework.
\r
2407 @(DesignTimeReference) - List of assembly references as simple/fusion names.
\r
2411 @(ReferencePath) - Paths to resolved primary files.
\r
2413 ==============================================================
\r
2416 <DesignTimeResolveAssemblyReferencesDependsOn>
\r
2417 GetFrameworkPaths;
\r
2418 GetReferenceAssemblyPaths;
\r
2420 </DesignTimeResolveAssemblyReferencesDependsOn>
\r
2424 Name="DesignTimeResolveAssemblyReferences"
\r
2425 Condition="'$(DesignTimeReference)'!=''"
\r
2426 DependsOnTargets="$(DesignTimeResolveAssemblyReferencesDependsOn)">
\r
2429 <_DesignTimeReferenceInstalledAssemblyDirectory Include="$(TargetFrameworkDirectory)" />
\r
2433 <DesignTimeResolveAssemblyReferencesStateFile Condition="'$(BuildingProject)'=='true'">$(IntermediateOutputPath)$(MSBuildProjectFile)DesignTimeResolveAssemblyReferences.cache</DesignTimeResolveAssemblyReferencesStateFile>
\r
2437 <DesignTimeAssemblySearchPaths Condition=" '$(DesignTimeAssemblySearchPaths)' == '' ">
\r
2438 {CandidateAssemblyFiles};
\r
2440 {HintPathFromItem};
\r
2441 {TargetFrameworkDirectory};
\r
2442 {Registry:$(FrameworkRegistryBase),$(TargetFrameworkVersion),$(AssemblyFoldersSuffix)$(AssemblyFoldersExConditions)};
\r
2445 </DesignTimeAssemblySearchPaths>
\r
2449 <DesignTimeFindDependencies Condition=" '$(DesignTimeFindDependencies)' == '' ">false</DesignTimeFindDependencies>
\r
2450 <DesignTimeIgnoreVersionForFrameworkReferences Condition=" '$(DesignTimeIgnoreVersionForFrameworkReferences)' == '' ">false</DesignTimeIgnoreVersionForFrameworkReferences>
\r
2451 <DesignTimeFindSatellites Condition=" '$(DesignTimeFindSatellites)' == '' ">false</DesignTimeFindSatellites>
\r
2452 <DesignTimeFindSerializationAssemblies Condition=" '$(DesignTimeFindSerializationAssemblies)' == '' ">false</DesignTimeFindSerializationAssemblies>
\r
2453 <DesignTimeFindRelatedFiles Condition=" '$(DesignTimeFindRelatedFiles)' == '' ">false</DesignTimeFindRelatedFiles>
\r
2454 <DesignTimeSilentResolution Condition=" '$(DesignTimeSilentResolution)' == '' and '$(TraceDesignTime)' != 'true'">true</DesignTimeSilentResolution>
\r
2455 <DesignTimeAutoUnify Condition="'$(DesignTimeAutoUnify)' == ''">false</DesignTimeAutoUnify>
\r
2459 <_DesignTimeReferenceAssemblies Include ="$(DesignTimeReference)" />
\r
2463 <_RARResolvedReferencePath Include="@(ReferencePath)" />
\r
2464 <ReferencePath Remove="@(ReferencePath)" />
\r
2467 <ResolveAssemblyReference
\r
2468 Assemblies="@(_DesignTimeReferenceAssemblies)"
\r
2469 TargetFrameworkDirectories="@(_DesignTimeReferenceInstalledAssemblyDirectory)"
\r
2470 SearchPaths="$(DesignTimeAssemblySearchPaths)"
\r
2471 AllowedAssemblyExtensions="$(AllowedReferenceAssemblyFileExtensions)"
\r
2472 TargetProcessorArchitecture="$(ProcessorArchitecture)"
\r
2473 CandidateAssemblyFiles="@(Content);@(None);@(_RARResolvedReferencePath)"
\r
2474 FindDependencies="$(DesignTimeFindDependencies)"
\r
2475 AutoUnify="$(DesignTimeAutoUnify)"
\r
2476 IgnoreVersionForFrameworkReferences="$(DesignTimeIgnoreVersionForFrameworkReferences)"
\r
2477 FindSatellites="$(DesignTimeFindSatellites)"
\r
2478 FindSerializationAssemblies="$(DesignTimeFindSerializationAssemblies)"
\r
2479 FindRelatedFiles="$(DesignTimeFindRelatedFiles)"
\r
2480 Silent="$(DesignTimeSilentResolution)"
\r
2481 TargetFrameworkVersion="$(TargetFrameworkVersion)"
\r
2482 TargetFrameworkMoniker="$(TargetFrameworkMoniker)"
\r
2483 TargetFrameworkMonikerDisplayName="$(TargetFrameworkMonikerDisplayName)"
\r
2484 TargetedRuntimeVersion="$(TargetedRuntimeVersion)"
\r
2485 StateFile="$(DesignTimeResolveAssemblyReferencesStateFile)"
\r
2486 InstalledAssemblySubsetTables="@(InstalledAssemblySubsetTables)"
\r
2487 IgnoreDefaultInstalledAssemblySubsetTables="$(IgnoreInstalledAssemblySubsetTables)"
\r
2488 TargetFrameworkSubsets="@(_ReferenceInstalledAssemblySubsets)"
\r
2489 FullTargetFrameworkSubsetNames="$(FullReferenceAssemblyNames)"
\r
2490 FullFrameworkFolders="$(_FullFrameworkReferenceAssemblyPaths)"
\r
2491 FullFrameworkAssemblyTables="@(FullFrameworkAssemblyTables)"
\r
2492 ProfileName="$(TargetFrameworkProfile)"
\r
2493 ResolvedSDKReferences="@(ResolvedSDKReference)"
\r
2494 IgnoreTargetFrameworkAttributeVersionMismatch ="$(DesignTimeIgnoreTargetFrameworkAttributeVersionMismatch)"
\r
2497 <Output TaskParameter="ResolvedFiles" ItemName="DesignTimeReferencePath"/>
\r
2498 <Output TaskParameter="FilesWritten" ItemName="FileWrites"/>
\r
2499 </ResolveAssemblyReference>
\r
2503 ============================================================
\r
2504 ResolveComReferences
\r
2506 Resolve COM references
\r
2509 @(COMReference) - The list of COM references
\r
2510 $(BaseIntermediateOutputPath) - The output directory in which to generate wrapper assemblies
\r
2513 @(ReferencePath) - Paths to referenced wrappers.
\r
2515 If ResolveComReferences is invoked from the IDE, PrepareForBuild may need to run to create directories.
\r
2516 ============================================================
\r
2519 <ComReferenceExecuteAsTool Condition="'$(ComReferenceExecuteAsTool)'==''">false</ComReferenceExecuteAsTool>
\r
2523 Name="ResolveComReferences"
\r
2524 Condition="'@(COMReference)'!='' or '@(COMFileReference)'!=''"
\r
2525 Returns="@(ReferencePath)"
\r
2526 DependsOnTargets="PrepareForBuild;ResolveKeySource;ResolveAssemblyReferences"
\r
2529 <PropertyGroup Condition=" '$(InteropOutputPath)' == '' ">
\r
2530 <InteropOutputPath>$(IntermediateOutputPath)</InteropOutputPath>
\r
2533 <MakeDir Directories="$(InteropOutputPath)"/>
\r
2536 Note: This task should not be batched, since it relies on having all the COM references fed into it at once.
\r
2539 <ResolveComReferenceMSBuildArchitecture Condition="'$(ResolveComReferenceMSBuildArchitecture)' == ''">$(PlatformTargetAsMSBuildArchitecture)</ResolveComReferenceMSBuildArchitecture>
\r
2541 <ResolveComReferenceToolPath Condition="'$(ResolveComReferenceToolPath)' == ''">$(TargetFrameworkSDKToolsDirectory)</ResolveComReferenceToolPath>
\r
2542 <ResolveComReferenceSilent Condition="'$(ResolveComReferenceSilent)' == ''">false</ResolveComReferenceSilent>
\r
2545 <ResolveComReference
\r
2546 TypeLibNames="@(COMReference)"
\r
2547 TypeLibFiles="@(COMFileReference)"
\r
2548 ResolvedAssemblyReferences="@(ReferencePath)"
\r
2549 WrapperOutputDirectory="$(InteropOutputPath)"
\r
2550 IncludeVersionInInteropName="$(IncludeVersionInInteropName)"
\r
2551 KeyContainer="$(KeyContainerName)"
\r
2552 KeyFile="$(KeyOriginatorFile)"
\r
2553 DelaySign="$(DelaySign)"
\r
2554 StateFile="@(_ResolveComReferenceCache)"
\r
2555 TargetFrameworkVersion="$(TargetFrameworkVersion)"
\r
2556 TargetProcessorArchitecture="$(ProcessorArchitecture)"
\r
2557 NoClassMembers="$(ComReferenceNoClassMembers)"
\r
2558 Silent="$(ResolveComReferenceSilent)"
\r
2559 EnvironmentVariables="$(ResolveComReferenceEnvironment)"
\r
2560 SdkToolsPath="$(ResolveComReferenceToolPath)"
\r
2561 ExecuteAsTool="$(ComReferenceExecuteAsTool)"
\r
2562 MSBuildArchitecture="$(ResolveComReferenceMSBuildArchitecture)"
\r
2563 ContinueOnError="$(ContinueOnError)">
\r
2565 <Output TaskParameter="ResolvedFiles" ItemName="ReferencePath"/>
\r
2566 <Output TaskParameter="ResolvedFiles" ItemName="ComReferenceWrappers"/>
\r
2567 <Output TaskParameter="ResolvedFiles" ItemName="FileWrites"/>
\r
2568 <!-- This output list only includes items with Isolated attribute set to True. It's done by the task itself. -->
\r
2569 <Output TaskParameter="ResolvedModules" ItemName="ResolvedIsolatedComModules"/>
\r
2571 </ResolveComReference>
\r
2574 <FileWrites Include="@(_ResolveComReferenceCache)"/>
\r
2575 <ReferenceComWrappersToCopyLocal Include="@(ComReferenceWrappers)" Condition="'%(ComReferenceWrappers.CopyLocal)'!='false'"/>
\r
2581 Name="ResolveComReferencesDesignTime"
\r
2582 Returns="@(ComReferenceWrappers)"
\r
2583 DependsOnTargets="ResolveComReferences" />
\r
2586 ***********************************************************************************************
\r
2587 ***********************************************************************************************
\r
2588 PrepareResources Section
\r
2589 ***********************************************************************************************
\r
2590 ***********************************************************************************************
\r
2594 ============================================================
\r
2597 Prepare resources for the Compile step.
\r
2598 ============================================================
\r
2601 <PrepareResourcesDependsOn>
\r
2602 PrepareResourceNames;
\r
2605 </PrepareResourcesDependsOn>
\r
2608 Name="PrepareResources"
\r
2609 DependsOnTargets="$(PrepareResourcesDependsOn)"/>
\r
2612 ============================================================
\r
2613 PrepareResourceNames
\r
2615 Prepare the names of resource files.
\r
2616 ============================================================
\r
2619 <PrepareResourceNamesDependsOn>
\r
2620 AssignTargetPaths;
\r
2621 SplitResourcesByCulture;
\r
2622 CreateManifestResourceNames;
\r
2623 CreateCustomManifestResourceNames
\r
2624 </PrepareResourceNamesDependsOn>
\r
2627 Name="PrepareResourceNames"
\r
2628 DependsOnTargets="$(PrepareResourceNamesDependsOn)"/>
\r
2631 ============================================================
\r
2634 This target creates <TargetPath> tags for items. <TargetPath> is a relative folder plus filename
\r
2635 for the destination of this item.
\r
2636 ============================================================
\r
2639 <AssignTargetPathsDependsOn></AssignTargetPathsDependsOn>
\r
2642 Name="AssignTargetPaths"
\r
2643 DependsOnTargets="$(AssignTargetPathsDependsOn)">
\r
2646 <_Temporary Remove="@(_Temporary)" />
\r
2649 <!-- AssignTargetPath generates TargetPath metadata that is consumed by CreateManifestResourceNames target for manifest name generation -->
\r
2650 <AssignTargetPath Files="@(EmbeddedResource)" RootFolder="$(MSBuildProjectDirectory)">
\r
2651 <Output TaskParameter="AssignedFiles" ItemName="_Temporary" />
\r
2652 </AssignTargetPath>
\r
2656 <!-- Replace items in EmbeddedResource with the items emitted by the AssignTargetPath task that have the TargetPath metadata -->
\r
2657 <EmbeddedResource Remove="@(_Temporary)" />
\r
2658 <EmbeddedResource Include="@(_Temporary)" />
\r
2659 <_Temporary Remove="@(_Temporary)" />
\r
2662 <AssignTargetPath Files="@(Content)" RootFolder="$(MSBuildProjectDirectory)">
\r
2663 <Output TaskParameter="AssignedFiles" ItemName="ContentWithTargetPath" />
\r
2664 </AssignTargetPath>
\r
2666 <AssignTargetPath Files="@(None)" RootFolder="$(MSBuildProjectDirectory)">
\r
2667 <Output TaskParameter="AssignedFiles" ItemName="_NoneWithTargetPath" />
\r
2668 </AssignTargetPath>
\r
2670 <AssignTargetPath Files="@(BaseApplicationManifest)" RootFolder="$(MSBuildProjectDirectory)">
\r
2671 <Output TaskParameter="AssignedFiles" ItemName="_DeploymentBaseManifestWithTargetPath"/>
\r
2672 </AssignTargetPath>
\r
2674 <AssignTargetPath Files="@(None)" RootFolder="$(MSBuildProjectDirectory)" Condition="'@(_DeploymentBaseManifestWithTargetPath)'=='' and '%(None.Extension)'=='.manifest'">
\r
2675 <Output TaskParameter="AssignedFiles" ItemName="_DeploymentBaseManifestWithTargetPath" />
\r
2676 </AssignTargetPath>
\r
2681 ============================================================
\r
2682 GetItemTargetPaths
\r
2684 This target returns all items that have TargetPath metadata assigned by the AssignTargetPaths target.
\r
2685 ============================================================
\r
2688 Name="GetItemTargetPaths"
\r
2689 DependsOnTargets="AssignTargetPaths"
\r
2691 @(EmbeddedResource);
\r
2692 @(ContentWithTargetPath);
\r
2693 @(_NoneWithTargetPath);
\r
2694 @(_DeploymentBaseManifestWithTargetPath);
\r
2698 ============================================================
\r
2699 SplitResourcesByCulture
\r
2701 Split EmbeddedResource items into five lists based on whether
\r
2702 they are resx files, licx files or other resources and whether they should be localized. Also adds Type and Culture
\r
2703 metadata. Type indicates whether the resource is "Resx" or "Non-Resx".
\r
2706 @(EmbeddedResource) - The raw list of resources.
\r
2709 @(_LicxFile) - The EmbeddedResource items with extension equal to '.licx'.
\r
2710 ============================================================
\r
2713 Name="SplitResourcesByCulture"
\r
2714 DependsOnTargets="AssignTargetPaths">
\r
2716 <Warning Condition="'@(ResxWithNoCulture)'!=''" Code="MSB9000" Text="ResxWithNoCulture item type is deprecated. Use EmbeddedResource items instead."/>
\r
2717 <Warning Condition="'@(ResxWithCulture)'!=''" Code="MSB9001" Text="ResxWithCulture item type is deprecated. Use EmbeddedResource items instead."/>
\r
2718 <Warning Condition="'@(NonResxWithCulture)'!=''" Code="MSB9002" Text="NonResxWithCulture item type is deprecated. Use EmbeddedResource items instead."/>
\r
2719 <Warning Condition="'@(NonResxWithNoCulture)'!=''" Code="MSB9003" Text="NonResxWithNoCulture item type is deprecated. Use EmbeddedResource items instead."/>
\r
2722 <_LicxFile Include="@(EmbeddedResource)" Condition="'%(Extension)'=='.licx'"/>
\r
2724 <!-- CONSUMED FOR COMPATIBILITY REASONS ONLY. EMIT EMBEDDEDRESOURCE INSTEAD -->
\r
2725 <EmbeddedResource Include="@(ResxWithNoCulture);@(ResxWithCulture)">
\r
2727 </EmbeddedResource>
\r
2728 <EmbeddedResource Include="@(NonResxWithCulture);@(NonResxWithNoCulture)">
\r
2729 <Type>Non-Resx</Type>
\r
2730 </EmbeddedResource>
\r
2733 <AssignCulture Files="@(EmbeddedResource)" Condition="'%(Extension)'!='.licx'">
\r
2734 <!-- Create the list of culture resx and embedded resource files -->
\r
2735 <Output TaskParameter="AssignedFilesWithCulture" ItemName="_MixedResourceWithCulture"/>
\r
2736 <!-- Create the list of non-culture resx and embedded resource files -->
\r
2737 <Output TaskParameter="AssignedFilesWithNoCulture" ItemName="_MixedResourceWithNoCulture"/>
\r
2742 <!-- Remove EmbeddedResource items that we have processed already
\r
2743 i.e. either Licx, or resources that don't have culture info -->
\r
2744 <EmbeddedResource Remove="@(_MixedResourceWithCulture)" />
\r
2745 <EmbeddedResource Remove="@(_MixedResourceWithNoCulture)" />
\r
2746 <EmbeddedResource Remove="@(_LicxFile)" />
\r
2748 <!-- Add back everything except Licx, so that we have culture info -->
\r
2749 <EmbeddedResource Include="@(_MixedResourceWithNoCulture);@(_MixedResourceWithCulture)" Condition="'%(Extension)'=='.resx' or '%(Extension)'=='.restext'">
\r
2750 <Type Condition="'%(_MixedResourceWithNoCulture.Type)'=='' and '%(_MixedResourceWithCulture.Type)'==''">Resx</Type>
\r
2751 </EmbeddedResource>
\r
2752 <EmbeddedResource Include="@(_MixedResourceWithNoCulture);@(_MixedResourceWithCulture)" Condition="'%(Extension)'!='.resx' and '%(Extension)'!='.restext'">
\r
2753 <Type Condition="'%(_MixedResourceWithNoCulture.Type)'=='' and '%(_MixedResourceWithCulture.Type)'==''">Non-Resx</Type>
\r
2754 </EmbeddedResource>
\r
2756 <!-- EMITTED FOR COMPATIBILITY REASONS ONLY. CONSUME EMBEDDEDRESOURCE INSTEAD -->
\r
2757 <ResxWithNoCulture Remove="@(ResxWithNoCulture)"/>
\r
2758 <NonResxWithNoCulture Remove="@(NonResxWithNoCulture)"/>
\r
2759 <ResxWithCulture Remove="@(ResxWithCulture)"/>
\r
2760 <NonResxWithCulture Remove="@(NonResxWithCulture)"/>
\r
2761 <ResxWithNoCulture Include="@(_MixedResourceWithNoCulture)" Condition="'%(WithCulture)'=='false' and ('%(Extension)'=='.resx' or '%(Extension)'=='.restext')"/>
\r
2762 <NonResxWithNoCulture Include="@(_MixedResourceWithNoCulture)" Condition="'%(WithCulture)'=='false' and ('%(Extension)'!='.resx' and '%(Extension)'!='.restext')"/>
\r
2763 <ResxWithCulture Include="@(_MixedResourceWithCulture)" Condition="'%(WithCulture)'=='true' and ('%(Extension)'=='.resx' or '%(Extension)'=='.restext')"/>
\r
2764 <NonResxWithCulture Include="@(_MixedResourceWithCulture)" Condition="'%(WithCulture)'=='true' and ('%(Extension)'!='.resx' and '%(Extension)'!='.restext')"/>
\r
2766 <!-- Clean up temporary lists -->
\r
2767 <_MixedResourceWithNoCulture Remove="@(_MixedResourceWithNoCulture)" />
\r
2768 <_MixedResourceWithCulture Remove="@(_MixedResourceWithCulture)" />
\r
2775 =======================================================================
\r
2776 CreateCustomManifestResourceNames
\r
2778 Allows custom manifest resource name generation tasks to plug
\r
2779 into the build process
\r
2780 =======================================================================
\r
2783 <CreateCustomManifestResourceNamesDependsOn></CreateCustomManifestResourceNamesDependsOn>
\r
2786 Name="CreateCustomManifestResourceNames"
\r
2787 DependsOnTargets="$(CreateCustomManifestResourceNamesDependsOn)"/>
\r
2790 ============================================================
\r
2793 Run GenerateResource on the given resx files.
\r
2795 ============================================================
\r
2798 <ResGenDependsOn>ResolveAssemblyReferences;SplitResourcesByCulture;BeforeResGen;CoreResGen;AfterResGen</ResGenDependsOn>
\r
2799 <CoreResGenDependsOn></CoreResGenDependsOn>
\r
2800 <UseSourcePath Condition="'$(UseSourcePath)'==''">true</UseSourcePath>
\r
2801 <ResGenExecuteAsTool Condition="'$(ResGenExecuteAsTool)'==''">false</ResGenExecuteAsTool>
\r
2805 DependsOnTargets="$(ResGenDependsOn)"/>
\r
2808 ============================================================
\r
2811 Redefine this target in your project in order to run tasks just before Resgen.
\r
2812 ============================================================
\r
2814 <Target Name="BeforeResGen"/>
\r
2817 ============================================================
\r
2820 Redefine this target in your project in order to run tasks just after Resgen.
\r
2821 ============================================================
\r
2823 <Target Name="AfterResGen"/>
\r
2826 ============================================================
\r
2828 ============================================================
\r
2832 DependsOnTargets="$(CoreResGenDependsOn)">
\r
2835 <_Temporary Remove="@(_Temporary)" />
\r
2839 <GenerateResourceMSBuildArchitecture Condition="'$(GenerateResourceMSBuildArchitecture)' == ''">$(PlatformTargetAsMSBuildArchitecture)</GenerateResourceMSBuildArchitecture>
\r
2841 <ResgenToolPath Condition="'$(ResgenToolPath)' == ''">$(TargetFrameworkSDKToolsDirectory)</ResgenToolPath>
\r
2844 <PropertyGroup Condition="'$(TargetFrameworkAsMSBuildRuntime)' != '' and '$(GenerateResourceMSBuildArchitecture)' != ''">
\r
2845 <!-- In the general case, we want to fail to run the task if the task host it's requesting doesn't exist, because we'd rather let the
\r
2846 user know there's something wrong than just silently generate something that's probably not quite right. However, in a few
\r
2847 circumstances, there are tasks that are already aware of runtime / bitness concerns, in which case even if we go ahead and run
\r
2848 the more recent version of the task, it should be able to generate something correct. GenerateResource is one such task, so
\r
2849 we check for the existence of the targeted task host so that we can use it preferentially, but if it can't be found, we'll fall
\r
2850 back to the current task since it's still mostly correct.
\r
2852 In particular, we need to do this because otherwise people with Dev10 on a machine that they upgrade to Win8 will be broken:
\r
2853 they'll have ResGen from the 7.0A SDK installed, so launching ResGen will still work, but the CLR2 task host is only installed by
\r
2854 the 8.0A SDK, which they won't have installed, and thus without this fallback mechanism, their projects targeting v3.5 will
\r
2855 suddenly start failing to build.-->
\r
2856 <GenerateResourceMSBuildRuntime
\r
2857 Condition="'$(GenerateResourceMSBuildRuntime)' == '' and
\r
2858 $([MSBuild]::DoesTaskHostExist(`$(TargetFrameworkAsMSBuildRuntime)`, `$(GenerateResourceMSBuildArchitecture)`))">$(TargetFrameworkAsMSBuildRuntime)</GenerateResourceMSBuildRuntime>
\r
2860 <!-- If the targeted runtime doesn't exist, fall back to current -->
\r
2861 <GenerateResourceMSBuildRuntime Condition="'$(GenerateResourceMSBuildRuntime)' == ''">CurrentRuntime</GenerateResourceMSBuildRuntime>
\r
2864 <!-- 4.0 task has some new parameters that we want to make use of if we're targeting 4.0 -->
\r
2866 Sources="@(EmbeddedResource)"
\r
2867 UseSourcePath="$(UseSourcePath)"
\r
2868 References="@(ReferencePath)"
\r
2869 AdditionalInputs="$(MSBuildAllProjects)"
\r
2870 NeverLockTypeAssemblies="$(GenerateResourceNeverLockTypeAssemblies)"
\r
2871 StateFile="$(IntermediateOutputPath)$(MSBuildProjectFile).GenerateResource.Cache"
\r
2872 StronglyTypedClassName="%(EmbeddedResource.StronglyTypedClassName)"
\r
2873 StronglyTypedFileName="%(EmbeddedResource.StronglyTypedFileName)"
\r
2874 StronglyTypedLanguage="%(EmbeddedResource.StronglyTypedLanguage)"
\r
2875 StronglyTypedNamespace="%(EmbeddedResource.StronglyTypedNamespace)"
\r
2876 StronglyTypedManifestPrefix="%(EmbeddedResource.StronglyTypedManifestPrefix)"
\r
2877 PublicClass="%(EmbeddedResource.PublicClass)"
\r
2878 OutputResources="@(EmbeddedResource->'$(IntermediateOutputPath)%(ManifestResourceName).resources')"
\r
2879 Condition="'%(EmbeddedResource.Type)' == 'Resx' and '%(EmbeddedResource.GenerateResource)' != 'false' and '$(GenerateResourceMSBuildRuntime)' != 'CLR2'"
\r
2880 SdkToolsPath="$(ResgenToolPath)"
\r
2881 ExecuteAsTool="$(ResGenExecuteAsTool)"
\r
2882 EnvironmentVariables="$(ResGenEnvironment)"
\r
2883 MSBuildRuntime="$(GenerateResourceMSBuildRuntime)"
\r
2884 MSBuildArchitecture="$(GenerateResourceMSBuildArchitecture)">
\r
2886 <Output TaskParameter="FilesWritten" ItemName="FileWrites"/>
\r
2887 <Output TaskParameter="StronglyTypedFileName" ItemName="Compile"/>
\r
2889 <!-- Gather Sources as an output since it will contain OutputResource metadata indicating the final output resource that it was compiled into -->
\r
2890 <Output TaskParameter="Sources" ItemName="_Temporary" />
\r
2892 </GenerateResource>
\r
2894 <!-- But we can't use those parameters if we're targeting 3.5, since we're using the 3.5 task -->
\r
2896 Sources="@(EmbeddedResource)"
\r
2897 UseSourcePath="$(UseSourcePath)"
\r
2898 References="@(ReferencePath)"
\r
2899 AdditionalInputs="$(MSBuildAllProjects)"
\r
2900 NeverLockTypeAssemblies="$(GenerateResourceNeverLockTypeAssemblies)"
\r
2901 StateFile="$(IntermediateOutputPath)$(MSBuildProjectFile).GenerateResource.Cache"
\r
2902 StronglyTypedClassName="%(EmbeddedResource.StronglyTypedClassName)"
\r
2903 StronglyTypedFileName="%(EmbeddedResource.StronglyTypedFileName)"
\r
2904 StronglyTypedLanguage="%(EmbeddedResource.StronglyTypedLanguage)"
\r
2905 StronglyTypedNamespace="%(EmbeddedResource.StronglyTypedNamespace)"
\r
2906 StronglyTypedManifestPrefix="%(EmbeddedResource.StronglyTypedManifestPrefix)"
\r
2907 PublicClass="%(EmbeddedResource.PublicClass)"
\r
2908 OutputResources="@(EmbeddedResource->'$(IntermediateOutputPath)%(ManifestResourceName).resources')"
\r
2909 MSBuildRuntime="$(GenerateResourceMSBuildRuntime)"
\r
2910 MSBuildArchitecture="$(GenerateResourceMSBuildArchitecture)"
\r
2911 Condition="'%(EmbeddedResource.Type)' == 'Resx' and '%(EmbeddedResource.GenerateResource)' != 'false' and '$(GenerateResourceMSBuildRuntime)' == 'CLR2'">
\r
2913 <Output TaskParameter="FilesWritten" ItemName="FileWrites"/>
\r
2914 <Output TaskParameter="StronglyTypedFileName" ItemName="Compile"/>
\r
2916 <!-- Gather Sources as an output since it will contain OutputResource metadata indicating the final output resource that it was compiled into -->
\r
2917 <Output TaskParameter="Sources" ItemName="_Temporary" />
\r
2919 </GenerateResource>
\r
2922 <EmbeddedResource Remove="@(_Temporary)" />
\r
2924 <!-- Add back the Sources list (with OutputResource metadata) that we output from GenerateResource into EmbeddedResource -->
\r
2925 <EmbeddedResource Include="@(_Temporary)" />
\r
2926 <_Temporary Remove="@(_Temporary)" />
\r
2928 <!-- EMITTED FOR COMPATIBILITY REASONS ONLY. CONSUME EMBEDDEDRESOURCE INSTEAD -->
\r
2929 <ManifestResourceWithNoCulture Include="@(EmbeddedResource->'%(OutputResource)')" Condition="'%(EmbeddedResource.WithCulture)'=='false' and '%(EmbeddedResource.Type)' == 'Resx'">
\r
2930 <EmittedForCompatibilityOnly>true</EmittedForCompatibilityOnly>
\r
2931 </ManifestResourceWithNoCulture>
\r
2932 <ManifestNonResxWithNoCultureOnDisk Include="@(EmbeddedResource)" Condition="'%(EmbeddedResource.WithCulture)'=='false' and '%(EmbeddedResource.Type)' == 'Non-Resx'">
\r
2933 <EmittedForCompatibilityOnly>true</EmittedForCompatibilityOnly>
\r
2934 </ManifestNonResxWithNoCultureOnDisk>
\r
2936 <!-- EMITTED FOR COMPATIBILITY REASONS ONLY. CONSUME EMBEDDEDRESOURCE INSTEAD -->
\r
2937 <ManifestResourceWithCulture Include="@(EmbeddedResource->'%(OutputResource)')" Condition="'%(EmbeddedResource.WithCulture)'=='true' and '%(EmbeddedResource.Type)' == 'Resx'">
\r
2938 <EmittedForCompatibilityOnly>true</EmittedForCompatibilityOnly>
\r
2939 </ManifestResourceWithCulture>
\r
2940 <ManifestNonResxWithCultureOnDisk Include="@(EmbeddedResource)" Condition="'%(EmbeddedResource.WithCulture)'=='true' and '%(EmbeddedResource.Type)' == 'Non-Resx'">
\r
2941 <EmittedForCompatibilityOnly>true</EmittedForCompatibilityOnly>
\r
2942 </ManifestNonResxWithCultureOnDisk>
\r
2949 ============================================================
\r
2952 Compile .licx files (containing information about licensed controls used by the application) into .licenses files.
\r
2955 @(_LicxFile) - The list of .licx files in the project (usually there will be just one)
\r
2958 @(CompiledLicenseFile) - The list of compiled .licenses files (there will be just one)
\r
2959 ============================================================
\r
2962 <CompileLicxFilesDependsOn></CompileLicxFilesDependsOn>
\r
2965 Name="CompileLicxFiles"
\r
2966 Condition="'@(_LicxFile)'!=''"
\r
2967 DependsOnTargets="$(CompileLicxFilesDependsOn)"
\r
2968 Inputs="$(MSBuildAllProjects);@(_LicxFile);@(ReferencePath);@(ReferenceDependencyPaths)"
\r
2969 Outputs="$(IntermediateOutputPath)$(TargetFileName).licenses">
\r
2972 <LCMSBuildArchitecture Condition="'$(LCMSBuildArchitecture)' == ''">$(PlatformTargetAsMSBuildArchitecture)</LCMSBuildArchitecture>
\r
2976 Sources="@(_LicxFile)"
\r
2977 LicenseTarget="$(TargetFileName)"
\r
2978 OutputDirectory="$(IntermediateOutputPath)"
\r
2979 OutputLicense="$(IntermediateOutputPath)$(TargetFileName).licenses"
\r
2980 ReferencedAssemblies="@(ReferencePath);@(ReferenceDependencyPaths)"
\r
2981 NoLogo="$(NoLogo)"
\r
2982 ToolPath="$(LCToolPath)"
\r
2983 SdkToolsPath="$(TargetFrameworkSDKToolsDirectory)"
\r
2984 EnvironmentVariables="$(LCEnvironment)"
\r
2985 MSBuildArchitecture="$(LCMSBuildArchitecture)"
\r
2986 TargetFrameworkVersion="$(TargetFrameworkVersion)"
\r
2989 <Output TaskParameter="OutputLicense" ItemName="CompiledLicenseFile"/>
\r
2990 <Output TaskParameter="OutputLicense" ItemName="FileWrites"/>
\r
3000 ***********************************************************************************************
\r
3001 ***********************************************************************************************
\r
3002 ResolveKeySource Section
\r
3003 ***********************************************************************************************
\r
3004 ***********************************************************************************************
\r
3008 ============================================================
\r
3011 Resolve the strong name key used to sign the assembly as well as the certificate used to
\r
3012 sign the ClickOnce manifests.
\r
3015 $(AssemblyOriginatorKeyFile) - The file used to sign the assembly (.snk or .pfx)
\r
3016 $(ManifestCertificateThumbprint) - The thumbprint used to locate the certificate in the
\r
3017 user's certificate store.
\r
3018 $(ManifestKeyFile) - The key file that contains the certificate in case the
\r
3019 certificate is not in the user's store.
\r
3022 $(ResolvedAssemblyKeyFile) - Key used to sign the assembly
\r
3023 $(_DeploymentResolvedManifestCertificateThumbprint) - Certificate used to sign the manifests
\r
3024 ============================================================
\r
3027 Name="ResolveKeySource"
\r
3028 Condition="$(SignManifests) == 'true' or $(SignAssembly) == 'true'">
\r
3031 KeyFile="$(AssemblyOriginatorKeyFile)"
\r
3032 CertificateThumbprint="$(ManifestCertificateThumbprint)"
\r
3033 CertificateFile="$(ManifestKeyFile)"
\r
3034 SuppressAutoClosePasswordPrompt="$(BuildingInsideVisualStudio)"
\r
3035 ShowImportDialogDespitePreviousFailures="$(BuildingProject)"
\r
3036 ContinueOnError="!$(BuildingProject)"
\r
3039 <Output TaskParameter="ResolvedKeyFile" PropertyName="KeyOriginatorFile" Condition=" '$(SignAssembly)' == 'true' "/>
\r
3040 <Output TaskParameter="ResolvedKeyContainer" PropertyName="KeyContainerName" Condition=" '$(SignAssembly)' == 'true' "/>
\r
3041 <Output TaskParameter="ResolvedThumbprint" PropertyName="_DeploymentResolvedManifestCertificateThumbprint" Condition=" '$(SignManifests)' == 'true' "/>
\r
3043 </ResolveKeySource>
\r
3048 ***********************************************************************************************
\r
3049 ***********************************************************************************************
\r
3051 ***********************************************************************************************
\r
3052 ***********************************************************************************************
\r
3056 ============================================================
\r
3058 ============================================================
\r
3061 <CompileDependsOn>
\r
3062 ResolveReferences;
\r
3064 SetWin32ManifestProperties;
\r
3065 _GenerateCompileInputs;
\r
3067 _TimeStampBeforeCompile;
\r
3068 _GenerateCompileDependencyCache;
\r
3070 _TimeStampAfterCompile;
\r
3072 </CompileDependsOn>
\r
3076 DependsOnTargets="$(CompileDependsOn)"/>
\r
3079 ============================================================
\r
3080 _GenerateCompileInputs
\r
3082 Create the _CoreCompileResourceInputs list of inputs to the CoreCompile target.
\r
3083 ============================================================
\r
3085 <Target Name="_GenerateCompileInputs">
\r
3087 <Warning Condition="'@(ManifestResourceWithNoCulture)'!='' and '%(ManifestResourceWithNoCulture.EmittedForCompatibilityOnly)'==''" Code="MSB9004" Text="ManifestResourceWithNoCulture item type is deprecated. Emit EmbeddedResource items instead, with metadata WithCulture='false', Type='Resx', and optional LogicalName."/>
\r
3088 <Warning Condition="'@(ManifestNonResxWithNoCultureOnDisk)'!='' and '%(ManifestNonResxWithNoCultureOnDisk.EmittedForCompatibilityOnly)'==''" Code="MSB9005" Text="ManifestNonResxWithNoCultureOnDisk item type is deprecated. Emit EmbeddedResource items instead, with metadata WithCulture='false', Type='Non-Resx', and optional LogicalName."/>
\r
3092 <!-- _CoreCompileResourceInputs is the list of TLDA inputs that should trigger CoreCompile, and are listed as inputs to that target -->
\r
3093 <_CoreCompileResourceInputs Include="@(EmbeddedResource->'%(OutputResource)')" Condition="'%(EmbeddedResource.WithCulture)' == 'false' and '%(EmbeddedResource.Type)' == 'Resx'" />
\r
3094 <_CoreCompileResourceInputs Include="@(EmbeddedResource)" Condition="'%(EmbeddedResource.WithCulture)' == 'false' and '%(EmbeddedResource.Type)' == 'Non-Resx' " />
\r
3096 <!-- CONSUMED FOR COMPATIBILITY REASONS ONLY. EMIT EMBEDDEDRESOURCE INSTEAD -->
\r
3097 <_CoreCompileResourceInputs Include="@(ManifestResourceWithNoCulture)" Condition="'%(ManifestResourceWithNoCulture.EmittedForCompatibilityOnly)'==''">
\r
3099 <WithCulture>false</WithCulture>
\r
3100 </_CoreCompileResourceInputs>
\r
3101 <_CoreCompileResourceInputs Include="@(ManifestNonResxWithNoCultureOnDisk)" Condition="'%(ManifestNonResxWithNoCultureOnDisk.EmittedForCompatibilityOnly)'==''">
\r
3102 <Type>Non-Resx</Type>
\r
3103 <WithCulture>false</WithCulture>
\r
3104 </_CoreCompileResourceInputs>
\r
3111 ============================================================
\r
3112 GenerateTargetFrameworkMonikerAttribute
\r
3114 Emit the target framework moniker attribute as a code fragment into a temporary source file for the compiler.
\r
3115 ============================================================
\r
3117 <PropertyGroup Condition="'$(TargetFrameworkMoniker)' != ''">
\r
3118 <!-- Do not clean if we are going to default the path to the temp directory -->
\r
3119 <TargetFrameworkMonikerAssemblyAttributesFileClean Condition="'$(TargetFrameworkMonikerAssemblyAttributesFileClean)' == '' and '$(TargetFrameworkMonikerAssemblyAttributesPath)' != ''">true</TargetFrameworkMonikerAssemblyAttributesFileClean>
\r
3120 <TargetFrameworkMonikerAssemblyAttributesPath Condition="'$(TargetFrameworkMonikerAssemblyAttributesPath)' == ''">$([System.IO.Path]::Combine('$([System.IO.Path]::GetTempPath())','$(TargetFrameworkMoniker).AssemblyAttributes$(DefaultLanguageSourceExtension)'))</TargetFrameworkMonikerAssemblyAttributesPath>
\r
3124 <GenerateTargetFrameworkAttribute Condition="'$(GenerateTargetFrameworkAttribute)' == '' and '$(TargetFrameworkMoniker)' != '' and '$(TargetingClr2Framework)' != 'true'">true</GenerateTargetFrameworkAttribute>
\r
3127 <ItemGroup Condition="'$(TargetFrameworkMonikerAssemblyAttributesFileClean)' == 'true'">
\r
3128 <Clean Include="$(TargetFrameworkMonikerAssemblyAttributesPath)"/>
\r
3131 <Target Name="GenerateTargetFrameworkMonikerAttribute"
\r
3132 BeforeTargets="BeforeCompile"
\r
3133 DependsOnTargets="PrepareForBuild;GetReferenceAssemblyPaths"
\r
3134 Inputs="$(MSBuildToolsPath)\Microsoft.Common.targets"
\r
3135 Outputs="$(TargetFrameworkMonikerAssemblyAttributesPath)"
\r
3136 Condition="'$(GenerateTargetFrameworkAttribute)' == 'true'">
\r
3138 <!-- This is a file shared between projects so we have to take care to handle simultaneous writes (by ContinueOnError)
\r
3139 and a race between clean from one project and build from another (by not adding to FilesWritten so it doesn't clean) -->
\r
3141 File="$(TargetFrameworkMonikerAssemblyAttributesPath)"
\r
3142 Lines="$(TargetFrameworkMonikerAssemblyAttributeText)"
\r
3144 ContinueOnError="true"
\r
3145 Condition="'@(Compile)' != '' and '$(TargetFrameworkMonikerAssemblyAttributeText)' != ''"
\r
3148 <ItemGroup Condition="'@(Compile)' != '' and '$(TargetFrameworkMonikerAssemblyAttributeText)' != ''">
\r
3149 <Compile Include="$(TargetFrameworkMonikerAssemblyAttributesPath)"/>
\r
3150 <!-- Do not put in FileWrites: this is a file shared between projects in %temp%, and cleaning it would create a race between projects during rebuild -->
\r
3156 ============================================================
\r
3157 GenerateAdditionalSources
\r
3159 Emit any specified code fragments into a temporary source file for the compiler.
\r
3160 ============================================================
\r
3163 <PropertyGroup Condition="'$(AssemblyAttributesPath)' != ''">
\r
3164 <GenerateAdditionalSources Condition="'$(GenerateAdditionalSources)' == ''">true</GenerateAdditionalSources>
\r
3167 <ItemGroup Condition="'$(AssemblyAttributesPath)' != ''">
\r
3168 <Clean Include="$(AssemblyAttributesPath)" Condition="'$(AssemblyAttributesFileClean)' != 'false'" />
\r
3171 <Target Name="GenerateAdditionalSources"
\r
3172 BeforeTargets="BeforeCompile"
\r
3173 DependsOnTargets="PrepareForBuild;GetReferenceAssemblyPaths"
\r
3174 Inputs="$(MSBuildAllProjects)"
\r
3175 Outputs="$(AssemblyAttributesPath)"
\r
3176 Condition="'@(AssemblyAttributes)' != '' and '$(GenerateAdditionalSources)' == 'true'">
\r
3177 <WriteCodeFragment
\r
3178 AssemblyAttributes="@(AssemblyAttributes)"
\r
3179 OutputFile="$(AssemblyAttributesPath)"
\r
3180 Language="$(Language)">
\r
3182 <Output TaskParameter="OutputFile" ItemName="Compile"/>
\r
3183 <Output TaskParameter="OutputFile" ItemName="FileWrites"/>
\r
3184 </WriteCodeFragment>
\r
3188 ============================================================
\r
3191 Redefine this target in your project in order to run tasks just before Compile.
\r
3192 ============================================================
\r
3194 <Target Name="BeforeCompile"/>
\r
3197 ============================================================
\r
3200 Redefine this target in your project in order to run tasks just after Compile.
\r
3201 ============================================================
\r
3203 <Target Name="AfterCompile"/>
\r
3206 ============================================================
\r
3207 _TimeStampBeforeCompile
\r
3209 If post-build events are set to fire "OnOutputUpdated", then take before
\r
3210 and after timestamps so that we can compare them.
\r
3211 ============================================================
\r
3214 Name="_TimeStampBeforeCompile"
\r
3215 Condition="'$(RunPostBuildEvent)'=='OnOutputUpdated' or ('$(RegisterForComInterop)'=='true' and '$(OutputType)'=='library')">
\r
3218 <_AssemblyTimestampBeforeCompile>%(IntermediateAssembly.ModifiedTime)</_AssemblyTimestampBeforeCompile>
\r
3224 ============================================================
\r
3225 _GenerateCompileDependencyCache
\r
3227 Generate a file used to track compiler dependencies between incremental build
\r
3228 executions. This handles cases where items are added or removed from a glob (e.g.
\r
3229 <Compile Include="**\*.cs" />) and can't otherwise be detected with timestamp
\r
3230 comparisons. The file contains a hash of compiler inputs that are known to
\r
3231 contribute to incremental build inconsistencies.
\r
3232 ============================================================
\r
3234 <Target Name="_GenerateCompileDependencyCache" DependsOnTargets="ResolveAssemblyReferences">
\r
3236 <CustomAdditionalCompileInputs Include="$(IntermediateOutputPath)CoreCompileInputs.cache" />
\r
3237 <CoreCompileCache Include="@(Compile->'%(FullPath)')" />
\r
3238 <CoreCompileCache Include="@(ReferencePath->'%(FullPath)')" />
\r
3241 <Hash ItemsToHash="@(CoreCompileCache)">
\r
3242 <Output TaskParameter="HashResult" PropertyName="CoreCompileDependencyHash" />
\r
3245 <WriteLinesToFile Lines="$(CoreCompileDependencyHash)" File="$(IntermediateOutputPath)CoreCompileInputs.cache" Overwrite="True" WriteOnlyWhenDifferent="True" />
\r
3248 <FileWrites Include="$(IntermediateOutputPath)CoreCompileInputs.cache" />
\r
3253 ============================================================
\r
3254 _TimeStampAfterCompile
\r
3256 If post-build events are set to fire "OnOutputUpdated", then take before
\r
3257 and after timestamps so that we can compare them.
\r
3258 ============================================================
\r
3261 Name="_TimeStampAfterCompile"
\r
3262 Condition="'$(RunPostBuildEvent)'=='OnOutputUpdated' or ('$(RegisterForComInterop)'=='true' and '$(OutputType)'=='library')">
\r
3265 <_AssemblyTimestampAfterCompile>%(IntermediateAssembly.ModifiedTime)</_AssemblyTimestampAfterCompile>
\r
3271 ================================================================
\r
3272 _ComputeNonExistentFileProperty
\r
3274 There are certain situations in which we want to always run the CoreCompile target (and
\r
3275 thus the Csc task), even if the timestamps of the outputs appear to be up-to-date on disk.
\r
3276 If we're inside the IDE during design-time, then the Csc/Vbc/Vjc task is simply being used to
\r
3277 initialize the host compiler, so we always want to run it. Also, if we're inside the IDE, and
\r
3278 the host compiler is responsible for doing the compilation during an actual build, we want to let
\r
3279 the host compiler determine whether the output is up-to-date, because there may be source files
\r
3280 in the IDE's in-memory buffers that we don't know about.
\r
3282 So, we always run the CoreCompile target if we're in the IDE, and either we're in design-time or
\r
3283 we're delegating to the host compiler for the actual build.
\r
3285 We compare against BuildOutOfProcess != true because we cannot assume that the build process will
\r
3286 have set BuildOutOfProcess to true or false. Therefore the default behavior should be to do the
\r
3287 legacy behavior seen before BuildingOutOfProcess was introduced if the property is not set.
\r
3288 ================================================================
\r
3291 Name="_ComputeNonExistentFileProperty"
\r
3292 Condition="('$(BuildingInsideVisualStudio)' == 'true') and ('$(BuildingOutOfProcess)' != 'true') and (('$(BuildingProject)' == 'false') or ('$(UseHostCompilerIfAvailable)' == 'true'))">
\r
3295 <NonExistentFile>__NonExistentSubDir__\__NonExistentFile__</NonExistentFile>
\r
3304 ***********************************************************************************************
\r
3305 ***********************************************************************************************
\r
3306 GenerateSerializationAssemblies Section
\r
3307 ***********************************************************************************************
\r
3308 ***********************************************************************************************
\r
3312 <_SGenDllName>$(TargetName).XmlSerializers.dll</_SGenDllName>
\r
3313 <_SGenDllCreated>false</_SGenDllCreated>
\r
3314 <_SGenGenerateSerializationAssembliesConfig>$(GenerateSerializationAssemblies)</_SGenGenerateSerializationAssembliesConfig>
\r
3315 <_SGenGenerateSerializationAssembliesConfig Condition="'$(GenerateSerializationAssemblies)' == ''">Auto</_SGenGenerateSerializationAssembliesConfig>
\r
3316 <_SGenGenerateSerializationAssembliesConfig Condition="'$(ConfigurationName)'=='Debug' and '$(_SGenGenerateSerializationAssembliesConfig)' == 'Auto'">Off</_SGenGenerateSerializationAssembliesConfig>
\r
3317 <SGenUseProxyTypes Condition="'$(SGenUseProxyTypes)' == ''">true</SGenUseProxyTypes>
\r
3318 <SGenUseKeep Condition="'$(SGenUseKeep)'==''">false</SGenUseKeep>
\r
3319 <SGenShouldGenerateSerializer Condition="'$(SGenShouldGenerateSerializer)' == ''">true</SGenShouldGenerateSerializer>
\r
3323 ============================================================
\r
3324 GenerateSerializationAssemblies
\r
3326 Run GenerateSerializationAssemblies on the assembly produced by this build.
\r
3329 @(BuildAssemblyName) - The assembly generated by this build.
\r
3330 @(BuildAssemblyPath) - The path where the assembly resides.
\r
3331 @(ReferencePath) - The list of references used by this assembly.
\r
3334 @(SerializationAssembly) - The path to the serialization assembly. Maybe we'll just append to an existing list.
\r
3335 ============================================================
\r
3338 Name="GenerateSerializationAssemblies"
\r
3339 Condition="'$(_SGenGenerateSerializationAssembliesConfig)' == 'On' or ('@(WebReferenceUrl)'!='' and '$(_SGenGenerateSerializationAssembliesConfig)' == 'Auto')"
\r
3340 DependsOnTargets="AssignTargetPaths;Compile;ResolveKeySource"
\r
3341 Inputs="$(MSBuildAllProjects);@(IntermediateAssembly)"
\r
3342 Outputs="$(IntermediateOutputPath)$(_SGenDllName)">
\r
3345 <SGenMSBuildArchitecture Condition="'$(SGenMSBuildArchitecture)' == ''">$(PlatformTargetAsMSBuildArchitecture)</SGenMSBuildArchitecture>
\r
3349 BuildAssemblyName="$(TargetFileName)"
\r
3350 BuildAssemblyPath="$(IntermediateOutputPath)"
\r
3351 References="@(ReferencePath)"
\r
3352 ShouldGenerateSerializer="$(SGenShouldGenerateSerializer)"
\r
3353 UseProxyTypes="$(SGenUseProxyTypes)"
\r
3354 UseKeep="$(SGenUseKeep)"
\r
3355 KeyContainer="$(KeyContainerName)"
\r
3356 KeyFile="$(KeyOriginatorFile)"
\r
3357 DelaySign="$(DelaySign)"
\r
3358 ToolPath="$(SGenToolPath)"
\r
3359 SdkToolsPath="$(TargetFrameworkSDKToolsDirectory)"
\r
3360 EnvironmentVariables="$(SGenEnvironment)"
\r
3361 MSBuildArchitecture="$(SGenMSBuildArchitecture)"
\r
3362 SerializationAssembly="$(IntermediateOutputPath)$(_SGenDllName)"
\r
3363 Platform="$(SGenPlatformTarget)"
\r
3364 Types="$(SGenSerializationTypes)">
\r
3366 <Output TaskParameter="SerializationAssembly" ItemName="SerializationAssembly"/>
\r
3373 ***********************************************************************************************
\r
3374 ***********************************************************************************************
\r
3375 CreateSatelliteAssemblies Section
\r
3376 ***********************************************************************************************
\r
3377 ***********************************************************************************************
\r
3381 ============================================================
\r
3382 CreateSatelliteAssemblies
\r
3384 Create one satellite assembly for every unique culture in the resources.
\r
3385 ============================================================
\r
3388 <CreateSatelliteAssembliesDependsOn>
\r
3389 _GenerateSatelliteAssemblyInputs;
\r
3390 ComputeIntermediateSatelliteAssemblies;
\r
3391 GenerateSatelliteAssemblies
\r
3392 </CreateSatelliteAssembliesDependsOn>
\r
3395 Name="CreateSatelliteAssemblies"
\r
3396 DependsOnTargets="$(CreateSatelliteAssembliesDependsOn)" />
\r
3399 ============================================================
\r
3400 _GenerateSatelliteAssemblyInputs
\r
3402 Create the _SatelliteAssemblyResourceInputs list of inputs to the CreateSatelliteAssemblies target.
\r
3403 ============================================================
\r
3405 <Target Name="_GenerateSatelliteAssemblyInputs">
\r
3407 <Warning Condition="'@(ManifestResourceWithCulture)'!='' and '%(ManifestResourceWithCulture.EmittedForCompatibilityOnly)'==''" Code="MSB9006" Text="ManifestResourceWithCulture item type is deprecated. Emit EmbeddedResource items instead, with metadata WithCulture='true', Type='Resx', and optional LogicalName."/>
\r
3408 <Warning Condition="'@(ManifestNonResxWithCultureOnDisk)'!='' and '%(ManifestNonResxWithCultureOnDisk.EmittedForCompatibilityOnly)'==''" Code="MSB9007" Text="ManifestNonResxWithCultureOnDisk item type is deprecated. Emit EmbeddedResource items instead, with metadata WithCulture='true', Type='Non-Resx', and optional LogicalName."/>
\r
3411 <!-- _SatelliteAssemblyResourceInputs is the list of TLDA inputs that should trigger CreateSatelliteAssemblies, so listed as inputs to that target -->
\r
3412 <_SatelliteAssemblyResourceInputs Include="@(EmbeddedResource->'%(OutputResource)')" Condition="'%(EmbeddedResource.WithCulture)' == 'true' and '%(EmbeddedResource.Type)' == 'Resx'" />
\r
3413 <_SatelliteAssemblyResourceInputs Include="@(EmbeddedResource)" Condition="'%(EmbeddedResource.WithCulture)' == 'true' and '%(EmbeddedResource.Type)' == 'Non-Resx'" />
\r
3415 <!-- CONSUMED FOR COMPATIBILITY REASONS ONLY. EMIT EMBEDDEDRESOURCE INSTEAD -->
\r
3416 <_SatelliteAssemblyResourceInputs Include="@(ManifestResourceWithCulture)" Condition="'%(ManifestResourceWithCulture.EmittedForCompatibilityOnly)'==''">
\r
3418 <WithCulture>true</WithCulture>
\r
3419 </_SatelliteAssemblyResourceInputs>
\r
3420 <_SatelliteAssemblyResourceInputs Include="@(ManifestNonResxWithCultureOnDisk)" Condition="'%(ManifestNonResxWithCultureOnDisk.EmittedForCompatibilityOnly)'==''">
\r
3421 <Type>Non-Resx</Type>
\r
3422 <WithCulture>true</WithCulture>
\r
3423 </_SatelliteAssemblyResourceInputs>
\r
3429 ============================================================
\r
3430 GenerateSatelliteAssemblies
\r
3432 Actually run al.exe to create the satellite assemblies.
\r
3433 ============================================================
\r
3435 <Target Name="GenerateSatelliteAssemblies"
\r
3436 Inputs="$(MSBuildAllProjects);@(_SatelliteAssemblyResourceInputs);$(IntermediateOutputPath)$(TargetName)$(TargetExt)"
\r
3437 Outputs="$(IntermediateOutputPath)%(Culture)\$(TargetName).resources.dll"
\r
3438 Condition="'@(_SatelliteAssemblyResourceInputs)' != '' and '$(MSBuildRuntimeType)' != 'Core'">
\r
3441 Directories="@(EmbeddedResource->'$(IntermediateOutputPath)%(Culture)')" />
\r
3443 <AL AlgorithmId="$(Satellite_AlgorithmId)"
\r
3444 BaseAddress="$(Satellite_BaseAddress)"
\r
3445 CompanyName="$(Satellite_CompanyName)"
\r
3446 Configuration="$(Satellite_Configuration)"
\r
3447 Copyright="$(Satellite_Copyright)"
\r
3448 Culture="%(Culture)"
\r
3449 DelaySign="$(DelaySign)"
\r
3450 Description="$(Satellite_Description)"
\r
3451 EmbedResources="@(_SatelliteAssemblyResourceInputs)"
\r
3452 EnvironmentVariables="$(AlEnvironment)"
\r
3453 EvidenceFile="$(Satellite_EvidenceFile)"
\r
3454 FileVersion="$(Satellite_FileVersion)"
\r
3455 Flags="$(Satellite_Flags)"
\r
3456 GenerateFullPaths="$(Satellite_GenerateFullPaths)"
\r
3457 KeyContainer="$(KeyContainerName)"
\r
3458 KeyFile="$(KeyOriginatorFile)"
\r
3459 LinkResources="@(Satellite_LinkResource)"
\r
3460 MainEntryPoint="$(Satellite_MainEntryPoint)"
\r
3461 OutputAssembly="$(IntermediateOutputPath)%(Culture)\$(TargetName).resources.dll"
\r
3462 Platform="$(PlatformTarget)"
\r
3463 ProductName="$(Satellite_ProductName)"
\r
3464 ProductVersion="$(Satellite_ProductVersion)"
\r
3465 ResponseFiles="@(AlResponseFile)"
\r
3466 SourceModules="@(Satellite_SourceModule)"
\r
3467 TargetType="$(Satellite_TargetType)"
\r
3468 TemplateFile="$(IntermediateOutputPath)$(TargetName)$(TargetExt)"
\r
3469 Title="$(Satellite_Title)"
\r
3470 ToolPath="$(AlToolPath)"
\r
3471 ToolExe ="$(AlToolExe)"
\r
3472 SdkToolsPath="$(TargetFrameworkSDKToolsDirectory)"
\r
3473 Trademark="$(Satellite_Trademark)"
\r
3474 Version="$(Satellite_Version)"
\r
3475 Win32Icon="$(Satellite_Win32Icon)"
\r
3476 Win32Resource="$(Satellite_Win32Resource)">
\r
3478 <Output TaskParameter="OutputAssembly" ItemName="FileWrites"/>
\r
3484 ============================================================
\r
3485 ComputeIntermediateSatelliteAssemblies
\r
3487 Compute the paths to the intermediate satellite assemblies,
\r
3488 with culture attributes so we can copy them to the right place.
\r
3489 ============================================================
\r
3492 <ComputeIntermediateSatelliteAssembliesDependsOn>
\r
3493 CreateManifestResourceNames
\r
3494 </ComputeIntermediateSatelliteAssembliesDependsOn>
\r
3497 Name="ComputeIntermediateSatelliteAssemblies"
\r
3498 Condition="@(EmbeddedResource->'%(WithCulture)') != ''"
\r
3499 DependsOnTargets="$(ComputeIntermediateSatelliteAssembliesDependsOn)">
\r
3502 <IntermediateSatelliteAssembliesWithTargetPath Include="$(IntermediateOutputPath)%(EmbeddedResource.Culture)\$(TargetName).resources.dll"
\r
3503 Condition="'%(EmbeddedResource.Culture)' != ''">
\r
3504 <Culture>%(EmbeddedResource.Culture)</Culture>
\r
3505 <TargetPath>%(EmbeddedResource.Culture)\$(TargetName).resources.dll</TargetPath>
\r
3506 </IntermediateSatelliteAssembliesWithTargetPath>
\r
3511 ***********************************************************************************************
\r
3512 ***********************************************************************************************
\r
3513 SetWin32ManifestProperties Section
\r
3514 ***********************************************************************************************
\r
3515 ***********************************************************************************************
\r
3519 <EmbeddedWin32Manifest>$(Win32Manifest)</EmbeddedWin32Manifest>
\r
3523 ============================================================
\r
3524 SetWin32ManifestProperties
\r
3526 Set Win32Manifest and EmbeddedManifest properties to be used later in the build.
\r
3527 ============================================================
\r
3530 Name="SetWin32ManifestProperties"
\r
3531 Condition="'$(Win32Manifest)'==''"
\r
3532 DependsOnTargets="ResolveComReferences;ResolveNativeReferences;_SetExternalWin32ManifestProperties;_SetEmbeddedWin32ManifestProperties" />
\r
3535 Name="_SetExternalWin32ManifestProperties"
\r
3536 Condition="'$(GenerateClickOnceManifests)'=='true' or '@(NativeReference)'!='' or '@(ResolvedIsolatedComModules)'!=''" >
\r
3539 <!-- set _DeploymentBaseManifest property to the value of $(ApplicationManifest) if the property is set,
\r
3540 but use _DeploymentBaseManifestWithTargetPath item-group if the property is not set to support backwards
\r
3541 compat with earlier MSBuild versions when manifest files were determined by the item-group. If the newer
\r
3542 property is set though, prefer that one be used to specify the manifest. -->
\r
3543 <_DeploymentBaseManifest>$(ApplicationManifest)</_DeploymentBaseManifest>
\r
3544 <_DeploymentBaseManifest Condition="'$(_DeploymentBaseManifest)'==''">@(_DeploymentBaseManifestWithTargetPath)</_DeploymentBaseManifest>
\r
3546 <!-- when using external manifests, always set the NoWin32Manifest property to
\r
3547 true if there is no value set in the incoming project file so the
\r
3548 compilers that support manifest embedding know not to add
\r
3549 a manifest to their built assemblies -->
\r
3550 <NoWin32Manifest Condition="'$(NoWin32Manifest)'==''">true</NoWin32Manifest>
\r
3556 Name="_SetEmbeddedWin32ManifestProperties"
\r
3557 Condition="'$(GenerateClickOnceManifests)'!='true' and '@(NativeReference)'=='' and '@(ResolvedIsolatedComModules)'==''" >
\r
3560 <EmbeddedWin32Manifest>$(ApplicationManifest)</EmbeddedWin32Manifest>
\r
3561 <Win32Manifest>$(ApplicationManifest)</Win32Manifest>
\r
3564 <GetFrameworkPath Condition="'$(ApplicationManifest)'=='' and '$(NoWin32Manifest)'!='true'">
\r
3565 <Output TaskParameter="FrameworkVersion40Path" PropertyName="_FrameworkVersion40Path" />
\r
3566 </GetFrameworkPath>
\r
3569 <EmbeddedWin32Manifest Condition="'$(ApplicationManifest)'=='' and '$(NoWin32Manifest)'!='true' and Exists('$(_FrameworkVersion40Path)\default.win32manifest')">$(_FrameworkVersion40Path)\default.win32manifest</EmbeddedWin32Manifest>
\r
3578 ***********************************************************************************************
\r
3579 ***********************************************************************************************
\r
3580 GenerateManifests Section
\r
3581 ***********************************************************************************************
\r
3582 ***********************************************************************************************
\r
3586 ============================================================
\r
3589 Generates ClickOnce application and deployment manifests or a native manifest.
\r
3590 ============================================================
\r
3593 <GenerateManifestsDependsOn>
\r
3594 SetWin32ManifestProperties;
\r
3595 GenerateApplicationManifest;
\r
3596 GenerateDeploymentManifest
\r
3597 </GenerateManifestsDependsOn>
\r
3601 ============================================================
\r
3602 _GenerateResolvedDeploymentManifestEntryPoint
\r
3604 Use the ResolveManifestFiles to generate the GenerateResolvedDeploymentManifestEntryPoint
\r
3606 ============================================================
\r
3609 Name="_GenerateResolvedDeploymentManifestEntryPoint">
\r
3611 <_DeploymentPublishFileOfTypeManifestEntryPoint Include="@(PublishFile)" Condition="'%(FileType)'=='ManifestEntryPoint'"/>
\r
3614 <ResolveManifestFiles
\r
3615 TargetFrameworkVersion="$(TargetFrameworkVersion)"
\r
3616 SigningManifests="$(SignManifests)"
\r
3617 DeploymentManifestEntryPoint="@(ApplicationManifest)"
\r
3618 PublishFiles="@(_DeploymentPublishFileOfTypeManifestEntryPoint)">
\r
3620 <Output TaskParameter="OutputDeploymentManifestEntryPoint" ItemName="_DeploymentResolvedDeploymentManifestEntryPoint"/>
\r
3622 </ResolveManifestFiles>
\r
3626 Name="GenerateManifests"
\r
3627 Condition="'$(GenerateClickOnceManifests)'=='true' or '@(NativeReference)'!='' or '@(ResolvedIsolatedComModules)'!='' or '$(GenerateAppxManifest)' == 'true'"
\r
3628 DependsOnTargets="$(GenerateManifestsDependsOn)"/>
\r
3631 ============================================================
\r
3632 GenerateApplicationManifest
\r
3634 Generates a ClickOnce or native application manifest.
\r
3635 An application manifest specifies declarative application identity, dependency and security information.
\r
3638 $(_DeploymentBaseManifest) - The base app.manifest from project.
\r
3639 @(ResolvedIsolatedComModules) - The list of COM references to be isolated as reg-free COM dependencies for native assembly loader.
\r
3640 @(_DeploymentManifestFiles) - The list of loose files (content, pdb, xml, etc.) for ClickOnce.
\r
3641 @(_DeploymentManifestDependencies) - The list of application dependencies (typically this is the set of assembly dependencies in bin\) for ClickOnce.
\r
3642 @(AppConfigWithTargetPath) - App config file, if present.
\r
3643 $(_DeploymentManifestType) - Type of manifest to be generated, either "Native" or "ClickOnce".
\r
3646 @(ApplicationManifest) - Generated native or ClickOnce application manifest, i.e. WindowsApplication1.exe.manifest
\r
3647 ============================================================
\r
3650 Name="GenerateApplicationManifest"
\r
3651 DependsOnTargets="
\r
3652 _DeploymentComputeNativeManifestInfo;
\r
3653 _DeploymentComputeClickOnceManifestInfo;
\r
3654 ResolveComReferences;
\r
3655 ResolveNativeReferences;
\r
3656 _GenerateResolvedDeploymentManifestEntryPoint"
\r
3658 $(MSBuildAllProjects);
\r
3659 @(AppConfigWithTargetPath);
\r
3660 $(_DeploymentBaseManifest);
\r
3661 @(ResolvedIsolatedComModules);
\r
3662 @(_DeploymentManifestDependencies);
\r
3663 @(_DeploymentResolvedManifestEntryPoint);
\r
3664 @(_DeploymentManifestFiles)"
\r
3665 Outputs="@(ApplicationManifest)">
\r
3667 <RequiresFramework35SP1Assembly
\r
3668 ReferencedAssemblies="@(Reference)"
\r
3669 ErrorReportUrl="$(_DeploymentFormattedErrorReportUrl)"
\r
3670 TargetFrameworkVersion="$(TargetFrameworkVersion)"
\r
3671 CreateDesktopShortcut="$(CreateDesktopShortcut)"
\r
3672 SigningManifests="$(SignManifests)"
\r
3673 Assemblies="@(_DeploymentManifestDependencies)"
\r
3674 DeploymentManifestEntryPoint="@(_DeploymentResolvedDeploymentManifestEntryPoint)"
\r
3675 EntryPoint="@(_DeploymentResolvedManifestEntryPoint)"
\r
3676 Files="@(_DeploymentManifestFiles)"
\r
3677 SuiteName="$(SuiteName)" >
\r
3679 <Output TaskParameter="RequiresMinimumFramework35SP1" PropertyName="_DeploymentRequiresMinimumFramework35SP1" />
\r
3680 </RequiresFramework35SP1Assembly>
\r
3682 <GenerateApplicationManifest
\r
3683 AssemblyName="$(_DeploymentApplicationManifestIdentity)"
\r
3684 AssemblyVersion="$(_DeploymentManifestVersion)"
\r
3685 ConfigFile="@(AppConfigWithTargetPath)"
\r
3686 ClrVersion="$(ClrVersion)"
\r
3687 Dependencies="@(_DeploymentManifestDependencies)"
\r
3688 Description="$(Description)"
\r
3689 EntryPoint="@(_DeploymentResolvedManifestEntryPoint)"
\r
3690 ErrorReportUrl="$(_DeploymentFormattedErrorReportUrl)"
\r
3691 FileAssociations="@(FileAssociation)"
\r
3692 Files="@(_DeploymentManifestFiles)"
\r
3693 HostInBrowser="$(HostInBrowser)"
\r
3694 IconFile="@(_DeploymentManifestIconFile)"
\r
3695 InputManifest="$(_DeploymentBaseManifest)"
\r
3696 IsolatedComReferences="@(ResolvedIsolatedComModules)"
\r
3697 ManifestType="$(_DeploymentManifestType)"
\r
3698 MaxTargetPath="$(MaxTargetPath)"
\r
3699 OutputManifest="@(ApplicationManifest)"
\r
3700 OSVersion="$(OSVersion)"
\r
3701 Platform="$(PlatformTarget)"
\r
3702 Product="$(ProductName)"
\r
3703 Publisher="$(PublisherName)"
\r
3704 RequiresMinimumFramework35SP1="$(_DeploymentRequiresMinimumFramework35SP1)"
\r
3705 SuiteName="$(SuiteName)"
\r
3706 SupportUrl="$(_DeploymentFormattedSupportUrl)"
\r
3707 TargetCulture="$(TargetCulture)"
\r
3708 TargetFrameworkSubset="$(TargetFrameworkSubset)"
\r
3709 TargetFrameworkProfile="$(TargetFrameworkProfile)"
\r
3710 TargetFrameworkVersion="$(TargetFrameworkVersion)"
\r
3711 TrustInfoFile="@(_DeploymentIntermediateTrustInfoFile)"
\r
3712 UseApplicationTrust="$(UseApplicationTrust)">
\r
3714 <Output TaskParameter="OutputManifest" ItemName="FileWrites"/>
\r
3716 </GenerateApplicationManifest>
\r
3719 <_DeploymentCopyApplicationManifest>true</_DeploymentCopyApplicationManifest>
\r
3725 ============================================================
\r
3726 _DeploymentComputeNativeManifestInfo
\r
3728 Compute info for native manifest generation
\r
3729 ============================================================
\r
3732 Name="_DeploymentComputeNativeManifestInfo"
\r
3733 Condition="'$(GenerateClickOnceManifests)'!='true'">
\r
3735 <!-- Create list of items for manifest generation -->
\r
3736 <ResolveManifestFiles NativeAssemblies="@(NativeReferenceFile);@(_DeploymentNativePrerequisite)">
\r
3737 <Output TaskParameter="OutputAssemblies" ItemName="_DeploymentManifestDependencies"/>
\r
3738 </ResolveManifestFiles>
\r
3741 <_DeploymentManifestType>Native</_DeploymentManifestType>
\r
3744 <!-- Obtain manifest version from the built assembly -->
\r
3745 <GetAssemblyIdentity AssemblyFiles="@(IntermediateAssembly)">
\r
3746 <Output TaskParameter="Assemblies" ItemName="_IntermediateAssemblyIdentity"/>
\r
3747 </GetAssemblyIdentity>
\r
3750 <_DeploymentManifestVersion>@(_IntermediateAssemblyIdentity->'%(Version)')</_DeploymentManifestVersion>
\r
3756 ============================================================
\r
3757 _DeploymentComputeClickOnceManifestInfo
\r
3759 Compute info for ClickOnce manifest generation
\r
3760 ============================================================
\r
3763 Name="_DeploymentComputeClickOnceManifestInfo"
\r
3764 Condition="'$(GenerateClickOnceManifests)'=='true'"
\r
3765 DependsOnTargets="
\r
3766 CleanPublishFolder;
\r
3767 _DeploymentGenerateTrustInfo">
\r
3769 <!-- Grab just the serialization assemblies for a referenced assembly. There may also be a symbols file in ReferenceRelatedPaths -->
\r
3771 <_SGenDllsRelatedToCurrentDll Include="@(_ReferenceSerializationAssemblyPaths->'%(FullPath)')" Condition="'%(Extension)' == '.dll'"/>
\r
3772 <_SGenDllsRelatedToCurrentDll Include="@(SerializationAssembly->'%(FullPath)')" Condition="'%(Extension)' == '.dll'"/>
\r
3775 <!-- Flag primary dependencies-certain warnings emitted during application manifest generation apply only to them. -->
\r
3777 <_DeploymentReferencePaths Include="@(ReferencePath)">
\r
3778 <IsPrimary>true</IsPrimary>
\r
3779 </_DeploymentReferencePaths>
\r
3782 <!-- Copy the application executable from Obj folder to app.publish folder.
\r
3783 This is being done to avoid Windows Forms designer memory issues that can arise while operating directly on files located in Obj directory. -->
\r
3785 SourceFiles="@(_DeploymentManifestEntryPoint)"
\r
3786 DestinationFolder="$(PublishDir)">
\r
3788 <Output TaskParameter="DestinationFiles" ItemName="_DeploymentClickOnceApplicationExecutable" />
\r
3791 <!-- Sign the application executable located in app.publish folder. Signing this file is done to comply with SmartScreen. -->
\r
3793 CertificateThumbprint="$(_DeploymentResolvedManifestCertificateThumbprint)"
\r
3794 TimestampUrl="$(ManifestTimestampUrl)"
\r
3795 SigningTarget="@(_DeploymentClickOnceApplicationExecutable)"
\r
3796 Condition="'$(_DeploymentResolvedManifestCertificateThumbprint)'!='' and '$(_DeploymentSignClickOnceManifests)'=='true' and '$(TargetExt)' == '.exe'"
\r
3799 <!-- Create list of items for manifest generation -->
\r
3800 <ResolveManifestFiles
\r
3801 TargetFrameworkVersion="$(TargetFrameworkVersion)"
\r
3802 SigningManifests="$(SignManifests)"
\r
3803 EntryPoint="@(_DeploymentClickOnceApplicationExecutable)"
\r
3804 ExtraFiles="@(_DebugSymbolsIntermediatePath);$(IntermediateOutputPath)$(TargetName).xml;@(_ReferenceRelatedPaths)"
\r
3805 Files="@(ContentWithTargetPath);@(_DeploymentManifestIconFile);@(AppConfigWithTargetPath)"
\r
3806 ManagedAssemblies="@(_DeploymentReferencePaths);@(ReferenceDependencyPaths);@(_SGenDllsRelatedToCurrentDll);@(SerializationAssembly)"
\r
3807 NativeAssemblies="@(NativeReferenceFile);@(_DeploymentNativePrerequisite)"
\r
3808 PublishFiles="@(PublishFile)"
\r
3809 SatelliteAssemblies="@(IntermediateSatelliteAssembliesWithTargetPath);@(ReferenceSatellitePaths)"
\r
3810 TargetCulture="$(TargetCulture)">
\r
3812 <Output TaskParameter="OutputAssemblies" ItemName="_DeploymentManifestDependencies"/>
\r
3813 <Output TaskParameter="OutputFiles" ItemName="_DeploymentManifestFiles"/>
\r
3814 <Output TaskParameter="OutputEntryPoint" ItemName="_DeploymentResolvedManifestEntryPoint"/>
\r
3816 </ResolveManifestFiles>
\r
3819 <_DeploymentManifestType>ClickOnce</_DeploymentManifestType>
\r
3822 <!-- Obtain manifest version from ApplicationVersion and ApplicationRevision properties -->
\r
3823 <FormatVersion Version="$(ApplicationVersion)" Revision="$(ApplicationRevision)">
\r
3824 <Output TaskParameter="OutputVersion" PropertyName="_DeploymentManifestVersion"/>
\r
3827 <FormatUrl InputUrl="$(_DeploymentUrl)">
\r
3828 <Output TaskParameter="OutputUrl" PropertyName="_DeploymentFormattedDeploymentUrl"/>
\r
3831 <FormatUrl InputUrl="$(SupportUrl)">
\r
3832 <Output TaskParameter="OutputUrl" PropertyName="_DeploymentFormattedSupportUrl"/>
\r
3835 <FormatUrl InputUrl="$(ErrorReportUrl)">
\r
3836 <Output TaskParameter="OutputUrl" PropertyName="_DeploymentFormattedErrorReportUrl"/>
\r
3842 ============================================================
\r
3843 _DeploymentGenerateTrustInfo
\r
3845 Generates the application permission set for inclusion in the generated ClickOnce application manifest.
\r
3846 ============================================================
\r
3849 Name="_DeploymentGenerateTrustInfo"
\r
3850 Condition="'$(TargetZone)'!=''"
\r
3852 $(MSBuildAllProjects);
\r
3853 $(_DeploymentBaseManifest);
\r
3855 Outputs="@(_DeploymentIntermediateTrustInfoFile)">
\r
3857 <GenerateTrustInfo
\r
3858 BaseManifest="$(_DeploymentBaseManifest)"
\r
3859 ApplicationDependencies="@(ReferencePath);@(ReferenceDependencyPaths)"
\r
3860 ExcludedPermissions="$(ExcludedPermissions)"
\r
3861 TargetFrameworkMoniker="$(TargetFrameworkMoniker)"
\r
3862 TargetZone="$(TargetZone)"
\r
3863 TrustInfoFile="@(_DeploymentIntermediateTrustInfoFile)">
\r
3865 <Output TaskParameter="TrustInfoFile" ItemName="FileWrites"/>
\r
3867 </GenerateTrustInfo>
\r
3872 ============================================================
\r
3873 GenerateDeploymentManifest
\r
3875 Generates a ClickOnce deployment manifest.
\r
3876 An deployment manifest specifies declarative application identity and application update information.
\r
3877 ============================================================
\r
3880 Name="GenerateDeploymentManifest"
\r
3881 DependsOnTargets="GenerateApplicationManifest"
\r
3883 $(MSBuildAllProjects);
\r
3884 @(ApplicationManifest)
\r
3886 Outputs="@(DeployManifest)">
\r
3888 <GenerateDeploymentManifest
\r
3889 AssemblyName="$(_DeploymentDeployManifestIdentity)"
\r
3890 AssemblyVersion="$(_DeploymentManifestVersion)"
\r
3891 CreateDesktopShortcut="$(CreateDesktopShortcut)"
\r
3892 DeploymentUrl="$(_DeploymentFormattedDeploymentUrl)"
\r
3893 Description="$(Description)"
\r
3894 DisallowUrlActivation="$(DisallowUrlActivation)"
\r
3895 EntryPoint="@(_DeploymentResolvedDeploymentManifestEntryPoint)"
\r
3896 ErrorReportUrl="$(_DeploymentFormattedErrorReportUrl)"
\r
3897 Install="$(Install)"
\r
3898 MapFileExtensions="$(MapFileExtensions)"
\r
3899 MaxTargetPath="$(MaxTargetPath)"
\r
3900 MinimumRequiredVersion="$(_DeploymentBuiltMinimumRequiredVersion)"
\r
3901 OutputManifest="@(DeployManifest)"
\r
3902 Platform="$(PlatformTarget)"
\r
3903 Product="$(ProductName)"
\r
3904 Publisher="$(PublisherName)"
\r
3905 SuiteName="$(SuiteName)"
\r
3906 SupportUrl="$(_DeploymentFormattedSupportUrl)"
\r
3907 TargetCulture="$(TargetCulture)"
\r
3908 TargetFrameworkVersion="$(TargetFrameworkVersion)"
\r
3909 TargetFrameworkMoniker="$(TargetFrameworkMoniker)"
\r
3910 TrustUrlParameters="$(TrustUrlParameters)"
\r
3911 UpdateEnabled="$(UpdateEnabled)"
\r
3912 UpdateInterval="$(_DeploymentBuiltUpdateInterval)"
\r
3913 UpdateMode="$(UpdateMode)"
\r
3914 UpdateUnit="$(_DeploymentBuiltUpdateIntervalUnits)"
\r
3915 Condition="'$(GenerateClickOnceManifests)'=='true'">
\r
3917 <Output TaskParameter="OutputManifest" ItemName="FileWrites"/>
\r
3919 </GenerateDeploymentManifest>
\r
3927 ***********************************************************************************************
\r
3928 ***********************************************************************************************
\r
3929 PrepareForRun Section
\r
3930 ***********************************************************************************************
\r
3931 ***********************************************************************************************
\r
3935 <SkipCopyUnchangedFiles Condition="'$(SkipCopyUnchangedFiles)' == ''">true</SkipCopyUnchangedFiles>
\r
3936 <UseCommonOutputDirectory Condition="'$(UseCommonOutputDirectory)' == ''">false</UseCommonOutputDirectory>
\r
3940 ============================================================
\r
3943 Copy the build outputs to the final directory if they have changed.
\r
3944 ============================================================
\r
3947 <PrepareForRunDependsOn>
\r
3948 CopyFilesToOutputDirectory
\r
3949 </PrepareForRunDependsOn>
\r
3952 Name="PrepareForRun"
\r
3953 DependsOnTargets="$(PrepareForRunDependsOn)"/>
\r
3956 ============================================================
\r
3957 CopyFilesToOutputDirectory
\r
3959 Copy all build outputs, satellites and other necessary files to the final directory.
\r
3960 ============================================================
\r
3963 <!-- By default we're not using Hard or Symbolic Links to copy to the output directory, and never when building in VS -->
\r
3964 <CreateHardLinksForCopyAdditionalFilesIfPossible Condition="'$(BuildingInsideVisualStudio)' == 'true' or '$(CreateHardLinksForCopyAdditionalFilesIfPossible)' == ''">false</CreateHardLinksForCopyAdditionalFilesIfPossible>
\r
3965 <CreateSymbolicLinksForCopyAdditionalFilesIfPossible Condition="'$(BuildingInsideVisualStudio)' == 'true' or '$(CreateSymbolicLinksForCopyAdditionalFilesIfPossible)' == ''">false</CreateSymbolicLinksForCopyAdditionalFilesIfPossible>
\r
3969 Name="CopyFilesToOutputDirectory"
\r
3970 DependsOnTargets="
\r
3971 ComputeIntermediateSatelliteAssemblies;
\r
3972 _CopyFilesMarkedCopyLocal;
\r
3973 _CopySourceItemsToOutputDirectory;
\r
3974 _CopyAppConfigFile;
\r
3975 _CopyManifestFiles;
\r
3976 _CheckForCompileOutputs;
\r
3977 _SGenCheckForOutputs">
\r
3980 <!-- By default we're not using Hard Links to copy to the output directory, and never when building in VS -->
\r
3981 <CreateHardLinksForCopyFilesToOutputDirectoryIfPossible Condition="'$(BuildingInsideVisualStudio)' == 'true' or '$(CreateHardLinksForCopyFilesToOutputDirectoryIfPossible)' == ''">false</CreateHardLinksForCopyFilesToOutputDirectoryIfPossible>
\r
3982 <CreateSymbolicLinksForCopyFilesToOutputDirectoryIfPossible Condition="'$(BuildingInsideVisualStudio)' == 'true' or '$(CreateSymbolicLinksForCopyFilesToOutputDirectoryIfPossible)' == ''">false</CreateSymbolicLinksForCopyFilesToOutputDirectoryIfPossible>
\r
3986 <CopyBuildOutputToOutputDirectory Condition="'$(CopyBuildOutputToOutputDirectory)'==''">true</CopyBuildOutputToOutputDirectory>
\r
3987 <CopyOutputSymbolsToOutputDirectory Condition="'$(CopyOutputSymbolsToOutputDirectory)'==''">true</CopyOutputSymbolsToOutputDirectory>
\r
3990 <!-- Copy the build product (.dll or .exe). -->
\r
3992 SourceFiles="@(IntermediateAssembly)"
\r
3993 DestinationFolder="$(OutDir)"
\r
3994 SkipUnchangedFiles="$(SkipCopyUnchangedFiles)"
\r
3995 OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)"
\r
3996 Retries="$(CopyRetryCount)"
\r
3997 RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"
\r
3998 UseHardlinksIfPossible="$(CreateHardLinksForCopyFilesToOutputDirectoryIfPossible)"
\r
3999 UseSymboliclinksIfPossible="$(CreateSymbolicLinksForCopyFilesToOutputDirectoryIfPossible)"
\r
4000 Condition="'$(CopyBuildOutputToOutputDirectory)' == 'true' and '$(SkipCopyBuildProduct)' != 'true'"
\r
4003 <Output TaskParameter="DestinationFiles" ItemName="MainAssembly"/>
\r
4004 <Output TaskParameter="DestinationFiles" ItemName="FileWrites"/>
\r
4008 <Message Importance="High" Text="$(MSBuildProjectName) -> @(MainAssembly->'%(FullPath)')" Condition="'$(CopyBuildOutputToOutputDirectory)' == 'true' and '$(SkipCopyBuildProduct)'!='true'" />
\r
4010 <!-- Copy the additional modules. -->
\r
4012 SourceFiles="@(AddModules)"
\r
4013 DestinationFolder="$(OutDir)"
\r
4014 SkipUnchangedFiles="$(SkipCopyUnchangedFiles)"
\r
4015 OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)"
\r
4016 Retries="$(CopyRetryCount)"
\r
4017 RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"
\r
4018 UseHardlinksIfPossible="$(CreateHardLinksForCopyAdditionalFilesIfPossible)"
\r
4019 UseSymboliclinksIfPossible="$(CreateSymbolicLinksForCopyAdditionalFilesIfPossible)"
\r
4020 Condition="'@(AddModules)' != ''"
\r
4023 <Output TaskParameter="DestinationFiles" ItemName="FileWrites"/>
\r
4027 <!-- Copy the serialization assembly if it exists. -->
\r
4029 SourceFiles="$(IntermediateOutputPath)$(_SGenDllName)"
\r
4030 DestinationFiles="$(OutDir)$(_SGenDllName)"
\r
4031 SkipUnchangedFiles="$(SkipCopyUnchangedFiles)"
\r
4032 OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)"
\r
4033 Retries="$(CopyRetryCount)"
\r
4034 RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"
\r
4035 UseHardlinksIfPossible="$(CreateHardLinksForCopyFilesToOutputDirectoryIfPossible)"
\r
4036 UseSymboliclinksIfPossible="$(CreateSymbolicLinksForCopyFilesToOutputDirectoryIfPossible)"
\r
4037 Condition="'$(_SGenDllCreated)'=='true'">
\r
4039 <Output TaskParameter="DestinationFiles" ItemName="FileWrites"/>
\r
4043 <!-- Copy the debug information file (.pdb), if any -->
\r
4045 SourceFiles="@(_DebugSymbolsIntermediatePath)"
\r
4046 DestinationFiles="@(_DebugSymbolsOutputPath)"
\r
4047 SkipUnchangedFiles="$(SkipCopyUnchangedFiles)"
\r
4048 OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)"
\r
4049 Retries="$(CopyRetryCount)"
\r
4050 RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"
\r
4051 UseHardlinksIfPossible="$(CreateHardLinksForCopyFilesToOutputDirectoryIfPossible)"
\r
4052 UseSymboliclinksIfPossible="$(CreateSymbolicLinksForCopyFilesToOutputDirectoryIfPossible)"
\r
4053 Condition="'$(_DebugSymbolsProduced)'=='true' and '$(SkipCopyingSymbolsToOutputDirectory)' != 'true' and '$(CopyOutputSymbolsToOutputDirectory)'=='true'">
\r
4055 <Output TaskParameter="DestinationFiles" ItemName="FileWrites"/>
\r
4059 <!-- Copy the resulting XML documentation file, if any. -->
\r
4061 SourceFiles="@(DocFileItem)"
\r
4062 DestinationFiles="@(FinalDocFile)"
\r
4063 SkipUnchangedFiles="$(SkipCopyUnchangedFiles)"
\r
4064 OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)"
\r
4065 Retries="$(CopyRetryCount)"
\r
4066 RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"
\r
4067 UseHardlinksIfPossible="$(CreateHardLinksForCopyFilesToOutputDirectoryIfPossible)"
\r
4068 UseSymboliclinksIfPossible="$(CreateSymbolicLinksForCopyFilesToOutputDirectoryIfPossible)"
\r
4069 Condition="'$(_DocumentationFileProduced)'=='true'">
\r
4071 <Output TaskParameter="DestinationFiles" ItemName="FileWrites"/>
\r
4075 <!-- Copy satellite assemblies. -->
\r
4077 SourceFiles="@(IntermediateSatelliteAssembliesWithTargetPath)"
\r
4078 DestinationFiles="@(IntermediateSatelliteAssembliesWithTargetPath->'$(OutDir)%(Culture)\$(TargetName).resources.dll')"
\r
4079 SkipUnchangedFiles="$(SkipCopyUnchangedFiles)"
\r
4080 OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)"
\r
4081 Retries="$(CopyRetryCount)"
\r
4082 RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"
\r
4083 UseHardlinksIfPossible="$(CreateHardLinksForCopyFilesToOutputDirectoryIfPossible)"
\r
4084 UseSymboliclinksIfPossible="$(CreateSymbolicLinksForCopyFilesToOutputDirectoryIfPossible)"
\r
4085 Condition="'@(IntermediateSatelliteAssembliesWithTargetPath)' != ''"
\r
4088 <Output TaskParameter="DestinationFiles" ItemName="FileWrites"/>
\r
4093 Copy COM reference wrappers, isolated COM references, COM references included by
\r
4094 native (manifest) references, native (manifest) reference files themselves.
\r
4097 SourceFiles="@(ReferenceComWrappersToCopyLocal); @(ResolvedIsolatedComModules); @(_DeploymentLooseManifestFile); @(NativeReferenceFile)"
\r
4098 DestinationFolder="$(OutDir)"
\r
4099 SkipUnchangedFiles="$(SkipCopyUnchangedFiles)"
\r
4100 OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)"
\r
4101 Retries="$(CopyRetryCount)"
\r
4102 RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"
\r
4103 UseHardlinksIfPossible="$(CreateHardLinksForCopyAdditionalFilesIfPossible)"
\r
4104 UseSymboliclinksIfPossible="$(CreateSymbolicLinksForCopyAdditionalFilesIfPossible)"
\r
4105 Condition="'@(ReferenceComWrappersToCopyLocal)' != '' or '@(ResolvedIsolatedComModules)' != '' or '@(_DeploymentLooseManifestFile)' != '' or '@(NativeReferenceFile)' != '' "
\r
4108 <Output TaskParameter="DestinationFiles" ItemName="FileWritesShareable"/>
\r
4112 <!-- Copy the build product of WinMDExp. -->
\r
4114 SourceFiles="@(WinMDExpArtifacts)"
\r
4115 DestinationFolder="$(OutDir)"
\r
4116 SkipUnchangedFiles="$(SkipCopyUnchangedFiles)"
\r
4117 OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)"
\r
4118 Retries="$(CopyRetryCount)"
\r
4119 RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"
\r
4120 UseHardlinksIfPossible="$(CreateHardLinksForCopyFilesToOutputDirectoryIfPossible)"
\r
4121 UseSymboliclinksIfPossible="$(CreateSymbolicLinksForCopyFilesToOutputDirectoryIfPossible)"
\r
4122 Condition="'$(SkipCopyWinMDArtifact)' != 'true' and '@(WinMDExpArtifacts)' != ''"
\r
4124 <Output TaskParameter="DestinationFiles" ItemName="FileWrites"/>
\r
4125 <Output TaskParameter="DestinationFiles" ItemName="FinalWinmdExpArtifacts" />
\r
4128 <Message Importance="High" Text="$(MSBuildProjectName) -> $([System.IO.Path]::GetFullPath('$(_WindowsMetadataOutputPath)'))" Condition="'$(SkipCopyWinMDArtifact)' != 'true' and '$(_WindowsMetadataOutputPath)' != ''" />
\r
4133 ============================================================
\r
4134 _CopyFilesMarkedCopyLocal
\r
4136 Copy references that are marked as "CopyLocal" and their dependencies, including .pdbs, .xmls and satellites.
\r
4137 ============================================================
\r
4140 Name="_CopyFilesMarkedCopyLocal"
\r
4141 Condition="'@(ReferenceCopyLocalPaths)' != ''"
\r
4145 <!-- By default we're not using Hard Links to copy to the output directory, and never when building in VS -->
\r
4146 <CreateHardLinksForCopyLocalIfPossible Condition="'$(BuildingInsideVisualStudio)' == 'true' or '$(CreateHardLinksForCopyLocalIfPossible)' == ''">false</CreateHardLinksForCopyLocalIfPossible>
\r
4147 <CreateSymbolicLinksForCopyLocalIfPossible Condition="'$(BuildingInsideVisualStudio)' == 'true' or '$(CreateSymbolicLinksForCopyLocalIfPossible)' == ''">false</CreateSymbolicLinksForCopyLocalIfPossible>
\r
4151 SourceFiles="@(ReferenceCopyLocalPaths)"
\r
4152 DestinationFiles="@(ReferenceCopyLocalPaths->'$(OutDir)%(DestinationSubDirectory)%(Filename)%(Extension)')"
\r
4153 SkipUnchangedFiles="$(SkipCopyUnchangedFiles)"
\r
4154 OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)"
\r
4155 Retries="$(CopyRetryCount)"
\r
4156 RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"
\r
4157 UseHardlinksIfPossible="$(CreateHardLinksForCopyLocalIfPossible)"
\r
4158 UseSymboliclinksIfPossible="$(CreateSymbolicLinksForCopyLocalIfPossible)"
\r
4159 Condition="'$(UseCommonOutputDirectory)' != 'true'"
\r
4162 <Output TaskParameter="DestinationFiles" ItemName="FileWritesShareable"/>
\r
4169 ============================================================
\r
4170 _CopySourceItemsToOutputDirectory
\r
4171 ============================================================
\r
4174 Name="_CopySourceItemsToOutputDirectory"
\r
4175 DependsOnTargets="
\r
4176 GetCopyToOutputDirectoryItems;
\r
4177 _CopyOutOfDateSourceItemsToOutputDirectory;
\r
4178 _CopyOutOfDateSourceItemsToOutputDirectoryAlways"/>
\r
4182 ============================================================
\r
4183 GetCopyToOutputDirectoryItems
\r
4185 Get all project items that may need to be transferred to the output directory.
\r
4186 This includes baggage items from transitively referenced projects. It would appear
\r
4187 that this target computes full transitive closure of content items for all referenced
\r
4188 projects; however that is not the case. It only collects the content items from its
\r
4189 immediate children and not children of children. The reason this happens is that
\r
4190 the ProjectReferenceWithConfiguration list that is consumed by _SplitProjectReferencesByFileExistence
\r
4191 is only populated in the current project and is empty in the children. The empty list
\r
4192 causes _MSBuildProjectReferenceExistent to be empty and terminates the recursion.
\r
4193 ============================================================
\r
4196 <GetCopyToOutputDirectoryItemsDependsOn>
\r
4197 AssignTargetPaths;
\r
4198 _SplitProjectReferencesByFileExistence;
\r
4199 _GetProjectReferenceTargetFrameworkProperties
\r
4200 </GetCopyToOutputDirectoryItemsDependsOn>
\r
4203 Name="GetCopyToOutputDirectoryItems"
\r
4204 Returns="@(AllItemsFullPathWithTargetPath)"
\r
4205 KeepDuplicateOutputs=" '$(MSBuildDisableGetCopyToOutputDirectoryItemsOptimization)' == '' "
\r
4206 DependsOnTargets="$(GetCopyToOutputDirectoryItemsDependsOn)">
\r
4209 <!-- In the general case, clients need very little of the metadata which is generated by invoking this target on this project and its children. For those
\r
4210 cases, we can immediately discard the unwanted metadata, reducing memory usage, particularly in very large and interconnected systems of projects.
\r
4211 However, if some client does require the original functionality, it is sufficient to set MSBuildDisableGetCopyToOutputDirectoryItemsOptimization to
\r
4212 a non-empty value and the original behavior will be restored. -->
\r
4213 <PropertyGroup Condition=" '$(MSBuildDisableGetCopyToOutputDirectoryItemsOptimization)' == '' ">
\r
4214 <_GCTODIKeepDuplicates>false</_GCTODIKeepDuplicates>
\r
4215 <_GCTODIKeepMetadata>CopyToOutputDirectory;TargetPath</_GCTODIKeepMetadata>
\r
4218 <!-- Get items from child projects first. -->
\r
4220 Projects="@(_MSBuildProjectReferenceExistent)"
\r
4221 Targets="GetCopyToOutputDirectoryItems"
\r
4222 BuildInParallel="$(BuildInParallel)"
\r
4223 Properties="%(_MSBuildProjectReferenceExistent.SetConfiguration); %(_MSBuildProjectReferenceExistent.SetPlatform); %(_MSBuildProjectReferenceExistent.SetTargetFramework)"
\r
4224 Condition="'@(_MSBuildProjectReferenceExistent)' != '' and '$(_GetChildProjectCopyToOutputDirectoryItems)' == 'true' and '%(_MSBuildProjectReferenceExistent.Private)' != 'false' and '$(UseCommonOutputDirectory)' != 'true'"
\r
4225 ContinueOnError="$(ContinueOnError)"
\r
4226 RemoveProperties="%(_MSBuildProjectReferenceExistent.GlobalPropertiesToRemove)">
\r
4228 <Output TaskParameter="TargetOutputs" ItemName="_AllChildProjectItemsWithTargetPath"/>
\r
4232 <!-- Target outputs must be full paths because they will be consumed by a different project. -->
\r
4234 <_SourceItemsToCopyToOutputDirectoryAlways KeepDuplicates=" '$(_GCTODIKeepDuplicates)' != 'false' " KeepMetadata="$(_GCTODIKeepMetadata)" Include="@(_AllChildProjectItemsWithTargetPath->'%(FullPath)')" Condition="'%(_AllChildProjectItemsWithTargetPath.CopyToOutputDirectory)'=='Always'"/>
\r
4235 <_SourceItemsToCopyToOutputDirectory KeepDuplicates=" '$(_GCTODIKeepDuplicates)' != 'false' " KeepMetadata="$(_GCTODIKeepMetadata)" Include="@(_AllChildProjectItemsWithTargetPath->'%(FullPath)')" Condition="'%(_AllChildProjectItemsWithTargetPath.CopyToOutputDirectory)'=='PreserveNewest'"/>
\r
4238 <!-- Remove items which we will never again use - they just sit around taking up memory otherwise -->
\r
4240 <_AllChildProjectItemsWithTargetPath Remove="@(_AllChildProjectItemsWithTargetPath)"/>
\r
4243 <!-- Get items from this project last so that they will be copied last. -->
\r
4245 <_SourceItemsToCopyToOutputDirectoryAlways KeepMetadata="$(_GCTODIKeepMetadata)" Include="@(ContentWithTargetPath->'%(FullPath)')" Condition="'%(ContentWithTargetPath.CopyToOutputDirectory)'=='Always'"/>
\r
4246 <_SourceItemsToCopyToOutputDirectory KeepMetadata="$(_GCTODIKeepMetadata)" Include="@(ContentWithTargetPath->'%(FullPath)')" Condition="'%(ContentWithTargetPath.CopyToOutputDirectory)'=='PreserveNewest'"/>
\r
4250 <_SourceItemsToCopyToOutputDirectoryAlways KeepMetadata="$(_GCTODIKeepMetadata)" Include="@(EmbeddedResource->'%(FullPath)')" Condition="'%(EmbeddedResource.CopyToOutputDirectory)'=='Always'"/>
\r
4251 <_SourceItemsToCopyToOutputDirectory KeepMetadata="$(_GCTODIKeepMetadata)" Include="@(EmbeddedResource->'%(FullPath)')" Condition="'%(EmbeddedResource.CopyToOutputDirectory)'=='PreserveNewest'"/>
\r
4255 <_CompileItemsToCopy Include="@(Compile->'%(FullPath)')" Condition="'%(Compile.CopyToOutputDirectory)'=='Always' or '%(Compile.CopyToOutputDirectory)'=='PreserveNewest'"/>
\r
4258 <AssignTargetPath Files="@(_CompileItemsToCopy)" RootFolder="$(MSBuildProjectDirectory)">
\r
4259 <Output TaskParameter="AssignedFiles" ItemName="_CompileItemsToCopyWithTargetPath" />
\r
4260 </AssignTargetPath>
\r
4263 <_SourceItemsToCopyToOutputDirectoryAlways KeepMetadata="$(_GCTODIKeepMetadata)" Include="@(_CompileItemsToCopyWithTargetPath)" Condition="'%(_CompileItemsToCopyWithTargetPath.CopyToOutputDirectory)'=='Always'"/>
\r
4264 <_SourceItemsToCopyToOutputDirectory KeepMetadata="$(_GCTODIKeepMetadata)" Include="@(_CompileItemsToCopyWithTargetPath)" Condition="'%(_CompileItemsToCopyWithTargetPath.CopyToOutputDirectory)'=='PreserveNewest'"/>
\r
4268 <_SourceItemsToCopyToOutputDirectoryAlways KeepMetadata="$(_GCTODIKeepMetadata)" Include="@(_NoneWithTargetPath->'%(FullPath)')" Condition="'%(_NoneWithTargetPath.CopyToOutputDirectory)'=='Always'"/>
\r
4269 <_SourceItemsToCopyToOutputDirectory KeepMetadata="$(_GCTODIKeepMetadata)" Include="@(_NoneWithTargetPath->'%(FullPath)')" Condition="'%(_NoneWithTargetPath.CopyToOutputDirectory)'=='PreserveNewest'"/>
\r
4273 <AllItemsFullPathWithTargetPath Include="@(_SourceItemsToCopyToOutputDirectoryAlways->'%(FullPath)');@(_SourceItemsToCopyToOutputDirectory->'%(FullPath)')"/>
\r
4279 ============================================================
\r
4280 GetCopyToPublishDirectoryItems
\r
4282 Default implementation of GetCopyToPublishDirectoryItems for projects that do not
\r
4283 use Microsoft.NET.Sdk. It simply returns whatever GetCopyToOutputDirectoryItems
\r
4284 does with CopyToPublishDirectory implied by CopyToOutputDirectory, which is the
\r
4285 same as Microsoft.NET.Sdk default when its CopyToPublishDirectory is not used.
\r
4287 Microsoft.NET.Sdk projects will override this to allow the publish output to be
\r
4288 customized independently from the build output.
\r
4290 Having a default implementation here allows the Microsoft.NET.Sdk Publish target
\r
4291 to work when a Microsoft.NET.Sdk-based project references a non-Microsoft.NET.Sdk-based
\r
4293 ============================================================
\r
4296 Name="GetCopyToPublishDirectoryItems"
\r
4297 DependsOnTargets="GetCopyToOutputDirectoryItems"
\r
4298 Returns="@(AllPublishItemsFullPathWithTargetPath)">
\r
4301 <AllPublishItemsFullPathWithTargetPath Include="@(AllItemsFullPathWithTargetPath)">
\r
4302 <CopyToPublishDirectory>%(CopyToOutputDirectory)</CopyToPublishDirectory>
\r
4303 </AllPublishItemsFullPathWithTargetPath>
\r
4308 ============================================================
\r
4309 _CopyOutOfDateSourceItemsToOutputDirectory
\r
4311 Copy files that have the CopyToOutputDirectory attribute set to 'PreserveNewest'.
\r
4312 ============================================================
\r
4315 Name="_CopyOutOfDateSourceItemsToOutputDirectory"
\r
4316 Condition=" '@(_SourceItemsToCopyToOutputDirectory)' != '' "
\r
4317 Inputs="@(_SourceItemsToCopyToOutputDirectory)"
\r
4318 Outputs="@(_SourceItemsToCopyToOutputDirectory->'$(OutDir)%(TargetPath)')">
\r
4321 Not using SkipUnchangedFiles="true" because the application may want to change
\r
4322 one of these files and not have an incremental build replace it.
\r
4325 SourceFiles = "@(_SourceItemsToCopyToOutputDirectory)"
\r
4326 DestinationFiles = "@(_SourceItemsToCopyToOutputDirectory->'$(OutDir)%(TargetPath)')"
\r
4327 OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)"
\r
4328 Retries="$(CopyRetryCount)"
\r
4329 RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"
\r
4330 UseHardlinksIfPossible="$(CreateHardLinksForAdditionalFilesIfPossible)"
\r
4331 UseSymboliclinksIfPossible="$(CreateSymbolicLinksForAdditionalFilesIfPossible)"
\r
4334 <Output TaskParameter="DestinationFiles" ItemName="FileWrites"/>
\r
4341 ============================================================
\r
4342 _CopyOutOfDateSourceItemsToOutputDirectoryAlways
\r
4344 Copy files that have the CopyToOutputDirectory attribute set to 'Always'.
\r
4345 ============================================================
\r
4348 Name="_CopyOutOfDateSourceItemsToOutputDirectoryAlways"
\r
4349 Condition=" '@(_SourceItemsToCopyToOutputDirectoryAlways)' != '' ">
\r
4352 Not using SkipUnchangedFiles="true" because the application may want to change
\r
4353 one of these files and not have an incremental build replace it.
\r
4356 SourceFiles = "@(_SourceItemsToCopyToOutputDirectoryAlways)"
\r
4357 DestinationFiles = "@(_SourceItemsToCopyToOutputDirectoryAlways->'$(OutDir)%(TargetPath)')"
\r
4358 OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)"
\r
4359 Retries="$(CopyRetryCount)"
\r
4360 RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"
\r
4361 UseHardlinksIfPossible="$(CreateHardLinksForAdditionalFilesIfPossible)"
\r
4362 UseSymboliclinksIfPossible="$(CreateSymbolicLinksForAdditionalFilesIfPossible)"
\r
4365 <Output TaskParameter="DestinationFiles" ItemName="FileWrites"/>
\r
4372 ============================================================
\r
4373 _CopyAppConfigFile
\r
4375 Copy the application config file.
\r
4376 ============================================================
\r
4379 Name="_CopyAppConfigFile"
\r
4380 Condition=" '@(AppConfigWithTargetPath)' != '' "
\r
4381 Inputs="@(AppConfigWithTargetPath)"
\r
4382 Outputs="@(AppConfigWithTargetPath->'$(OutDir)%(TargetPath)')">
\r
4385 Copy the application's .config file, if any.
\r
4386 Not using SkipUnchangedFiles="true" because the application may want to change
\r
4387 the app.config and not have an incremental build replace it.
\r
4390 SourceFiles="@(AppConfigWithTargetPath)"
\r
4391 DestinationFiles="@(AppConfigWithTargetPath->'$(OutDir)%(TargetPath)')"
\r
4392 OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)"
\r
4393 Retries="$(CopyRetryCount)"
\r
4394 RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"
\r
4395 UseHardlinksIfPossible="$(CreateHardLinksForAdditionalFilesIfPossible)"
\r
4396 UseSymboliclinksIfPossible="$(CreateSymbolicLinksForAdditionalFilesIfPossible)"
\r
4399 <Output TaskParameter="DestinationFiles" ItemName="FileWrites"/>
\r
4406 ================================================================
\r
4407 _CopyManifestFiles
\r
4408 ================================================================
\r
4410 Copy the built manifests (.exe.manifest, .application/.xbap) to the final directory.
\r
4413 Name="_CopyManifestFiles"
\r
4414 Condition=" '$(_DeploymentCopyApplicationManifest)'=='true' or '$(GenerateClickOnceManifests)'=='true' "
\r
4415 DependsOnTargets="PrepareForBuild">
\r
4418 SourceFiles="@(ApplicationManifest)"
\r
4419 DestinationFolder="$(OutDir)"
\r
4420 SkipUnchangedFiles="$(SkipCopyUnchangedFiles)"
\r
4421 OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)"
\r
4422 Retries="$(CopyRetryCount)"
\r
4423 RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"
\r
4424 UseHardlinksIfPossible="$(CreateHardLinksForAdditionalFilesIfPossible)"
\r
4425 UseSymboliclinksIfPossible="$(CreateSymbolicLinksForAdditionalFilesIfPossible)"
\r
4426 Condition="'$(GenerateClickOnceManifests)'=='true' or '$(_DeploymentCopyApplicationManifest)'=='true'">
\r
4428 <Output TaskParameter="DestinationFiles" ItemName="_DeploymentMainApplicationManifest"/>
\r
4429 <Output TaskParameter="DestinationFiles" ItemName="FileWrites"/>
\r
4433 <Message Importance="Normal" Condition="'$(_DeploymentCopyApplicationManifest)'=='true'" Text="$(MSBuildProjectName) -> @(_DeploymentMainApplicationManifest->'%(FullPath)')" />
\r
4436 SourceFiles="@(DeployManifest)"
\r
4437 DestinationFolder="$(OutDir)"
\r
4438 SkipUnchangedFiles="$(SkipCopyUnchangedFiles)"
\r
4439 OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)"
\r
4440 Retries="$(CopyRetryCount)"
\r
4441 RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"
\r
4442 UseHardlinksIfPossible="$(CreateHardLinksForAdditionalFilesIfPossible)"
\r
4443 UseSymboliclinksIfPossible="$(CreateSymbolicLinksForAdditionalFilesIfPossible)"
\r
4444 Condition="'$(GenerateClickOnceManifests)'=='true'">
\r
4446 <Output TaskParameter="DestinationFiles" ItemName="_DeploymentMainDeployManifest"/>
\r
4447 <Output TaskParameter="DestinationFiles" ItemName="FileWrites"/>
\r
4451 <Message Importance="Normal" Condition="'$(GenerateClickOnceManifests)'=='true'" Text="$(MSBuildProjectName) -> @(_DeploymentMainDeployManifest->'%(FullPath)')" />
\r
4456 ================================================================
\r
4457 _CheckForCompileOutputs
\r
4459 Checks each file output from the main "Compile" target to make sure they really exist.
\r
4460 If they do, then record them in the clean cache.
\r
4461 ============================================================
\r
4464 Name="_CheckForCompileOutputs">
\r
4466 <!--Record the main compile outputs.-->
\r
4468 <FileWrites Include="@(IntermediateAssembly)" Condition="Exists('@(IntermediateAssembly)')"/>
\r
4471 <!-- Record the .xml if one was produced. -->
\r
4473 <_DocumentationFileProduced Condition="!Exists('@(DocFileItem)')">false</_DocumentationFileProduced>
\r
4477 <FileWrites Include="@(DocFileItem)" Condition="'$(_DocumentationFileProduced)'=='true'"/>
\r
4480 <!-- Record the .pdb if one was produced. -->
\r
4482 <_DebugSymbolsProduced Condition="!Exists('@(_DebugSymbolsIntermediatePath)')">false</_DebugSymbolsProduced>
\r
4486 <FileWrites Include="@(_DebugSymbolsIntermediatePath)" Condition="'$(_DebugSymbolsProduced)'=='true'"/>
\r
4491 ============================================================
\r
4492 _SGenCheckForOutputs
\r
4494 Checks each file output from the "GenerateSerializationAssemblies" target to make sure they really exist.
\r
4495 If they do, then record them in the clean cache.
\r
4496 ============================================================
\r
4499 Name="_SGenCheckForOutputs"
\r
4500 Condition="'$(_SGenGenerateSerializationAssembliesConfig)' == 'On' or ('@(WebReferenceUrl)'!='' and '$(_SGenGenerateSerializationAssembliesConfig)' == 'Auto')"
\r
4503 <!-- Record the serializer .dll if one was produced.-->
\r
4505 <_SGenDllCreated Condition="Exists('$(IntermediateOutputPath)$(_SGenDllName)')">true</_SGenDllCreated>
\r
4509 <FileWrites Include="$(IntermediateOutputPath)$(_SGenDllName)" Condition="Exists('$(IntermediateOutputPath)$(_SGenDllName)')"/>
\r
4518 ***********************************************************************************************
\r
4519 ***********************************************************************************************
\r
4520 UnmanagedRegistration Section
\r
4521 ***********************************************************************************************
\r
4522 ***********************************************************************************************
\r
4526 ============================================================
\r
4527 UnmanagedRegistration
\r
4529 Registers the main assembly for COM interop.
\r
4530 ============================================================
\r
4533 <UnmanagedRegistrationDependsOn></UnmanagedRegistrationDependsOn>
\r
4536 Name="UnmanagedRegistration"
\r
4537 Condition="'$(RegisterForComInterop)'=='true' and '$(OutputType)'=='library'"
\r
4538 DependsOnTargets="$(UnmanagedRegistrationDependsOn)"
\r
4542 <RegisterAssemblyMSBuildArchitecture Condition="'$(RegisterAssemblyMSBuildArchitecture)' == ''">$(PlatformTargetAsMSBuildArchitecture)</RegisterAssemblyMSBuildArchitecture>
\r
4545 <PropertyGroup Condition="'$(TargetFrameworkAsMSBuildRuntime)' != '' and '$(RegisterAssemblyMSBuildArchitecture)' != ''">
\r
4546 <!-- Falling back to the current runtime if we are targeting CLR2 and the task host doesn't exist will lead to
\r
4547 incorrect behavior in some cases, but it's the same incorrect behavior as Visual Studio 2010, and thus better
\r
4548 than causing build breaks on upgrade to Win8 the way not doing so would. For more details, see the
\r
4549 corresponding comment in GenerateResource. -->
\r
4550 <RegisterAssemblyMSBuildRuntime
\r
4551 Condition="'$(RegisterAssemblyMSBuildRuntime)' == '' and
\r
4552 $([MSBuild]::DoesTaskHostExist(`$(TargetFrameworkAsMSBuildRuntime)`, `$(RegisterAssemblyMSBuildArchitecture)`))">$(TargetFrameworkAsMSBuildRuntime)</RegisterAssemblyMSBuildRuntime>
\r
4554 <!-- If the targeted runtime doesn't exist, fall back to current -->
\r
4555 <RegisterAssemblyMSBuildRuntime Condition="'$(RegisterAssemblyMSBuildRuntime)' == ''">CurrentRuntime</RegisterAssemblyMSBuildRuntime>
\r
4559 Assemblies="@(_OutputPathItem->'%(FullPath)$(TargetFileName)')"
\r
4560 TypeLibFiles="@(_OutputPathItem->'%(FullPath)$(TargetName).tlb')"
\r
4561 AssemblyListFile="@(_UnmanagedRegistrationCache)"
\r
4562 CreateCodeBase="true"
\r
4563 MSBuildRuntime="$(RegisterAssemblyMSBuildRuntime)"
\r
4564 MSBuildArchitecture="$(RegisterAssemblyMSBuildArchitecture)"
\r
4565 Condition="!Exists('@(_UnmanagedRegistrationCache)')"/>
\r
4568 <FileWrites Include="@(_OutputPathItem->'%(FullPath)$(TargetName).tlb')"/>
\r
4577 ***********************************************************************************************
\r
4578 ***********************************************************************************************
\r
4579 IncrementalClean Section
\r
4580 ***********************************************************************************************
\r
4581 ***********************************************************************************************
\r
4585 ============================================================
\r
4588 Remove files that were produced in a prior build but weren't produced in the current build.
\r
4589 The reason is that if, for example, the name of the .exe has changed we want to delete the
\r
4592 Leave the Clean cache file containing only the files produced in the current build.
\r
4593 ============================================================
\r
4596 Name="IncrementalClean"
\r
4597 DependsOnTargets="_CleanGetCurrentAndPriorFileWrites">
\r
4599 <!-- Subtract list of files produced in prior builds from list of files produced in this build. -->
\r
4601 <_CleanOrphanFileWrites Include="@(_CleanPriorFileWrites)" Exclude="@(_CleanCurrentFileWrites)"/>
\r
4604 <!-- Find all files in the final output directory. -->
\r
4605 <FindUnderPath Path="$(OutDir)" Files="@(_CleanOrphanFileWrites)">
\r
4606 <Output TaskParameter="InPath" ItemName="_CleanOrphanFileWritesInOutput"/>
\r
4609 <!-- Find all files in the intermediate output directory. -->
\r
4610 <FindUnderPath Path="$(IntermediateOutputPath)" Files="@(_CleanOrphanFileWrites)">
\r
4611 <Output TaskParameter="InPath" ItemName="_CleanOrphanFileWritesInIntermediate"/>
\r
4614 <!-- Delete the orphaned files. -->
\r
4616 Files="@(_CleanOrphanFileWritesInIntermediate);@(_CleanOrphanFileWritesInOutput)"
\r
4617 TreatErrorsAsWarnings="true">
\r
4619 <Output TaskParameter="DeletedFiles" ItemName="_CleanOrphanFilesDeleted"/>
\r
4623 <!-- Create a list of everything that wasn't deleted or was outside
\r
4624 the current final output and intermediate output directories. -->
\r
4626 <_CleanRemainingFileWritesAfterIncrementalClean Include="@(_CleanPriorFileWrites);@(_CleanCurrentFileWrites)" Exclude="@(_CleanOrphanFilesDeleted)"/>
\r
4629 <!-- Remove duplicates. -->
\r
4630 <RemoveDuplicates Inputs="@(_CleanRemainingFileWritesAfterIncrementalClean)">
\r
4631 <Output TaskParameter="Filtered" ItemName="_CleanUniqueRemainingFileWritesAfterIncrementalClean"/>
\r
4632 </RemoveDuplicates>
\r
4634 <!-- Write new list of current files back to disk, replacing the existing list.-->
\r
4636 File="$(IntermediateOutputPath)$(CleanFile)"
\r
4637 Lines="@(_CleanUniqueRemainingFileWritesAfterIncrementalClean)"
\r
4638 Condition="'@(_CleanUnfilteredPriorFileWrites)'!='@(_CleanUniqueRemainingFileWritesAfterIncrementalClean)'"
\r
4639 Overwrite="true"/>
\r
4644 ============================================================
\r
4645 _CleanGetCurrentAndPriorFileWrites
\r
4647 Get the list of files built in the current build and in prior builds.
\r
4648 ============================================================
\r
4651 Name="_CleanGetCurrentAndPriorFileWrites"
\r
4652 DependsOnTargets="_CheckForCompileOutputs;_SGenCheckForOutputs">
\r
4654 <!-- Read the list of files produced by a prior builds from disk. -->
\r
4655 <ReadLinesFromFile File="$(IntermediateOutputPath)$(CleanFile)">
\r
4656 <Output TaskParameter="Lines" ItemName="_CleanUnfilteredPriorFileWrites"/>
\r
4657 </ReadLinesFromFile>
\r
4660 Convert the list of references to the absolute paths so we can make valid comparisons
\r
4663 <ConvertToAbsolutePath Paths="@(_ResolveAssemblyReferenceResolvedFiles)">
\r
4664 <Output TaskParameter="AbsolutePaths" ItemName="_ResolveAssemblyReferenceResolvedFilesAbsolute"/>
\r
4665 </ConvertToAbsolutePath>
\r
4668 Subtract any resolved assembly files from *prior* file writes because deleting
\r
4669 these would break subsequent builds because the assemblies would be unresolvable.
\r
4672 <_CleanPriorFileWrites Include="@(_CleanUnfilteredPriorFileWrites)" Exclude="@(_ResolveAssemblyReferenceResolvedFilesAbsolute)"/>
\r
4676 Of shareable files, keep only those that are in the project's directory.
\r
4677 We never clean shareable files outside of the project directory because
\r
4678 the build may be to a common output directory and other projects may need
\r
4681 Only subtract the outputs from ResolveAssemblyReferences target because that's the
\r
4682 only "Resolve" target that tries to resolve assemblies directly from the output
\r
4685 <FindUnderPath Path="$(MSBuildProjectDirectory)" Files="@(FileWritesShareable)" UpdateToAbsolutePaths="true">
\r
4686 <Output TaskParameter="InPath" ItemName="FileWrites"/>
\r
4689 <!-- Find all files in the final output directory. -->
\r
4690 <FindUnderPath Path="$(OutDir)" Files="@(FileWrites)" UpdateToAbsolutePaths="true">
\r
4691 <Output TaskParameter="InPath" ItemName="_CleanCurrentFileWritesInOutput"/>
\r
4694 <!-- Find all files in the intermediate output directory. -->
\r
4695 <FindUnderPath Path="$(IntermediateOutputPath)" Files="@(FileWrites)" UpdateToAbsolutePaths="true">
\r
4696 <Output TaskParameter="InPath" ItemName="_CleanCurrentFileWritesInIntermediate"/>
\r
4700 Subtract any resolved assembly files from *current* file writes because deleting
\r
4701 these would break subsequent builds because the assemblies would be unresolvable.
\r
4703 Only subtract the outputs from ResolveAssemblyReferences target because that's the
\r
4704 only "Resolve" target that tries to resolve assemblies directly from the output
\r
4708 <_CleanCurrentFileWritesWithNoReferences Include="@(_CleanCurrentFileWritesInOutput);@(_CleanCurrentFileWritesInIntermediate)" Exclude="@(_ResolveAssemblyReferenceResolvedFilesAbsolute)"/>
\r
4711 <!-- Remove duplicates from files produced in this build. -->
\r
4712 <RemoveDuplicates Inputs="@(_CleanCurrentFileWritesWithNoReferences)" >
\r
4713 <Output TaskParameter="Filtered" ItemName="_CleanCurrentFileWrites"/>
\r
4714 </RemoveDuplicates>
\r
4719 ***********************************************************************************************
\r
4720 ***********************************************************************************************
\r
4722 ***********************************************************************************************
\r
4723 ***********************************************************************************************
\r
4727 ============================================================
\r
4730 Delete all intermediate and final build outputs.
\r
4731 ============================================================
\r
4736 UnmanagedUnregistration;
\r
4738 CleanReferencedProjects;
\r
4739 CleanPublishFolder;
\r
4745 Condition=" '$(_InvalidConfigurationWarning)' != 'true' "
\r
4746 DependsOnTargets="$(CleanDependsOn)" />
\r
4749 ============================================================
\r
4752 Redefine this target in your project in order to run tasks just before Clean.
\r
4753 ============================================================
\r
4755 <Target Name="BeforeClean"/>
\r
4758 ============================================================
\r
4761 Redefine this target in your project in order to run tasks just after Clean.
\r
4762 ============================================================
\r
4764 <Target Name="AfterClean"/>
\r
4767 ============================================================
\r
4768 CleanReferencedProjects
\r
4770 Call Clean target on all Referenced Projects.
\r
4771 ============================================================
\r
4774 Name="CleanReferencedProjects"
\r
4775 DependsOnTargets="PrepareProjectReferences">
\r
4778 When building the project directly from the command-line, clean those referenced projects
\r
4779 that exist on disk. For IDE builds and command-line .SLN builds, the solution build manager
\r
4780 takes care of this.
\r
4783 Projects="@(_MSBuildProjectReferenceExistent)"
\r
4785 Properties="%(_MSBuildProjectReferenceExistent.SetConfiguration); %(_MSBuildProjectReferenceExistent.SetPlatform); %(_MSBuildProjectReferenceExistent.SetTargetFramework)"
\r
4786 BuildInParallel="$(BuildInParallel)"
\r
4787 Condition="'$(BuildingInsideVisualStudio)' != 'true' and '$(BuildProjectReferences)' == 'true' and '@(_MSBuildProjectReferenceExistent)' != ''"
\r
4788 ContinueOnError="$(ContinueOnError)"
\r
4789 RemoveProperties="%(_MSBuildProjectReferenceExistent.GlobalPropertiesToRemove)"/>
\r
4794 ============================================================
\r
4796 ============================================================
\r
4799 <CoreCleanDependsOn></CoreCleanDependsOn>
\r
4803 DependsOnTargets="$(CoreCleanDependsOn)">
\r
4805 <!-- First clean any explicitly specified cleanable files.
\r
4806 Declare items of this type if you want Clean to delete them. -->
\r
4809 TreatErrorsAsWarnings="true"/>
\r
4811 <!-- Read in list of files that were written to disk in past builds. -->
\r
4812 <ReadLinesFromFile File="$(IntermediateOutputPath)$(CleanFile)">
\r
4813 <Output TaskParameter="Lines" ItemName="_CleanPriorFileWrites"/>
\r
4814 </ReadLinesFromFile>
\r
4816 <!-- Find all files in the final output directory. -->
\r
4817 <FindUnderPath Path="$(OutDir)" Files="@(_CleanPriorFileWrites)">
\r
4818 <Output TaskParameter="InPath" ItemName="_CleanPriorFileWritesInOutput"/>
\r
4821 <!-- Find all files in the intermediate output directory. -->
\r
4822 <FindUnderPath Path="$(IntermediateOutputPath)" Files="@(_CleanPriorFileWrites)">
\r
4823 <Output TaskParameter="InPath" ItemName="_CleanPriorFileWritesInIntermediate"/>
\r
4826 <!-- Delete those files. -->
\r
4828 Files="@(_CleanPriorFileWritesInOutput);@(_CleanPriorFileWritesInIntermediate)"
\r
4829 TreatErrorsAsWarnings="true">
\r
4831 <Output TaskParameter="DeletedFiles" ItemName="_CleanPriorFileWritesDeleted"/>
\r
4835 <!-- Create a list of everything that wasn't deleted. -->
\r
4837 <_CleanRemainingFileWritesAfterClean Include="@(_CleanPriorFileWrites)" Exclude="@(_CleanPriorFileWritesDeleted)"/>
\r
4840 <!-- Remove duplicates. -->
\r
4841 <RemoveDuplicates Inputs="@(_CleanRemainingFileWritesAfterClean)">
\r
4842 <Output TaskParameter="Filtered" ItemName="_CleanUniqueRemainingFileWrites"/>
\r
4843 </RemoveDuplicates>
\r
4845 <!-- Make sure the directory exists. -->
\r
4846 <MakeDir Directories="$(IntermediateOutputPath)"/>
\r
4848 <!-- Write new list of current files back to disk. -->
\r
4849 <WriteLinesToFile File="$(IntermediateOutputPath)$(CleanFile)" Lines="@(_CleanUniqueRemainingFileWrites)" Overwrite="true" />
\r
4854 ============================================================
\r
4855 _CleanRecordFileWrites
\r
4857 Save the list of all files written to disk so that it can be used for "Clean" later.
\r
4859 Files written in prior builds are not removed from Clean cache.
\r
4860 ============================================================
\r
4863 Name="_CleanRecordFileWrites"
\r
4864 DependsOnTargets="_CleanGetCurrentAndPriorFileWrites">
\r
4867 Merge list of files from prior builds with the current build and then
\r
4868 remove duplicates.
\r
4870 <RemoveDuplicates Inputs="@(_CleanPriorFileWrites);@(_CleanCurrentFileWrites)">
\r
4871 <Output TaskParameter="Filtered" ItemName="_CleanUniqueFileWrites"/>
\r
4872 </RemoveDuplicates>
\r
4874 <!-- Make sure the directory exists. -->
\r
4875 <MakeDir Directories="$(IntermediateOutputPath)"/>
\r
4877 <!-- Write merged file list back to disk, replacing existing contents. -->
\r
4879 File="$(IntermediateOutputPath)$(CleanFile)"
\r
4880 Lines="@(_CleanUniqueFileWrites)"
\r
4881 Overwrite="true" />
\r
4886 ============================================================
\r
4887 CleanPublishFolder
\r
4888 ============================================================
\r
4891 Name="CleanPublishFolder">
\r
4894 Directories="$(PublishDir)"
\r
4895 Condition="'$(PublishDir)'=='$(OutputPath)app.publish\' and Exists('$(PublishDir)')"/>
\r
4903 ***********************************************************************************************
\r
4904 ***********************************************************************************************
\r
4905 PostBuildEvent Section
\r
4906 ***********************************************************************************************
\r
4907 ***********************************************************************************************
\r
4911 ============================================================
\r
4914 Run the post-build event. This step is driven by two parameters:
\r
4916 (1) The $(RunPostBuildEvent) property is set by the user through the IDE and can be one of four values.
\r
4918 - OnBuildSuccess: In this case, every step of the build must succeed for the post-build step to run.
\r
4919 - <Blank>: This is the same as OnBuildSuccess.
\r
4920 - OnOutputUpdated: In this case, the post-build step will run only if the main output assembly was
\r
4922 - Always: The post-build step is always run.
\r
4924 (2) The $(_AssemblyTimestampBeforeCompile) and $(_AssemblyTimestampAfterCompile) values are
\r
4925 set by the _TimeStampBeforeCompile and _TimeStampAfterCompile targets. If the assembly was actually
\r
4926 rebuilt during this build, then the two values will be different.
\r
4927 ============================================================
\r
4930 <PostBuildEventDependsOn></PostBuildEventDependsOn>
\r
4933 Name="PostBuildEvent"
\r
4934 Condition="'$(PostBuildEvent)' != '' and ('$(RunPostBuildEvent)' != 'OnOutputUpdated' or '$(_AssemblyTimestampBeforeCompile)' != '$(_AssemblyTimestampAfterCompile)')"
\r
4935 DependsOnTargets="$(PostBuildEventDependsOn)">
\r
4937 <Exec WorkingDirectory="$(OutDir)" Command="$(PostBuildEvent)" />
\r
4945 ***********************************************************************************************
\r
4946 ***********************************************************************************************
\r
4948 ***********************************************************************************************
\r
4949 ***********************************************************************************************
\r
4953 ============================================================
\r
4956 This target is only called when doing ClickOnce publishing outside the IDE, which implicitly builds before publishing.
\r
4957 ============================================================
\r
4960 <PublishDependsOn Condition="'$(PublishableProject)'=='true'">
\r
4961 SetGenerateManifests;
\r
4964 </PublishDependsOn>
\r
4965 <PublishDependsOn Condition="'$(PublishableProject)'!='true'">
\r
4966 _DeploymentUnpublishable
\r
4967 </PublishDependsOn>
\r
4971 DependsOnTargets="$(PublishDependsOn)"/>
\r
4974 ============================================================
\r
4975 _DeploymentUnpublishable
\r
4977 This target is used to block an attempt to ClickOnce publish a non-publishable project, such as a ClassLibrary, when building outside the IDE.
\r
4978 ============================================================
\r
4981 Name="_DeploymentUnpublishable">
\r
4983 <Message Text="Skipping unpublishable project."/>
\r
4988 ============================================================
\r
4989 SetGenerateManifests
\r
4991 This target simply assures the GenerateClickOnceManifests property is set whenever the publish target is invoked.
\r
4992 ============================================================
\r
4995 Name="SetGenerateManifests">
\r
4997 <Error Condition="'$(OutputType)'!='winexe' and '$(OutputType)'!='exe' and '$(OutputType)'!='appcontainerexe'" Text="Publish is only valid for 'Windows Application' or 'Console Application' project types."/>
\r
4998 <Error Condition="'$(_DeploymentSignClickOnceManifests)'=='true' and '$(ManifestCertificateThumbprint)'=='' and '$(ManifestKeyFile)'==''" Text="A signing key is required in order to publish this project. Please specify a ManifestKeyFile or ManifestCertificateThumbprint value. Publishing from Visual Studio will automatically configure a signing key for this project."/>
\r
5001 <GenerateClickOnceManifests>true</GenerateClickOnceManifests>
\r
5007 ============================================================
\r
5010 The "PublishOnly" target is intended for ClickOnce publishing inside the IDE, where the build has already been done
\r
5011 by the BuildManager.
\r
5012 ============================================================
\r
5015 <PublishOnlyDependsOn>
\r
5016 SetGenerateManifests;
\r
5019 GenerateManifests;
\r
5020 CopyFilesToOutputDirectory;
\r
5021 _CopyFilesToPublishFolder;
\r
5022 _DeploymentGenerateBootstrapper;
\r
5024 _DeploymentSignClickOnceDeployment;
\r
5026 </PublishOnlyDependsOn>
\r
5029 Name="PublishOnly"
\r
5030 DependsOnTargets="$(PublishOnlyDependsOn)"/>
\r
5033 ============================================================
\r
5036 Redefine this target in your project in order to run tasks just before Publish.
\r
5037 ============================================================
\r
5039 <Target Name="BeforePublish"/>
\r
5042 ============================================================
\r
5045 Redefine this target in your project in order to run tasks just after Publish.
\r
5046 ============================================================
\r
5048 <Target Name="AfterPublish"/>
\r
5051 ============================================================
\r
5054 Defines the set of targets that publishing is directly dependent on.
\r
5055 ============================================================
\r
5058 <PublishBuildDependsOn>
\r
5059 BuildOnlySettings;
\r
5061 ResolveReferences;
\r
5064 GenerateSerializationAssemblies;
\r
5065 CreateSatelliteAssemblies;
\r
5066 </PublishBuildDependsOn>
\r
5069 Name="PublishBuild"
\r
5070 DependsOnTargets="$(PublishBuildDependsOn)"/>
\r
5073 ============================================================
\r
5074 _CopyFilesToPublishFolder
\r
5075 ============================================================
\r
5078 Name="_CopyFilesToPublishFolder">
\r
5080 <!-- Compute name of application folder, which includes the assembly name plus formatted application version.
\r
5081 The application version is formatted to use "_" in place of "." chars (i.e. "1_0_0_0" instead of "1.0.0.0").
\r
5082 This is done because some servers misinterpret "." as a file extension. -->
\r
5083 <FormatVersion Version="$(ApplicationVersion)" Revision="$(ApplicationRevision)" FormatType="Path">
\r
5084 <Output TaskParameter="OutputVersion" PropertyName="_DeploymentApplicationVersionFragment"/>
\r
5088 <_DeploymentApplicationFolderName>Application Files\$(AssemblyName)_$(_DeploymentApplicationVersionFragment)</_DeploymentApplicationFolderName>
\r
5089 <_DeploymentApplicationDir>$(PublishDir)$(_DeploymentApplicationFolderName)\</_DeploymentApplicationDir>
\r
5093 <!-- By default we're not using Hard or Symbolic Links to copy to the publish directory, and never when building in VS -->
\r
5094 <CreateHardLinksForPublishFilesIfPossible Condition="'$(BuildingInsideVisualStudio)' == 'true' or '$(CreateHardLinksForPublishFilesIfPossible)' == ''">false</CreateHardLinksForPublishFilesIfPossible>
\r
5095 <CreateSymbolicLinksForPublishFilesIfPossible Condition="'$(BuildingInsideVisualStudio)' == 'true' or '$(CreateSymbolicLinksForPublishFilesIfPossible)' == ''">false</CreateSymbolicLinksForPublishFilesIfPossible>
\r
5098 <!-- Copy files to publish folder -->
\r
5101 "@(_ApplicationManifestFinal);
\r
5102 @(_DeploymentResolvedManifestEntryPoint);
\r
5103 @(_DeploymentManifestFiles);
\r
5104 @(ReferenceComWrappersToCopyLocal);
\r
5105 @(ResolvedIsolatedComModules);
\r
5106 @(_DeploymentLooseManifestFile)"
\r
5108 "@(_ApplicationManifestFinal->'$(_DeploymentApplicationDir)%(TargetPath)');
\r
5109 @(_DeploymentManifestEntryPoint->'$(_DeploymentApplicationDir)%(TargetPath)$(_DeploymentFileMappingExtension)');
\r
5110 @(_DeploymentManifestFiles->'$(_DeploymentApplicationDir)%(TargetPath)$(_DeploymentFileMappingExtension)');
\r
5111 @(ReferenceComWrappersToCopyLocal->'$(_DeploymentApplicationDir)%(FileName)%(Extension)$(_DeploymentFileMappingExtension)');
\r
5112 @(ResolvedIsolatedComModules->'$(_DeploymentApplicationDir)%(FileName)%(Extension)$(_DeploymentFileMappingExtension)');
\r
5113 @(_DeploymentLooseManifestFile->'$(_DeploymentApplicationDir)%(FileName)%(Extension)$(_DeploymentFileMappingExtension)')"
\r
5114 SkipUnchangedFiles="$(SkipCopyUnchangedFiles)"
\r
5115 OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)"
\r
5116 Retries="$(CopyRetryCount)"
\r
5117 UseHardlinksIfPossible="$(CreateHardLinksForPublishFilesIfPossible)"
\r
5118 UseSymboliclinksIfPossible="$(CreateSymbolicLinksForPublishFilesIfPossible)"
\r
5119 RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"/>
\r
5122 SourceFiles="@(_DeploymentManifestDependencies)"
\r
5123 DestinationFiles="@(_DeploymentManifestDependencies->'$(_DeploymentApplicationDir)%(TargetPath)$(_DeploymentFileMappingExtension)')"
\r
5124 SkipUnchangedFiles="$(SkipCopyUnchangedFiles)"
\r
5125 OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)"
\r
5126 Retries="$(CopyRetryCount)"
\r
5127 RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"
\r
5128 UseHardlinksIfPossible="$(CreateHardLinksForPublishFilesIfPossible)"
\r
5129 UseSymboliclinksIfPossible="$(CreateSymbolicLinksForPublishFilesIfPossible)"
\r
5130 Condition="'%(_DeploymentManifestDependencies.DependencyType)'=='Install'"/>
\r
5133 SourceFiles="@(_ReferenceScatterPaths)"
\r
5134 DestinationFiles="@(_ReferenceScatterPaths->'$(_DeploymentApplicationDir)%(Filename)%(Extension)$(_DeploymentFileMappingExtension)')"
\r
5135 SkipUnchangedFiles="$(SkipCopyUnchangedFiles)"
\r
5136 OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)"
\r
5137 Retries="$(CopyRetryCount)"
\r
5138 RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"
\r
5139 UseHardlinksIfPossible="$(CreateHardLinksForPublishFilesIfPossible)"
\r
5140 UseSymboliclinksIfPossible="$(CreateSymbolicLinksForPublishFilesIfPossible)"
\r
5143 <FormatUrl InputUrl="$(_DeploymentApplicationUrl)">
\r
5144 <Output TaskParameter="OutputUrl" PropertyName="_DeploymentFormattedApplicationUrl"/>
\r
5147 <FormatUrl InputUrl="$(_DeploymentComponentsUrl)">
\r
5148 <Output TaskParameter="OutputUrl" PropertyName="_DeploymentFormattedComponentsUrl"/>
\r
5154 ============================================================
\r
5155 _DeploymentGenerateBootstrapper
\r
5156 ============================================================
\r
5159 Name="_DeploymentGenerateBootstrapper">
\r
5161 <!-- Build setup.exe bootstrapper and copy referenced packages -->
\r
5162 <GenerateBootstrapper
\r
5163 ApplicationFile="$(TargetDeployManifestFileName)"
\r
5164 ApplicationName="$(AssemblyName)"
\r
5165 ApplicationUrl="$(_DeploymentFormattedApplicationUrl)"
\r
5166 BootstrapperItems="@(BootstrapperPackage)"
\r
5167 ComponentsLocation="$(BootstrapperComponentsLocation)"
\r
5168 ComponentsUrl="$(_DeploymentFormattedComponentsUrl)"
\r
5169 Culture="$(TargetCulture)"
\r
5170 FallbackCulture="$(FallbackCulture)"
\r
5171 OutputPath="$(PublishDir)"
\r
5172 SupportUrl="$(_DeploymentFormattedSupportUrl)"
\r
5173 Path="$(GenerateBootstrapperSdkPath)"
\r
5174 VisualStudioVersion="$(VisualStudioVersion)"
\r
5175 Condition="'$(BootstrapperEnabled)'=='true'"/>
\r
5180 ============================================================
\r
5181 _DeploymentSignClickOnceDeployment
\r
5182 ============================================================
\r
5185 Name="_DeploymentSignClickOnceDeployment">
\r
5187 <!-- Sign manifests and the bootstrapper -->
\r
5189 CertificateThumbprint="$(_DeploymentResolvedManifestCertificateThumbprint)"
\r
5190 TimestampUrl="$(ManifestTimestampUrl)"
\r
5191 SigningTarget="$(_DeploymentApplicationDir)$(_DeploymentTargetApplicationManifestFileName)"
\r
5192 TargetFrameworkVersion="$(TargetFrameworkVersion)"
\r
5193 Condition="'$(_DeploymentSignClickOnceManifests)'=='true'" />
\r
5195 <!-- Update entry point path in deploy manifest -->
\r
5197 ApplicationPath="$(_DeploymentApplicationFolderName)\$(_DeploymentTargetApplicationManifestFileName)"
\r
5198 TargetFrameworkVersion="$(TargetFrameworkVersion)"
\r
5199 ApplicationManifest="$(_DeploymentApplicationDir)$(_DeploymentTargetApplicationManifestFileName)"
\r
5200 InputManifest="$(OutDir)$(TargetDeployManifestFileName)"
\r
5201 OutputManifest="$(PublishDir)$(TargetDeployManifestFileName)">
\r
5203 <Output TaskParameter="OutputManifest" ItemName="PublishedDeployManifest"/>
\r
5208 CertificateThumbprint="$(_DeploymentResolvedManifestCertificateThumbprint)"
\r
5209 TimestampUrl="$(ManifestTimestampUrl)"
\r
5210 SigningTarget="$(PublishDir)$(TargetDeployManifestFileName)"
\r
5211 TargetFrameworkVersion="$(TargetFrameworkVersion)"
\r
5212 Condition="'$(_DeploymentSignClickOnceManifests)'=='true'" />
\r
5215 CertificateThumbprint="$(_DeploymentResolvedManifestCertificateThumbprint)"
\r
5216 TimestampUrl="$(ManifestTimestampUrl)"
\r
5217 SigningTarget="$(PublishDir)\setup.exe"
\r
5218 Condition="'$(BootstrapperEnabled)'=='true' and '$(_DeploymentSignClickOnceManifests)'=='true'" />
\r
5227 ***********************************************************************************************
\r
5228 ***********************************************************************************************
\r
5229 AllProjectOutputGroups Section
\r
5230 ***********************************************************************************************
\r
5231 ***********************************************************************************************
\r
5235 ============================================================
\r
5236 AllProjectOutputGroups
\r
5238 The targets below drive output groups, which provide generic information about a
\r
5239 project's inputs (e.g., content files, compilation sources, etc.) and built outputs
\r
5240 (e.g., built EXE/DLL, PDB, XML documentation files, etc.)
\r
5242 Each target may produce two kinds of items: outputs and dependencies. Outputs are
\r
5243 items from the current project; dependencies are items that are brought into the
\r
5244 current project as a result of referencing other projects or components.
\r
5246 For both outputs and dependencies, the Include attribute
\r
5247 specifies the location of the output/dependency; it must be a full path. Any number
\r
5248 of additional attributes may be placed on an output/dependency item.
\r
5249 ============================================================
\r
5252 Name="AllProjectOutputGroups"
\r
5253 DependsOnTargets="
\r
5254 BuiltProjectOutputGroup;
\r
5255 DebugSymbolsProjectOutputGroup;
\r
5256 DocumentationProjectOutputGroup;
\r
5257 SatelliteDllsProjectOutputGroup;
\r
5258 SourceFilesProjectOutputGroup;
\r
5259 ContentFilesProjectOutputGroup;
\r
5260 SGenFilesOutputGroup"/>
\r
5263 This is the key output for the BuiltProjectOutputGroup and is meant to be read directly from the IDE.
\r
5264 Reading an item is faster than invoking a target.
\r
5266 <ItemGroup Condition=" '$(OutputType)' != 'winmdobj' ">
\r
5267 <BuiltProjectOutputGroupKeyOutput Include="@(IntermediateAssembly->'%(FullPath)')">
\r
5268 <IsKeyOutput>true</IsKeyOutput>
\r
5269 <FinalOutputPath>$(TargetPath)</FinalOutputPath>
\r
5270 <TargetPath>$(TargetFileName)</TargetPath>
\r
5271 <COM2REG Condition="'$(RegisterForComInterop)'=='true' and '$(OutputType)'=='library'">true</COM2REG>
\r
5272 </BuiltProjectOutputGroupKeyOutput>
\r
5275 <ItemGroup Condition=" '$(OutputType)' == 'winmdobj' ">
\r
5276 <WinMDExpOutputWindowsMetadataFileItem Include="$(_IntermediateWindowsMetadataPath)" Condition="'$(_IntermediateWindowsMetadataPath)' != ''" />
\r
5277 <BuiltProjectOutputGroupKeyOutput Include="@(WinMDExpOutputWindowsMetadataFileItem->'%(FullPath)')">
\r
5278 <IsKeyOutput>true</IsKeyOutput>
\r
5279 <FinalOutputPath>$(TargetPath)</FinalOutputPath>
\r
5280 <TargetPath>$(TargetFileName)</TargetPath>
\r
5281 </BuiltProjectOutputGroupKeyOutput>
\r
5285 ============================================================
\r
5286 BuiltProjectOutputGroup
\r
5287 ============================================================
\r
5290 <BuiltProjectOutputGroupDependsOn>PrepareForBuild</BuiltProjectOutputGroupDependsOn>
\r
5291 <AddAppConfigToBuildOutputs Condition="('$(AddAppConfigToBuildOutputs)'=='') and ('$(OutputType)'!='library' and '$(OutputType)'!='winmdobj')">true</AddAppConfigToBuildOutputs>
\r
5294 Name="BuiltProjectOutputGroup"
\r
5295 Returns="@(BuiltProjectOutputGroupOutput)"
\r
5296 DependsOnTargets="$(BuiltProjectOutputGroupDependsOn)">
\r
5299 <_BuiltProjectOutputGroupOutputIntermediate Include="@(BuiltProjectOutputGroupKeyOutput)"/>
\r
5302 <!-- This item represents the app.config file -->
\r
5304 <_BuiltProjectOutputGroupOutputIntermediate Include="$(AppConfig)" Condition="'$(AddAppConfigToBuildOutputs)'=='true'">
\r
5305 <FinalOutputPath>$(TargetDir)$(TargetFileName).config</FinalOutputPath>
\r
5306 <TargetPath>$(TargetFileName).config</TargetPath>
\r
5307 <!-- For compatibility with 2.0 -->
\r
5308 <OriginalItemSpec>$(AppConfig)</OriginalItemSpec>
\r
5309 </_BuiltProjectOutputGroupOutputIntermediate>
\r
5313 <_IsolatedComReference Include="@(COMReference)" Condition=" '%(COMReference.Isolated)' == 'true' "/>
\r
5314 <_IsolatedComReference Include="@(COMFileReference)" Condition=" '%(COMFileReference.Isolated)' == 'true' "/>
\r
5317 <!-- This item represents the native manifest, example: WindowsApplication1.exe.manifest or Native.ClassLibrary1.manifest -->
\r
5319 <_BuiltProjectOutputGroupOutputIntermediate Include="$(OutDir)$(_DeploymentTargetApplicationManifestFileName)" Condition="'@(NativeReference)'!='' or '@(_IsolatedComReference)'!=''">
\r
5320 <TargetPath>$(_DeploymentTargetApplicationManifestFileName)</TargetPath>
\r
5321 <!-- For compatibility with 2.0 -->
\r
5322 <OriginalItemSpec>$(OutDir)$(_DeploymentTargetApplicationManifestFileName)</OriginalItemSpec>
\r
5323 </_BuiltProjectOutputGroupOutputIntermediate>
\r
5326 <!-- Convert intermediate items into final items; this way we can get the full path for each item -->
\r
5328 <BuiltProjectOutputGroupOutput Include="@(_BuiltProjectOutputGroupOutputIntermediate->'%(FullPath)')">
\r
5329 <!-- For compatibility with 2.0 -->
\r
5330 <OriginalItemSpec Condition="'%(_BuiltProjectOutputGroupOutputIntermediate.OriginalItemSpec)' == ''">%(_BuiltProjectOutputGroupOutputIntermediate.FullPath)</OriginalItemSpec>
\r
5331 </BuiltProjectOutputGroupOutput>
\r
5337 ============================================================
\r
5338 DebugSymbolsProjectOutputGroup
\r
5340 This target performs population of the Debug Symbols project output group.
\r
5341 ============================================================
\r
5344 <DebugSymbolsProjectOutputGroupDependsOn></DebugSymbolsProjectOutputGroupDependsOn>
\r
5346 <ItemGroup Condition="'$(_DebugSymbolsProduced)' != 'false' and '$(OutputType)' != 'winmdobj'">
\r
5347 <DebugSymbolsProjectOutputGroupOutput Include="@(_DebugSymbolsIntermediatePath->'%(FullPath)')">
\r
5348 <FinalOutputPath>@(_DebugSymbolsOutputPath->'%(FullPath)')</FinalOutputPath>
\r
5349 <TargetPath>@(_DebugSymbolsIntermediatePath->'%(Filename)%(Extension)')</TargetPath>
\r
5350 </DebugSymbolsProjectOutputGroupOutput>
\r
5352 <ItemGroup Condition="'$(_DebugSymbolsProduced)' != 'false' and '$(OutputType)' == 'winmdobj'">
\r
5353 <WinMDExpOutputPdbItem Include="$(WinMDExpOutputPdb)" Condition="'$(WinMDExpOutputPdb)' != ''" />
\r
5354 <WinMDExpFinalOutputPdbItem Include="$(_WinMDDebugSymbolsOutputPath)" Condition="'$(_WinMDDebugSymbolsOutputPath)' != ''" />
\r
5355 <DebugSymbolsProjectOutputGroupOutput Include="@(WinMDExpOutputPdbItem->'%(FullPath)')">
\r
5356 <FinalOutputPath>@(WinMDExpFinalOutputPdbItem->'%(FullPath)')</FinalOutputPath>
\r
5357 <TargetPath>@(WinMDExpOutputPdbItem->'%(Filename)%(Extension)')</TargetPath>
\r
5358 </DebugSymbolsProjectOutputGroupOutput>
\r
5361 Name="DebugSymbolsProjectOutputGroup"
\r
5362 Returns="@(DebugSymbolsProjectOutputGroupOutput)"
\r
5363 DependsOnTargets="$(DebugSymbolsProjectOutputGroupDependsOn)"/>
\r
5366 ============================================================
\r
5367 DocumentationProjectOutputGroup
\r
5369 This target performs population of the Documentation project output group.
\r
5370 ============================================================
\r
5373 <DocumentationProjectOutputGroupDependsOn></DocumentationProjectOutputGroupDependsOn>
\r
5375 <ItemGroup Condition="'$(DocumentationFile)'!='' and '$(OutputType)' != 'winmdobj'">
\r
5376 <DocumentationProjectOutputGroupOutput Include="@(DocFileItem->'%(FullPath)')">
\r
5377 <FinalOutputPath>@(FinalDocFile->'%(FullPath)')</FinalOutputPath>
\r
5378 <IsKeyOutput>true</IsKeyOutput>
\r
5379 <TargetPath>@(DocFileItem->'%(Filename)%(Extension)')</TargetPath>
\r
5380 </DocumentationProjectOutputGroupOutput>
\r
5382 <ItemGroup Condition="'$(DocumentationFile)' != '' and '$(OutputType)' == 'winmdobj'">
\r
5383 <WinMDOutputDocumentationFileItem Include="$(WinMDOutputDocumentationFile)" Condition="'$(WinMDOutputDocumentationFile)' != ''" />
\r
5384 <WinMDExpFinalOutputDocItem Include="$(_WinMDDocFileOutputPath)" Condition="'$(_WinMDDocFileOutputPath)' != ''" />
\r
5385 <DocumentationProjectOutputGroupOutput Include="@(WinMDOutputDocumentationFileItem->'%(FullPath)')">
\r
5386 <FinalOutputPath>@(WinMDExpFinalOutputDocItem->'%(FullPath)')</FinalOutputPath>
\r
5387 <TargetPath>@(WinMDOutputDocumentationFileItem->'%(Filename)%(Extension)')</TargetPath>
\r
5388 </DocumentationProjectOutputGroupOutput>
\r
5391 Name="DocumentationProjectOutputGroup"
\r
5392 Returns="@(DocumentationProjectOutputGroupOutput)"
\r
5393 DependsOnTargets="$(DocumentationProjectOutputGroupDependsOn)"/>
\r
5396 ============================================================
\r
5397 SatelliteDllsProjectOutputGroup
\r
5399 This target performs population of the Satellite Files project output group.
\r
5400 ============================================================
\r
5403 <SatelliteDllsProjectOutputGroupDependsOn>PrepareForBuild;PrepareResourceNames</SatelliteDllsProjectOutputGroupDependsOn>
\r
5406 Name="SatelliteDllsProjectOutputGroup"
\r
5407 Returns="@(SatelliteDllsProjectOutputGroupOutput)"
\r
5408 DependsOnTargets="$(SatelliteDllsProjectOutputGroupDependsOn)">
\r
5411 <SatelliteDllsProjectOutputGroupOutputIntermediate Include="$(IntermediateOutputPath)%(EmbeddedResource.Culture)\$(TargetName).resources.dll"
\r
5412 Condition="'%(WithCulture)' == 'true'">
\r
5413 <TargetPath>%(EmbeddedResource.Culture)\$(TargetName).resources.dll</TargetPath>
\r
5414 <Culture>%(EmbeddedResource.Culture)</Culture>
\r
5415 </SatelliteDllsProjectOutputGroupOutputIntermediate>
\r
5418 <!-- Convert intermediate items into final items; this way we can get the full path for each item. -->
\r
5420 <SatelliteDllsProjectOutputGroupOutput Include="@(SatelliteDllsProjectOutputGroupOutputIntermediate->'%(FullPath)')">
\r
5421 <FinalOutputPath>$(TargetDir)%(SatelliteDllsProjectOutputGroupOutputIntermediate.TargetPath)</FinalOutputPath>
\r
5422 <!-- For compatibility with 2.0 -->
\r
5423 <OriginalItemSpec>%(SatelliteDllsProjectOutputGroupOutputIntermediate.Identity)</OriginalItemSpec>
\r
5424 </SatelliteDllsProjectOutputGroupOutput>
\r
5430 ============================================================
\r
5431 SourceFilesProjectOutputGroup
\r
5433 This target performs population of the Source Files project output group.
\r
5434 Source files are items in the project whose type is "Compile" and "EmbeddedResource".
\r
5435 ============================================================
\r
5438 <SourceFilesProjectOutputGroupDependsOn>PrepareForBuild;AssignTargetPaths</SourceFilesProjectOutputGroupDependsOn>
\r
5441 Name="SourceFilesProjectOutputGroup"
\r
5442 Returns="@(SourceFilesProjectOutputGroupOutput)"
\r
5443 DependsOnTargets="$(SourceFilesProjectOutputGroupDependsOn)">
\r
5445 <AssignTargetPath Files="@(Compile)" RootFolder="$(MSBuildProjectDirectory)">
\r
5446 <Output TaskParameter="AssignedFiles" ItemName="_CompileWithTargetPath" />
\r
5447 </AssignTargetPath>
\r
5450 <!-- First we deal with Compile, EmbeddedResource and AppConfig -->
\r
5451 <SourceFilesProjectOutputGroupOutput Include="@(_CompileWithTargetPath->'%(FullPath)');@(EmbeddedResource->'%(FullPath)');@(_LicxFile->'%(FullPath)');@(AppConfigWithTargetPath->'%(FullPath)')"/>
\r
5453 <!-- Include the project file -->
\r
5454 <SourceFilesProjectOutputGroupOutput Include="$(MSBuildProjectFullPath)">
\r
5455 <!-- For compatibility with 2.0 -->
\r
5456 <OriginalItemSpec>$(MSBuildProjectFullPath)</OriginalItemSpec>
\r
5457 <TargetPath>$(ProjectFileName)</TargetPath>
\r
5458 </SourceFilesProjectOutputGroupOutput>
\r
5463 <!-- Get just the compile items -->
\r
5464 <Target Name="GetCompile" Returns="@(Compile)"/>
\r
5467 ============================================================
\r
5468 ContentFilesProjectOutputGroup
\r
5470 This target performs population of the Content Files project output group.
\r
5471 Content files are items in the project whose type is "Content".
\r
5472 ============================================================
\r
5475 <ContentFilesProjectOutputGroupDependsOn>PrepareForBuild;AssignTargetPaths</ContentFilesProjectOutputGroupDependsOn>
\r
5478 Name="ContentFilesProjectOutputGroup"
\r
5479 Returns="@(ContentFilesProjectOutputGroupOutput)"
\r
5480 DependsOnTargets="$(ContentFilesProjectOutputGroupDependsOn)">
\r
5482 <!-- Convert items into final items; this way we can get the full path for each item. -->
\r
5484 <ContentFilesProjectOutputGroupOutput Include="@(ContentWithTargetPath->'%(FullPath)')"/>
\r
5490 ============================================================
\r
5491 SGenFilesOutputGroup
\r
5493 This target performs population of the GenerateSerializationAssemblies Files project output group.
\r
5494 GenerateSerializationAssemblies files are those generated by the GenerateSerializationAssemblies target and task.
\r
5495 ============================================================
\r
5498 <SGenFilesOutputGroupDependsOn></SGenFilesOutputGroupDependsOn>
\r
5501 Condition="'$(_SGenGenerateSerializationAssembliesConfig)' == 'On' or ('@(WebReferenceUrl)'!='' and '$(_SGenGenerateSerializationAssembliesConfig)' == 'Auto')">
\r
5502 <SGenFilesOutputGroupOutput Include="@(_OutputPathItem->'%(FullPath)$(_SGenDllName)')">
\r
5503 <FinalOutputPath>@(_OutputPathItem->'%(FullPath)$(_SGenDllName)')</FinalOutputPath>
\r
5504 <TargetPath>$(_SGenDllName)</TargetPath>
\r
5505 </SGenFilesOutputGroupOutput>
\r
5508 Name="SGenFilesOutputGroup"
\r
5509 Returns="@(SGenFilesOutputGroupOutput)"
\r
5510 DependsOnTargets="$(SGenFilesOutputGroupDependsOn)"/>
\r
5513 ============================================================
\r
5514 SDKRelated Output groups
\r
5516 These targets are to gather information from the SDKs.
\r
5517 ============================================================
\r
5519 <!-- Get the resolved SDK reference items -->
\r
5520 <Target Name="GetResolvedSDKReferences" DependsOnTargets="ResolveSDKReferences" Returns="@(ResolvedSDKReference)"/>
\r
5523 ============================================================
\r
5524 PriFilesOutputGroup
\r
5526 This target performs population of the pri files output group
\r
5527 ============================================================
\r
5530 Name="PriFilesOutputGroup"
\r
5531 Condition="'@(_ReferenceRelatedPaths)' != ''"
\r
5532 DependsOnTargets="BuildOnlySettings;PrepareForBuild;AssignTargetPaths;ResolveReferences"
\r
5533 Returns="@(PriFilesOutputGroupOutput)">
\r
5535 <!-- This item represents dependent pri file's -->
\r
5537 <PriFilesOutputGroupOutput Include="@(_ReferenceRelatedPaths->'%(FullPath)')" Condition="'%(Extension)' == '.pri'"/>
\r
5543 <SDKRedistOutputGroupDependsOn>ResolveSDKReferences;ExpandSDKReferences</SDKRedistOutputGroupDependsOn>
\r
5547 ============================================================
\r
5548 SDKRedistOutputGroup
\r
5550 This target gathers the Redist folders from the SDKs which have been resolved.
\r
5551 ============================================================
\r
5554 Name="SDKRedistOutputGroup"
\r
5555 Returns="@(SDKRedistOutputGroupOutput)"
\r
5556 DependsOnTargets="$(SDKRedistOutputGroupDependsOn)">
\r
5558 <!-- This list starts with the least specific files to the most specific so that later files can overwrite earlier files-->
\r
5560 <SDKRedistOutputGroupOutput Include="@(ResolvedRedistFiles)"/>
\r
5565 ***********************************************************************************************
\r
5566 ***********************************************************************************************
\r
5567 AllProjectOutputGroupsDependencies Section
\r
5568 ***********************************************************************************************
\r
5569 ***********************************************************************************************
\r
5573 ============================================================
\r
5574 AllProjectOutputGroupsDependencies
\r
5575 ============================================================
\r
5578 Name="AllProjectOutputGroupsDependencies"
\r
5579 DependsOnTargets="
\r
5580 BuiltProjectOutputGroupDependencies;
\r
5581 DebugSymbolsProjectOutputGroupDependencies;
\r
5582 SatelliteDllsProjectOutputGroupDependencies;
\r
5583 DocumentationProjectOutputGroupDependencies;
\r
5584 SGenFilesOutputGroupDependencies"/>
\r
5587 ============================================================
\r
5588 BuiltProjectOutputGroupDependencies
\r
5590 This target performs population of the Built project output group dependencies.
\r
5591 ============================================================
\r
5594 Name="BuiltProjectOutputGroupDependencies"
\r
5595 DependsOnTargets="BuildOnlySettings;PrepareForBuild;AssignTargetPaths;ResolveReferences"
\r
5596 Returns="@(BuiltProjectOutputGroupDependency)">
\r
5599 <BuiltProjectOutputGroupDependency Include="@(ReferencePath->'%(FullPath)');
\r
5600 @(ReferenceDependencyPaths->'%(FullPath)');
\r
5601 @(NativeReferenceFile->'%(FullPath)');
\r
5602 @(_DeploymentLooseManifestFile->'%(FullPath)');
\r
5603 @(ResolvedIsolatedComModules->'%(FullPath)')"/>
\r
5609 ============================================================
\r
5610 DebugSymbolsProjectOutputGroupDependencies
\r
5612 This target performs population of the dependencies for the debug symbols project output group.
\r
5613 ============================================================
\r
5616 Name="DebugSymbolsProjectOutputGroupDependencies"
\r
5617 Condition="'$(DebugSymbols)'!='false'"
\r
5618 DependsOnTargets="BuildOnlySettings;PrepareForBuild;AssignTargetPaths;ResolveReferences"
\r
5619 Returns="@(DebugSymbolsProjectOutputGroupDependency)">
\r
5621 <!-- This item represents dependent PDB's -->
\r
5623 <DebugSymbolsProjectOutputGroupDependency Include="@(_ReferenceRelatedPaths->'%(FullPath)')" Condition="'%(Extension)' == '.pdb'"/>
\r
5629 ============================================================
\r
5630 SatelliteDllsProjectOutputGroupDependencies
\r
5632 This target performs population of the dependencies for the satellite files project output group.
\r
5633 ============================================================
\r
5636 Name="SatelliteDllsProjectOutputGroupDependencies"
\r
5637 DependsOnTargets="BuildOnlySettings;PrepareForBuild;AssignTargetPaths;ResolveReferences"
\r
5638 Returns="@(SatelliteDllsProjectOutputGroupDependency)">
\r
5640 <!-- This item represents dependent satellites -->
\r
5642 <SatelliteDllsProjectOutputGroupDependency Include="@(ReferenceSatellitePaths->'%(FullPath)')"/>
\r
5648 ============================================================
\r
5649 DocumentationProjectOutputGroupDependencies
\r
5651 This target performs population of the dependencies for the documentation project output group.
\r
5652 ============================================================
\r
5655 Name="DocumentationProjectOutputGroupDependencies"
\r
5656 Condition="'$(DocumentationFile)'!=''"
\r
5657 DependsOnTargets="BuildOnlySettings;PrepareForBuild;AssignTargetPaths;ResolveReferences"
\r
5658 Returns="@(DocumentationProjectOutputGroupDependency)">
\r
5660 <!-- This item represents dependent XMLs -->
\r
5662 <DocumentationProjectOutputGroupDependency Include="@(_ReferenceRelatedPaths->'%(FullPath)')" Condition="'%(Extension)' == '.xml'"/>
\r
5668 ============================================================
\r
5669 SGenFilesOutputGroupDependencies
\r
5671 This target performs population of the dependencies for the GenerateSerializationAssemblies project output group.
\r
5672 ============================================================
\r
5675 Name="SGenFilesOutputGroupDependencies"
\r
5676 DependsOnTargets="BuildOnlySettings;PrepareForBuild;AssignTargetPaths;ResolveReferences"
\r
5677 Returns="@(SGenFilesOutputGroupDependency)">
\r
5679 <!-- This item represents sgen xml serializer dll's -->
\r
5681 <SGenFilesOutputGroupDependency Include="@(_ReferenceSerializationAssemblyPaths->'%(FullPath)')" Condition="'%(Extension)' == '.dll'"/>
\r
5687 <CodeAnalysisTargets Condition="'$(CodeAnalysisTargets)'==''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CodeAnalysis\Microsoft.CodeAnalysis.targets</CodeAnalysisTargets>
\r
5690 <Import Project="$(CodeAnalysisTargets)" Condition="Exists('$(CodeAnalysisTargets)')"/>
\r
5692 <Import Project="$(ReportingServicesTargets)" Condition="Exists('$(ReportingServicesTargets)')"/>
\r
5694 <Import Project="$(MSBuildToolsPath)\Microsoft.NETFramework.targets" Condition="('$(TargetFrameworkIdentifier)' == '' or '$(TargetFrameworkIdentifier)' == '.NETFramework') and ('$(TargetRuntime)' == 'Managed')"/>
\r
5697 <ImportXamlTargets Condition="'$(ImportXamlTargets)'=='' and ('$(TargetFrameworkVersion)' != 'v2.0' and '$(TargetFrameworkVersion)' != 'v3.5') and Exists('$(MSBuildToolsPath)\Microsoft.Xaml.targets')">true</ImportXamlTargets>
\r
5700 <Import Project="$(MSBuildToolsPath)\Microsoft.Xaml.targets" Condition="('$(ImportXamlTargets)' == 'true')" />
\r
5702 <!-- imports Microsoft.WorkflowBuildExtensions.targets only if TargetFrameworkVersion is v4.5 or above or TargetFrameworkfVersion specified does not conform to the format of vX.X[.X.X] -->
\r
5703 <!-- Underlying assumption is that there shouldn't be any other versions between v4.0.* and v4.5 -->
\r
5704 <Import Project="$(MSBuildToolsPath)\Microsoft.WorkflowBuildExtensions.targets"
\r
5705 Condition="('$(TargetFrameworkVersion)' != 'v2.0' and '$(TargetFrameworkVersion)' != 'v3.5' and (!$([System.String]::IsNullOrEmpty('$(TargetFrameworkVersion)')) and !$(TargetFrameworkVersion.StartsWith('v4.0')))) and Exists('$(MSBuildToolsPath)\Microsoft.WorkflowBuildExtensions.targets')"/>
\r
5707 <!-- This import is temporary and will be removed once it is moved into the silverlight targets -->
\r
5708 <Import Project="$(MSBuildToolsPath)\Microsoft.WinFX.targets" Condition="'$(TargetFrameworkIdentifier)' == 'Silverlight' and Exists('$(MSBuildToolsPath)\Microsoft.WinFX.targets')"/>
\r
5711 <MsTestToolsTargets Condition="'$(MsTestToolsTargets)'==''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\TeamTest\Microsoft.TeamTest.targets</MsTestToolsTargets>
\r
5714 <Import Project="$(MsTestToolsTargets)" Condition="Exists('$(MsTestToolsTargets)')" />
\r
5716 <!-- App packaging support -->
\r
5719 Following two targets are needed to be present in every project being built
\r
5720 because the app packaging targets recursively scan all projects referenced
\r
5721 from projects that generate app packages for them.
\r
5723 <Target Name="CleanAppxPackage" />
\r
5724 <Target Name="GetPackagingOutputs" />
\r
5727 <MsAppxPackageTargets Condition="'$(MsAppxPackageTargets)'==''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\AppxPackage\Microsoft.AppXPackage.Targets</MsAppxPackageTargets>
\r
5730 <Import Project="$(MsAppxPackageTargets)" Condition="'$(WindowsAppContainer)' == 'true' and Exists('$(MsAppxPackageTargets)')" />
\r
5732 <!-- This import is temporary and will be removed once it is moved into the silverlight targets -->
\r
5733 <Import Project="$(MSBuildToolsPath)\Microsoft.Data.Entity.targets" Condition="'$(TargetFrameworkIdentifier)' == 'Silverlight' and Exists('$(MSBuildToolsPath)\Microsoft.Data.Entity.targets')"/>
\r
5735 <Import Project="$(CustomAfterMicrosoftCommonTargets)" Condition="'$(CustomAfterMicrosoftCommonTargets)' != '' and Exists('$(CustomAfterMicrosoftCommonTargets)')"/>
\r
5737 <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.targets\ImportAfter\*" Condition="'$(ImportByWildcardAfterMicrosoftCommonTargets)' == 'true' and exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.targets\ImportAfter')"/>
\r
5738 <Import Project="$(MSBuildUserExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.targets\ImportAfter\*" Condition="'$(ImportUserLocationsByWildcardAfterMicrosoftCommonTargets)' == 'true' and exists('$(MSBuildUserExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.targets\ImportAfter')"/>
\r