Advertisement
Guest User

asd

a guest
Jun 30th, 2016
291
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <!--
  2. ***********************************************************************************************
  3. Microsoft.Common.CurrentVersion.targets
  4.  
  5. WARNING:  DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
  6.           created a backup copy.  Incorrect changes to this file will make it
  7.           impossible to load or build your projects from the command-line or the IDE.
  8.  
  9. This file defines the steps in the standard build process for .NET projects.  It
  10. contains all the steps that are common among the different .NET languages, such as
  11. Visual Basic, and Visual C#.
  12.  
  13. Copyright (C) Microsoft Corporation. All rights reserved.
  14. ***********************************************************************************************
  15. -->
  16.  
  17. <Project DefaultTargets="Build" InitialTargets="_CheckForInvalidConfigurationAndPlatform" TreatAsLocalProperty="OutDir" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  18.  
  19.   <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="'$(MicrosoftCommonPropsHasBeenImported)' != 'true' and Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
  20.  
  21.   <PropertyGroup>
  22.     <ImportByWildcardBeforeMicrosoftCommonTargets Condition="'$(ImportByWildcardBeforeMicrosoftCommonTargets)' == ''">true</ImportByWildcardBeforeMicrosoftCommonTargets>
  23.     <ImportByWildcardAfterMicrosoftCommonTargets Condition="'$(ImportByWildcardAfterMicrosoftCommonTargets)' == ''">true</ImportByWildcardAfterMicrosoftCommonTargets>
  24.     <ImportUserLocationsByWildcardBeforeMicrosoftCommonTargets Condition="'$(ImportUserLocationsByWildcardBeforeMicrosoftCommonTargets)' == ''">true</ImportUserLocationsByWildcardBeforeMicrosoftCommonTargets>
  25.     <ImportUserLocationsByWildcardAfterMicrosoftCommonTargets Condition="'$(ImportUserLocationsByWildcardAfterMicrosoftCommonTargets)' == ''">true</ImportUserLocationsByWildcardAfterMicrosoftCommonTargets>
  26.   </PropertyGroup>
  27.  
  28.   <Import Project="$(MSBuildUserExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.targets\ImportBefore\*" Condition="'$(ImportUserLocationsByWildcardBeforeMicrosoftCommonTargets)' == 'true' and exists('$(MSBuildUserExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.targets\ImportBefore')"/>
  29.   <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.targets\ImportBefore\*" Condition="'$(ImportByWildcardBeforeMicrosoftCommonTargets)' == 'true' and exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.targets\ImportBefore')"/>
  30.  
  31.   <Import Project="$(MSBuildProjectFullPath).user" Condition="Exists('$(MSBuildProjectFullPath).user')"/>
  32.  
  33.  
  34.   <!-- VS10 without SP1 and without VS11 will not have VisualStudioVersion set, so do that here -->
  35.   <PropertyGroup>
  36.     <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
  37.   </PropertyGroup>
  38.  
  39.   <PropertyGroup>
  40.     <CustomBeforeMicrosoftCommonTargets Condition="'$(CustomBeforeMicrosoftCommonTargets)'==''">$(MSBuildExtensionsPath)\v$(MSBuildToolsVersion)\Custom.Before.Microsoft.Common.targets</CustomBeforeMicrosoftCommonTargets>
  41.     <CustomAfterMicrosoftCommonTargets Condition="'$(CustomAfterMicrosoftCommonTargets)'==''">$(MSBuildExtensionsPath)\v$(MSBuildToolsVersion)\Custom.After.Microsoft.Common.targets</CustomAfterMicrosoftCommonTargets>
  42.     <ReportingServicesTargets Condition="'$(ReportingServicesTargets)'==''">$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v$(VisualStudioVersion)\ReportingServices\Microsoft.ReportingServices.targets</ReportingServicesTargets>
  43.   </PropertyGroup>
  44.  
  45.   <Import Project="$(CustomBeforeMicrosoftCommonTargets)" Condition="'$(CustomBeforeMicrosoftCommonTargets)' != '' and Exists('$(CustomBeforeMicrosoftCommonTargets)')"/>
  46.  
  47.   <!-- By default, we are creating a managed app because .NET 2.0 projects did not have this property. -->
  48.   <PropertyGroup Condition="'$(TargetRuntime)' == ''">
  49.     <TargetRuntime>Managed</TargetRuntime>
  50.   </PropertyGroup>
  51.  
  52.   <!-- Because .NET 2.0 apps did not set TargetFrameworkIdentifier, we need to set it for them here by default.  If
  53.        the runtime is set to Managed, we also need to set these.  Otherwise they should be blank (for instance Javascript or
  54.        Native apps) because they do not target a .NET Framework. -->
  55.   <PropertyGroup Condition="'$(TargetRuntime)' == 'Managed'">
  56.     <TargetFrameworkIdentifier Condition="'$(TargetFrameworkIdentifier)' == ''">.NETFramework</TargetFrameworkIdentifier>
  57.     <TargetFrameworkVersion Condition=" '$(TargetFrameworkVersion)' == '' ">v4.0</TargetFrameworkVersion>
  58.   </PropertyGroup>  
  59.  
  60.   <!-- AvailablePlatforms is the list of platform targets available. -->
  61.   <PropertyGroup>
  62.     <AvailablePlatforms Condition="'$(VisualStudioVersion)' == '10.0' or '$(VisualStudioVersion)' == ''">Any CPU,x86,x64,Itanium</AvailablePlatforms>
  63.     <AvailablePlatforms Condition="'$(VisualStudioVersion)' != '' and '$(VisualStudioVersion)' > '10.0'">Any CPU,x86,x64</AvailablePlatforms>
  64.   </PropertyGroup>
  65.  
  66.   <!-- Import does NOT apply to .NETCore -->
  67.   <Import Project="Microsoft.NETFramework.props" Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework' or '$(TargetFrameworkIdentifier)' == 'Silverlight'"/>
  68.  
  69.   <PropertyGroup>
  70.     <!-- Yield optimization properties -->
  71.     <YieldDuringToolExecution Condition="'$(YieldDuringToolExecution)' == ''">true</YieldDuringToolExecution>
  72.   </PropertyGroup>
  73.  
  74.   <PropertyGroup Condition="'$(TargetFrameworkIdentifier)' != '' and '$(TargetFrameworkVersion)' != ''">
  75.     <TargetFrameworkMoniker Condition="'$(TargetFrameworkMoniker)' == '' and '$(TargetFrameworkProfile)' != ''">$(TargetFrameworkIdentifier),Version=$(TargetFrameworkVersion),Profile=$(TargetFrameworkProfile)</TargetFrameworkMoniker>
  76.     <TargetFrameworkMoniker Condition="'$(TargetFrameworkMoniker)' == ''">$(TargetFrameworkIdentifier),Version=$(TargetFrameworkVersion)</TargetFrameworkMoniker>
  77.  
  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
  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
  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).-->
  81.     <FrameworkPathOverride Condition="'$(FrameworkPathOverride)' == ''">$([Microsoft.Build.Utilities.ToolLocationHelper]::GetPathToStandardLibraries($(TargetFrameworkIdentifier), $(TargetFrameworkVersion), $(TargetFrameworkProfile), $(PlatformTarget)))</FrameworkPathOverride>
  82.     <FrameworkPathOverride Condition="!Exists('$(FrameworkPathOverride)\mscorlib.dll')">$(MSBuildFrameworkToolsPath)</FrameworkPathOverride>
  83.   </PropertyGroup>
  84.  
  85.   <PropertyGroup>
  86.     <TargetPlatformIdentifier Condition="'$(TargetPlatformIdentifier)' == ''">Windows</TargetPlatformIdentifier>
  87.     <TargetPlatformVersion Condition="'$(TargetPlatformVersion)' == ''">7.0</TargetPlatformVersion>
  88.     <TargetPlatformSdkPath Condition=" '$(TargetPlatformIdentifier)' == 'Windows'">$([MSBuild]::GetRegistryValueFromView('HKEY_LOCAL_MACHINE\Software\Microsoft\Microsoft SDKs\Windows\v$(TargetPlatformVersion)', InstallationFolder, null, RegistryView.Registry32, RegistryView.Default))</TargetPlatformSdkPath>
  89.     <TargetPlatformSdkPath Condition=" '$(TargetPlatformSdkPath)' == ''">$([Microsoft.Build.Utilities.ToolLocationHelper]::GetPlatformSDKLocation($(TargetPlatformIdentifier), $(TargetPlatformVersion)))</TargetPlatformSdkPath>
  90.     <TargetPlatformSdkMetadataLocation Condition="'$(TargetPlatformSdkMetadataLocation)' == '' and Exists('$(TargetPlatformSdkPath)')">$(TargetPlatformSdkPath)Windows Metadata</TargetPlatformSdkMetadataLocation>
  91.     <TargetPlatformSdkMetadataLocation Condition="Exists('$(TargetPlatformSdkPath)') and ('$(TargetPlatformSdkMetadataLocation)' == '' or !Exists('$(TargetPlatformSdkMetadataLocation)'))">$(TargetPlatformSdkPath)References\CommonConfiguration\Neutral</TargetPlatformSdkMetadataLocation>
  92.     <TargetPlatformWinMDLocation Condition="'$(TargetPlatformWinMDLocation)' == '' and Exists('$(TargetPlatformSdkMetadataLocation)')">$(TargetPlatformSdkMetadataLocation)</TargetPlatformWinMDLocation>
  93.     <UseOSWinMdReferences Condition="'$(UseOSWinMdReferences)' == '' and ('$(TargetPlatformWinMDLocation)' == '' and '$(TargetPlatformIdentifier)' == 'Windows' and '$(TargetPlatformVersion)' &gt; '7.0')">true</UseOSWinMdReferences>
  94.     <TargetPlatformWinMDLocation Condition="'$(UseOsWinMdReferences)' == 'true'">$(WinDir)\System32\WinMetadata</TargetPlatformWinMDLocation>
  95.     <TargetPlatformMoniker Condition="'$(TargetPlatformMoniker)' == ''">$(TargetPlatformIdentifier),Version=$(TargetPlatformVersion)</TargetPlatformMoniker>
  96.     <TargetPlatformDisplayName Condition="'$(TargetPlatformDisplayName)' == ''">$([Microsoft.Build.Utilities.ToolLocationHelper]::GetPlatformSDKDisplayName($(TargetPlatformIdentifier), $(TargetPlatformVersion)))</TargetPlatformDisplayName>
  97.   </PropertyGroup>
  98.  
  99.   <!--
  100.     Several properties must be set in the main project file, before using this .TARGETS file.
  101.     However, if the properties are not set, we pick some defaults.
  102.  
  103.     OutDir:
  104.     Indicates the final output location for the project or solution. When building a solution,
  105.     OutDir can be used to gather multiple project outputs in one location. In addition,
  106.     OutDir is included in AssemblySearchPaths used for resolving references.
  107.  
  108.     OutputPath:
  109.     This property is usually specified in the project file and is used to initialize OutDir.
  110.     OutDir and OutputPath are distinguished for legacy reasons, and OutDir should be used if at all possible.
  111.  
  112.     BaseIntermediateOutputPath:
  113.     This is the top level folder where all configuration specific intermediate output folders will be created.
  114.     Default value is obj\
  115.  
  116.     IntermediateOutputPath:
  117.     This is the full intermediate Output Path, and is derived from BaseIntermediateOutputPath, if none specified
  118.     (eg. obj\debug). If this property is overridden, then setting BaseIntermediateOutputPath has no effect.
  119.     -->
  120.  
  121.   <PropertyGroup>
  122.     <!-- Ensure any OutputPath has a trailing slash, so it can be concatenated -->
  123.     <OutputPath Condition="'$(OutputPath)' != '' and !HasTrailingSlash('$(OutputPath)')">$(OutputPath)\</OutputPath>
  124.     <AssemblyName Condition=" '$(AssemblyName)'=='' ">$(MSBuildProjectName)</AssemblyName>
  125.     <!--
  126.         Be careful not to give OutputPath a default value in the case of an invalid Configuration/Platform.
  127.         We use OutputPath specifically to check for invalid configurations/platforms.
  128.         -->
  129.     <OutputPath Condition=" '$(Platform)'=='' and '$(Configuration)'=='' and '$(OutputPath)'=='' ">bin\Debug\</OutputPath>
  130.     <_OriginalConfiguration>$(Configuration)</_OriginalConfiguration>
  131.     <_OriginalPlatform>$(Platform)</_OriginalPlatform>
  132.     <Configuration Condition=" '$(Configuration)'=='' ">Debug</Configuration>
  133.     <ConfigurationName Condition=" '$(ConfigurationName)' == '' ">$(Configuration)</ConfigurationName>
  134.     <!-- Example, Debug -->
  135.     <Platform Condition=" '$(Platform)'=='' ">AnyCPU</Platform>
  136.  
  137.     <OutputType Condition=" '$(TargetType)' != ''">$(TargetType)</OutputType>
  138.     <OutputType Condition=" '$(TargetType)' == 'Container' or '$(TargetType)' == 'DocumentContainer' ">library</OutputType>
  139.     <OutputType Condition=" '$(OutputType)' == '' ">exe</OutputType>
  140.  
  141.     <DebugSymbols Condition=" '$(ConfigurationName)' == 'Debug' and '$(DebugSymbols)' == '' and '$(DebugType)'==''">true</DebugSymbols>
  142.  
  143.     <!-- Whether or not a .pdb file is produced. -->
  144.     <_DebugSymbolsProduced>false</_DebugSymbolsProduced>
  145.     <_DebugSymbolsProduced Condition="'$(DebugSymbols)'=='true'">true</_DebugSymbolsProduced>
  146.     <_DebugSymbolsProduced Condition="'$(DebugType)'=='none'">false</_DebugSymbolsProduced>
  147.     <_DebugSymbolsProduced Condition="'$(DebugType)'=='pdbonly'">true</_DebugSymbolsProduced>
  148.     <_DebugSymbolsProduced Condition="'$(DebugType)'=='full'">true</_DebugSymbolsProduced>
  149.     <_DebugSymbolsProduced Condition="'$(DebugType)'=='portable'">true</_DebugSymbolsProduced>
  150.  
  151.     <!-- Whether or not a .xml file is produced. -->
  152.     <_DocumentationFileProduced>true</_DocumentationFileProduced>
  153.     <_DocumentationFileProduced Condition="'$(DocumentationFile)'==''">false</_DocumentationFileProduced>
  154.  
  155.   </PropertyGroup>
  156.  
  157.   <PropertyGroup Condition=" '$(OutputPath)' == '' ">
  158.     <!--
  159.         A blank OutputPath at this point means that the user passed in an invalid Configuration/Platform
  160.         combination.  Whether this is considered an error or a warning depends on the value of
  161.         $(SkipInvalidConfigurations).
  162.         -->
  163.     <_InvalidConfigurationError Condition=" '$(SkipInvalidConfigurations)' != 'true' ">true</_InvalidConfigurationError>
  164.     <_InvalidConfigurationWarning Condition=" '$(SkipInvalidConfigurations)' == 'true' ">true</_InvalidConfigurationWarning>
  165.   </PropertyGroup>
  166.  
  167.   <!--
  168.     IDE Macros available from both integrated builds and from command line builds.
  169.     The following properties are 'macros' that are available via IDE for
  170.     pre and post build steps.
  171.     -->
  172.   <PropertyGroup>
  173.     <TargetExt Condition="'$(TargetExt)' == '' and '$(OutputType)'=='exe'">.exe</TargetExt>
  174.     <TargetExt Condition="'$(TargetExt)' == '' and '$(OutputType)'=='winexe'">.exe</TargetExt>
  175.     <TargetExt Condition="'$(TargetExt)' == '' and '$(OutputType)'=='appcontainerexe'">.exe</TargetExt>
  176.     <TargetExt Condition="'$(TargetExt)' == '' and '$(OutputType)'=='library'">.dll</TargetExt>
  177.     <TargetExt Condition="'$(TargetExt)' == '' and '$(OutputType)'=='module'">.netmodule</TargetExt>
  178.     <TargetExt Condition="'$(TargetExt)' == '' and '$(OutputType)'=='winmdobj'">.winmdobj</TargetExt>
  179.   </PropertyGroup>
  180.  
  181.   <PropertyGroup>
  182.  
  183.     <!-- Required for enabling Team Build for packaging app package-generating projects -->
  184.     <OutDirWasSpecified Condition=" '$(OutDir)'!='' and '$(OutDirWasSpecified)'=='' ">true</OutDirWasSpecified>
  185.  
  186.     <OutDir Condition=" '$(OutDir)' == '' ">$(OutputPath)</OutDir>
  187.     <!-- Example, bin\Debug\ -->
  188.     <!-- Ensure OutDir has a trailing slash, so it can be concatenated -->
  189.     <OutDir Condition="'$(OutDir)' != '' and !HasTrailingSlash('$(OutDir)')">$(OutDir)\</OutDir>
  190.     <ProjectName Condition=" '$(ProjectName)' == '' ">$(MSBuildProjectName)</ProjectName>
  191.     <!-- Example, MyProject -->
  192.  
  193.     <!-- For projects that generate app packages or ones that want a per-project output directory, update OutDir to include the project name -->
  194.     <OutDir Condition="'$(OutDir)' != '' and '$(OutDirWasSpecified)' == 'true' and (('$(WindowsAppContainer)' == 'true' and '$(GenerateProjectSpecificOutputFolder)' != 'false') or '$(GenerateProjectSpecificOutputFolder)' == 'true')">$(OutDir)$(ProjectName)\</OutDir>
  195.  
  196.     <TargetName Condition="'$(TargetName)' == '' and '$(OutputType)' == 'winmdobj' and '$(RootNamespace)' != ''">$(RootNamespace)</TargetName>
  197.     <TargetName Condition=" '$(TargetName)' == '' ">$(AssemblyName)</TargetName>
  198.     <!-- Example, MyAssembly -->
  199.     <ProjectFileName Condition=" '$(ProjectFileName)' == '' ">$(MSBuildProjectFile)</ProjectFileName>
  200.     <!-- Example, MyProject.csproj -->
  201.     <ProjectExt Condition=" '$(ProjectExt)' == '' ">$(MSBuildProjectExtension)</ProjectExt>
  202.     <!-- Example, .csproj -->
  203.     <WinMDExpOutputWindowsMetadataFilename Condition="'$(WinMDExpOutputWindowsMetadataFilename)' == '' and '$(OutputType)' == 'winmdobj'">$(TargetName).winmd</WinMDExpOutputWindowsMetadataFilename>
  204.     <TargetFileName Condition=" '$(TargetFileName)' == '' and '$(OutputType)' == 'winmdobj'">$(WinMDExpOutputWindowsMetadataFilename)</TargetFileName>
  205.     <TargetFileName Condition=" '$(TargetFileName)' == '' ">$(TargetName)$(TargetExt)</TargetFileName>
  206.    
  207.     <!-- Example, MyAssembly.dll -->
  208.   </PropertyGroup>
  209.  
  210.   <PropertyGroup>
  211.     <!--
  212.         The PublishableProject property is used when invoking the publish target on a solution that
  213.         contains multiple projects. The property determines which projects should be published, and
  214.         which projects should be skipped in the publish target. By default any "Windows Application"
  215.         or "Console Application" project type is publishable. However, a project that would otherwise
  216.         be published can be skipped by defining the PublishableProject property in the project itself.
  217.         -->
  218.     <_DeploymentPublishableProjectDefault Condition="'$(OutputType)'=='winexe' or '$(OutputType)'=='exe' or '$(OutputType)'=='appcontainerexe'">true</_DeploymentPublishableProjectDefault>
  219.     <PublishableProject Condition="'$(PublishableProject)'==''">$(_DeploymentPublishableProjectDefault)</PublishableProject>
  220.  
  221.     <_DeploymentTargetApplicationManifestFileName Condition="'$(OutputType)'=='library'">Native.$(AssemblyName).manifest</_DeploymentTargetApplicationManifestFileName>
  222.     <!-- Example, Native.MyAssembly.manifest -->
  223.     <_DeploymentTargetApplicationManifestFileName Condition="'$(OutputType)'=='winexe'">$(TargetFileName).manifest</_DeploymentTargetApplicationManifestFileName>
  224.     <!-- Example, MyAssembly.exe.manifest -->
  225.     <_DeploymentTargetApplicationManifestFileName Condition="'$(OutputType)'=='exe'">$(TargetFileName).manifest</_DeploymentTargetApplicationManifestFileName>
  226.     <!-- Example, MyAssembly.exe.manifest -->
  227.     <_DeploymentTargetApplicationManifestFileName Condition="'$(OutputType)'=='appcontainerexe'">$(TargetFileName).manifest</_DeploymentTargetApplicationManifestFileName>
  228.     <!-- Example, MyAssembly.exe.manifest -->
  229.     <TargetDeployManifestFileName Condition="'$(TargetDeployManifestFileName)' == '' and '$(HostInBrowser)' != 'true'">$(AssemblyName).application</TargetDeployManifestFileName>
  230.     <!-- Example, MyAssembly.application -->
  231.     <TargetDeployManifestFileName Condition="'$(TargetDeployManifestFileName)' == '' and '$(HostInBrowser)' == 'true'">$(AssemblyName).xbap</TargetDeployManifestFileName>
  232.     <!-- Example, MyAssembly.xbap -->
  233.     <GenerateClickOnceManifests Condition="'$(OutputType)'=='winexe' or '$(OutputType)'=='exe' or '$(OutputType)'=='appcontainerexe'">$(GenerateManifests)</GenerateClickOnceManifests>
  234.  
  235.     <_DeploymentApplicationManifestIdentity Condition="'$(OutputType)'=='library'">Native.$(AssemblyName)</_DeploymentApplicationManifestIdentity>
  236.     <_DeploymentApplicationManifestIdentity Condition="'$(OutputType)'=='winexe'">$(AssemblyName).exe</_DeploymentApplicationManifestIdentity>
  237.     <_DeploymentApplicationManifestIdentity Condition="'$(OutputType)'=='exe'">$(AssemblyName).exe</_DeploymentApplicationManifestIdentity>
  238.     <_DeploymentApplicationManifestIdentity Condition="'$(OutputType)'=='appcontainerexe'">$(AssemblyName).exe</_DeploymentApplicationManifestIdentity>
  239.     <_DeploymentDeployManifestIdentity Condition="'$(HostInBrowser)' != 'true'">$(AssemblyName).application</_DeploymentDeployManifestIdentity>
  240.     <_DeploymentDeployManifestIdentity Condition="'$(HostInBrowser)' == 'true'">$(AssemblyName).xbap</_DeploymentDeployManifestIdentity>
  241.  
  242.     <_DeploymentFileMappingExtension Condition="'$(MapFileExtensions)'=='true'">.deploy</_DeploymentFileMappingExtension>
  243.     <_DeploymentFileMappingExtension Condition="'$(MapFileExtensions)'!='true'"></_DeploymentFileMappingExtension>
  244.  
  245.     <_DeploymentBuiltUpdateInterval Condition="'$(UpdatePeriodically)'=='true'">$(UpdateInterval)</_DeploymentBuiltUpdateInterval>
  246.     <_DeploymentBuiltUpdateIntervalUnits Condition="'$(UpdatePeriodically)'=='true'">$(UpdateIntervalUnits)</_DeploymentBuiltUpdateIntervalUnits>
  247.     <_DeploymentBuiltUpdateInterval Condition="'$(UpdatePeriodically)'!='true'">0</_DeploymentBuiltUpdateInterval>
  248.     <_DeploymentBuiltUpdateIntervalUnits Condition="'$(UpdatePeriodically)'!='true'">Days</_DeploymentBuiltUpdateIntervalUnits>
  249.     <_DeploymentBuiltMinimumRequiredVersion Condition="'$(UpdateRequired)'=='true' and '$(Install)'=='true'">$(MinimumRequiredVersion)</_DeploymentBuiltMinimumRequiredVersion>
  250.  
  251.     <MaxTargetPath Condition="'$(MaxTargetPath)'==''">100</MaxTargetPath>
  252.   </PropertyGroup>
  253.  
  254.   <PropertyGroup>
  255.     <!--
  256.         By default, GenerateApplicationManifest puts all satellite assemblies to the manifest
  257.         record by default by setting TargetCulture to *.
  258.         -->
  259.     <TargetCulture Condition="'$(TargetCulture)'==''">*</TargetCulture>
  260.     <FallbackCulture Condition="'$(UICulture)'!='' and '$(FallbackCulture)'==''">$(UICulture)</FallbackCulture>
  261.   </PropertyGroup>
  262.  
  263.   <ItemGroup>
  264.     <!-- Not used any more-->
  265.     <_OutputPathItem Include="$(OutDir)"/>
  266.  
  267.     <_UnmanagedRegistrationCache Include="$(BaseIntermediateOutputPath)$(MSBuildProjectFile).UnmanagedRegistration.cache"/>
  268.     <_ResolveComReferenceCache Include="$(IntermediateOutputPath)$(MSBuildProjectFile).ResolveComReference.cache"/>
  269.   </ItemGroup>
  270.  
  271.   <PropertyGroup>
  272.     <!-- Example, c:\MyProjects\MyProject\bin\debug\ -->
  273.     <!--
  274.         Condition intentionally omitted on this one, because it causes problems
  275.         when we pick up the value of an environment variable named TargetDir
  276.         -->
  277.     <TargetDir Condition="'$(OutDir)' != ''">$([MSBuild]::Escape($([System.IO.Path]::GetFullPath(`$([System.IO.Path]::Combine(`$(MSBuildProjectDirectory)`, `$(OutDir)`))`))))</TargetDir>
  278.  
  279.     <!-- Example, c:\MyProjects\MyProject\bin\debug\MyAssembly.dll -->
  280.     <TargetPath Condition=" '$(TargetPath)' == '' ">$(TargetDir)$(TargetFileName)</TargetPath>
  281.  
  282.     <!-- Example, c:\MyProjects\MyProject\ -->
  283.     <ProjectDir Condition=" '$(ProjectDir)' == '' ">$(MSBuildProjectDirectory)\</ProjectDir>
  284.  
  285.     <!-- Example, c:\MyProjects\MyProject\MyProject.csproj -->
  286.     <ProjectPath Condition=" '$(ProjectPath)' == '' ">$(ProjectDir)$(ProjectFileName)</ProjectPath>
  287.  
  288.     <!-- Example, AnyCPU -->
  289.     <PlatformName Condition=" '$(PlatformName)' == '' ">$(Platform)</PlatformName>
  290.   </PropertyGroup>
  291.  
  292.   <ItemGroup>
  293.     <!-- This is not used here but remains for backwards compatibility -->
  294.     <AppConfigFileDestination Include="$(OutDir)$(TargetFileName).config"/>
  295.   </ItemGroup>
  296.  
  297.   <!--
  298.     IDE Macros available only from integrated builds.
  299.     The following properties are 'macros' that are available via IDE for
  300.     pre and post build steps. However, they are not defined when directly building
  301.     a project from the command line, only when building a solution.
  302.     -->
  303.   <PropertyGroup>
  304.     <DevEnvDir Condition="'$(DevEnvDir)'==''">*Undefined*</DevEnvDir>
  305.     <SolutionName Condition="'$(SolutionName)'==''">*Undefined*</SolutionName>
  306.     <!-- Example, MySolution -->
  307.     <SolutionFileName Condition="'$(SolutionFileName)'==''">*Undefined*</SolutionFileName>
  308.     <!-- Example, MySolution.sln -->
  309.     <SolutionPath Condition="'$(SolutionPath)'==''">*Undefined*</SolutionPath>
  310.     <!-- Example, f:\MySolutions\MySolution\MySolution.sln -->
  311.     <SolutionDir Condition="'$(SolutionDir)'==''">*Undefined*</SolutionDir>
  312.     <!-- Example, f:\MySolutions\MySolution\ -->
  313.     <SolutionExt Condition="'$(SolutionExt)'==''">*Undefined*</SolutionExt>
  314.     <!-- Example, .sln -->
  315.   </PropertyGroup>
  316.  
  317.   <PropertyGroup>
  318.     <GenerateBindingRedirectsOutputType Condition="'$(OutputType)'=='exe' or '$(OutputType)'=='winexe'">true</GenerateBindingRedirectsOutputType>
  319.   </PropertyGroup>
  320.   <PropertyGroup>
  321.     <AutoUnifyAssemblyReferences>true</AutoUnifyAssemblyReferences>
  322.     <AutoUnifyAssemblyReferences Condition="'$(GenerateBindingRedirectsOutputType)' == 'true' and '$(AutoGenerateBindingRedirects)' != 'true'">false</AutoUnifyAssemblyReferences>
  323.     <BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">obj\</BaseIntermediateOutputPath>
  324.     <BaseIntermediateOutputPath Condition="!HasTrailingSlash('$(BaseIntermediateOutputPath)')">$(BaseIntermediateOutputPath)\</BaseIntermediateOutputPath>
  325.     <CleanFile Condition="'$(CleanFile)'==''">$(MSBuildProjectFile).FileListAbsolute.txt</CleanFile>
  326.     <!-- During DesignTime Builds, skip project reference build as Design time is only queueing information.-->
  327.     <BuildProjectReferences Condition="'$(BuildProjectReferences)' == '' and '$(DesignTimeBuild)' == 'true'">false</BuildProjectReferences>
  328.     <!-- By default we will build (and if applicable, clean) all project references. But this can be used to disable that-->
  329.     <BuildProjectReferences Condition="'$(BuildProjectReferences)' == ''">true</BuildProjectReferences>
  330.     <BuildInParallel Condition="'$(BuildInParallel)' == ''">true</BuildInParallel>
  331.     <_ResolveReferenceDependencies Condition="'$(_ResolveReferenceDependencies)' == ''">false</_ResolveReferenceDependencies>
  332.     <_GetChildProjectCopyToOutputDirectoryItems Condition="'$(_GetChildProjectCopyToOutputDirectoryItems)' == ''">true</_GetChildProjectCopyToOutputDirectoryItems>
  333.     <OverwriteReadOnlyFiles Condition="'$(OverwriteReadOnlyFiles)' == ''">false</OverwriteReadOnlyFiles>
  334.     <ComReferenceNoClassMembers Condition="'$(ComReferenceNoClassMembers)' == ''">false</ComReferenceNoClassMembers>
  335.   </PropertyGroup>
  336.  
  337.   <PropertyGroup Condition=" $(IntermediateOutputPath) == '' ">
  338.     <IntermediateOutputPath Condition=" '$(PlatformName)' == 'AnyCPU' ">$(BaseIntermediateOutputPath)$(Configuration)\</IntermediateOutputPath>
  339.     <IntermediateOutputPath Condition=" '$(PlatformName)' != 'AnyCPU' ">$(BaseIntermediateOutputPath)$(PlatformName)\$(Configuration)\</IntermediateOutputPath>
  340.   </PropertyGroup>
  341.   <PropertyGroup>
  342.     <IntermediateOutputPath Condition="!HasTrailingSlash('$(IntermediateOutputPath)')">$(IntermediateOutputPath)\</IntermediateOutputPath>
  343.     <_GenerateBindingRedirectsIntermediateAppConfig>$(IntermediateOutputPath)$(MSBuildProjectFile).$(TargetFileName).config</_GenerateBindingRedirectsIntermediateAppConfig>
  344.   </PropertyGroup>
  345.   <ItemGroup>
  346.     <IntermediateAssembly Include="$(IntermediateOutputPath)$(TargetName)$(TargetExt)"/>
  347.     <FinalDocFile Include="@(DocFileItem->'$(OutDir)%(Filename)%(Extension)')"/>
  348.   </ItemGroup>
  349.  
  350.   <ItemGroup Condition="'$(_DebugSymbolsProduced)' == 'true'">
  351.     <_DebugSymbolsIntermediatePath Include="$(IntermediateOutputPath)$(TargetName).compile.pdb" Condition="'$(OutputType)' == 'winmdobj' and '@(_DebugSymbolsIntermediatePath)' == ''"/>
  352.     <_DebugSymbolsIntermediatePath Include="$(IntermediateOutputPath)$(TargetName).pdb" Condition="'$(OutputType)' != 'winmdobj' and '@(_DebugSymbolsIntermediatePath)' == ''"/>
  353.     <_DebugSymbolsOutputPath Include="@(_DebugSymbolsIntermediatePath->'$(OutDir)%(Filename)%(Extension)')" />
  354.   </ItemGroup>
  355.  
  356.   <PropertyGroup Condition="'$(_DebugSymbolsProduced)' == 'true' and '$(OutputType)' == 'winmdobj'">
  357.     <WinMDExpOutputPdb Condition="'$(WinMDExpOutputPdb)' == ''">$(IntermediateOutputPath)$(TargetName).pdb</WinMDExpOutputPdb>
  358.     <_WinMDDebugSymbolsOutputPath>$([System.IO.Path]::Combine('$(OutDir)', $([System.IO.Path]::GetFileName('$(WinMDExpOutputPdb)'))))</_WinMDDebugSymbolsOutputPath>
  359.   </PropertyGroup>
  360.  
  361.   <PropertyGroup Condition="'$(OutputType)' == 'winmdobj' and '$(DocumentationFile)'!=''">
  362.     <WinMDOutputDocumentationFile Condition="'$(WinMDOutputDocumentationFile)' == ''">$(IntermediateOutputPath)$(TargetName).xml</WinMDOutputDocumentationFile>
  363.     <_WinMDDocFileOutputPath>$([System.IO.Path]::Combine('$(OutDir)', $([System.IO.Path]::GetFileName('$(WinMDOutputDocumentationFile)'))))</_WinMDDocFileOutputPath>
  364.   </PropertyGroup>
  365.  
  366.   <PropertyGroup Condition="'$(WinMDExpOutputWindowsMetadataFilename)' != ''">
  367.     <_IntermediateWindowsMetadataPath>$(IntermediateOutputPath)$(WinMDExpOutputWindowsMetadataFilename)</_IntermediateWindowsMetadataPath>
  368.     <_WindowsMetadataOutputPath>$(OutDir)$(WinMDExpOutputWindowsMetadataFilename)</_WindowsMetadataOutputPath>
  369.   </PropertyGroup>
  370.  
  371.   <ItemGroup>
  372.     <!-- Create an item for entry point of the ClickOnce application (Example: WindowsApplication1.exe) -->
  373.     <_DeploymentManifestEntryPoint Include="@(IntermediateAssembly)">
  374.       <TargetPath>$(TargetFileName)</TargetPath>
  375.     </_DeploymentManifestEntryPoint>
  376.  
  377.     <!-- Create an item for the application icon if one exists in the project (Example: app.ico) -->
  378.     <!-- NOTE: The item Include and the Exists function are operating relative to the PROJECT (.csproj, .vbproj etc.) directory in this case -->
  379.     <_DeploymentManifestIconFile Include="$(ApplicationIcon)" Condition="Exists('$(ApplicationIcon)')">
  380.       <TargetPath>$(ApplicationIcon)</TargetPath>
  381.     </_DeploymentManifestIconFile>
  382.  
  383.     <!-- Create an item for the output application manifest (Example: WindowsApplication1.exe.manifeset) -->
  384.     <ApplicationManifest Include="$(IntermediateOutputPath)$(_DeploymentTargetApplicationManifestFileName)">
  385.       <TargetPath>$(_DeploymentTargetApplicationManifestFileName)</TargetPath>
  386.     </ApplicationManifest>
  387.  
  388.     <!-- Create an item for the final application manifest (Example: WindowsApplication1.exe.manifeset)
  389.              This item represents the final output application manifest used for project-to-project
  390.              references and for copying to the publish output location. -->
  391.     <_ApplicationManifestFinal Include="$(OutDir)$(_DeploymentTargetApplicationManifestFileName)">
  392.       <TargetPath>$(_DeploymentTargetApplicationManifestFileName)</TargetPath>
  393.     </_ApplicationManifestFinal>
  394.  
  395.     <!-- Create an item for the output deploy manifest (Example: WindowsApplication1.application) -->
  396.     <DeployManifest Include="$(IntermediateOutputPath)$(TargetDeployManifestFileName)">
  397.       <TargetPath>$(TargetDeployManifestFileName)</TargetPath>
  398.     </DeployManifest>
  399.  
  400.     <!-- Create an item for the intermediate trust info file -->
  401.     <_DeploymentIntermediateTrustInfoFile Include="$(IntermediateOutputPath)$(TargetName).TrustInfo.xml" Condition="'$(TargetZone)'!=''"/>
  402.   </ItemGroup>
  403.  
  404.   <!--
  405.     Determine the <deploymentProvider> (_DeploymentUrl) for the ClickOnce deployment manifest.
  406.     Prefer the UpdateUrl, falling back to InstallUrl or PublishUrl if not specified.
  407.     If the UpdateUrl is specified then _DeploymentUrl is always set to the UpdateUrl.
  408.     Otherwise, only set the _DeploymentUrl if it's an installed app and updates are enabled.
  409.    -->
  410.  <PropertyGroup>
  411.    <_DeploymentUrl Condition="'$(_DeploymentUrl)'==''">$(UpdateUrl)</_DeploymentUrl>
  412.    <_DeploymentUrl Condition="'$(_DeploymentUrl)'==''">$(InstallUrl)</_DeploymentUrl>
  413.    <_DeploymentUrl Condition="'$(_DeploymentUrl)'==''">$(PublishUrl)</_DeploymentUrl>
  414.    <_DeploymentUrl Condition="!('$(UpdateUrl)'=='') and '$(Install)'=='false'"></_DeploymentUrl>
  415.    <_DeploymentUrl Condition="'$(_DeploymentUrl)'!=''">$(_DeploymentUrl)$(TargetDeployManifestFileName)</_DeploymentUrl>
  416.    <!--
  417.        Need to explicitly blank out the _DeploymentUrl when it's not used. Otherwise an
  418.         inappropriate value may be used. For example a local path from the PublishUrl
  419.         is something we never want to see in the manifest because it means you could
  420.         only install the app from that machine.
  421.         -->
  422.     <_DeploymentUrl Condition="'$(UpdateUrl)'=='' and !('$(Install)'=='true' and '$(UpdateEnabled)'=='true')"></_DeploymentUrl>
  423.     <_DeploymentUrl Condition="'$(ExcludeDeploymentUrl)'=='true'"></_DeploymentUrl>
  424.   </PropertyGroup>
  425.  
  426.   <!-- Determine the URLs for the bootstrapper. -->
  427.   <PropertyGroup>
  428.     <_DeploymentApplicationUrl Condition="'$(IsWebBootstrapper)'=='true'">$(InstallUrl)</_DeploymentApplicationUrl>
  429.     <_DeploymentApplicationUrl Condition="'$(IsWebBootstrapper)'=='true' and '$(InstallUrl)'==''">$(PublishUrl)</_DeploymentApplicationUrl>
  430.     <_DeploymentComponentsUrl Condition="'$(BootstrapperComponentsLocation)'=='Absolute'">$(BootstrapperComponentsUrl)</_DeploymentComponentsUrl>
  431.   </PropertyGroup>
  432.  
  433.   <!-- Output location for publish target. -->
  434.   <PropertyGroup>
  435.     <PublishDir Condition="'$(PublishDir)' != '' and !HasTrailingSlash('$(PublishDir)')">$(PublishDir)\</PublishDir>
  436.     <PublishDir Condition="'$(PublishDir)'==''">$(OutputPath)app.publish\</PublishDir>
  437.   </PropertyGroup>
  438.  
  439.   <!--
  440.     ProcessorArchitecture is the target processor architecture.
  441.     -->
  442.   <PropertyGroup Condition="'$(ProcessorArchitecture)'==''">
  443.     <!--
  444.         If ProcessorArchitecture is not set, set it to PlatformTarget
  445.         Note: if $(PlatformTarget) is also blank resolve assembly reference defaults to msil which is the
  446.         desired behavior in this case
  447.         -->
  448.     <ProcessorArchitecture>$(PlatformTarget)</ProcessorArchitecture>
  449.  
  450.     <!--
  451.         If Processor architecture is not set and PlatformTarget is a known target translate the
  452.         PlatformTarget into something ResolveAssemblyReference knows about
  453.         -->
  454.     <ProcessorArchitecture Condition=" '$(PlatformTarget)' == 'AnyCpu' ">msil</ProcessorArchitecture>
  455.     <ProcessorArchitecture Condition=" '$(PlatformTarget)' == 'x64' ">amd64</ProcessorArchitecture>
  456.     <ProcessorArchitecture Condition=" '$(PlatformTarget)' == 'Itanium' ">ia64</ProcessorArchitecture>
  457.     <ProcessorArchitecture Condition=" '$(PlatformTarget)' == 'x86' ">x86</ProcessorArchitecture>
  458.     <ProcessorArchitecture Condition=" '$(PlatformTarget)' == 'ARM' ">arm</ProcessorArchitecture>
  459.   </PropertyGroup>
  460.  
  461.  <PropertyGroup>
  462.     <ConsiderPlatformAsProcessorArchitecture Condition="'$(ConsiderPlatformAsProcessorArchitecture)' == ''">true</ConsiderPlatformAsProcessorArchitecture>
  463.  </PropertyGroup>
  464.  
  465.  <PropertyGroup Condition="'$(ProcessorArchitecture)' == '' and '$(ConsiderPlatformAsProcessorArchitecture)' == 'true'">
  466.     <!-- 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 -->
  467.     <ProcessorArchitectureAsPlatform>$(Platform)</ProcessorArchitectureAsPlatform>
  468.     <ProcessorArchitecture Condition=" '$(ProcessorArchitectureAsPlatform)' == 'AnyCpu' or '$(ProcessorArchitectureAsPlatform)' == 'Any Cpu'">msil</ProcessorArchitecture>
  469.     <ProcessorArchitecture Condition=" '$(ProcessorArchitectureAsPlatform)' == 'x64' or '$(ProcessorArchitectureAsPlatform)' == 'amd64'">amd64</ProcessorArchitecture>
  470.     <ProcessorArchitecture Condition=" '$(ProcessorArchitectureAsPlatform)' == 'Itanium' ">ia64</ProcessorArchitecture>
  471.     <ProcessorArchitecture Condition=" '$(ProcessorArchitectureAsPlatform)' == 'x86' or '$(ProcessorArchitectureAsPlatform)' == 'win32'">x86</ProcessorArchitecture>
  472.     <ProcessorArchitecture Condition=" '$(ProcessorArchitectureAsPlatform)' == 'ARM' ">arm</ProcessorArchitecture>
  473.  
  474.     <!--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-->
  475.     <ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch Condition="'$(ProcessorArchitecture)'==''">None</ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
  476.     <ProcessorArchitecture Condition="'$(ProcessorArchitecture)'==''">$(PROCESSOR_ARCHITECTURE)</ProcessorArchitecture>
  477.   </PropertyGroup>
  478.  
  479.  
  480.   <!-- Sensible defaults for the most-commonly-desired MSBuildRuntime and MSBuildArchitecture values -->
  481.   <PropertyGroup Condition="'$(DisableOutOfProcTaskHost)' == ''">
  482.     <TargetFrameworkAsMSBuildRuntime Condition="'$(TargetFrameworkVersion)' == 'v2.0' or '$(TargetFrameworkVersion)' == 'v3.0' or '$(TargetFrameworkVersion)' == 'v3.5'">CLR2</TargetFrameworkAsMSBuildRuntime>
  483.     <TargetFrameworkAsMSBuildRuntime Condition="'$(TargetFrameworkVersion)' == 'v4.0' or '$(TargetFrameworkVersion)' == 'v4.5'">CLR4</TargetFrameworkAsMSBuildRuntime>
  484.     <TargetFrameworkAsMSBuildRuntime Condition="'$(TargetFrameworkAsMSBuildRuntime)' == ''">CurrentRuntime</TargetFrameworkAsMSBuildRuntime>
  485.  
  486.     <PlatformTargetAsMSBuildArchitectureExplicitlySet Condition="'$(PlatformTargetAsMSBuildArchitecture)' != ''">true</PlatformTargetAsMSBuildArchitectureExplicitlySet>
  487.     <PlatformTargetAsMSBuildArchitectureExplicitlySet Condition="'$(PlatformTargetAsMSBuildArchitecture)' == ''">false</PlatformTargetAsMSBuildArchitectureExplicitlySet>
  488.  
  489.     <PlatformTargetAsMSBuildArchitecture Condition="'$(PlatformTarget)' == 'x86' or ('$(PlatformTarget)' == 'x64' and '$(MSBuildExtensionsPath64)' != '')">$(PlatformTarget)</PlatformTargetAsMSBuildArchitecture>
  490.     <PlatformTargetAsMSBuildArchitecture Condition="'$(PlatformTarget)' == 'arm'">x86</PlatformTargetAsMSBuildArchitecture>
  491.     <PlatformTargetAsMSBuildArchitecture Condition="('$(PlatformTarget)' == 'ia64' and '$(MSBuildExtensionsPath64)' != '')">x64</PlatformTargetAsMSBuildArchitecture>
  492.     <PlatformTargetAsMSBuildArchitecture Condition="'$(PlatformTargetAsMSBuildArchitecture)' == ''">CurrentArchitecture</PlatformTargetAsMSBuildArchitecture>
  493.   </PropertyGroup>
  494.  
  495.   <!-- Flavor is the project flavor. For example, Client, Smart Devices, SQL Server, etc. -->
  496.   <PropertyGroup>
  497.     <ProjectFlavor Condition="'$(ProjectFlavor)'==''">Client</ProjectFlavor>
  498.   </PropertyGroup>
  499.  
  500.   <!--
  501.     The default for compilers is to not delay-sign. If $(DelaySign) is false, let the compiler
  502.     use its default rather than forcing a no-delay-sign flag to be passed in. This is so that
  503.     attributes in the source code can override this decision.
  504.     -->
  505.   <PropertyGroup>
  506.     <DelaySign Condition="'$(SignAssembly)' != 'true'">false</DelaySign>
  507.     <DelaySign Condition="'$(DelaySign)'!='true'"></DelaySign>
  508.   </PropertyGroup>
  509.  
  510.   <!-- These properties control web reference proxy generation. -->
  511.   <PropertyGroup>
  512.     <WebReference_EnableProperties Condition=" '$(WebReference_EnableProperties)' == '' ">true</WebReference_EnableProperties>
  513.     <WebReference_EnableSQLTypes Condition=" '$(WebReference_EnableSQLTypes)' == '' ">true</WebReference_EnableSQLTypes>
  514.     <WebReference_EnableLegacyEventingModel Condition=" '$(WebReference_EnableLegacyEventingModel)' == '' ">false</WebReference_EnableLegacyEventingModel>
  515.   </PropertyGroup>
  516.  
  517.   <PropertyGroup>
  518.     <MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildProjectFullPath);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
  519.     <MSBuildAllProjects Condition="Exists('$(MSBuildProjectFullPath).user')">$(MSBuildAllProjects);$(MSBuildProjectFullPath).user</MSBuildAllProjects>
  520.   </PropertyGroup>
  521.  
  522.   <!--
  523.     These parameters control where to look in the registry for directories to search for
  524.     assemblies in the assembly resolution tasks.
  525.     -->
  526.   <PropertyGroup>
  527.     <AssemblyFoldersSuffix Condition=" '$(AssemblyFoldersSuffix)' == '' ">AssemblyFoldersEx</AssemblyFoldersSuffix>
  528.     <FrameworkRegistryBase Condition=" '$(FrameworkRegistryBase)' == '' ">Software\Microsoft\$(TargetFrameworkIdentifier)</FrameworkRegistryBase>
  529.     <TargetPlatformRegistryBase Condition="'$(TargetPlatformRegistryBase)' == ''">Software\Microsoft\Microsoft SDKs\$(TargetPlatformIdentifier)</TargetPlatformRegistryBase>
  530.     <!--
  531.         The SearchPaths property is set to find assemblies in the following order:
  532.  
  533.             (1) Files from current project - indicated by {CandidateAssemblyFiles}
  534.             (2) $(ReferencePath) - the reference path property, which comes from the .USER file.
  535.             (3) The hintpath from the referenced item itself, indicated by {HintPathFromItem}.
  536.             (4) The directory of MSBuild's "target" runtime from GetFrameworkPath.
  537.                The "target" runtime folder is the folder of the runtime that MSBuild is a part of.
  538.            (5) Registered assembly folders, indicated by {Registry:*,*,*}
  539.            (6) Legacy registered assembly folders, indicated by {AssemblyFolders}
  540.            (7) Resolve to the GAC.
  541.            (8) Treat the reference's Include as if it were a real file name.
  542.             (9) Look in the application's output folder (like bin\debug)
  543.        -->
  544.    <AssemblySearchPaths Condition=" '$(AssemblySearchPaths)' == ''">
  545.      {CandidateAssemblyFiles};
  546.      $(ReferencePath);
  547.      {HintPathFromItem};
  548.      {TargetFrameworkDirectory};
  549.      {Registry:$(FrameworkRegistryBase),$(TargetFrameworkVersion),$(AssemblyFoldersSuffix)$(AssemblyFoldersExConditions)};
  550.      {AssemblyFolders};
  551.      {GAC};
  552.      {RawFileName};
  553.      $(OutDir)
  554.    </AssemblySearchPaths>
  555.  
  556.    <!--
  557.        These are the extensions that assembly reference resolution will consider for resolution.
  558.        Add new extensions here if you want to add new file types to consider (for example, .metadata_dll).
  559.        Put the most likely extensions first for reference resolution speed.
  560.        -->
  561.    <AllowedReferenceAssemblyFileExtensions Condition=" '$(AllowedReferenceAssemblyFileExtensions)' == '' ">
  562.      .winmd;
  563.      .dll;
  564.      .exe
  565.    </AllowedReferenceAssemblyFileExtensions>
  566.  
  567.    <!--
  568.        These are the extensions that reference resolution will consider when looking for files related
  569.        to resolved references.  Add new extensions here if you want to add new file types to consider.
  570.        -->
  571.    <AllowedReferenceRelatedFileExtensions Condition=" '$(AllowedReferenceRelatedFileExtensions)' == '' ">
  572.      .pdb;
  573.      .xml;
  574.      .pri
  575.    </AllowedReferenceRelatedFileExtensions>
  576.  
  577.    <!--
  578.        These names are used when determining which TargetFramework subset to use. If the any of the FullReferenceAssemblyNames
  579.        are seen in the list of client subsets, RAR will assume that no client subset is being used. The list is semicolon seperated
  580.        For example :   Full;Complete;AllThere
  581.        -->
  582.    <FullReferenceAssemblyNames Condition="'$(FullReferenceAssemblyNames)' == ''">Full</FullReferenceAssemblyNames>
  583.  </PropertyGroup>
  584.  
  585.  <!-- ContinueOnError takes 3 values:  WarnAndContinue (true), ErrorAndStop (false), and ErrorAndContinue.
  586.         Default to ErrorAndStop, since that matches the behaviour in previous versions, and what users
  587.         typically expect -->
  588.  <PropertyGroup>
  589.    <ContinueOnError Condition="'$(ContinueOnError)' == ''">false</ContinueOnError>
  590.  </PropertyGroup>
  591.  
  592.  <!-- Common Project System support -->
  593.  <PropertyGroup>
  594.    <CommonXamlResourcesDirectory Condition=" '$(CommonXamlResourcesDirectory)' == '' ">$(MSBuildThisFileDirectory)$(LangName)\</CommonXamlResourcesDirectory>
  595.  </PropertyGroup>
  596.  
  597.  <!-- We need to fallback to en-US in case the xaml rules are not localized (possibly happen on community languages).  -->
  598.  <PropertyGroup Condition="!Exists('$(CommonXamlResourcesDirectory)')">
  599.    <CommonXamlResourcesDirectory>$(MSBuildThisFileDirectory)en-US\</CommonXamlResourcesDirectory>
  600.  </PropertyGroup>
  601.  
  602.  <ItemGroup Condition=" '$(DefineCommonItemSchemas)' == 'true' ">
  603.    <PropertyPageSchema Include="$(CommonXamlResourcesDirectory)ProjectItemsSchema.xaml"/>
  604.  
  605.    <PropertyPageSchema Include="
  606.                        $(CommonXamlResourcesDirectory)General.xaml;
  607.                        $(CommonXamlResourcesDirectory)Debugger_General.xaml">
  608.      <Context>Project</Context>
  609.    </PropertyPageSchema>
  610.  
  611.    <PropertyPageSchema Include="$(CommonXamlResourcesDirectory)General.BrowseObject.xaml">
  612.      <Context>BrowseObject</Context>
  613.    </PropertyPageSchema>
  614.  
  615.    <PropertyPageSchema Include="$(CommonXamlResourcesDirectory)General_File.xaml">
  616.      <Context>File</Context>
  617.    </PropertyPageSchema>
  618.  
  619.    <PropertyPageSchema Include="$(CommonXamlResourcesDirectory)SCC.xaml">
  620.      <Context>Invisible</Context>
  621.    </PropertyPageSchema>
  622.  
  623.    <PropertyPageSchema Include="
  624.                        $(CommonXamlResourcesDirectory)Folder.xaml;
  625.                        $(CommonXamlResourcesDirectory)None.xaml;
  626.                        $(CommonXamlResourcesDirectory)Content.xaml;
  627.                        $(CommonXamlResourcesDirectory)EmbeddedResource.xaml;
  628.                        ">
  629.      <Context>File;BrowseObject</Context>
  630.    </PropertyPageSchema>
  631.  
  632.    <PropertyPageSchema Include="$(CommonXamlResourcesDirectory)SpecialFolder.xaml;">
  633.      <Context>File;ProjectSubscriptionService</Context>
  634.    </PropertyPageSchema>
  635.  </ItemGroup>
  636.  
  637.  <PropertyGroup>
  638.    <DefineCommonReferenceSchemas Condition=" '$(DefineCommonReferenceSchemas)' == '' ">$(DefineCommonItemSchemas)</DefineCommonReferenceSchemas>
  639.  </PropertyGroup>
  640.  
  641.  <ItemGroup Condition=" '$(DefineCommonReferenceSchemas)' == 'true' ">
  642.    <!-- Assembly references -->
  643.    <PropertyPageSchema Include="$(CommonXamlResourcesDirectory)assemblyreference.xaml">
  644.      <Context>;BrowseObject</Context>
  645.    </PropertyPageSchema>
  646.    <PropertyPageSchema Include="$(CommonXamlResourcesDirectory)ResolvedAssemblyReference.xaml">
  647.      <Context>ProjectSubscriptionService;BrowseObject</Context>
  648.    </PropertyPageSchema>
  649.  
  650.    <!-- COM references -->
  651.    <PropertyPageSchema Include="$(CommonXamlResourcesDirectory)COMReference.xaml">
  652.      <Context>;BrowseObject</Context>
  653.    </PropertyPageSchema>
  654.    <PropertyPageSchema Include="$(CommonXamlResourcesDirectory)ResolvedCOMReference.xaml">
  655.      <Context>ProjectSubscriptionService;BrowseObject</Context>
  656.    </PropertyPageSchema>
  657.  
  658.    <!-- Project references -->
  659.    <PropertyPageSchema Include="$(CommonXamlResourcesDirectory)ProjectReference.xaml">
  660.      <Context>;BrowseObject</Context>
  661.    </PropertyPageSchema>
  662.    <PropertyPageSchema Include="$(CommonXamlResourcesDirectory)ResolvedProjectReference.xaml">
  663.      <Context>ProjectSubscriptionService;BrowseObject</Context>
  664.    </PropertyPageSchema>
  665.  </ItemGroup>
  666.  
  667.  <ItemGroup Condition=" '$(DefineCommonCapabilities)' == 'true' ">
  668.    <ProjectCapability Include="
  669.                          AssemblyReferences;
  670.                          COMReferences;
  671.                          ProjectReferences;
  672.                          SharedProjectReferences;
  673.                          OutputGroups;
  674.                          AllTargetOutputGroups;
  675.                          VisualStudioWellKnownOutputGroups;
  676.                          SingleFileGenerators;
  677.                          DeclaredSourceItems;
  678.                          UserSourceItems;
  679.                           " />
  680.    <ProjectCapability Condition=" '$(TargetPlatformIdentifier)' == 'Windows' and '$(TargetPlatformVersion)' &lt; 8.0 "
  681.                       Include="BuildWindowsDesktopTarget" />
  682.  </ItemGroup>
  683.  
  684.  <ItemDefinitionGroup Condition=" '$(DefineExplicitDefaults)' == 'true' ">
  685.    <None>
  686.      <CopyToOutputDirectory>Never</CopyToOutputDirectory>
  687.    </None>
  688.    <Content>
  689.      <CopyToOutputDirectory>Never</CopyToOutputDirectory>
  690.    </Content>
  691.    <Compile>
  692.      <CopyToOutputDirectory>Never</CopyToOutputDirectory>
  693.    </Compile>
  694.    <EmbeddedResource>
  695.      <CopyToOutputDirectory>Never</CopyToOutputDirectory>
  696.    </EmbeddedResource>
  697.  </ItemDefinitionGroup>
  698.  
  699.  <!--
  700.    ***********************************************************************************************
  701.    ***********************************************************************************************
  702.                                                                Build Section
  703.    ***********************************************************************************************
  704.    ***********************************************************************************************
  705.    -->
  706.  
  707.  <!--
  708.    ============================================================
  709.                                        _CheckForInvalidConfigurationAndPlatform
  710.  
  711.    This target checks for errors in statically defined properties.  It always
  712.    gets executed before any other target.
  713.    ============================================================
  714.    -->
  715.  <Target
  716.      Name="_CheckForInvalidConfigurationAndPlatform">
  717.  
  718.    <PropertyGroup>
  719.      <_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>
  720.      <_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>
  721.      <_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>
  722.     </PropertyGroup>
  723.  
  724.     <Error Condition=" '$(_InvalidConfigurationError)' == 'true' " Text="$(_InvalidConfigurationMessageText)"/>
  725.     <Warning Condition=" '$(_InvalidConfigurationWarning)' == 'true' " Text="$(_InvalidConfigurationMessageText)"/>
  726.  
  727.     <Message Condition="'$(DesignTimeBuild)' != 'true'" Text="Configuration=$(Configuration)" Importance="Low" />
  728.     <Message Condition="'$(DesignTimeBuild)' != 'true'" Text="Platform=$(Platform)" Importance="Low" />
  729.  
  730.     <!-- Although we try to ensure a trailing slash, it's possible to circumvent this if the property is set on the command line -->
  731.    <Error Condition="'$(OutDir)' != '' and !HasTrailingSlash('$(OutDir)')" Text="The OutDir property must end with a trailing slash." />
  732.    <Error Condition="'$(BaseIntermediateOutputPath)' != '' and !HasTrailingSlash('$(BaseIntermediateOutputPath)')" Text="The BaseIntermediateOutputPath must end with a trailing slash." />
  733.    <Error Condition="'$(IntermediateOutputPath)' != '' and !HasTrailingSlash('$(IntermediateOutputPath)')" Text="The IntermediateOutputPath must end with a trailing slash." />
  734.  
  735.    <!-- Also update the value of PlatformTargetAsMSBuildArchitecture per the value of Prefer32Bit.  We are doing
  736.         this here because Prefer32Bit may be set anywhere in the targets, so we can't depend on it having the
  737.          correct value when we're trying to figure out PlatformTargetAsMSBuildArchitecture -->
  738.    <PropertyGroup Condition="'$(Prefer32Bit)' == 'true' and ('$(PlatformTarget)' == 'AnyCPU' or '$(PlatformTarget)' == '') and '$(PlatformTargetAsMSBuildArchitectureExplicitlySet)' != 'true'">
  739.      <PlatformTargetAsMSBuildArchitecture>x86</PlatformTargetAsMSBuildArchitecture>
  740.    </PropertyGroup>
  741.  </Target>
  742.  
  743.  <!--
  744.    ============================================================
  745.                                        Build
  746.  
  747.    The main build entry point.
  748.    ============================================================
  749.    -->
  750.  <PropertyGroup>
  751.    <BuildDependsOn>
  752.      BeforeBuild;
  753.      CoreBuild;
  754.      AfterBuild
  755.    </BuildDependsOn>
  756.  </PropertyGroup>
  757.  <Target
  758.      Name="Build"
  759.      Condition=" '$(_InvalidConfigurationWarning)' != 'true' "
  760.      DependsOnTargets="$(BuildDependsOn)"
  761.      Returns="$(TargetPath)" />
  762.  
  763.  <!--
  764.    ============================================================
  765.                                        BeforeBuild
  766.  
  767.    Redefine this target in your project in order to run tasks just before Build
  768.    ============================================================
  769.    -->
  770.  <Target Name="BeforeBuild"/>
  771.  
  772.  <!--
  773.    ============================================================
  774.                                        AfterBuild
  775.  
  776.    Redefine this target in your project in order to run tasks just after Build
  777.    ============================================================
  778.    -->
  779.  <Target Name="AfterBuild"/>
  780.  
  781.  <!--
  782.    ============================================================
  783.                                        CoreBuild
  784.  
  785.    The core build step calls each of the build targets.
  786.    ============================================================
  787.    -->
  788.  <PropertyGroup>
  789.    <CoreBuildDependsOn>
  790.      BuildOnlySettings;
  791.      PrepareForBuild;
  792.      PreBuildEvent;
  793.      ResolveReferences;
  794.      PrepareResources;
  795.      ResolveKeySource;
  796.      Compile;
  797.      ExportWindowsMDFile;
  798.      UnmanagedUnregistration;
  799.      GenerateSerializationAssemblies;
  800.      CreateSatelliteAssemblies;
  801.      GenerateManifests;
  802.      GetTargetPath;
  803.      PrepareForRun;
  804.      UnmanagedRegistration;
  805.      IncrementalClean;
  806.      PostBuildEvent
  807.    </CoreBuildDependsOn>
  808.  </PropertyGroup>
  809.  <Target
  810.      Name="CoreBuild"
  811.      DependsOnTargets="$(CoreBuildDependsOn)">
  812.  
  813.    <OnError ExecuteTargets="_TimeStampAfterCompile;PostBuildEvent" Condition="'$(RunPostBuildEvent)'=='Always' or '$(RunPostBuildEvent)'=='OnOutputUpdated'"/>
  814.    <OnError ExecuteTargets="_CleanRecordFileWrites"/>
  815.  
  816.  </Target>
  817.  
  818.  <!--
  819.    ============================================================
  820.                                        Rebuild
  821.  
  822.    Delete all intermediate and final build outputs, and then build the project from scratch.
  823.    ============================================================
  824.    -->
  825.  <PropertyGroup>
  826.  
  827.    <_ProjectDefaultTargets Condition="'$(MSBuildProjectDefaultTargets)' != ''">$(MSBuildProjectDefaultTargets)</_ProjectDefaultTargets>
  828.    <_ProjectDefaultTargets Condition="'$(MSBuildProjectDefaultTargets)' == ''">Build</_ProjectDefaultTargets>
  829.  
  830.    <RebuildDependsOn>
  831.      BeforeRebuild;
  832.      Clean;
  833.      $(_ProjectDefaultTargets);
  834.      AfterRebuild;
  835.    </RebuildDependsOn>
  836.  
  837.    <RebuildDependsOn Condition=" '$(MSBuildProjectDefaultTargets)' == 'Rebuild' " >
  838.      BeforeRebuild;
  839.      Clean;
  840.      Build;
  841.      AfterRebuild;
  842.    </RebuildDependsOn>
  843.  </PropertyGroup>
  844.  
  845.  <Target
  846.      Name="Rebuild"
  847.      Condition=" '$(_InvalidConfigurationWarning)' != 'true' "
  848.      DependsOnTargets="$(RebuildDependsOn)"
  849.      Returns="$(TargetPath)"/>
  850.  
  851.  <!--
  852.    ============================================================
  853.                                        BeforeRebuild
  854.  
  855.    Redefine this target in your project in order to run tasks just before Rebuild
  856.    ============================================================
  857.    -->
  858.  <Target Name="BeforeRebuild"/>
  859.  
  860.  <!--
  861.    ============================================================
  862.                                        AfterRebuild
  863.  
  864.    Redefine this target in your project in order to run tasks just after Rebuild
  865.    ============================================================
  866.    -->
  867.  <Target Name="AfterRebuild"/>
  868.  
  869.  <!--
  870.    ============================================================
  871.                                        BuildGenerateSources
  872.  
  873.    Redefine this target in your project in order to run tasks for BuildGenerateSources
  874.  
  875.    Set BuildPassReferences to enable P2P builds
  876.    ============================================================
  877.    -->
  878.  <PropertyGroup>
  879.    <BuildGenerateSourcesAction>Build</BuildGenerateSourcesAction>
  880.  </PropertyGroup>
  881.  
  882.  <Target Name="BuildGenerateSources" DependsOnTargets="BuildGenerateSourcesTraverse;$(BuildGenerateSourcesAction)" />
  883.  
  884.  <Target Name="BuildGenerateSourcesTraverse" DependsOnTargets="AssignProjectConfiguration;_SplitProjectReferencesByFileExistence">
  885.    <MSBuild
  886.        Projects="@(_MSBuildProjectReferenceExistent)"
  887.        Targets="BuildGenerateSources"
  888.        BuildInParallel="$(BuildInParallel)"
  889.        Properties="%(_MSBuildProjectReferenceExistent.SetConfiguration); %(_MSBuildProjectReferenceExistent.SetPlatform)"
  890.        Condition="'$(BuildPassReferences)' == 'true' and '@(ProjectReferenceWithConfiguration)' != '' and '@(_MSBuildProjectReferenceExistent)' != '' and '%(_MSBuildProjectReferenceExistent.BuildReference)' == 'true'"
  891.        ContinueOnError="!$(BuildingProject)"
  892.        RemoveProperties="%(_MSBuildProjectReferenceExistent.GlobalPropertiesToRemove)">
  893.    </MSBuild>
  894.  </Target>
  895.  
  896.  <!--
  897.    ============================================================
  898.                                        BuildCompile
  899.  
  900.    Redefine this target in your project in order to run tasks for BuildCompile
  901.    ============================================================
  902.    -->
  903.  <PropertyGroup>
  904.    <BuildCompileAction>Build</BuildCompileAction>
  905.  </PropertyGroup>
  906.  
  907.  <Target Name="BuildCompile" DependsOnTargets="BuildCompileTraverse;$(BuildCompileAction)" />
  908.  
  909.  <Target Name="BuildCompileTraverse" DependsOnTargets="AssignProjectConfiguration;_SplitProjectReferencesByFileExistence">
  910.    <MSBuild
  911.        Projects="@(_MSBuildProjectReferenceExistent)"
  912.        Targets="BuildCompile"
  913.        BuildInParallel="$(BuildInParallel)"
  914.        Properties="%(_MSBuildProjectReferenceExistent.SetConfiguration); %(_MSBuildProjectReferenceExistent.SetPlatform)"
  915.        Condition="'$(BuildPassReferences)' == 'true' and '@(ProjectReferenceWithConfiguration)' != '' and '@(_MSBuildProjectReferenceExistent)' != ''  and '%(_MSBuildProjectReferenceExistent.BuildReference)' == 'true'"
  916.        ContinueOnError="!$(BuildingProject)"
  917.        RemoveProperties="%(_MSBuildProjectReferenceExistent.GlobalPropertiesToRemove)">
  918.    </MSBuild>
  919.  </Target>
  920.  
  921.  <!--
  922.    ============================================================
  923.                                        BuildLink
  924.  
  925.    Redefine this target in your project in order to run tasks for BuildLink
  926.    ============================================================
  927.    -->
  928.  <PropertyGroup>
  929.    <BuildLinkAction>Build</BuildLinkAction>
  930.  </PropertyGroup>
  931.  
  932.  <Target Name="BuildLink" DependsOnTargets="BuildLinkTraverse;$(BuildLinkAction)" />
  933.  
  934.  <Target Name="BuildLinkTraverse" DependsOnTargets="AssignProjectConfiguration;_SplitProjectReferencesByFileExistence" >
  935.    <MSBuild
  936.        Projects="@(_MSBuildProjectReferenceExistent)"
  937.        Targets="BuildLink"
  938.        BuildInParallel="$(BuildInParallel)"
  939.        Properties="%(_MSBuildProjectReferenceExistent.SetConfiguration); %(_MSBuildProjectReferenceExistent.SetPlatform)"
  940.        Condition="'$(BuildPassReferences)' == 'true' and '@(ProjectReferenceWithConfiguration)' != '' and '@(_MSBuildProjectReferenceExistent)' != ''  and '%(_MSBuildProjectReferenceExistent.BuildReference)' == 'true'"
  941.        ContinueOnError="!$(BuildingProject)"
  942.        RemoveProperties="%(_MSBuildProjectReferenceExistent.GlobalPropertiesToRemove)">
  943.    </MSBuild>
  944.  </Target>
  945.  
  946.  <!--
  947.    ============================================================
  948.                                        CopyRunEnvironmentFiles
  949.  
  950.    Copy environment files necessary to run the user's app to the final directory.
  951.     This is a public target that can be invoked by an IDE.
  952.  
  953.     This may be used by an IDE to make the app.config file available for running
  954.     the target app.
  955.     ============================================================
  956.     -->
  957.   <Target
  958.       Name="CopyRunEnvironmentFiles"
  959.       DependsOnTargets="PrepareForBuild;SetWin32ManifestProperties;_CopyAppConfigFile;_CleanRecordFileWrites"/>
  960.  
  961.   <!--
  962.     ============================================================
  963.                                         Run
  964.  
  965.     Run the final build output if it is a .EXE
  966.     ============================================================
  967.     -->
  968.   <PropertyGroup>
  969.     <RunDependsOn></RunDependsOn>
  970.   </PropertyGroup>
  971.   <Target
  972.       Name="Run"
  973.       DependsOnTargets="$(RunDependsOn)">
  974.  
  975.     <Error Text="Cannot run '$(TargetPath)' because project output type is not '.exe'" Condition="'$(TargetExt)'!='.exe'"/>
  976.     <Exec Command="$(TargetPath) $(StartArguments)" WorkingDirectory="$(OutDir)" Condition=" '$(StartWorkingDirectory)' == '' "/>
  977.     <Exec Command="$(TargetPath) $(StartArguments)" WorkingDirectory="$(StartWorkingDirectory)" Condition=" '$(StartWorkingDirectory)' != '' "/>
  978.  
  979.   </Target>
  980.  
  981.  
  982.  
  983.  
  984.   <!--
  985.     ***********************************************************************************************
  986.     ***********************************************************************************************
  987.                                                                 BuildOnlySettings Section
  988.     ***********************************************************************************************
  989.     ***********************************************************************************************
  990.     -->
  991.  
  992.   <!--
  993.     ============================================================
  994.                                         BuildOnlySettings
  995.  
  996.     This target is called only when doing a real build.  It is specifically not called during project load.
  997.     ============================================================
  998.     -->
  999.   <PropertyGroup>
  1000.     <BuildingProject>false</BuildingProject>
  1001.   </PropertyGroup>
  1002.   <Target
  1003.       Name="BuildOnlySettings">
  1004.     <PropertyGroup>
  1005.       <BuildingProject>true</BuildingProject>
  1006.     </PropertyGroup>
  1007.   </Target>
  1008.  
  1009.  
  1010.  
  1011.  
  1012.   <!--
  1013.     ***********************************************************************************************
  1014.     ***********************************************************************************************
  1015.                                                                 PrepareForBuild Section
  1016.     ***********************************************************************************************
  1017.     ***********************************************************************************************
  1018.     -->
  1019.  
  1020.   <!--
  1021.     ============================================================
  1022.                                         PrepareForBuild
  1023.  
  1024.     Prepare the prerequisites for building.
  1025.     ============================================================
  1026.     -->
  1027.   <PropertyGroup>
  1028.     <PrepareForBuildDependsOn>GetFrameworkPaths;GetReferenceAssemblyPaths;AssignLinkMetadata</PrepareForBuildDependsOn>
  1029.   </PropertyGroup>
  1030.   <Target
  1031.       Name="PrepareForBuild"
  1032.       DependsOnTargets="$(PrepareForBuildDependsOn)">
  1033.  
  1034.     <ItemGroup>
  1035.       <AppConfigWithTargetPath Include="$(AppConfig)" Condition="'$(AppConfig)'!=''">
  1036.         <TargetPath>$(TargetFileName).config</TargetPath>
  1037.       </AppConfigWithTargetPath>
  1038.     </ItemGroup>
  1039.  
  1040.     <FindAppConfigFile PrimaryList="@(None)" SecondaryList="@(Content)" TargetPath="$(TargetFileName).config" Condition="'$(AppConfig)'==''">
  1041.       <Output TaskParameter="AppConfigFile" ItemName="AppConfigWithTargetPath"/>
  1042.       <Output TaskParameter="AppConfigFile" PropertyName="AppConfig"/>
  1043.     </FindAppConfigFile>
  1044.  
  1045.     <!-- Create the directories for intermediate and final build products, and any other arbitrary directories. -->
  1046.     <!-- We are going to continue on error here so that if the tree is read only we will still get intellisense -->
  1047.     <MakeDir Directories="$(OutDir);$(IntermediateOutputPath);@(DocFileItem->'%(RelativeDir)');@(CreateDirectory)" ContinueOnError="True"/>
  1048.  
  1049.   </Target>
  1050.  
  1051.   <!--
  1052.     ============================================================
  1053.                                         GetFrameworkPaths
  1054.  
  1055.     Get the paths for the .NET Framework installation directory
  1056.  
  1057.     These paths are not used directly by this .targets file but are available for pre and
  1058.     post build steps.
  1059.     ============================================================
  1060.     -->
  1061.   <PropertyGroup>
  1062.     <Framework40Dir>@(_TargetFramework40DirectoryItem)</Framework40Dir>
  1063.     <Framework35Dir>@(_TargetFramework35DirectoryItem)</Framework35Dir>
  1064.     <Framework30Dir>@(_TargetFramework30DirectoryItem)</Framework30Dir>
  1065.     <Framework20Dir>@(_TargetFramework20DirectoryItem)</Framework20Dir>
  1066.     <!-- 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.-->
  1067.     <FrameworkDir Condition="'$(FrameworkDir)' == '' and ('$(TargetFrameworkVersion)' == 'v2.0' or '$(TargetFrameworkVersion)' == 'v3.5' or '$(TargetFrameworkVersion)' == 'v4.0')">@(_TargetFramework20DirectoryItem)</FrameworkDir>
  1068.     <FrameworkDir Condition="'$(FrameworkDir)' == ''">@(_TargetFramework40DirectoryItem)</FrameworkDir>
  1069.     <TargetedFrameworkDir Condition="'$(TargetedFrameworkDir)' == ''">@(_TargetedFrameworkDirectoryItem)</TargetedFrameworkDir>
  1070.     <FrameworkSDKDir Condition="'$(FrameworkSDKDir)' == ''">@(_TargetFrameworkSDKDirectoryItem)</FrameworkSDKDir>
  1071.     <GetFrameworkPathsDependsOn></GetFrameworkPathsDependsOn>
  1072.   </PropertyGroup>
  1073.  
  1074.   <!-- This is a generally overriden target, for example it is overriden in the Microsoft.NETFramework.targets file -->
  1075.   <Target Name="GetFrameworkPaths"/>
  1076.  
  1077.   <!--
  1078.     ============================================================
  1079.                                         GetReferenceAssemblyPaths
  1080.  
  1081.     Get the paths for the Reference Assemblies for the known versions of the
  1082.     .NET Framework.
  1083.  
  1084.     These paths are used by the build process in order to resolve the correct
  1085.     assemblies from the various directories, and to support multi-targeting
  1086.     ============================================================
  1087.     -->
  1088.   <Target
  1089.       Name="GetReferenceAssemblyPaths"
  1090.       DependsOnTargets="$(GetReferenceAssemblyPathsDependsOn)">
  1091.  
  1092.     <!-- 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 -->
  1093.    <PropertyGroup>
  1094.      <TargetFrameworkDirectory Condition="'@(_CombinedTargetFrameworkDirectoriesItem)' == '$(TargetFrameworkDirectory)'"/>
  1095.    </PropertyGroup>
  1096.  
  1097.    <!-- By default if there is no root path set then the task will assume it is Program Files\Reference Assemblies\Microsoft\Framework-->
  1098.    <GetReferenceAssemblyPaths
  1099.        Condition="'$(TargetFrameworkMoniker)' != '' and ('$(_TargetFrameworkDirectories)' == '' or '$(_FullFrameworkReferenceAssemblyPaths)' == '')"
  1100.        TargetFrameworkMoniker="$(TargetFrameworkMoniker)"
  1101.        RootPath="$(TargetFrameworkRootPath)"
  1102.        BypassFrameworkInstallChecks="$(BypassFrameworkInstallChecks)"
  1103.        >
  1104.      <Output TaskParameter="ReferenceAssemblyPaths" PropertyName="_TargetFrameworkDirectories"/>
  1105.      <Output TaskParameter="FullFrameworkReferenceAssemblyPaths" PropertyName="_FullFrameworkReferenceAssemblyPaths"/>
  1106.      <Output TaskParameter="TargetFrameworkMonikerDisplayName" PropertyName="TargetFrameworkMonikerDisplayName" Condition="'$(TargetFrameworkMonikerDisplayName)' == ''"/>
  1107.    </GetReferenceAssemblyPaths>
  1108.  
  1109.    <PropertyGroup>
  1110.      <TargetFrameworkDirectory>$(_TargetFrameworkDirectories);$(TargetFrameworkDirectory);$(WinFXAssemblyDirectory)</TargetFrameworkDirectory>
  1111.      <TargetFrameworkDirectory Condition="'$(TargetPlatformWinMDLocation)' != '' and Exists('$(TargetPlatformWinMDLocation)')">$(TargetFrameworkDirectory);$(TargetPlatformWinMDLocation)</TargetFrameworkDirectory>
  1112.    </PropertyGroup>
  1113.  
  1114.    <!-- Remove the AssemblyFolders if no target framework directories could be found. This is to prevent us from
  1115.             resolving from the assemblyfolders global location if we are not acutally targeting a framework-->
  1116.  
  1117.    <PropertyGroup>
  1118.      <RemoveAssemblyFoldersIfNoTargetFramework Condition="'$(RemoveAssemblyFoldersIfNoTargetFramework)' == ''">true</RemoveAssemblyFoldersIfNoTargetFramework>
  1119.    </PropertyGroup>
  1120.  
  1121.    <PropertyGroup Condition="'$(_TargetFrameworkDirectories)' == '' and '$(AssemblySearchPaths)' != '' and '$(RemoveAssemblyFoldersIfNoTargetFramework)' == 'true'">
  1122.      <AssemblySearchPaths>$(AssemblySearchPaths.Replace('{AssemblyFolders}', '').Split(';'))</AssemblySearchPaths>
  1123.     </PropertyGroup>
  1124.  
  1125.     <ItemGroup Condition="'$(ImplicitlyExpandDesignTimeFacades)' == 'true'">
  1126.       <DesignTimeFacadeDirectoryRoots Include="$(TargetFrameworkDirectory)" />
  1127.       <DesignTimeFacadeDirectories Include="%(DesignTimeFacadeDirectoryRoots.Identity)Facades\" Condition="Exists('%(DesignTimeFacadeDirectoryRoots.Identity)Facades\')" />
  1128.     </ItemGroup>
  1129.  
  1130.     <PropertyGroup Condition="'@(DesignTimeFacadeDirectories)' != ''">
  1131.       <TargetFrameworkDirectory>$(TargetFrameworkDirectory);@(DesignTimeFacadeDirectories)</TargetFrameworkDirectory>
  1132.     </PropertyGroup>
  1133.  
  1134.     <PropertyGroup Condition="'$(_TargetFrameworkDirectories)' == ''">
  1135.       <TargetFrameworkProfile/>
  1136.     </PropertyGroup>
  1137.   </Target>
  1138.  
  1139.    <!-- Returns target framework moniker. E.g. ".NETFramework,Version=v4.0.1" -->
  1140.   <Target Name="GetTargetFrameworkMoniker"
  1141.           Returns="$(TargetFrameworkMoniker)"/>
  1142.  
  1143.   <!-- Returns target framework moniker display name. E.g. ".NET Framework 4 Platform Update 1 (KB2478063)" -->
  1144.   <Target Name="GetTargetFrameworkMonikerDisplayName"
  1145.           DependsOnTargets="GetFrameworkPaths;GetReferenceAssemblyPaths"
  1146.           Returns="$(TargetFrameworkMonikerDisplayName)"/>
  1147.  
  1148.   <!-- Returns semicolon separated list of target framework directories.
  1149.   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\" -->
  1150.   <Target Name="GetTargetFrameworkDirectories"
  1151.           DependsOnTargets="GetFrameworkPaths;GetReferenceAssemblyPaths"
  1152.           Returns="$(TargetFrameworkDirectory)"/>
  1153.  
  1154.   <!--
  1155.     ============================================================
  1156.                                         AssignLinkMetadata
  1157.  
  1158.        For items of a certain set of whitelisted types, make sure that
  1159.        if they are defined in a file other than the project file, that
  1160.        they have "Link" metadata set to an appropriate default.
  1161.     ============================================================
  1162.     -->
  1163.   <Target Name="AssignLinkMetadata" Condition=" '$(SynthesizeLinkMetadata)' == 'true' ">
  1164.     <!-- NONE ITEMS -->
  1165.     <AssignLinkMetadata Items="@(None)"
  1166.                         Condition="'@(None)' != '' and '%(None.DefiningProjectFullPath)' != '$(MSBuildProjectFullPath)'">
  1167.       <Output TaskParameter="OutputItems" ItemName="_Temp" />
  1168.     </AssignLinkMetadata>
  1169.  
  1170.     <ItemGroup>
  1171.       <None Remove="@(_Temp)" />
  1172.       <None Include="@(_Temp)" />
  1173.       <_Temp Remove="@(_Temp)" />
  1174.     </ItemGroup>
  1175.  
  1176.     <!-- CONTENT ITEMS -->
  1177.     <AssignLinkMetadata Items="@(Content)"
  1178.                         Condition="'@(Content)' != '' and '%(Content.DefiningProjectFullPath)' != '$(MSBuildProjectFullPath)'">
  1179.       <Output TaskParameter="OutputItems" ItemName="_Temp" />
  1180.     </AssignLinkMetadata>
  1181.  
  1182.     <ItemGroup>
  1183.       <Content Remove="@(_Temp)" />
  1184.       <Content Include="@(_Temp)" />
  1185.       <_Temp Remove="@(_Temp)" />
  1186.     </ItemGroup>
  1187.  
  1188.  
  1189.     <!-- PAGE ITEMS -->
  1190.     <AssignLinkMetadata Items="@(Page)"
  1191.                         Condition="'@(Page)' != '' and '%(Page.DefiningProjectFullPath)' != '$(MSBuildProjectFullPath)'">
  1192.       <Output TaskParameter="OutputItems" ItemName="_Temp" />
  1193.     </AssignLinkMetadata>
  1194.  
  1195.     <ItemGroup>
  1196.       <Page Remove="@(_Temp)" />
  1197.       <Page Include="@(_Temp)" />
  1198.       <_Temp Remove="@(_Temp)" />
  1199.     </ItemGroup>
  1200.  
  1201.  
  1202.     <!-- APPLICATIONDEFINITION ITEMS -->
  1203.     <AssignLinkMetadata Items="@(ApplicationDefinition)"
  1204.                         Condition="'@(ApplicationDefinition)' != '' and '%(ApplicationDefinition.DefiningProjectFullPath)' != '$(MSBuildProjectFullPath)'">
  1205.       <Output TaskParameter="OutputItems" ItemName="_Temp" />
  1206.     </AssignLinkMetadata>
  1207.  
  1208.     <ItemGroup>
  1209.       <ApplicationDefinition Remove="@(_Temp)" />
  1210.       <ApplicationDefinition Include="@(_Temp)" />
  1211.       <_Temp Remove="@(_Temp)" />
  1212.     </ItemGroup>
  1213.  
  1214.     <!-- EMBEDDEDRESOURCE ITEMS -->
  1215.     <AssignLinkMetadata Items="@(EmbeddedResource)"
  1216.                         Condition="'@(EmbeddedResource)' != '' and '%(EmbeddedResource.DefiningProjectFullPath)' != '$(MSBuildProjectFullPath)'">
  1217.       <Output TaskParameter="OutputItems" ItemName="_Temp" />
  1218.     </AssignLinkMetadata>
  1219.  
  1220.     <ItemGroup>
  1221.       <EmbeddedResource Remove="@(_Temp)" />
  1222.       <EmbeddedResource Include="@(_Temp)" />
  1223.       <_Temp Remove="@(_Temp)" />
  1224.     </ItemGroup>
  1225.   </Target>
  1226.  
  1227.   <!--
  1228.     ***********************************************************************************************
  1229.     ***********************************************************************************************
  1230.                                                                 PreBuildEvent Section
  1231.     ***********************************************************************************************
  1232.     ***********************************************************************************************
  1233.     -->
  1234.  
  1235.   <!--
  1236.     ============================================================
  1237.                                         PreBuildEvent
  1238.  
  1239.     Run the pre-build event if there is one.
  1240.     ============================================================
  1241.     -->
  1242.   <PropertyGroup>
  1243.     <PreBuildEventDependsOn></PreBuildEventDependsOn>
  1244.   </PropertyGroup>
  1245.   <Target
  1246.       Name="PreBuildEvent"
  1247.       Condition="'$(PreBuildEvent)'!=''"
  1248.       DependsOnTargets="$(PreBuildEventDependsOn)">
  1249.  
  1250.     <Exec WorkingDirectory="$(OutDir)" Command="$(PreBuildEvent)" />
  1251.  
  1252.   </Target>
  1253.  
  1254.  
  1255.  
  1256.  
  1257.   <!--
  1258.     ***********************************************************************************************
  1259.     ***********************************************************************************************
  1260.                                                                 UnmanagedUnregistration Section
  1261.     ***********************************************************************************************
  1262.     ***********************************************************************************************
  1263.     -->
  1264.  
  1265.   <!--
  1266.     ============================================================
  1267.                                         UnmanagedUnregistration
  1268.  
  1269.     If the main assembly had previously been registered for COM interop, unregister it now.
  1270.     We will re-register the new version after it has been built.
  1271.     ============================================================
  1272.     -->
  1273.   <PropertyGroup>
  1274.     <UnmanagedUnregistrationDependsOn></UnmanagedUnregistrationDependsOn>
  1275.   </PropertyGroup>
  1276.   <Target
  1277.       Name="UnmanagedUnregistration"
  1278.       Condition="(('$(_AssemblyTimestampBeforeCompile)' != '$(_AssemblyTimestampAfterCompile)' or '$(RegisterForComInterop)' != 'true' or '$(OutputType)' != 'library') or
  1279.                    ('$(_AssemblyTimestampBeforeCompile)' == '')) and
  1280.                   Exists('@(_UnmanagedRegistrationCache)')"
  1281.       DependsOnTargets="$(UnmanagedUnregistrationDependsOn)">
  1282.  
  1283.     <PropertyGroup>
  1284.       <UnregisterAssemblyMSBuildArchitecture Condition="'$(UnregisterAssemblyMSBuildArchitecture)' == ''">$(PlatformTargetAsMSBuildArchitecture)</UnregisterAssemblyMSBuildArchitecture>
  1285.     </PropertyGroup>
  1286.  
  1287.     <PropertyGroup Condition="'$(TargetFrameworkAsMSBuildRuntime)' != '' and '$(UnregisterAssemblyMSBuildArchitecture)' != ''">
  1288.       <!-- Falling back to the current runtime if we are targeting CLR2 and the task host doesn't exist will lead to
  1289.           incorrect behavior in some cases, but it's the same incorrect behavior as Visual Studio 2010, and thus better
  1290.            than causing build breaks on upgrade to Win8 the way not doing so would.  For more details, see the
  1291.            corresponding comment in GenerateResource. -->
  1292.       <UnregisterAssemblyMSBuildRuntime
  1293.           Condition="'$(UnregisterAssemblyMSBuildRuntime)' == '' and
  1294.                     $([MSBuild]::DoesTaskHostExist(`$(TargetFrameworkAsMSBuildRuntime)`, `$(UnregisterAssemblyMSBuildArchitecture)`))">$(TargetFrameworkAsMSBuildRuntime)</UnregisterAssemblyMSBuildRuntime>
  1295.  
  1296.       <!-- If the targeted runtime doesn't exist, fall back to current -->
  1297.      <UnregisterAssemblyMSBuildRuntime Condition="'$(UnregisterAssemblyMSBuildRuntime)' == ''">CurrentRuntime</UnregisterAssemblyMSBuildRuntime>
  1298.    </PropertyGroup>
  1299.  
  1300.  
  1301.    <UnregisterAssembly AssemblyListFile="@(_UnmanagedRegistrationCache)"
  1302.                        MSBuildArchitecture="$(UnregisterAssemblyMSBuildArchitecture)"
  1303.                        MSBuildRuntime="$(UnregisterAssemblyMSBuildRuntime)" />
  1304.  
  1305.  </Target>
  1306.  
  1307.  
  1308.  
  1309.  
  1310.  <!--
  1311.    ***********************************************************************************************
  1312.    ***********************************************************************************************
  1313.                                                                ResolveReferences Section
  1314.    ***********************************************************************************************
  1315.    ***********************************************************************************************
  1316.    -->
  1317.  <!--
  1318.    ============================================================
  1319.                     GetTargetFrameworkVersion
  1320.  
  1321.    This stand-alone target returns the target framework version (i.e. v3.5, v4.0, etc.)
  1322.    that would be used if we built this project.
  1323.  
  1324.    ============================================================
  1325.    -->
  1326.  
  1327.  <Target
  1328.     Name="GetTargetFrameworkVersion"
  1329.     Returns="$(TargetFrameworkVersion)">
  1330.  </Target>
  1331.  
  1332.  <!--
  1333.    ============================================================
  1334.                                        ResolveReferences
  1335.    ============================================================
  1336.    -->
  1337.  <PropertyGroup>
  1338.    <ResolveReferencesDependsOn>
  1339.      BeforeResolveReferences;
  1340.      AssignProjectConfiguration;
  1341.      ResolveProjectReferences;
  1342.      FindInvalidProjectReferences;
  1343.      ResolveNativeReferences;
  1344.      ResolveAssemblyReferences;
  1345.      GenerateBindingRedirects;
  1346.      ResolveComReferences;
  1347.      AfterResolveReferences
  1348.    </ResolveReferencesDependsOn>
  1349.  </PropertyGroup>
  1350.  <Target
  1351.      Name="ResolveReferences"
  1352.      DependsOnTargets="$(ResolveReferencesDependsOn)"/>
  1353.  
  1354.  <!--
  1355.    ============================================================
  1356.                                        BeforeResolveReferences
  1357.  
  1358.    Redefine this target in your project in order to run tasks just before ResolveReferences
  1359.    ============================================================
  1360.    -->
  1361.  <Target Name="BeforeResolveReferences"/>
  1362.  
  1363.  <!--
  1364.    ============================================================
  1365.                                        AfterResolveReferences
  1366.  
  1367.    Redefine this target in your project in order to run tasks just after ResolveReferences
  1368.    ============================================================
  1369.    -->
  1370.  <Target Name="AfterResolveReferences"/>
  1371.  
  1372.  <!--
  1373.    ============================================================
  1374.                                        AssignProjectConfiguration
  1375.  
  1376.    Assigns the appropriate configuration to each project in the list of project references passed in.
  1377.    Adds to the project references passed in any project references implied by dependencies expressed in the solution file, if any.
  1378.  
  1379.        [IN]
  1380.        @(ProjectReference) - the list of all project references
  1381.  
  1382.        [OUT]
  1383.        @(ProjectReferenceWithConfiguration) - the list of project references (MSBuild and potentially VSIP projects)
  1384.                                               with metadata values FullConfiguration, Configuration, Platform,
  1385.                                               SetConfiguration, and SetPlatform
  1386.    ============================================================
  1387.    -->
  1388.  <Target
  1389.      Name="AssignProjectConfiguration"
  1390.      Condition="'$(CurrentSolutionConfigurationContents)' != '' or '@(ProjectReference)'!=''">
  1391.  
  1392.    <PropertyGroup>
  1393.      <OnlyReferenceAndBuildProjectsEnabledInSolutionConfiguration Condition="'$(OnlyReferenceAndBuildProjectsEnabledInSolutionConfiguration)' == ''">true</OnlyReferenceAndBuildProjectsEnabledInSolutionConfiguration>
  1394.      <ShouldUnsetParentConfigurationAndPlatform Condition="'$(ShouldUnsetParentConfigurationAndPlatform)' == '' and ('$(BuildingInsideVisualStudio)' == 'true' or '$(BuildingSolutionFile)' == 'true')">true</ShouldUnsetParentConfigurationAndPlatform>
  1395.      <ShouldUnsetParentConfigurationAndPlatform Condition="'$(ShouldUnsetParentConfigurationAndPlatform)' == ''">false</ShouldUnsetParentConfigurationAndPlatform>
  1396.      
  1397.      <!-- Web Application projects can "secretly" reference Silverlight projects, which can take project dependencies on that same Web Application.  If the project
  1398.           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
  1399.            want this to happen, so just turn off synthetic project reference generation for Silverlight projects. -->
  1400.       <AddSyntheticProjectReferencesForSolutionDependencies Condition="'$(AddSyntheticProjectReferencesForSolutionDependencies)' == '' and '$(TargetFrameworkIdentifier)' == 'Silverlight'">false</AddSyntheticProjectReferencesForSolutionDependencies>
  1401.  
  1402.       <!-- 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-->
  1403.       <AddSyntheticProjectReferencesForSolutionDependencies Condition="'$(AddSyntheticProjectReferencesForSolutionDependencies)' == '' and '$(BuildingInsideVisualStudio)' != 'true'">true</AddSyntheticProjectReferencesForSolutionDependencies>
  1404.     </PropertyGroup>
  1405.  
  1406.     <!-- Assign a project configuration to each project reference if we're building a solution file. -->
  1407.    <AssignProjectConfiguration
  1408.        ProjectReferences="@(ProjectReference)"
  1409.        CurrentProject="$(MSBuildProjectFullPath)"
  1410.        CurrentProjectConfiguration="$(Configuration)"
  1411.        CurrentProjectPlatform="$(Platform)"
  1412.        DefaultToVcxPlatformMapping="$(DefaultToVcxPlatformMapping)"
  1413.        VcxToDefaultPlatformMapping="$(VcxToDefaultPlatformMapping)"
  1414.        OutputType="$(OutputType)"
  1415.        ResolveConfigurationPlatformUsingMappings="false"
  1416.        SolutionConfigurationContents="$(CurrentSolutionConfigurationContents)"
  1417.        AddSyntheticProjectReferencesForSolutionDependencies="$(AddSyntheticProjectReferencesForSolutionDependencies)"
  1418.        OnlyReferenceAndBuildProjectsEnabledInSolutionConfiguration = "$(OnlyReferenceAndBuildProjectsEnabledInSolutionConfiguration)"
  1419.        ShouldUnsetParentConfigurationAndPlatform = "$(ShouldUnsetParentConfigurationAndPlatform)" >
  1420.  
  1421.      <!-- EMITTED FOR COMPATIBILITY REASONS ONLY. CONSUME PROJECTREFERENCEWITHCONFIGURATION INSTEAD -->
  1422.      <Output TaskParameter="AssignedProjects" ItemName="_ProjectReferenceWithConfiguration"/>
  1423.      <Output TaskParameter="UnassignedProjects" ItemName="_ProjectReferenceWithConfiguration"/>
  1424.  
  1425.      <Output TaskParameter="AssignedProjects" ItemName="ProjectReferenceWithConfiguration"/>
  1426.      <Output TaskParameter="UnassignedProjects" ItemName="ProjectReferenceWithConfiguration"/>
  1427.    </AssignProjectConfiguration>
  1428.  
  1429.    <ItemGroup>
  1430.      <_ProjectReferenceWithConfiguration>
  1431.        <BuildReference Condition="'%(_ProjectReferenceWithConfiguration.BuildReference)' == ''">true</BuildReference>
  1432.        <ReferenceOutputAssembly Condition="'%(_ProjectReferenceWithConfiguration.ReferenceOutputAssembly)' == ''">true</ReferenceOutputAssembly>
  1433.      </_ProjectReferenceWithConfiguration>
  1434.      <ProjectReferenceWithConfiguration>
  1435.        <BuildReference Condition="'%(ProjectReferenceWithConfiguration.BuildReference)' == ''">true</BuildReference>
  1436.        <ReferenceOutputAssembly Condition="'%(ProjectReferenceWithConfiguration.ReferenceOutputAssembly)' == ''">true</ReferenceOutputAssembly>
  1437.      </ProjectReferenceWithConfiguration>
  1438.    </ItemGroup>
  1439.  </Target>
  1440.  
  1441.  <!--
  1442.    ============================================================
  1443.                                        _SplitProjectReferencesByFileExistence
  1444.  
  1445.    Split referenced projects into two lists: those that exist on
  1446.    disk and those that don't.
  1447.     ============================================================
  1448.     -->
  1449.  
  1450.   <Target
  1451.     Name="_SplitProjectReferencesByFileExistence">
  1452.  
  1453.     <!--
  1454.         Use this task for matching projects with pre-resolved project outputs set by the IDE
  1455.         if building inside the IDE.  The IDE only includes non-MSBuild projects in the output list.  We'll
  1456.        use MSBuild to resolve MSBuild projects.
  1457.        This task will resolve VSIP (3rd party) project references and create a new item list with only project references
  1458.        to projects in the MSBuild format.
  1459.        -->
  1460.    <ResolveNonMSBuildProjectOutput
  1461.        ProjectReferences="@(ProjectReferenceWithConfiguration)"
  1462.        PreresolvedProjectOutputs="$(VSIDEResolvedNonMSBuildProjectOutputs)"
  1463.        Condition="'$(BuildingInsideVisualStudio)'=='true' and '@(ProjectReferenceWithConfiguration)'!=''">
  1464.  
  1465.      <Output TaskParameter="ResolvedOutputPaths" ItemName="_ResolvedProjectReferencePaths"/>
  1466.      <Output TaskParameter="UnresolvedProjectReferences" ItemName="_MSBuildProjectReference"/>
  1467.  
  1468.    </ResolveNonMSBuildProjectOutput>
  1469.  
  1470.    <!--
  1471.       If building from the command line, simply copy the ProjectReferenceWithConfiguration item list to _MSBuildProjectReference,
  1472.       since we have to assume all projects are in the MSBuild format. We have no way of building
  1473.       VSIP (3rd party) projects from the command line.
  1474.       -->
  1475.    <ItemGroup>
  1476.      <_MSBuildProjectReference Include="@(ProjectReferenceWithConfiguration)" Condition="'$(BuildingInsideVisualStudio)'!='true' and '@(ProjectReferenceWithConfiguration)'!=''"/>
  1477.    </ItemGroup>
  1478.    
  1479.    <!-- Break the project list into two lists: those that exist on disk and those that don't. -->
  1480.     <ItemGroup>
  1481.       <_MSBuildProjectReferenceExistent Include="@(_MSBuildProjectReference)" Condition="Exists('%(Identity)')"/>
  1482.       <_MSBuildProjectReferenceNonexistent Include="@(_MSBuildProjectReference)" Condition="!Exists('%(Identity)')"/>
  1483.     </ItemGroup>
  1484.  
  1485.   </Target>
  1486.  
  1487.   <!--
  1488.     ============================================================
  1489.                                         ResolveProjectReferences
  1490.  
  1491.     Build referenced projects:
  1492.  
  1493.         [IN]
  1494.         @(ProjectReferenceWithConfiguration) - The list of project references.
  1495.  
  1496.         [OUT]
  1497.         @(_ResolvedNativeProjectReferencePaths) - Paths to referenced native projects.
  1498.         @(_ResolvedProjectReferencePaths) - Paths to referenced managed projects.
  1499.     ============================================================
  1500.     -->
  1501.   <!-- By default, the outputs of project references are passed to the compiler -->
  1502.   <ItemDefinitionGroup>
  1503.     <ProjectReference>
  1504.       <!-- Target to build in the project reference; by default, this property is blank, indicating the default targets-->
  1505.       <Targets>$(ProjectReferenceBuildTargets)</Targets>
  1506.       <!-- 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. -->
  1507.       <OutputItemType/>
  1508.       <ReferenceSourceTarget>ProjectReference</ReferenceSourceTarget>
  1509.     </ProjectReference>
  1510.   </ItemDefinitionGroup>
  1511.  
  1512.   <Target
  1513.       Name="ResolveProjectReferences"
  1514.       DependsOnTargets="AssignProjectConfiguration;_SplitProjectReferencesByFileExistence"
  1515.       Returns="@(_ResolvedNativeProjectReferencePaths);@(_ResolvedProjectReferencePaths)">
  1516.  
  1517.     <!--
  1518.         When building this project from the IDE, just gather the referenced build outputs.
  1519.         The IDE will already have built the project, so there's no need to do it again here.
  1520.  
  1521.        The ContinueOnError setting is here so that, during project load, as
  1522.        much information as possible will be passed to the compilers.
  1523.        -->
  1524.  
  1525.    <MSBuild
  1526.        Projects="@(_MSBuildProjectReferenceExistent)"
  1527.        Targets="GetTargetPath"
  1528.        BuildInParallel="$(BuildInParallel)"
  1529.        Properties="%(_MSBuildProjectReferenceExistent.SetConfiguration); %(_MSBuildProjectReferenceExistent.SetPlatform)"
  1530.        Condition="'%(_MSBuildProjectReferenceExistent.BuildReference)' == 'true' and '@(ProjectReferenceWithConfiguration)' != '' and ('$(BuildingInsideVisualStudio)' == 'true' or '$(BuildProjectReferences)' != 'true') and '$(VisualStudioVersion)' != '10.0' and '@(_MSBuildProjectReferenceExistent)' != ''"
  1531.        ContinueOnError="!$(BuildingProject)"
  1532.        RemoveProperties="%(_MSBuildProjectReferenceExistent.GlobalPropertiesToRemove)">
  1533.  
  1534.      <Output TaskParameter="TargetOutputs" ItemName="_ResolvedProjectReferencePaths" Condition="'%(_MSBuildProjectReferenceExistent.ReferenceOutputAssembly)'=='true'"/>
  1535.      <Output TaskParameter="TargetOutputs" ItemName="%(_MSBuildProjectReferenceExistent.OutputItemType)" Condition="'%(_MSBuildProjectReferenceExistent.OutputItemType)' != ''"/>
  1536.  
  1537.    </MSBuild>
  1538.  
  1539.    <!--
  1540.        QUIRKING FOR DEV10
  1541.  
  1542.        In the 4.0 version of the targets, we built the targets specified in the Targets metadata in addition to
  1543.        GetTargetPath when building in the IDE.  In 4.5, we changed this to just GetTargetPath because it was
  1544.        causing performance trouble with certain systems that specified targets that did a significant amount of
  1545.        work in the Targets metadata, expecting them to only build when doing a real build.  
  1546.  
  1547.        However, that change broke C++ unit testing in Dev10 + 4.5 scenarios, because they required use of the
  1548.        Targets metadata in order to get design time builds to work properly.  Thus, we need to make sure we
  1549.        restore the Dev10 behavior when building on Dev10.
  1550.        -->
  1551.  
  1552.    <MSBuild
  1553.        Projects="@(_MSBuildProjectReferenceExistent)"
  1554.        Targets="%(_MSBuildProjectReferenceExistent.Targets);GetTargetPath"
  1555.        BuildInParallel="$(BuildInParallel)"
  1556.        Properties="%(_MSBuildProjectReferenceExistent.SetConfiguration); %(_MSBuildProjectReferenceExistent.SetPlatform)"
  1557.        Condition="'%(_MSBuildProjectReferenceExistent.BuildReference)' == 'true' and '@(ProjectReferenceWithConfiguration)' != '' and ('$(BuildingInsideVisualStudio)' == 'true' or '$(BuildProjectReferences)' != 'true') and '$(VisualStudioVersion)' == '10.0' and '@(_MSBuildProjectReferenceExistent)' != ''"
  1558.        ContinueOnError="!$(BuildingProject)"
  1559.        RemoveProperties="%(_MSBuildProjectReferenceExistent.GlobalPropertiesToRemove)">
  1560.  
  1561.      <Output TaskParameter="TargetOutputs" ItemName="_ResolvedProjectReferencePaths" Condition="'%(_MSBuildProjectReferenceExistent.ReferenceOutputAssembly)'=='true'"/>
  1562.      <Output TaskParameter="TargetOutputs" ItemName="%(_MSBuildProjectReferenceExistent.OutputItemType)" Condition="'%(_MSBuildProjectReferenceExistent.OutputItemType)' != ''"/>
  1563.  
  1564.    </MSBuild>
  1565.  
  1566.    <!--
  1567.        Build referenced projects when building from the command line.
  1568.        -->
  1569.    <MSBuild
  1570.        Projects="@(_MSBuildProjectReferenceExistent)"
  1571.        Targets="%(_MSBuildProjectReferenceExistent.Targets)"
  1572.        BuildInParallel="$(BuildInParallel)"
  1573.        Properties="%(_MSBuildProjectReferenceExistent.SetConfiguration); %(_MSBuildProjectReferenceExistent.SetPlatform)"
  1574.        Condition="'%(_MSBuildProjectReferenceExistent.BuildReference)' == 'true' and '@(ProjectReferenceWithConfiguration)' != '' and '$(BuildingInsideVisualStudio)' != 'true' and '$(BuildProjectReferences)' == 'true' and '@(_MSBuildProjectReferenceExistent)' != ''"
  1575.        ContinueOnError="$(ContinueOnError)"
  1576.        RemoveProperties="%(_MSBuildProjectReferenceExistent.GlobalPropertiesToRemove)">
  1577.  
  1578.      <Output TaskParameter="TargetOutputs" ItemName="_ResolvedProjectReferencePaths" Condition="'%(_MSBuildProjectReferenceExistent.ReferenceOutputAssembly)'=='true' or '$(DesignTimeBuild)' == 'true'"/>
  1579.      <Output TaskParameter="TargetOutputs" ItemName="%(_MSBuildProjectReferenceExistent.OutputItemType)" Condition="'%(_MSBuildProjectReferenceExistent.OutputItemType)' != ''"/>
  1580.  
  1581.    </MSBuild>
  1582.  
  1583.    <!--
  1584.        Get manifest items from the (non-exe) built project references (to feed them into ResolveNativeReference).
  1585.        -->
  1586.    <MSBuild
  1587.        Projects="@(_MSBuildProjectReferenceExistent)"
  1588.        Targets="GetNativeManifest"
  1589.        BuildInParallel="$(BuildInParallel)"
  1590.        Properties="%(_MSBuildProjectReferenceExistent.SetConfiguration); %(_MSBuildProjectReferenceExistent.SetPlatform)"
  1591.        Condition="'%(_MSBuildProjectReferenceExistent.BuildReference)' == 'true' and '@(ProjectReferenceWithConfiguration)' != '' and '$(BuildingProject)' == 'true' and '@(_MSBuildProjectReferenceExistent)' != ''"
  1592.        ContinueOnError="$(ContinueOnError)"
  1593.        RemoveProperties="%(_MSBuildProjectReferenceExistent.GlobalPropertiesToRemove)">
  1594.  
  1595.      <Output TaskParameter="TargetOutputs" ItemName="NativeReference" Condition="'%(_MSBuildProjectReferenceExistent.ReferenceOutputAssembly)' == 'true'"/>
  1596.    </MSBuild>
  1597.  
  1598.    <ItemGroup>
  1599.      <_ResolvedProjectReferencePaths Remove="@(_ResolvedProjectReferencePaths)" Condition="'%(_ResolvedProjectReferencePaths.ResolveableAssembly)' == 'false'" />
  1600.      <!--
  1601.          Copy OriginalItemSpec to OriginalProjectReferenceItemSpec, so that when ResolveAssemblyReferences
  1602.          takes these items and resolves them to ReferencePath, we can still recover the _real_ OriginalItemSpec
  1603.          for the unresolved reference items.
  1604.          -->
  1605.      <_ResolvedProjectReferencePaths>
  1606.        <OriginalProjectReferenceItemSpec>%(_ResolvedProjectReferencePaths.OriginalItemSpec)</OriginalProjectReferenceItemSpec>
  1607.      </_ResolvedProjectReferencePaths>
  1608.    </ItemGroup>
  1609.  
  1610.    <!-- Issue a warning for each non-existent project. -->
  1611.    <Warning
  1612.        Text="The referenced project '%(_MSBuildProjectReferenceNonexistent.Identity)' does not exist."
  1613.        Condition="'@(ProjectReferenceWithConfiguration)' != '' and '@(_MSBuildProjectReferenceNonexistent)' != ''"/>
  1614.  
  1615.  </Target>
  1616.  
  1617.  <Target
  1618.    Name="ResolveProjectReferencesDesignTime"
  1619.    Returns="@(_ProjectReferencesFromRAR);@(_ResolvedNativeProjectReferencePaths)"
  1620.    DependsOnTargets="ResolveProjectReferences;ResolveAssemblyReferences">
  1621.    <!-- 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
  1622.        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.
  1623.    -->
  1624.    <ItemGroup>
  1625.      <_ProjectReferencesFromRAR Include="@(ReferencePath->WithMetadataValue('ReferenceSourceTarget', 'ProjectReference'))">
  1626.        <OriginalItemSpec>%(ReferencePath.ProjectReferenceOriginalItemSpec)</OriginalItemSpec>
  1627.      </_ProjectReferencesFromRAR>
  1628.    </ItemGroup>
  1629.  </Target>
  1630.  
  1631.  <Target
  1632.   Name="ExpandSDKReferencesDesignTime"
  1633.   Returns="@(ReferencesFromSDK)"
  1634.   DependsOnTargets="ExpandSDKReferences"/>
  1635.  
  1636.  <!--
  1637.    ============================================================
  1638.                                        GetTargetPath
  1639.  
  1640.    This stand-alone target returns the name of the build product (i.e. EXE, DLL)
  1641.    that would be produced if we built this project.
  1642.    ============================================================
  1643.    -->
  1644.  <PropertyGroup>
  1645.    <GetTargetPathDependsOn>$(GetTargetPathDependsOn)</GetTargetPathDependsOn>
  1646.  </PropertyGroup>
  1647.  
  1648.  <Target
  1649.      Name="GetTargetPath"
  1650.      DependsOnTargets="$(GetTargetPathDependsOn)"
  1651.      Returns="@(TargetPathWithTargetPlatformMoniker)">
  1652.    <ItemGroup>
  1653.      <TargetPathWithTargetPlatformMoniker Include="$(TargetPath)">
  1654.        <TargetPlatformMoniker>$(TargetPlatformMoniker)</TargetPlatformMoniker>
  1655.        <TargetPlatformIdentifier>$(TargetPlatformIdentifier)</TargetPlatformIdentifier>
  1656.      </TargetPathWithTargetPlatformMoniker>
  1657.    </ItemGroup>
  1658.  </Target>
  1659.  
  1660.  <!--
  1661.    ============================================================
  1662.                                        GetTargetPathWithTargetPlatformMoniker
  1663.  
  1664.    This stand-alone target returns the name and version of the target platform for this project.
  1665.  
  1666.    NOTE: The functionality of this target has been subsumed by GetTargetPath.  This target is
  1667.    provided purely for compat reasons.
  1668.    ============================================================
  1669.    -->
  1670.  <PropertyGroup>
  1671.    <GetTargetPathWithTargetPlatformMonikerDependsOn>$(GetTargetPathDependsOn); GetTargetPath</GetTargetPathWithTargetPlatformMonikerDependsOn>
  1672.  </PropertyGroup>
  1673.  
  1674.  <Target
  1675.      Name="GetTargetPathWithTargetPlatformMoniker"
  1676.      DependsOnTargets="$(GetTargetPathWithTargetPlatformMonikerDependsOn)"
  1677.      Returns="@(TargetPathWithTargetPlatformMoniker)" />
  1678.  
  1679.  <!--
  1680.    ============================================================
  1681.                                        GetNativeManifest
  1682.  
  1683.    Compute the manifest item for this project.
  1684.  
  1685.        [IN]
  1686.        $(_DeploymentApplicationManifestIdentity) - the manifest identity
  1687.        @(ApplicationManifest)         - the original application manifest item
  1688.  
  1689.        [OUT]
  1690.        @(ComputedApplicationManifest) - application manifest item with full hint path, if generated
  1691.    ============================================================
  1692.    -->
  1693.  <Target
  1694.      Name="GetNativeManifest"
  1695.      Returns="@(ComputedApplicationManifest)">
  1696.  
  1697.    <ItemGroup>
  1698.      <ComputedApplicationManifest Include="$(_DeploymentApplicationManifestIdentity)" Condition="'$(OutputType)'!='winexe' and '$(OutputType)'!='exe' and '$(OutputType)'!='appcontainerexe' and Exists('%(_ApplicationManifestFinal.FullPath)')">
  1699.        <HintPath>%(_ApplicationManifestFinal.FullPath)</HintPath>
  1700.      </ComputedApplicationManifest>
  1701.    </ItemGroup>
  1702.  
  1703.  </Target>
  1704.  
  1705.  <!--
  1706.    ============================================================
  1707.                                        ResolveNativeReferences
  1708.  
  1709.    Resolve native references
  1710.  
  1711.        [IN]
  1712.        @(NativeReference) - The manifest reference (or list of manifest references)
  1713.  
  1714.        [OUT]
  1715.        @(NativeReferenceFile)  - List of manifest files referenced.
  1716.        @(_DeploymentNativePrerequisite)   - List of native assembly prerequisites contained in the manifest.
  1717.        @(ComClassReference)    - List of COM components contained in the manifest.
  1718.        @(COMReferenceFromNative) List of type libraries contained in the manifest.
  1719.        @(COMFileReference)     - List of loose files contained in the manifest.
  1720.        @(_DeploymentLooseManifestFile)    - List of extra files that should be published.
  1721.    ============================================================
  1722.    -->
  1723.  <Target
  1724.      Name="ResolveNativeReferences"
  1725.      Condition="'@(NativeReference)'!=''"
  1726.      DependsOnTargets="ResolveProjectReferences">
  1727.  
  1728.    <ResolveNativeReference
  1729.        NativeReferences="@(NativeReference)"
  1730.        AdditionalSearchPaths="$(ReferencePath);$(OutDir)"
  1731.            >
  1732.      <Output TaskParameter="ContainingReferenceFiles" ItemName="NativeReferenceFile"/>
  1733.      <Output TaskParameter="ContainedPrerequisiteAssemblies" ItemName="_DeploymentNativePrerequisite"/>
  1734.      <Output TaskParameter="ContainedComComponents" ItemName="ComClassReference"/>
  1735.      <Output TaskParameter="ContainedTypeLibraries" ItemName="COMReferenceFromNative"/>
  1736.      <Output TaskParameter="ContainedLooseTlbFiles" ItemName="COMFileReference"/>
  1737.      <Output TaskParameter="ContainedLooseEtcFiles" ItemName="_DeploymentLooseManifestFile"/>
  1738.    </ResolveNativeReference>
  1739.  
  1740.  </Target>
  1741.  
  1742.  <!--
  1743.    ============================================================
  1744.  
  1745.                                        ResolveAssemblyReferences
  1746.  
  1747.    Given the list of assemblies, find the closure of all assemblies that they depend on. These are
  1748.    what we need to copy to the output directory.
  1749.  
  1750.        [IN]
  1751.        @(Reference) - List of assembly references as fusion names.
  1752.        @(_ResolvedProjectReferencePaths) - List of project references produced by projects that this project depends on.
  1753.  
  1754.            The 'Private' attribute on the reference corresponds to the Copy Local flag in IDE.
  1755.            The 'Private' flag can have three possible values:
  1756.                - 'True' means the reference should be Copied Local
  1757.                - 'False' means the reference should not be Copied Local
  1758.                - [Missing] means this task will decide whether to treat this reference as CopyLocal or not.
  1759.  
  1760.        [OUT]
  1761.        @(ReferencePath) - Paths to resolved primary files.
  1762.        @(ReferenceDependencyPaths) - Paths to resolved dependency files.
  1763.        @(_ReferenceRelatedPaths) - Paths to .xmls and .pdbs.
  1764.        @(ReferenceSatellitePaths) - Paths to satellites.
  1765.        @(_ReferenceSerializationAssemblyPaths) - Paths to XML serialization assemblies created by sgen.
  1766.        @(_ReferenceScatterPaths) - Paths to scatter files.
  1767.        @(ReferenceCopyLocalPaths) - Paths to files that should be copied to the local directory.
  1768.    ============================================================
  1769.    -->
  1770.  <PropertyGroup>
  1771.    <ResolveAssemblyReferencesDependsOn>
  1772.      GetFrameworkPaths;
  1773.      GetReferenceAssemblyPaths;
  1774.      PrepareForBuild;
  1775.      ResolveSDKReferences;
  1776.      ExpandSDKReferences;
  1777.    </ResolveAssemblyReferencesDependsOn>
  1778.  </PropertyGroup>
  1779.  <Target
  1780.      Name="ResolveAssemblyReferences"
  1781.      Returns="@(ReferencePath)"
  1782.      DependsOnTargets="$(ResolveAssemblyReferencesDependsOn)">
  1783.  
  1784.    <ItemGroup>
  1785.      <_ReferenceInstalledAssemblyDirectory Include="$(TargetFrameworkDirectory)" />
  1786.      <_ReferenceInstalledAssemblySubsets Include="$(TargetFrameworkSubset)" />
  1787.    </ItemGroup>
  1788.  
  1789.    <!--
  1790.        Only read and write cache file at build time, skip it for load time because its more
  1791.        expensive to write the newly created cache file.
  1792.        -->
  1793.    <PropertyGroup>
  1794.      <ResolveAssemblyReferencesStateFile Condition="'$(BuildingProject)'=='true'">$(IntermediateOutputPath)$(MSBuildProjectFile)ResolveAssemblyReference.cache</ResolveAssemblyReferencesStateFile>
  1795.    </PropertyGroup>
  1796.  
  1797.    <!-- Make an App.Config item that exists when AutoUnify is false. -->
  1798.    <ItemGroup>
  1799.      <_ResolveAssemblyReferencesApplicationConfigFileForExes Include="@(AppConfigWithTargetPath)" Condition="'$(AutoGenerateBindingRedirects)'=='true' or '$(AutoUnifyAssemblyReferences)'=='false'"/>
  1800.    </ItemGroup>
  1801.  
  1802.    <PropertyGroup>
  1803.      <!-- Default in task is true -->
  1804.      <_FindDependencies Condition="'$(BuildingProject)' != 'true' and '$(_ResolveReferenceDependencies)' != 'true'">false</_FindDependencies>
  1805.      <ResolveAssemblyReferencesSilent Condition="'$(ResolveAssemblyReferencesSilent)' == '' and '$(TraceDesignTime)' != 'true' and '$(BuildingProject)' == 'false'">true</ResolveAssemblyReferencesSilent>
  1806.      <ResolveAssemblyReferencesSilent Condition="'$(ResolveAssemblyReferencesSilent)' == ''">false</ResolveAssemblyReferencesSilent>
  1807.      <ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch Condition="'$(ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch)' == ''">Warning</ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
  1808.    </PropertyGroup>
  1809.  
  1810.    <ItemGroup>
  1811.      <!-- 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
  1812.             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
  1813.             ide will show one of the references as not resolved, this will not break the build but is a display issue -->
  1814.      <Reference Remove="$(AdditionalExplicitAssemblyReferences)"/>
  1815.      <Reference Include="$(AdditionalExplicitAssemblyReferences)">
  1816.        <Implicit>true</Implicit>
  1817.      </Reference>
  1818.    </ItemGroup>
  1819.  
  1820.    <ResolveAssemblyReference
  1821.        Assemblies="@(Reference)"
  1822.        AssemblyFiles="@(_ResolvedProjectReferencePaths);@(_ExplicitReference)"
  1823.        TargetFrameworkDirectories="@(_ReferenceInstalledAssemblyDirectory)"
  1824.        InstalledAssemblyTables="@(InstalledAssemblyTables);@(RedistList)"
  1825.        IgnoreDefaultInstalledAssemblyTables="$(IgnoreDefaultInstalledAssemblyTables)"
  1826.        IgnoreDefaultInstalledAssemblySubsetTables="$(IgnoreInstalledAssemblySubsetTables)"
  1827.        CandidateAssemblyFiles="@(Content);@(None)"
  1828.        SearchPaths="$(AssemblySearchPaths)"
  1829.        AllowedAssemblyExtensions="$(AllowedReferenceAssemblyFileExtensions)"
  1830.        AllowedRelatedFileExtensions="$(AllowedReferenceRelatedFileExtensions)"
  1831.        TargetProcessorArchitecture="$(ProcessorArchitecture)"
  1832.        AppConfigFile="@(_ResolveAssemblyReferencesApplicationConfigFileForExes)"
  1833.        AutoUnify="$(AutoUnifyAssemblyReferences)"
  1834.        SupportsBindingRedirectGeneration="$(GenerateBindingRedirectsOutputType)"
  1835.        IgnoreVersionForFrameworkReferences="$(IgnoreVersionForFrameworkReferences)"
  1836.        FindDependencies="$(_FindDependencies)"
  1837.        FindSatellites="$(BuildingProject)"
  1838.        FindSerializationAssemblies="$(BuildingProject)"
  1839.        FindRelatedFiles="$(BuildingProject)"
  1840.        Silent="$(ResolveAssemblyReferencesSilent)"
  1841.        TargetFrameworkVersion="$(TargetFrameworkVersion)"
  1842.        TargetFrameworkMoniker="$(TargetFrameworkMoniker)"
  1843.        TargetFrameworkMonikerDisplayName="$(TargetFrameworkMonikerDisplayName)"
  1844.        TargetedRuntimeVersion="$(TargetedRuntimeVersion)"
  1845.        StateFile="$(ResolveAssemblyReferencesStateFile)"
  1846.        InstalledAssemblySubsetTables="@(InstalledAssemblySubsetTables)"
  1847.        TargetFrameworkSubsets="@(_ReferenceInstalledAssemblySubsets)"
  1848.        FullTargetFrameworkSubsetNames="$(FullReferenceAssemblyNames)"
  1849.        FullFrameworkFolders="$(_FullFrameworkReferenceAssemblyPaths)"
  1850.        FullFrameworkAssemblyTables="@(FullFrameworkAssemblyTables)"
  1851.        ProfileName="$(TargetFrameworkProfile)"
  1852.        LatestTargetFrameworkDirectories="@(LatestTargetFrameworkDirectories)"
  1853.        CopyLocalDependenciesWhenParentReferenceInGac="$(CopyLocalDependenciesWhenParentReferenceInGac)"
  1854.        DoNotCopyLocalIfInGac="$(DoNotCopyLocalIfInGac)"
  1855.        ResolvedSDKReferences="@(ResolvedSDKReference)"
  1856.        WarnOrErrorOnTargetArchitectureMismatch="$(ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch)"
  1857.        IgnoreTargetFrameworkAttributeVersionMismatch ="$(ResolveAssemblyReferenceIgnoreTargetFrameworkAttributeVersionMismatch)"
  1858.        ContinueOnError="$(ContinueOnError)"
  1859.        Condition="'@(Reference)'!='' or '@(_ResolvedProjectReferencePaths)'!='' or '@(_ExplicitReference)' != ''"
  1860.        >
  1861.  
  1862.      <Output TaskParameter="ResolvedFiles" ItemName="ReferencePath"/>
  1863.      <Output TaskParameter="ResolvedFiles" ItemName="_ResolveAssemblyReferenceResolvedFiles"/>
  1864.      <Output TaskParameter="ResolvedDependencyFiles" ItemName="ReferenceDependencyPaths"/>
  1865.      <Output TaskParameter="RelatedFiles" ItemName="_ReferenceRelatedPaths"/>
  1866.      <Output TaskParameter="SatelliteFiles" ItemName="ReferenceSatellitePaths"/>
  1867.      <Output TaskParameter="SerializationAssemblyFiles" ItemName="_ReferenceSerializationAssemblyPaths"/>
  1868.      <Output TaskParameter="ScatterFiles" ItemName="_ReferenceScatterPaths"/>
  1869.      <Output TaskParameter="CopyLocalFiles" ItemName="ReferenceCopyLocalPaths"/>
  1870.      <Output TaskParameter="SuggestedRedirects" ItemName="SuggestedBindingRedirects"/>
  1871.      <Output TaskParameter="FilesWritten" ItemName="FileWrites"/>
  1872.      <Output TaskParameter="DependsOnSystemRuntime" PropertyName="DependsOnSystemRuntime"/>
  1873.    </ResolveAssemblyReference>
  1874.  </Target>
  1875.  
  1876.  <!--
  1877.    ====================================================================================================
  1878.  
  1879.                                        GenerateBindingRedirects
  1880.    Inject the binding redirects into the app config file based on suggested redirects as output from
  1881.    ResolveAssemblyReferences.
  1882.  
  1883.        [IN]
  1884.        @(AppConfigWithTargetPath) - Path to the source app config file. This can be null if the project
  1885.                                     doesn't contain an app config file.
  1886.         $(TargetFileName) -          The file name of the build target.
  1887.  
  1888.         [OUT]
  1889.         @(OutputAppConfigFile) -     Path to the output app config file in the intermediate directory.
  1890.        
  1891.     ====================================================================================================
  1892.   -->
  1893.   <Target Name="GenerateBindingRedirects"
  1894.     Inputs="$(MSBuildAllProjects);@(AppConfigFile);$(ResolveAssemblyReferencesStateFile);$(IntermediateOutputPath);@(SuggestedBindingRedirects)"
  1895.     Outputs="$(_GenerateBindingRedirectsIntermediateAppConfig)"
  1896.     Condition="'$(AutoGenerateBindingRedirects)' == 'true' and '$(GenerateBindingRedirectsOutputType)' == 'true'">
  1897.  
  1898.     <GenerateBindingRedirects
  1899.       AppConfigFile="@(AppConfigWithTargetPath)"
  1900.       TargetName="$(TargetFileName).config"
  1901.       OutputAppConfigFile="$(_GenerateBindingRedirectsIntermediateAppConfig)"
  1902.       SuggestedRedirects="@(SuggestedBindingRedirects)"
  1903.       >
  1904.  
  1905.       <Output TaskParameter="OutputAppConfigFile" ItemName="FileWrites" />
  1906.  
  1907.     </GenerateBindingRedirects>
  1908.  
  1909.   </Target>
  1910.  
  1911.   <!--
  1912.     ====================================================================================================
  1913.  
  1914.                                         GenerateBindingRedirectsUpdateAppConfig
  1915.     Updates the project to use the generated app.config content.  This needs to run regardless of
  1916.     inputs/outputs so it is seperate from GenerateBindingRedirects.
  1917.     ====================================================================================================
  1918.   -->
  1919.   <Target Name="GenerateBindingRedirectsUpdateAppConfig"
  1920.     AfterTargets="GenerateBindingRedirects"
  1921.     Condition="'$(AutoGenerateBindingRedirects)' == 'true' and '$(GenerateBindingRedirectsOutputType)' == 'true' and Exists('$(_GenerateBindingRedirectsIntermediateAppConfig)')">
  1922.  
  1923.     <PropertyGroup>
  1924.       <AppConfig>$(_GenerateBindingRedirectsIntermediateAppConfig)</AppConfig>
  1925.     </PropertyGroup>
  1926.     <ItemGroup>
  1927.       <AppConfigWithTargetPath Remove="@(AppConfigWithTargetPath)" />
  1928.       <AppConfigWithTargetPath Include="$(AppConfig)">
  1929.         <TargetPath>$(TargetFileName).config</TargetPath>
  1930.       </AppConfigWithTargetPath>
  1931.     </ItemGroup>
  1932.  
  1933.   </Target>
  1934.  
  1935.   <!--
  1936.     ===========================================================================================
  1937.                                         GetInstalledSDKs
  1938.  
  1939.     Gets the list of SDKs installed in the SDKDirectoryRoot and SDKRegistryRoot locations
  1940.  
  1941.     These paths are used by the ResolveSDKReference task and the ResolveAssemblyReference task.
  1942.     ===========================================================================================
  1943.   -->
  1944.   <PropertyGroup>
  1945.     <SDKReferenceRegistryRoot Condition="'$(SDKReferenceRegistryRoot)' == ''">Software\Microsoft\Microsoft SDKs</SDKReferenceRegistryRoot>
  1946.     <SDKReferenceDirectoryRoot Condition="'$(SDKReferenceDirectoryRoot)' == ''">$(LocalAppData)\Microsoft SDKs;$(MSBuildProgramFiles32)\Microsoft SDKs</SDKReferenceDirectoryRoot>
  1947.     <!-- Manifest driven extension SDK locations -->
  1948.     <SDKExtensionDirectoryRoot Condition="'$(SDKExtensionDirectoryRoot)' == '' and '$(SDKIdentifier)' != ''">$(MSBuildProgramFiles32)\Microsoft SDKs\Windows Kits\10;$(MSBuildProgramFiles32)\Windows Kits\10</SDKExtensionDirectoryRoot>
  1949.  
  1950.     <!-- UAP projects by default should support Windows 8.1 SDKs -->
  1951.     <SupportWindows81SDKs Condition="'$(SupportWindows81SDKs)' == '' and '$(Support81SDKs)' != 'false' and '$(TargetPlatformIdentifier)' == 'UAP'">true</SupportWindows81SDKs>
  1952.     <TargetPlatformIdentifierWindows81 Condition="'$(TargetPlatformIdentifierWindows81)' == '' and '$(SupportWindows81SDKs)' == 'true'">Windows</TargetPlatformIdentifierWindows81>
  1953.     <TargetPlatformVersionWindows81 Condition="'$(TargetPlatformVersionWindows81)' == '' and '$(SupportWindows81SDKs)' == 'true'">8.1</TargetPlatformVersionWindows81>
  1954.  
  1955.     <!-- Desktop and phone SDKs often have the exact same identifiers, don't enable phone by default -->
  1956.    <SupportWindowsPhone81SDKs Condition="'$(SupportWindowsPhone81SDKs)' == '' and '$(Support81SDKs)' != 'false' and '$(TargetPlatformIdentifier)' == 'UAP'">false</SupportWindowsPhone81SDKs>
  1957.    <TargetPlatformIdentifierWindowsPhone81 Condition="'$(TargetPlatformIdentifierWindowsPhone81)' == '' and '$(SupportWindowsPhone81SDKs)' == 'true'">WindowsPhoneApp</TargetPlatformIdentifierWindowsPhone81>
  1958.    <TargetPlatformVersionWindowsPhone81 Condition="'$(TargetPlatformVersionWindowsPhone81)' == '' and '$(SupportWindowsPhone81SDKs)' == 'true'">8.1</TargetPlatformVersionWindowsPhone81>
  1959.  </PropertyGroup>
  1960.  
  1961.  <Target
  1962.      Name="GetInstalledSDKLocations"
  1963.      DependsOnTargets="$(GetInstalledSDKLocationsDependsOn)"
  1964.      Returns="@(InstalledSDKLocations)"
  1965.      >
  1966.  
  1967.    <GetInstalledSDKLocations
  1968.           SDKDirectoryRoots="$(SDKReferenceDirectoryRoot)"
  1969.           SDKExtensionDirectoryRoots="$(SDKExtensionDirectoryRoot)"
  1970.           SDKRegistryRoot="$(SDKReferenceRegistryRoot)"
  1971.           TargetPlatformVersion="$(TargetPlatformVersion)"
  1972.           TargetPlatformIdentifier="$(TargetPlatformIdentifier)"
  1973.           Condition="'@(SDKReference)' != ''"
  1974.           >
  1975.      <Output TaskParameter="InstalledSDKs" ItemName="InstalledSDKLocations"/>
  1976.    </GetInstalledSDKLocations>
  1977.  
  1978.    <!-- Also lookup 8.1 SDKs if requested -->
  1979.    <GetInstalledSDKLocations
  1980.           SDKDirectoryRoots="$(SDKReferenceDirectoryRoot)"
  1981.           SDKExtensionDirectoryRoots=""
  1982.           SDKRegistryRoot="$(SDKReferenceRegistryRoot)"
  1983.           TargetPlatformVersion="$(TargetPlatformVersionWindows81)"
  1984.           TargetPlatformIdentifier="$(TargetPlatformIdentifierWindows81)"
  1985.           Condition="'@(SDKReference)' != '' and '$(SupportWindows81SDKs)' == 'true' and '$(TargetPlatformIdentifierWindows81)' != '' and '$(TargetPlatformVersionWindows81)' != ''"
  1986.           >
  1987.      <Output TaskParameter="InstalledSDKs" ItemName="InstalledSDKLocations"/>
  1988.    </GetInstalledSDKLocations>
  1989.  
  1990.    <GetInstalledSDKLocations
  1991.           SDKDirectoryRoots="$(SDKReferenceDirectoryRoot)"
  1992.           SDKExtensionDirectoryRoots=""
  1993.           SDKRegistryRoot="$(SDKReferenceRegistryRoot)"
  1994.           TargetPlatformVersion="$(TargetPlatformVersionWindowsPhone81)"
  1995.           TargetPlatformIdentifier="$(TargetPlatformIdentifierWindowsPhone81)"
  1996.           Condition="'@(SDKReference)' != '' and '$(SupportWindowsPhone81SDKs)' == 'true' and '$(TargetPlatformIdentifierWindowsPhone81)' != '' and '$(TargetPlatformVersionWindowsPhone81)' != ''"
  1997.           >
  1998.      <Output TaskParameter="InstalledSDKs" ItemName="InstalledSDKLocations"/>
  1999.    </GetInstalledSDKLocations>
  2000.  
  2001.  </Target>
  2002.  
  2003.  <!--
  2004.    ============================================================
  2005.  
  2006.                                        ResolveSDKReferences
  2007.  
  2008.    Given a list of SDKReference items and a list of resolved winmd files which may contain metadata as to which sdk they came from
  2009.    we need to find the sdk root folders on disk and populate a ResolvedSDKReference item which has the full path to the SDK ROOT
  2010.    and the sdk identity as a piece of metadata.
  2011.  
  2012.        [IN]
  2013.        @(SDKReference) - List of sdk references (the identity in the sdk manifest file).
  2014.        @(ReferencePath) -List of resolved assemblies, we are interested in the ones which have IsWinMDFile set to true.
  2015.  
  2016.        [OUT]
  2017.        @(ResolvedSDKReference) - Full path to the root of the SDK
  2018.    ============================================================
  2019.  -->
  2020.  <PropertyGroup>
  2021.    <ResolveSDKReferencesDependsOn>
  2022.      GetInstalledSDKLocations
  2023.    </ResolveSDKReferencesDependsOn>
  2024.  </PropertyGroup>
  2025.  
  2026.  <PropertyGroup>
  2027.    <TargetedSDKConfiguration Condition="'$(TargetedSDKConfiguration)' == '' and '_$(Configuration)' == '_Debug'">Debug</TargetedSDKConfiguration>
  2028.    <TargetedSDKConfiguration Condition="'$(TargetedSDKConfiguration)' == '' and '_$(Configuration)' == '_Release'">Retail</TargetedSDKConfiguration>
  2029.    <TargetedSDKConfiguration Condition="'$(TargetedSDKConfiguration)' == ''">Retail</TargetedSDKConfiguration>
  2030.    <TargetedSDKArchitecture Condition="'$(TargetedSDKArchitecture)' == ''">$(ProcessorArchitecture)</TargetedSDKArchitecture>
  2031.    <TargetedSDKArchitecture Condition="'$(TargetedSDKArchitecture)' == ''">Neutral</TargetedSDKArchitecture>
  2032.  </PropertyGroup>
  2033.  
  2034.  <PropertyGroup>
  2035.    <ShouldMarkCertainSDKReferencesAsRuntimeOnly Condition="'$(ShouldMarkCertainSDKReferencesAsRuntimeOnly)' == ''">true</ShouldMarkCertainSDKReferencesAsRuntimeOnly>
  2036.  </PropertyGroup>
  2037.  
  2038.  <ItemGroup Condition="'$(ShouldMarkCertainSDKReferencesAsRuntimeOnly)' == 'true'">
  2039.    <!-- Dependencies that are specified as runtime-only dependencies. Therefore the associated files are not used to build Appx package.  -->
  2040.    <!-- TODO: Do we need to do anything like this for the new SDK? -->
  2041.    <RuntimeReferenceOnlySDKDependencies Condition = "'$(TargetPlatformVersion)' == '8.1'" Include="Microsoft.VCLibs, Version=11.0"/>
  2042.  </ItemGroup>
  2043.  
  2044.  <Target
  2045.      Name="ResolveSDKReferences"
  2046.      Returns="@(ResolvedSDKReference)"
  2047.      DependsOnTargets="$(ResolveSDKReferencesDependsOn)">
  2048.  
  2049.    <ResolveSDKReference
  2050.           SDKReferences="@(SDKReference)"
  2051.           RuntimeReferenceOnlySDKDependencies="@(RuntimeReferenceOnlySDKDependencies)"
  2052.           References="@(Reference)"
  2053.           TargetPlatformVersion="$(TargetPlatformVersion)"
  2054.           TargetPlatformIdentifier="$(TargetPlatformIdentifier)"
  2055.           WarnOnMissingPlatformVersion="$(SDKReferenceWarnOnMissingMaxPlatformVersion)"
  2056.           ProjectName="$(MSBuildProjectName)"
  2057.           TargetedSDKConfiguration="$(TargetedSDKConfiguration)"
  2058.           TargetedSDKArchitecture="$(TargetedSDKArchitecture)"
  2059.           InstalledSDKs ="@(InstalledSDKLocations)"
  2060.           LogResolutionErrorsAsWarnings ="$(LogSDKReferenceResolutionErrorsAsWarnings)"
  2061.           Prefer32Bit ="$(Prefer32Bit)"
  2062.           ContinueOnError="$(ContinueOnError)"
  2063.           Condition="'@(SDKReference)'!=''">
  2064.      <Output TaskParameter="ResolvedSDKReferences" ItemName="ResolvedSDKReference"/>
  2065.    </ResolveSDKReference>
  2066.  </Target>
  2067.  
  2068.   <Target
  2069.      Name="ResolveSDKReferencesDesignTime"
  2070.      Returns="@(ResolvedSDKReference)"
  2071.      DependsOnTargets="ResolveSDKReferences" />
  2072.  
  2073.  <!--
  2074.    ============================================================
  2075.  
  2076.                                        FindInvalidProjectReferences
  2077.  
  2078.    Find project to project references with target platform version higher than the one used by the current project and
  2079.    creates a list of invalid references to be unresolved. It issues a warning for each invalid reference.
  2080.  
  2081.        [IN]
  2082.        $(TargetPlatformVersion) - Project's target platform version
  2083.         @(_ProjectReferenceTargetPlatformMonikers) - List of monikers of all referenced projects gathered by the helper
  2084.                                                      target GetTargetPlatformMonikers.
  2085.  
  2086.         [OUT]
  2087.     @(InvalidProjectReferences) - List of invalid project references
  2088.  
  2089.     ============================================================
  2090.     -->
  2091.  
  2092.   <PropertyGroup>
  2093.     <FindInvalidProjectReferencesDependsOn>
  2094.       GetReferenceTargetPlatformMonikers
  2095.     </FindInvalidProjectReferencesDependsOn>
  2096.   </PropertyGroup>
  2097.  
  2098.    <Target
  2099.       Name="FindInvalidProjectReferences"
  2100.       Condition ="'$(FindInvalidProjectReferences)' == 'true'"
  2101.       DependsOnTargets="$(FindInvalidProjectReferencesDependsOn)">
  2102.  
  2103.      <FindInvalidProjectReferences
  2104.          TargetPlatformVersion="$(TargetPlatformVersion)"
  2105.          TargetPlatformIdentifier="$(TargetPlatformIdentifier)"
  2106.          ProjectReferences="@(TargetPathWithTargetPlatformMoniker)">
  2107.        <Output TaskParameter="InvalidReferences" ItemName="InvalidProjectReferences" />
  2108.      </FindInvalidProjectReferences>
  2109.  
  2110.      <ItemGroup>
  2111.        <_ResolvedProjectReferencePaths Remove="@(InvalidProjectReferences)" />
  2112.      </ItemGroup>
  2113.    </Target>
  2114.  
  2115.   <Target Name="GetReferenceTargetPlatformMonikers" DependsOnTargets="AssignProjectConfiguration;_SplitProjectReferencesByFileExistence">
  2116.     <MSBuild
  2117.       Projects="@(_MSBuildProjectReferenceExistent)"
  2118.       Properties="%(_MSBuildProjectReferenceExistent.SetConfiguration); %(_MSBuildProjectReferenceExistent.SetPlatform)"
  2119.       Targets="GetTargetPathWithTargetPlatformMoniker"
  2120.       BuildInParallel="$(BuildInParallel)"
  2121.       ContinueOnError="!$(BuildingProject)"
  2122.       RemoveProperties="%(_MSBuildProjectReferenceExistent.GlobalPropertiesToRemove)">
  2123.      
  2124.       <Output TaskParameter="TargetOutputs" ItemName="TargetPathWithTargetPlatformMoniker" />
  2125.     </MSBuild>
  2126.   </Target>
  2127.  
  2128.    <!--
  2129.     ============================================================
  2130.  
  2131.                        ExpandSDKReferences
  2132.  
  2133.         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)
  2134.         as part of the assemblies passed to the compiler.
  2135.  
  2136.         Project systems or project which do not want to reference all dlls or winmd files should override this target to do nothing.
  2137.    ============================================================
  2138.     -->
  2139.   <PropertyGroup>
  2140.     <ExpandSDKReferencesDependsOn>
  2141.       ResolveSDKReferences
  2142.     </ExpandSDKReferencesDependsOn>
  2143.  
  2144.     <ExpandSDKAllowedReferenceExtensions Condition="'$(ExpandSDKAllowedReferenceExtensions)' == ''">
  2145.       .winmd;
  2146.       .dll
  2147.     </ExpandSDKAllowedReferenceExtensions>
  2148.   </PropertyGroup>
  2149.  
  2150.    <Target Name="ExpandSDKReferences"
  2151.            Returns="@(ReferencesFromSDK)"
  2152.            DependsOnTargets="$(ExpandSDKReferencesDependsOn)"
  2153.     >
  2154.      <GetSDKReferenceFiles
  2155.        ResolvedSDKReferences="@(ResolvedSDKReference)"
  2156.        ReferenceExtensions="$(ExpandSDKAllowedReferenceExtensions)"
  2157.        TargetSDKIdentifier="$(SDKIdentifier)"
  2158.        TargetSDKVersion="$(SDKVersion)"
  2159.        LogRedistFilesList="$(GetSDKReferenceFilesLogRedistFilesList)"
  2160.        LogRedistConflictWithinSDKAsWarning ="$(GetSDKReferenceFilesLogRedistConflictsWithinSDKAsWarning)"
  2161.        LogRedistConflictBetweenSDKsAsWarning ="$(GetSDKReferenceFilesLogRedistConflictsBetweenSDKsAsWarning)"
  2162.        LogReferencesList="$(GetSDKReferenceFilesLogReferencesList)"
  2163.        LogReferenceConflictWithinSDKAsWarning ="$(GetSDKReferenceFilesLogReferenceConflictsWithinSDKAsWarning)"
  2164.        LogReferenceConflictBetweenSDKsAsWarning ="$(GetSDKReferenceFilesLogReferenceConflictsBetweenSDKsAsWarning)"
  2165.        CacheFileFolderPath ="$(GetSDKReferenceFilesCacheFolder)"
  2166.        LogCacheFileExceptions="$(GetSDKReferenceFilesLogCacheFileExceptions)"
  2167.        Condition="'@(ResolvedSDKReference)'!=''">
  2168.  
  2169.        <Output TaskParameter="References" ItemName="ReferencePath"/>
  2170.        <Output TaskParameter="References" ItemName="ReferencesFromSDK"/>
  2171.        <Output TaskParameter="References" ItemName="_ResolveAssemblyReferenceResolvedFiles"/>
  2172.        <Output TaskParameter="CopyLocalFiles" ItemName="ReferenceCopyLocalPaths"/>
  2173.        <Output TaskParameter="RedistFiles" ItemName="ResolvedRedistFiles"/>
  2174.      </GetSDKReferenceFiles>
  2175.    </Target>
  2176.    
  2177.   <!--
  2178.     ============================================================
  2179.  
  2180.                                         ExportWindowsMDFile
  2181.  
  2182.     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
  2183.     through the winmdexp tool in order to generate the resulting WinMD file.
  2184.  
  2185.     ===========================================================
  2186.     -->
  2187.  
  2188.     <Target Name="ExportWindowsMDFile"
  2189.           DependsOnTargets="Compile"
  2190.           Condition="'$(ExportWinMDFile)' == 'true'"
  2191.           Inputs="@(IntermediateAssembly);@(DocFileItem);@(_DebugSymbolsIntermediatePath);@(ReferencePath);$(MSBuildAllProjects)"
  2192.           Outputs="$(_IntermediateWindowsMetadataPath);$(WinMDExpOutputPdb);$(WinMDOutputDocumentationFile)"
  2193.   >
  2194.  
  2195.       <PropertyGroup>
  2196.         <!-- Will be copied by the "copy WinMD artifacts" step instead -->
  2197.         <CopyBuildOutputToOutputDirectory>false</CopyBuildOutputToOutputDirectory>
  2198.         <CopyOutputSymbolsToOutputDirectory>false</CopyOutputSymbolsToOutputDirectory>
  2199.        
  2200.         <WinMdExpToolPath Condition="'$(WinMdExpToolPath)' == ''">$(TargetFrameworkSDKToolsDirectory)</WinMdExpToolPath>
  2201.         <WinMdExpUTF8Ouput Condition="'$(WinMdExpUTF8Ouput)' == ''">true</WinMdExpUTF8Ouput>
  2202.       </PropertyGroup>
  2203.  
  2204.       <WinMDExp WinMDModule="@(IntermediateAssembly)"
  2205.                 References="@(ReferencePath)"
  2206.                 DisabledWarnings="$(WinMdExpNoWarn)"
  2207.                 InputDocumentationFile="@(DocFileItem)"
  2208.                 OutputDocumentationFile="$(WinMDOutputDocumentationFile)"
  2209.                 TreatWarningsAsErrors="$(TreatWarningsAsErrors)"
  2210.                 InputPDBFile="@(_DebugSymbolsIntermediatePath)"
  2211.                 OutputPDBFile="$(WinMDExpOutputPdb)"
  2212.                 OutputWindowsMetadataFile="$(_IntermediateWindowsMetadataPath)"
  2213.                 EnvironmentVariables="$(WinMDExpEnvironment)"
  2214.                 UTF8Output="$(WinMdExpUTF8Ouput)"
  2215.                 SdkToolsPath="$(WinMdExpToolPath)"
  2216.                 AssemblyUnificationPolicy="$(WinMDExpAssemblyUnificationPolicy)">
  2217.       <Output TaskParameter="OutputWindowsMetadataFile" ItemName="FileWrites"/>
  2218.      </WinMDExp>
  2219.  
  2220.      <ItemGroup>
  2221.          <WinMDExpArtifacts Include="$(_IntermediateWindowsMetadataPath)"/>
  2222.          <WinMDExpArtifacts Include="$(WinMDOutputDocumentationFile)"/>
  2223.          <WinMDExpArtifacts Include="$(WinMDExpOutputPdb)"/>
  2224.          <FileWrites Include="$(WinMDOutputDocumentationFile);$(WinMDExpOutputPdb)"/>
  2225.     </ItemGroup>
  2226.   </Target>
  2227.  
  2228.   <Target
  2229.       Name="ResolveAssemblyReferencesDesignTime"
  2230.       Returns="@(_ReferencesFromRAR)"
  2231.       DependsOnTargets="ResolveProjectReferences;ResolveAssemblyReferences">
  2232.    
  2233.     <!-- We need to do this here because we only want references which have been passed into rar but are not project to project references. -->
  2234.     <ItemGroup>
  2235.       <_ReferencesFromRAR Include="@(ReferencePath->WithMetadataValue('ReferenceSourceTarget', 'ResolveAssemblyReference'))"/>
  2236.     </ItemGroup>
  2237.   </Target>
  2238.  
  2239.   <PropertyGroup>
  2240.     <ProjectDesignTimeAssemblyResolutionSearchPaths Condition=" '$(ProjectDesignTimeAssemblyResolutionSearchPaths)' == '' ">
  2241.       {CandidateAssemblyFiles};
  2242.       $(ReferencePath);
  2243.       {HintPathFromItem};
  2244.       {TargetFrameworkDirectory};
  2245.       {Registry:$(FrameworkRegistryBase),$(TargetFrameworkVersion),$(AssemblyFoldersSuffix)$(AssemblyFoldersExConditions)};
  2246.       {RawFileName};
  2247.       $(TargetDir)
  2248.     </ProjectDesignTimeAssemblyResolutionSearchPaths>
  2249.   </PropertyGroup>
  2250.  
  2251.   <!--
  2252.     ==============================================================
  2253.  
  2254.                                        DesignTimeResolveAssemblyReferences
  2255.  
  2256.     Given the list of assemblies, resolve their reference paths.
  2257.     This target is called by Visual Studio at run time in order to filter references
  2258.     according to the targeted framework.
  2259.  
  2260.         [IN]
  2261.         @(DesignTimeReference) - List of assembly references as simple/fusion names.
  2262.  
  2263.  
  2264.         [OUT]
  2265.         @(ReferencePath) - Paths to resolved primary files.
  2266.  
  2267.     ==============================================================
  2268.     -->
  2269.   <PropertyGroup>
  2270.     <DesignTimeResolveAssemblyReferencesDependsOn>
  2271.       GetFrameworkPaths;
  2272.       GetReferenceAssemblyPaths;
  2273.       ResolveReferences
  2274.     </DesignTimeResolveAssemblyReferencesDependsOn>
  2275.   </PropertyGroup>
  2276.  
  2277.   <Target
  2278.       Name="DesignTimeResolveAssemblyReferences"
  2279.       Condition="'$(DesignTimeReference)'!=''"
  2280.       DependsOnTargets="$(DesignTimeResolveAssemblyReferencesDependsOn)">
  2281.  
  2282.     <ItemGroup>
  2283.       <_DesignTimeReferenceInstalledAssemblyDirectory Include="$(TargetFrameworkDirectory)" />
  2284.     </ItemGroup>
  2285.  
  2286.     <PropertyGroup>
  2287.       <DesignTimeResolveAssemblyReferencesStateFile Condition="'$(BuildingProject)'=='true'">$(IntermediateOutputPath)$(MSBuildProjectFile)DesignTimeResolveAssemblyReferences.cache</DesignTimeResolveAssemblyReferencesStateFile>
  2288.     </PropertyGroup>
  2289.  
  2290.     <PropertyGroup>
  2291.       <DesignTimeAssemblySearchPaths Condition=" '$(DesignTimeAssemblySearchPaths)' == '' ">
  2292.         {CandidateAssemblyFiles};
  2293.         $(ReferencePath);
  2294.         {HintPathFromItem};
  2295.         {TargetFrameworkDirectory};
  2296.         {Registry:$(FrameworkRegistryBase),$(TargetFrameworkVersion),$(AssemblyFoldersSuffix)$(AssemblyFoldersExConditions)};
  2297.         {RawFileName};
  2298.         $(OutDir)
  2299.       </DesignTimeAssemblySearchPaths>
  2300.     </PropertyGroup>
  2301.  
  2302.     <PropertyGroup>
  2303.       <DesignTimeFindDependencies Condition=" '$(DesignTimeFindDependencies)' == '' ">false</DesignTimeFindDependencies>
  2304.       <DesignTimeIgnoreVersionForFrameworkReferences Condition=" '$(DesignTimeIgnoreVersionForFrameworkReferences)' == '' ">false</DesignTimeIgnoreVersionForFrameworkReferences>
  2305.       <DesignTimeFindSatellites Condition=" '$(DesignTimeFindSatellites)' == '' ">false</DesignTimeFindSatellites>
  2306.       <DesignTimeFindSerializationAssemblies Condition=" '$(DesignTimeFindSerializationAssemblies)' == '' ">false</DesignTimeFindSerializationAssemblies>
  2307.       <DesignTimeFindRelatedFiles Condition=" '$(DesignTimeFindRelatedFiles)' == '' ">false</DesignTimeFindRelatedFiles>
  2308.       <DesignTimeSilentResolution Condition=" '$(DesignTimeSilentResolution)' == '' and '$(TraceDesignTime)' != 'true'">true</DesignTimeSilentResolution>
  2309.       <DesignTimeAutoUnify Condition="'$(DesignTimeAutoUnify)' == ''">false</DesignTimeAutoUnify>
  2310.     </PropertyGroup>
  2311.  
  2312.     <ItemGroup>
  2313.       <_DesignTimeReferenceAssemblies Include ="$(DesignTimeReference)" />
  2314.     </ItemGroup>
  2315.  
  2316.     <ItemGroup>
  2317.       <_RARResolvedReferencePath Include="@(ReferencePath)" />
  2318.       <ReferencePath Remove="@(ReferencePath)" />
  2319.     </ItemGroup>
  2320.  
  2321.     <ResolveAssemblyReference
  2322.         Assemblies="@(_DesignTimeReferenceAssemblies)"
  2323.         TargetFrameworkDirectories="@(_DesignTimeReferenceInstalledAssemblyDirectory)"
  2324.         SearchPaths="$(DesignTimeAssemblySearchPaths)"
  2325.         AllowedAssemblyExtensions="$(AllowedReferenceAssemblyFileExtensions)"
  2326.         TargetProcessorArchitecture="$(ProcessorArchitecture)"
  2327.         CandidateAssemblyFiles="@(Content);@(None);@(_RARResolvedReferencePath)"
  2328.         FindDependencies="$(DesignTimeFindDependencies)"
  2329.         AutoUnify="$(DesignTimeAutoUnify)"
  2330.         IgnoreVersionForFrameworkReferences="$(DesignTimeIgnoreVersionForFrameworkReferences)"
  2331.         FindSatellites="$(DesignTimeFindSatellites)"
  2332.         FindSerializationAssemblies="$(DesignTimeFindSerializationAssemblies)"
  2333.         FindRelatedFiles="$(DesignTimeFindRelatedFiles)"
  2334.         Silent="$(DesignTimeSilentResolution)"
  2335.         TargetFrameworkVersion="$(TargetFrameworkVersion)"
  2336.         TargetFrameworkMoniker="$(TargetFrameworkMoniker)"
  2337.         TargetFrameworkMonikerDisplayName="$(TargetFrameworkMonikerDisplayName)"
  2338.         TargetedRuntimeVersion="$(TargetedRuntimeVersion)"
  2339.         StateFile="$(DesignTimeResolveAssemblyReferencesStateFile)"
  2340.         InstalledAssemblySubsetTables="@(InstalledAssemblySubsetTables)"
  2341.         IgnoreDefaultInstalledAssemblySubsetTables="$(IgnoreInstalledAssemblySubsetTables)"
  2342.         TargetFrameworkSubsets="@(_ReferenceInstalledAssemblySubsets)"
  2343.         FullTargetFrameworkSubsetNames="$(FullReferenceAssemblyNames)"
  2344.         FullFrameworkFolders="$(_FullFrameworkReferenceAssemblyPaths)"
  2345.         FullFrameworkAssemblyTables="@(FullFrameworkAssemblyTables)"
  2346.         ProfileName="$(TargetFrameworkProfile)"
  2347.         ResolvedSDKReferences="@(ResolvedSDKReference)"
  2348.         IgnoreTargetFrameworkAttributeVersionMismatch ="$(DesignTimeIgnoreTargetFrameworkAttributeVersionMismatch)"
  2349.        >
  2350.  
  2351.       <Output TaskParameter="ResolvedFiles" ItemName="DesignTimeReferencePath"/>
  2352.       <Output TaskParameter="FilesWritten" ItemName="FileWrites"/>
  2353.     </ResolveAssemblyReference>
  2354.   </Target>
  2355.  
  2356.   <!--
  2357.     ============================================================
  2358.                                         ResolveComReferences
  2359.  
  2360.     Resolve COM references
  2361.  
  2362.         [IN]
  2363.         @(COMReference) - The list of COM references
  2364.         $(BaseIntermediateOutputPath) - The output directory in which to generate wrapper assemblies
  2365.  
  2366.         [OUT]
  2367.         @(ReferencePath) - Paths to referenced wrappers.
  2368.  
  2369.         If ResolveComReferences is invoked from the IDE, PrepareForBuild may need to run to create directories.
  2370.     ============================================================
  2371.     -->
  2372.   <PropertyGroup>
  2373.     <ComReferenceExecuteAsTool Condition="'$(ComReferenceExecuteAsTool)'==''">false</ComReferenceExecuteAsTool>
  2374.   </PropertyGroup>
  2375.  
  2376.   <Target
  2377.       Name="ResolveComReferences"
  2378.       Condition="'@(COMReference)'!='' or '@(COMFileReference)'!=''"
  2379.       Returns="@(ReferencePath)"
  2380.       DependsOnTargets="PrepareForBuild;ResolveKeySource;ResolveAssemblyReferences"
  2381.         >
  2382.  
  2383.     <PropertyGroup Condition=" '$(InteropOutputPath)' == '' ">
  2384.       <InteropOutputPath>$(IntermediateOutputPath)</InteropOutputPath>
  2385.     </PropertyGroup>
  2386.  
  2387.     <MakeDir Directories="$(InteropOutputPath)"/>
  2388.  
  2389.     <!--
  2390.         Note: This task should not be batched, since it relies on having all the COM references fed into it at once.
  2391.         -->
  2392.     <PropertyGroup>
  2393.       <ResolveComReferenceMSBuildArchitecture Condition="'$(ResolveComReferenceMSBuildArchitecture)' == ''">$(PlatformTargetAsMSBuildArchitecture)</ResolveComReferenceMSBuildArchitecture>
  2394.      
  2395.       <ResolveComReferenceToolPath Condition="'$(ResolveComReferenceToolPath)' == ''">$(TargetFrameworkSDKToolsDirectory)</ResolveComReferenceToolPath>
  2396.       <ResolveComReferenceSilent Condition="'$(ResolveComReferenceSilent)' == ''">false</ResolveComReferenceSilent>
  2397.     </PropertyGroup>
  2398.    
  2399.     <ResolveComReference
  2400.           TypeLibNames="@(COMReference)"
  2401.           TypeLibFiles="@(COMFileReference)"
  2402.           ResolvedAssemblyReferences="@(ReferencePath)"
  2403.           WrapperOutputDirectory="$(InteropOutputPath)"
  2404.           IncludeVersionInInteropName="$(IncludeVersionInInteropName)"
  2405.           KeyContainer="$(KeyContainerName)"
  2406.           KeyFile="$(KeyOriginatorFile)"
  2407.           DelaySign="$(DelaySign)"
  2408.           StateFile="@(_ResolveComReferenceCache)"
  2409.           TargetFrameworkVersion="$(TargetFrameworkVersion)"
  2410.           TargetProcessorArchitecture="$(ProcessorArchitecture)"
  2411.           NoClassMembers="$(ComReferenceNoClassMembers)"
  2412.           Silent="$(ResolveComReferenceSilent)"
  2413.           EnvironmentVariables="$(ResolveComReferenceEnvironment)"
  2414.           SdkToolsPath="$(ResolveComReferenceToolPath)"
  2415.           ExecuteAsTool="$(ComReferenceExecuteAsTool)"
  2416.           MSBuildArchitecture="$(ResolveComReferenceMSBuildArchitecture)"
  2417.           ContinueOnError="$(ContinueOnError)">
  2418.  
  2419.       <Output TaskParameter="ResolvedFiles" ItemName="ReferencePath"/>
  2420.       <Output TaskParameter="ResolvedFiles" ItemName="ComReferenceWrappers"/>
  2421.       <Output TaskParameter="ResolvedFiles" ItemName="FileWrites"/>
  2422.       <!-- This output list only includes items with Isolated attribute set to True.  It's done by the task itself. -->
  2423.      <Output TaskParameter="ResolvedModules" ItemName="ResolvedIsolatedComModules"/>
  2424.  
  2425.    </ResolveComReference>
  2426.  
  2427.    <ItemGroup>
  2428.      <FileWrites Include="@(_ResolveComReferenceCache)"/>
  2429.      <ReferenceComWrappersToCopyLocal Include="@(ComReferenceWrappers)" Condition="'%(ComReferenceWrappers.CopyLocal)'!='false'"/>
  2430.    </ItemGroup>
  2431.  
  2432.  </Target>
  2433.  
  2434.  <Target
  2435.      Name="ResolveComReferencesDesignTime"
  2436.      Returns="@(ComReferenceWrappers)"
  2437.      DependsOnTargets="ResolveComReferences" />
  2438.  
  2439.  <!--
  2440.    ***********************************************************************************************
  2441.    ***********************************************************************************************
  2442.                                                                PrepareResources Section
  2443.    ***********************************************************************************************
  2444.    ***********************************************************************************************
  2445.    -->
  2446.  
  2447.  <!--
  2448.    ============================================================
  2449.                                        PrepareResources
  2450.  
  2451.    Prepare resources for the Compile step.
  2452.    ============================================================
  2453.    -->
  2454.  <PropertyGroup>
  2455.    <PrepareResourcesDependsOn>
  2456.      PrepareResourceNames;
  2457.      ResGen;
  2458.      CompileLicxFiles
  2459.    </PrepareResourcesDependsOn>
  2460.  </PropertyGroup>
  2461.  <Target
  2462.      Name="PrepareResources"
  2463.      DependsOnTargets="$(PrepareResourcesDependsOn)"/>
  2464.  
  2465.  <!--
  2466.    ============================================================
  2467.                                        PrepareResourceNames
  2468.  
  2469.    Prepare the names of resource files.
  2470.    ============================================================
  2471.    -->
  2472.  <PropertyGroup>
  2473.    <PrepareResourceNamesDependsOn>
  2474.      AssignTargetPaths;
  2475.      SplitResourcesByCulture;
  2476.      CreateManifestResourceNames;
  2477.      CreateCustomManifestResourceNames
  2478.    </PrepareResourceNamesDependsOn>
  2479.  </PropertyGroup>
  2480.  <Target
  2481.      Name="PrepareResourceNames"
  2482.      DependsOnTargets="$(PrepareResourceNamesDependsOn)"/>
  2483.  
  2484.  <!--
  2485.    ============================================================
  2486.                                        AssignTargetPaths
  2487.  
  2488.    This target creates <TargetPath> tags for items. <TargetPath> is a relative folder plus filename
  2489.    for the destination of this item.
  2490.    ============================================================
  2491.    -->
  2492.  <PropertyGroup>
  2493.    <AssignTargetPathsDependsOn></AssignTargetPathsDependsOn>
  2494.  </PropertyGroup>
  2495.  <Target
  2496.      Name="AssignTargetPaths"
  2497.      DependsOnTargets="$(AssignTargetPathsDependsOn)">
  2498.  
  2499.    <ItemGroup>
  2500.      <_Temporary Remove="@(_Temporary)" />
  2501.    </ItemGroup>
  2502.  
  2503.    <!-- AssignTargetPath generates TargetPath metadata that is consumed by CreateManifestResourceNames target for manifest name generation -->
  2504.    <AssignTargetPath Files="@(EmbeddedResource)" RootFolder="$(MSBuildProjectDirectory)">
  2505.      <Output TaskParameter="AssignedFiles" ItemName="_Temporary" />
  2506.    </AssignTargetPath>
  2507.  
  2508.  
  2509.    <ItemGroup>
  2510.      <!-- Replace items in EmbeddedResource with the items emitted by the AssignTargetPath task that have the TargetPath metadata -->
  2511.      <EmbeddedResource Remove="@(_Temporary)" />
  2512.      <EmbeddedResource Include="@(_Temporary)" />
  2513.      <_Temporary Remove="@(_Temporary)" />
  2514.    </ItemGroup>
  2515.  
  2516.    <AssignTargetPath Files="@(Content)" RootFolder="$(MSBuildProjectDirectory)">
  2517.      <Output TaskParameter="AssignedFiles" ItemName="ContentWithTargetPath" />
  2518.    </AssignTargetPath>
  2519.  
  2520.    <AssignTargetPath Files="@(None)" RootFolder="$(MSBuildProjectDirectory)">
  2521.      <Output TaskParameter="AssignedFiles" ItemName="_NoneWithTargetPath" />
  2522.    </AssignTargetPath>
  2523.  
  2524.    <AssignTargetPath Files="@(BaseApplicationManifest)" RootFolder="$(MSBuildProjectDirectory)">
  2525.      <Output TaskParameter="AssignedFiles" ItemName="_DeploymentBaseManifestWithTargetPath"/>
  2526.    </AssignTargetPath>
  2527.  
  2528.    <AssignTargetPath Files="@(None)" RootFolder="$(MSBuildProjectDirectory)" Condition="'@(_DeploymentBaseManifestWithTargetPath)'=='' and '%(None.Extension)'=='.manifest'">
  2529.      <Output TaskParameter="AssignedFiles" ItemName="_DeploymentBaseManifestWithTargetPath" />
  2530.    </AssignTargetPath>
  2531.  
  2532.  </Target>
  2533.  
  2534.  <!--
  2535.    ============================================================
  2536.                                        GetItemTargetPaths
  2537.  
  2538.    This target returns all items that have TargetPath metadata assigned by the AssignTargetPaths target.
  2539.    ============================================================
  2540.    -->
  2541.  <Target
  2542.    Name="GetItemTargetPaths"
  2543.    DependsOnTargets="AssignTargetPaths"
  2544.    Returns="
  2545.      @(EmbeddedResource);
  2546.      @(ContentWithTargetPath);
  2547.      @(_NoneWithTargetPath);
  2548.      @(_DeploymentBaseManifestWithTargetPath);
  2549.      " />
  2550.  
  2551.  <!--
  2552.    ============================================================
  2553.                                        SplitResourcesByCulture
  2554.  
  2555.    Split EmbeddedResource items into five lists based on whether
  2556.    they are resx files, licx files or other resources and whether they should be localized. Also adds Type and Culture
  2557.    metadata. Type indicates whether the resource is "Resx" or "Non-Resx".
  2558.  
  2559.        [IN]/[OUT]
  2560.        @(EmbeddedResource) - The raw list of resources.
  2561.  
  2562.        [OUT]
  2563.        @(_LicxFile) - The EmbeddedResource items with extension equal to '.licx'.
  2564.    ============================================================
  2565.    -->
  2566.  <Target
  2567.      Name="SplitResourcesByCulture"
  2568.      DependsOnTargets="AssignTargetPaths">
  2569.  
  2570.    <Warning Condition="'@(ResxWithNoCulture)'!=''" Code="MSB9000" Text="ResxWithNoCulture item type is deprecated. Use EmbeddedResource items instead."/>
  2571.    <Warning Condition="'@(ResxWithCulture)'!=''" Code="MSB9001" Text="ResxWithCulture item type is deprecated. Use EmbeddedResource items instead."/>
  2572.    <Warning Condition="'@(NonResxWithCulture)'!=''" Code="MSB9002" Text="NonResxWithCulture item type is deprecated. Use EmbeddedResource items instead."/>
  2573.    <Warning Condition="'@(NonResxWithNoCulture)'!=''" Code="MSB9003" Text="NonResxWithNoCulture item type is deprecated. Use EmbeddedResource items instead."/>
  2574.  
  2575.    <ItemGroup>
  2576.      <_LicxFile Include="@(EmbeddedResource)" Condition="'%(Extension)'=='.licx'"/>
  2577.  
  2578.      <!-- CONSUMED FOR COMPATIBILITY REASONS ONLY. EMIT EMBEDDEDRESOURCE INSTEAD -->
  2579.      <EmbeddedResource Include="@(ResxWithNoCulture);@(ResxWithCulture)">
  2580.        <Type>Resx</Type>
  2581.      </EmbeddedResource>
  2582.      <EmbeddedResource Include="@(NonResxWithCulture);@(NonResxWithNoCulture)">
  2583.        <Type>Non-Resx</Type>
  2584.      </EmbeddedResource>
  2585.    </ItemGroup>
  2586.  
  2587.    <AssignCulture Files="@(EmbeddedResource)" Condition="'%(Extension)'!='.licx'">
  2588.      <!-- Create the list of culture resx and embedded resource files -->
  2589.      <Output TaskParameter="AssignedFilesWithCulture" ItemName="_MixedResourceWithCulture"/>
  2590.      <!-- Create the list of non-culture resx and embedded resource files -->
  2591.      <Output TaskParameter="AssignedFilesWithNoCulture" ItemName="_MixedResourceWithNoCulture"/>
  2592.    </AssignCulture>
  2593.  
  2594.    <ItemGroup>
  2595.  
  2596.      <!-- Remove EmbeddedResource items that we have processed already
  2597.                 i.e. either Licx, or resources that don't have culture info -->
  2598.       <EmbeddedResource Remove="@(_MixedResourceWithCulture)" />
  2599.       <EmbeddedResource Remove="@(_MixedResourceWithNoCulture)" />
  2600.       <EmbeddedResource Remove="@(_LicxFile)" />
  2601.  
  2602.       <!-- Add back everything except Licx, so that we have culture info -->
  2603.       <EmbeddedResource Include="@(_MixedResourceWithNoCulture);@(_MixedResourceWithCulture)" Condition="'%(Extension)'=='.resx' or '%(Extension)'=='.restext'">
  2604.         <Type Condition="'%(_MixedResourceWithNoCulture.Type)'=='' and '%(_MixedResourceWithCulture.Type)'==''">Resx</Type>
  2605.       </EmbeddedResource>
  2606.       <EmbeddedResource Include="@(_MixedResourceWithNoCulture);@(_MixedResourceWithCulture)" Condition="'%(Extension)'!='.resx' and '%(Extension)'!='.restext'">
  2607.         <Type Condition="'%(_MixedResourceWithNoCulture.Type)'=='' and '%(_MixedResourceWithCulture.Type)'==''">Non-Resx</Type>
  2608.       </EmbeddedResource>
  2609.  
  2610.       <!-- EMITTED FOR COMPATIBILITY REASONS ONLY. CONSUME EMBEDDEDRESOURCE INSTEAD -->
  2611.       <ResxWithNoCulture Remove="@(ResxWithNoCulture)"/>
  2612.       <NonResxWithNoCulture Remove="@(NonResxWithNoCulture)"/>
  2613.       <ResxWithCulture Remove="@(ResxWithCulture)"/>
  2614.       <NonResxWithCulture Remove="@(NonResxWithCulture)"/>
  2615.       <ResxWithNoCulture Include="@(_MixedResourceWithNoCulture)" Condition="'%(WithCulture)'=='false' and ('%(Extension)'=='.resx' or '%(Extension)'=='.restext')"/>
  2616.       <NonResxWithNoCulture Include="@(_MixedResourceWithNoCulture)" Condition="'%(WithCulture)'=='false' and ('%(Extension)'!='.resx' and '%(Extension)'!='.restext')"/>
  2617.       <ResxWithCulture Include="@(_MixedResourceWithCulture)" Condition="'%(WithCulture)'=='true' and ('%(Extension)'=='.resx' or '%(Extension)'=='.restext')"/>
  2618.       <NonResxWithCulture Include="@(_MixedResourceWithCulture)" Condition="'%(WithCulture)'=='true' and ('%(Extension)'!='.resx' and '%(Extension)'!='.restext')"/>
  2619.  
  2620.       <!-- Clean up temporary lists -->
  2621.       <_MixedResourceWithNoCulture Remove="@(_MixedResourceWithNoCulture)" />
  2622.       <_MixedResourceWithCulture Remove="@(_MixedResourceWithCulture)" />
  2623.  
  2624.     </ItemGroup>
  2625.  
  2626.   </Target>
  2627.  
  2628.   <!--
  2629.     =======================================================================
  2630.                                         CreateCustomManifestResourceNames
  2631.  
  2632.     Allows custom manifest resource name generation tasks to plug
  2633.     into the build process
  2634.     =======================================================================
  2635.     -->
  2636.   <PropertyGroup>
  2637.     <CreateCustomManifestResourceNamesDependsOn></CreateCustomManifestResourceNamesDependsOn>
  2638.   </PropertyGroup>
  2639.   <Target
  2640.       Name="CreateCustomManifestResourceNames"
  2641.       DependsOnTargets="$(CreateCustomManifestResourceNamesDependsOn)"/>
  2642.  
  2643.   <!--
  2644.     ============================================================
  2645.                                         ResGen
  2646.  
  2647.     Run GenerateResource on the given resx files.
  2648.  
  2649.     ============================================================
  2650.     -->
  2651.   <PropertyGroup>
  2652.     <ResGenDependsOn>ResolveAssemblyReferences;SplitResourcesByCulture;BeforeResGen;CoreResGen;AfterResGen</ResGenDependsOn>
  2653.     <CoreResGenDependsOn></CoreResGenDependsOn>
  2654.     <UseSourcePath Condition="'$(UseSourcePath)'==''">true</UseSourcePath>
  2655.     <ResGenExecuteAsTool Condition="'$(ResGenExecuteAsTool)'==''">false</ResGenExecuteAsTool>
  2656.   </PropertyGroup>
  2657.   <Target
  2658.       Name="ResGen"
  2659.       DependsOnTargets="$(ResGenDependsOn)"/>
  2660.  
  2661.   <!--
  2662.     ============================================================
  2663.                                         BeforeResGen
  2664.  
  2665.     Redefine this target in your project in order to run tasks just before Resgen.
  2666.     ============================================================
  2667.     -->
  2668.   <Target Name="BeforeResGen"/>
  2669.  
  2670.   <!--
  2671.     ============================================================
  2672.                                         AfterResGen
  2673.  
  2674.     Redefine this target in your project in order to run tasks just after Resgen.
  2675.     ============================================================
  2676.     -->
  2677.   <Target Name="AfterResGen"/>
  2678.  
  2679.   <!--
  2680.     ============================================================
  2681.                                         CoreResGen
  2682.     ============================================================
  2683.     -->
  2684.   <Target
  2685.       Name="CoreResGen"
  2686.       DependsOnTargets="$(CoreResGenDependsOn)">
  2687.  
  2688.     <ItemGroup>
  2689.       <_Temporary Remove="@(_Temporary)" />
  2690.     </ItemGroup>
  2691.  
  2692.     <PropertyGroup>
  2693.       <GenerateResourceMSBuildArchitecture Condition="'$(GenerateResourceMSBuildArchitecture)' == ''">$(PlatformTargetAsMSBuildArchitecture)</GenerateResourceMSBuildArchitecture>
  2694.  
  2695.       <ResgenToolPath Condition="'$(ResgenToolPath)' == ''">$(TargetFrameworkSDKToolsDirectory)</ResgenToolPath>
  2696.     </PropertyGroup>
  2697.  
  2698.     <PropertyGroup Condition="'$(TargetFrameworkAsMSBuildRuntime)' != '' and '$(GenerateResourceMSBuildArchitecture)' != ''">
  2699.       <!-- 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
  2700.           user know there's something wrong than just silently generate something that's probably not quite right. However, in a few
  2701.           circumstances, there are tasks that are already aware of runtime / bitness concerns, in which case even if we go ahead and run
  2702.           the more recent version of the task, it should be able to generate something correct.  GenerateResource is one such task, so
  2703.           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
  2704.           back to the current task since it's still mostly correct.
  2705.  
  2706.            In particular, we need to do this because otherwise people with Dev10 on a machine that they upgrade to Win8 will be broken:
  2707.            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
  2708.           the 8.0A SDK, which they won't have installed, and thus without this fallback mechanism, their projects targeting v3.5 will
  2709.            suddenly start failing to build.-->
  2710.       <GenerateResourceMSBuildRuntime
  2711.           Condition="'$(GenerateResourceMSBuildRuntime)' == '' and
  2712.                     $([MSBuild]::DoesTaskHostExist(`$(TargetFrameworkAsMSBuildRuntime)`, `$(GenerateResourceMSBuildArchitecture)`))">$(TargetFrameworkAsMSBuildRuntime)</GenerateResourceMSBuildRuntime>
  2713.  
  2714.       <!-- If the targeted runtime doesn't exist, fall back to current -->
  2715.      <GenerateResourceMSBuildRuntime Condition="'$(GenerateResourceMSBuildRuntime)' == ''">CurrentRuntime</GenerateResourceMSBuildRuntime>
  2716.    </PropertyGroup>
  2717.      
  2718.    <!-- 4.0 task has some new parameters that we want to make use of if we're targeting 4.0 -->
  2719.     <GenerateResource
  2720.         Sources="@(EmbeddedResource)"
  2721.         UseSourcePath="$(UseSourcePath)"
  2722.         References="@(ReferencePath)"
  2723.         AdditionalInputs="$(MSBuildAllProjects)"
  2724.         NeverLockTypeAssemblies="$(GenerateResourceNeverLockTypeAssemblies)"
  2725.         StateFile="$(IntermediateOutputPath)$(MSBuildProjectFile).GenerateResource.Cache"
  2726.         StronglyTypedClassName="%(EmbeddedResource.StronglyTypedClassName)"
  2727.         StronglyTypedFileName="%(EmbeddedResource.StronglyTypedFileName)"
  2728.         StronglyTypedLanguage="%(EmbeddedResource.StronglyTypedLanguage)"
  2729.         StronglyTypedNamespace="%(EmbeddedResource.StronglyTypedNamespace)"
  2730.         StronglyTypedManifestPrefix="%(EmbeddedResource.StronglyTypedManifestPrefix)"
  2731.         PublicClass="%(EmbeddedResource.PublicClass)"
  2732.         OutputResources="@(EmbeddedResource->'$(IntermediateOutputPath)%(ManifestResourceName).resources')"
  2733.         Condition="'%(EmbeddedResource.Type)' == 'Resx' and '%(EmbeddedResource.GenerateResource)' != 'false' and '$(GenerateResourceMSBuildRuntime)' != 'CLR2'"
  2734.         SdkToolsPath="$(ResgenToolPath)"
  2735.         ExecuteAsTool="$(ResGenExecuteAsTool)"
  2736.         EnvironmentVariables="$(ResGenEnvironment)"
  2737.         MSBuildRuntime="$(GenerateResourceMSBuildRuntime)"
  2738.         MSBuildArchitecture="$(GenerateResourceMSBuildArchitecture)">
  2739.  
  2740.       <Output TaskParameter="FilesWritten" ItemName="FileWrites"/>
  2741.       <Output TaskParameter="StronglyTypedFileName" ItemName="Compile"/>
  2742.  
  2743.       <!-- Gather Sources as an output since it will contain OutputResource metadata indicating the final output resource that it was compiled into -->
  2744.       <Output TaskParameter="Sources" ItemName="_Temporary" />
  2745.  
  2746.     </GenerateResource>
  2747.  
  2748.     <!-- But we can't use those parameters if we're targeting 3.5, since we're using the 3.5 task -->
  2749.    <GenerateResource
  2750.        Sources="@(EmbeddedResource)"
  2751.        UseSourcePath="$(UseSourcePath)"
  2752.        References="@(ReferencePath)"
  2753.        AdditionalInputs="$(MSBuildAllProjects)"
  2754.        NeverLockTypeAssemblies="$(GenerateResourceNeverLockTypeAssemblies)"
  2755.        StateFile="$(IntermediateOutputPath)$(MSBuildProjectFile).GenerateResource.Cache"
  2756.        StronglyTypedClassName="%(EmbeddedResource.StronglyTypedClassName)"
  2757.        StronglyTypedFileName="%(EmbeddedResource.StronglyTypedFileName)"
  2758.        StronglyTypedLanguage="%(EmbeddedResource.StronglyTypedLanguage)"
  2759.        StronglyTypedNamespace="%(EmbeddedResource.StronglyTypedNamespace)"
  2760.        StronglyTypedManifestPrefix="%(EmbeddedResource.StronglyTypedManifestPrefix)"
  2761.        PublicClass="%(EmbeddedResource.PublicClass)"
  2762.        OutputResources="@(EmbeddedResource->'$(IntermediateOutputPath)%(ManifestResourceName).resources')"
  2763.        MSBuildRuntime="$(GenerateResourceMSBuildRuntime)"
  2764.        MSBuildArchitecture="$(GenerateResourceMSBuildArchitecture)"
  2765.        Condition="'%(EmbeddedResource.Type)' == 'Resx' and '%(EmbeddedResource.GenerateResource)' != 'false' and '$(GenerateResourceMSBuildRuntime)' == 'CLR2'">
  2766.  
  2767.      <Output TaskParameter="FilesWritten" ItemName="FileWrites"/>
  2768.      <Output TaskParameter="StronglyTypedFileName" ItemName="Compile"/>
  2769.  
  2770.      <!-- Gather Sources as an output since it will contain OutputResource metadata indicating the final output resource that it was compiled into -->
  2771.      <Output TaskParameter="Sources" ItemName="_Temporary" />
  2772.  
  2773.    </GenerateResource>
  2774.  
  2775.    <ItemGroup>
  2776.      <EmbeddedResource Remove="@(_Temporary)" />
  2777.  
  2778.      <!-- Add back the Sources list (with OutputResource metadata) that we output from GenerateResource into EmbeddedResource -->
  2779.      <EmbeddedResource Include="@(_Temporary)" />
  2780.      <_Temporary Remove="@(_Temporary)" />
  2781.  
  2782.      <!-- EMITTED FOR COMPATIBILITY REASONS ONLY. CONSUME EMBEDDEDRESOURCE INSTEAD -->
  2783.      <ManifestResourceWithNoCulture Include="@(EmbeddedResource->'%(OutputResource)')" Condition="'%(EmbeddedResource.WithCulture)'=='false' and '%(EmbeddedResource.Type)' == 'Resx'">
  2784.        <EmittedForCompatibilityOnly>true</EmittedForCompatibilityOnly>
  2785.      </ManifestResourceWithNoCulture>
  2786.      <ManifestNonResxWithNoCultureOnDisk Include="@(EmbeddedResource)" Condition="'%(EmbeddedResource.WithCulture)'=='false' and '%(EmbeddedResource.Type)' == 'Non-Resx'">
  2787.        <EmittedForCompatibilityOnly>true</EmittedForCompatibilityOnly>
  2788.      </ManifestNonResxWithNoCultureOnDisk>
  2789.  
  2790.      <!-- EMITTED FOR COMPATIBILITY REASONS ONLY. CONSUME EMBEDDEDRESOURCE INSTEAD -->
  2791.      <ManifestResourceWithCulture Include="@(EmbeddedResource->'%(OutputResource)')" Condition="'%(EmbeddedResource.WithCulture)'=='true' and '%(EmbeddedResource.Type)' == 'Resx'">
  2792.        <EmittedForCompatibilityOnly>true</EmittedForCompatibilityOnly>
  2793.      </ManifestResourceWithCulture>
  2794.      <ManifestNonResxWithCultureOnDisk Include="@(EmbeddedResource)" Condition="'%(EmbeddedResource.WithCulture)'=='true' and '%(EmbeddedResource.Type)' == 'Non-Resx'">
  2795.        <EmittedForCompatibilityOnly>true</EmittedForCompatibilityOnly>
  2796.      </ManifestNonResxWithCultureOnDisk>
  2797.  
  2798.    </ItemGroup>
  2799.  
  2800.  </Target>
  2801.  
  2802.  <!--
  2803.    ============================================================
  2804.                                        CompileLicxFiles
  2805.  
  2806.    Compile .licx files (containing information about licensed controls used by the application) into .licenses files.
  2807.  
  2808.        [IN]
  2809.        @(_LicxFile) - The list of .licx files in the project (usually there will be just one)
  2810.  
  2811.        [OUT]
  2812.        @(CompiledLicenseFile) - The list of compiled .licenses files (there will be just one)
  2813.    ============================================================
  2814.    -->
  2815.  <PropertyGroup>
  2816.    <CompileLicxFilesDependsOn></CompileLicxFilesDependsOn>
  2817.  </PropertyGroup>
  2818.  <Target
  2819.      Name="CompileLicxFiles"
  2820.      Condition="'@(_LicxFile)'!=''"
  2821.      DependsOnTargets="$(CompileLicxFilesDependsOn)"
  2822.      Inputs="$(MSBuildAllProjects);@(_LicxFile);@(ReferencePath);@(ReferenceDependencyPaths)"
  2823.      Outputs="$(IntermediateOutputPath)$(TargetFileName).licenses">
  2824.  
  2825.    <PropertyGroup>
  2826.      <LCMSBuildArchitecture Condition="'$(LCMSBuildArchitecture)' == ''">$(PlatformTargetAsMSBuildArchitecture)</LCMSBuildArchitecture>
  2827.    </PropertyGroup>
  2828.  
  2829.    <LC
  2830.        Sources="@(_LicxFile)"
  2831.        LicenseTarget="$(TargetFileName)"
  2832.        OutputDirectory="$(IntermediateOutputPath)"
  2833.        OutputLicense="$(IntermediateOutputPath)$(TargetFileName).licenses"
  2834.        ReferencedAssemblies="@(ReferencePath);@(ReferenceDependencyPaths)"
  2835.        NoLogo="$(NoLogo)"
  2836.        ToolPath="$(LCToolPath)"
  2837.        SdkToolsPath="$(TargetFrameworkSDKToolsDirectory)"
  2838.        EnvironmentVariables="$(LCEnvironment)"
  2839.        MSBuildArchitecture="$(LCMSBuildArchitecture)"
  2840.        TargetFrameworkVersion="$(TargetFrameworkVersion)"
  2841.        >
  2842.  
  2843.      <Output TaskParameter="OutputLicense" ItemName="CompiledLicenseFile"/>
  2844.      <Output TaskParameter="OutputLicense" ItemName="FileWrites"/>
  2845.  
  2846.    </LC>
  2847.  
  2848.  </Target>
  2849.  
  2850.  
  2851.  
  2852.  
  2853.  <!--
  2854.    ***********************************************************************************************
  2855.    ***********************************************************************************************
  2856.                                                                ResolveKeySource Section
  2857.    ***********************************************************************************************
  2858.    ***********************************************************************************************
  2859.    -->
  2860.  
  2861.  <!--
  2862.    ============================================================
  2863.                                        ResolveKeySource
  2864.  
  2865.    Resolve the strong name key used to sign the assembly as well as the certificate used to
  2866.    sign the ClickOnce manifests.
  2867.  
  2868.        [IN]
  2869.        $(AssemblyOriginatorKeyFile)     - The file used to sign the assembly (.snk or .pfx)
  2870.        $(ManifestCertificateThumbprint) - The thumbprint used to locate the certificate in the
  2871.                                           user's certificate store.
  2872.         $(ManifestKeyFile)               - The key file that contains the certificate in case the
  2873.                                            certificate is not in the user's store.
  2874.  
  2875.        [OUT]
  2876.        $(ResolvedAssemblyKeyFile)        - Key used to sign the assembly
  2877.        $(_DeploymentResolvedManifestCertificateThumbprint) - Certificate used to sign the manifests
  2878.    ============================================================
  2879.    -->
  2880.  <Target
  2881.      Name="ResolveKeySource"
  2882.      Condition="$(SignManifests) == 'true' or $(SignAssembly) == 'true'">
  2883.  
  2884.    <ResolveKeySource
  2885.        KeyFile="$(AssemblyOriginatorKeyFile)"
  2886.        CertificateThumbprint="$(ManifestCertificateThumbprint)"
  2887.        CertificateFile="$(ManifestKeyFile)"
  2888.        SuppressAutoClosePasswordPrompt="$(BuildingInsideVisualStudio)"
  2889.        ShowImportDialogDespitePreviousFailures="$(BuildingProject)"
  2890.        ContinueOnError="!$(BuildingProject)"
  2891.          >
  2892.  
  2893.      <Output TaskParameter="ResolvedKeyFile" PropertyName="KeyOriginatorFile" Condition=" '$(SignAssembly)' == 'true' "/>
  2894.      <Output TaskParameter="ResolvedKeyContainer" PropertyName="KeyContainerName" Condition=" '$(SignAssembly)' == 'true' "/>
  2895.      <Output TaskParameter="ResolvedThumbprint" PropertyName="_DeploymentResolvedManifestCertificateThumbprint" Condition=" '$(SignManifests)' == 'true' "/>
  2896.  
  2897.    </ResolveKeySource>
  2898.  
  2899.  </Target>
  2900.  
  2901.  <!--
  2902.    ***********************************************************************************************
  2903.    ***********************************************************************************************
  2904.                                                                Compile Section
  2905.    ***********************************************************************************************
  2906.    ***********************************************************************************************
  2907.    -->
  2908.  
  2909.  <!--
  2910.    ============================================================
  2911.                                        Compile
  2912.    ============================================================
  2913.    -->
  2914.  <PropertyGroup>
  2915.    <CompileDependsOn>
  2916.      ResolveReferences;
  2917.      ResolveKeySource;
  2918.      SetWin32ManifestProperties;
  2919.      _GenerateCompileInputs;
  2920.      BeforeCompile;
  2921.      _TimeStampBeforeCompile;
  2922.      CoreCompile;
  2923.      _TimeStampAfterCompile;
  2924.      AfterCompile;
  2925.    </CompileDependsOn>
  2926.  </PropertyGroup>
  2927.  <Target
  2928.      Name="Compile"
  2929.      DependsOnTargets="$(CompileDependsOn)"/>
  2930.  
  2931.  <!--
  2932.    ============================================================
  2933.                                        _GenerateCompileInputs
  2934.  
  2935.    Create the _CoreCompileResourceInputs list of inputs to the CoreCompile target.
  2936.    ============================================================
  2937.    -->
  2938.  <Target Name="_GenerateCompileInputs">
  2939.  
  2940.    <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."/>
  2941.    <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."/>
  2942.  
  2943.    <ItemGroup>
  2944.  
  2945.      <!-- _CoreCompileResourceInputs is the list of TLDA inputs that should trigger CoreCompile, and are listed as inputs to that target -->
  2946.      <_CoreCompileResourceInputs Include="@(EmbeddedResource->'%(OutputResource)')" Condition="'%(EmbeddedResource.WithCulture)' == 'false' and '%(EmbeddedResource.Type)' == 'Resx'" />
  2947.      <_CoreCompileResourceInputs Include="@(EmbeddedResource)" Condition="'%(EmbeddedResource.WithCulture)' == 'false' and '%(EmbeddedResource.Type)' == 'Non-Resx' " />
  2948.  
  2949.      <!-- CONSUMED FOR COMPATIBILITY REASONS ONLY. EMIT EMBEDDEDRESOURCE INSTEAD -->
  2950.      <_CoreCompileResourceInputs Include="@(ManifestResourceWithNoCulture)" Condition="'%(ManifestResourceWithNoCulture.EmittedForCompatibilityOnly)'==''">
  2951.        <Type>Resx</Type>
  2952.        <WithCulture>false</WithCulture>
  2953.      </_CoreCompileResourceInputs>
  2954.      <_CoreCompileResourceInputs Include="@(ManifestNonResxWithNoCultureOnDisk)" Condition="'%(ManifestNonResxWithNoCultureOnDisk.EmittedForCompatibilityOnly)'==''">
  2955.        <Type>Non-Resx</Type>
  2956.        <WithCulture>false</WithCulture>
  2957.      </_CoreCompileResourceInputs>
  2958.  
  2959.    </ItemGroup>
  2960.  
  2961.  </Target>
  2962.  
  2963.  <!--
  2964.    ============================================================
  2965.                                        GenerateTargetFrameworkMonikerAttribute
  2966.  
  2967.    Emit the target framework moniker attribute as  a code fragment into a temporary source file for the compiler.
  2968.    ============================================================
  2969.    -->
  2970.  <PropertyGroup Condition="'$(TargetFrameworkMoniker)' != ''">
  2971.    <!-- Do not clean if we are going to default the path to the temp directory -->
  2972.    <TargetFrameworkMonikerAssemblyAttributesFileClean Condition="'$(TargetFrameworkMonikerAssemblyAttributesFileClean)' == '' and '$(TargetFrameworkMonikerAssemblyAttributesPath)' != ''">true</TargetFrameworkMonikerAssemblyAttributesFileClean>
  2973.    <TargetFrameworkMonikerAssemblyAttributesPath Condition="'$(TargetFrameworkMonikerAssemblyAttributesPath)' == ''">$([System.IO.Path]::Combine('$([System.IO.Path]::GetTempPath())','$(TargetFrameworkMoniker).AssemblyAttributes$(DefaultLanguageSourceExtension)'))</TargetFrameworkMonikerAssemblyAttributesPath>
  2974.  </PropertyGroup>
  2975.  
  2976.  <PropertyGroup>
  2977.    <GenerateTargetFrameworkAttribute Condition="'$(GenerateTargetFrameworkAttribute)' == '' and '$(TargetFrameworkMoniker)' != '' and '$(TargetingClr2Framework)' != 'true'">true</GenerateTargetFrameworkAttribute>
  2978.  </PropertyGroup>
  2979.  
  2980.  <ItemGroup Condition="'$(TargetFrameworkMonikerAssemblyAttributesFileClean)' == 'true'">
  2981.    <Clean Include="$(TargetFrameworkMonikerAssemblyAttributesPath)"/>
  2982.  </ItemGroup>
  2983.  
  2984.  <Target Name="GenerateTargetFrameworkMonikerAttribute"
  2985.          BeforeTargets="BeforeCompile"
  2986.          DependsOnTargets="PrepareForBuild;GetReferenceAssemblyPaths"
  2987.          Inputs="$(MSBuildToolsPath)\Microsoft.Common.targets"
  2988.          Outputs="$(TargetFrameworkMonikerAssemblyAttributesPath)"
  2989.          Condition="'$(GenerateTargetFrameworkAttribute)' == 'true'">
  2990.  
  2991.    <!-- This is a file shared between projects so we have to take care to handle simultaneous writes (by ContinueOnError)
  2992.             and a race between clean from one project and build from another (by not adding to FilesWritten so it doesn't clean) -->
  2993.     <WriteLinesToFile
  2994.         File="$(TargetFrameworkMonikerAssemblyAttributesPath)"
  2995.         Lines="$(TargetFrameworkMonikerAssemblyAttributeText)"
  2996.         Overwrite="true"
  2997.         ContinueOnError="true"
  2998.         Condition="'@(Compile)' != '' and '$(TargetFrameworkMonikerAssemblyAttributeText)' != ''"
  2999.         />
  3000.  
  3001.     <ItemGroup Condition="'@(Compile)' != '' and '$(TargetFrameworkMonikerAssemblyAttributeText)' != ''">
  3002.       <Compile Include="$(TargetFrameworkMonikerAssemblyAttributesPath)"/>
  3003.       <!-- 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 -->
  3004.     </ItemGroup>
  3005.   </Target>
  3006.  
  3007.  
  3008.   <!--
  3009.     ============================================================
  3010.                                         GenerateAdditionalSources
  3011.  
  3012.     Emit any specified code fragments into a temporary source file for the compiler.
  3013.     ============================================================
  3014.     -->
  3015.  
  3016.   <PropertyGroup Condition="'$(AssemblyAttributesPath)' != ''">
  3017.     <GenerateAdditionalSources Condition="'$(GenerateAdditionalSources)' == ''">true</GenerateAdditionalSources>
  3018.   </PropertyGroup>
  3019.  
  3020.   <ItemGroup Condition="'$(AssemblyAttributesPath)' != ''">
  3021.     <Clean Include="$(AssemblyAttributesPath)" Condition="'$(AssemblyAttributesFileClean)' != 'false'" />
  3022.   </ItemGroup>
  3023.  
  3024.   <Target Name="GenerateAdditionalSources"
  3025.           BeforeTargets="BeforeCompile"
  3026.           DependsOnTargets="PrepareForBuild;GetReferenceAssemblyPaths"
  3027.           Inputs="$(MSBuildAllProjects)"
  3028.           Outputs="$(AssemblyAttributesPath)"
  3029.           Condition="'@(AssemblyAttributes)' != '' and '$(GenerateAdditionalSources)' == 'true'">
  3030.     <WriteCodeFragment
  3031.           AssemblyAttributes="@(AssemblyAttributes)"
  3032.           OutputFile="$(AssemblyAttributesPath)"
  3033.           Language="$(Language)">
  3034.  
  3035.       <Output TaskParameter="OutputFile" ItemName="Compile"/>
  3036.       <Output TaskParameter="OutputFile" ItemName="FileWrites"/>
  3037.     </WriteCodeFragment>
  3038.   </Target>
  3039.  
  3040.   <!--
  3041.     ============================================================
  3042.                                         BeforeCompile
  3043.  
  3044.     Redefine this target in your project in order to run tasks just before Compile.
  3045.     ============================================================
  3046.     -->
  3047.   <Target Name="BeforeCompile"/>
  3048.  
  3049.   <!--
  3050.     ============================================================
  3051.                                         AfterCompile
  3052.  
  3053.     Redefine this target in your project in order to run tasks just after Compile.
  3054.     ============================================================
  3055.     -->
  3056.   <Target Name="AfterCompile"/>
  3057.  
  3058.   <!--
  3059.     ============================================================
  3060.                                         _TimeStampBeforeCompile
  3061.  
  3062.     If post-build events are set to fire "OnOutputUpdated", then take before
  3063.     and after timestamps so that we can compare them.
  3064.     ============================================================
  3065.     -->
  3066.   <Target
  3067.       Name="_TimeStampBeforeCompile"
  3068.       Condition="'$(RunPostBuildEvent)'=='OnOutputUpdated' or ('$(RegisterForComInterop)'=='true' and '$(OutputType)'=='library')">
  3069.  
  3070.     <PropertyGroup>
  3071.       <_AssemblyTimestampBeforeCompile>%(IntermediateAssembly.ModifiedTime)</_AssemblyTimestampBeforeCompile>
  3072.     </PropertyGroup>
  3073.  
  3074.   </Target>
  3075.  
  3076.   <!--
  3077.     ============================================================
  3078.                                         _TimeStampAfterCompile
  3079.  
  3080.     If post-build events are set to fire "OnOutputUpdated", then take before
  3081.     and after timestamps so that we can compare them.
  3082.     ============================================================
  3083.     -->
  3084.   <Target
  3085.       Name="_TimeStampAfterCompile"
  3086.       Condition="'$(RunPostBuildEvent)'=='OnOutputUpdated' or ('$(RegisterForComInterop)'=='true' and '$(OutputType)'=='library')">
  3087.  
  3088.     <PropertyGroup>
  3089.       <_AssemblyTimestampAfterCompile>%(IntermediateAssembly.ModifiedTime)</_AssemblyTimestampAfterCompile>
  3090.     </PropertyGroup>
  3091.  
  3092.   </Target>
  3093.  
  3094.   <!--
  3095.     ================================================================
  3096.                                         _ComputeNonExistentFileProperty
  3097.  
  3098.     There are certain situations in which we want to always run the CoreCompile target (and
  3099.     thus the Csc task), even if the timestamps of the outputs appear to be up-to-date on disk.
  3100.     If we're inside the IDE during design-time, then the Csc/Vbc/Vjc task is simply being used to
  3101.    initialize the host compiler, so we always want to run it.  Also, if we're inside the IDE, and
  3102.     the host compiler is responsible for doing the compilation during an actual build, we want to let
  3103.     the host compiler determine whether the output is up-to-date, because there may be source files
  3104.     in the IDE's in-memory buffers that we don't know about.
  3105.  
  3106.     So, we always run the CoreCompile target if we're in the IDE, and either we're in design-time or
  3107.     we're delegating to the host compiler for the actual build.
  3108.  
  3109.    We compare against BuildOutOfProcess != true because we cannot assume that the build process will
  3110.    have set BuildOutOfProcess to true or false. Therefore the default behavior should be to do the
  3111.    legacy behavior seen before BuildingOutOfProcess was introduced if the property is not set.
  3112.    ================================================================
  3113.    -->
  3114.  <Target
  3115.      Name="_ComputeNonExistentFileProperty"
  3116.      Condition="('$(BuildingInsideVisualStudio)' == 'true') and ('$(BuildingOutOfProcess)' != 'true') and (('$(BuildingProject)' == 'false') or ('$(UseHostCompilerIfAvailable)' == 'true'))">
  3117.  
  3118.    <PropertyGroup>
  3119.      <NonExistentFile>__NonExistentSubDir__\__NonExistentFile__</NonExistentFile>
  3120.    </PropertyGroup>
  3121.  
  3122.  </Target>
  3123.  
  3124.  
  3125.  
  3126.  
  3127.  <!--
  3128.    ***********************************************************************************************
  3129.    ***********************************************************************************************
  3130.                                                                GenerateSerializationAssemblies Section
  3131.    ***********************************************************************************************
  3132.    ***********************************************************************************************
  3133.    -->
  3134.  
  3135.  <PropertyGroup>
  3136.    <_SGenDllName>$(TargetName).XmlSerializers.dll</_SGenDllName>
  3137.    <_SGenDllCreated>false</_SGenDllCreated>
  3138.    <_SGenGenerateSerializationAssembliesConfig>$(GenerateSerializationAssemblies)</_SGenGenerateSerializationAssembliesConfig>
  3139.    <_SGenGenerateSerializationAssembliesConfig Condition="'$(GenerateSerializationAssemblies)' == ''">Auto</_SGenGenerateSerializationAssembliesConfig>
  3140.    <_SGenGenerateSerializationAssembliesConfig Condition="'$(ConfigurationName)'=='Debug' and '$(_SGenGenerateSerializationAssembliesConfig)' == 'Auto'">Off</_SGenGenerateSerializationAssembliesConfig>
  3141.    <SGenUseProxyTypes Condition="'$(SGenUseProxyTypes)' == ''">true</SGenUseProxyTypes>
  3142.    <SGenUseKeep Condition="'$(SGenUseKeep)'==''">false</SGenUseKeep>
  3143.    <SGenShouldGenerateSerializer Condition="'$(SGenShouldGenerateSerializer)' == ''">true</SGenShouldGenerateSerializer>
  3144.  </PropertyGroup>
  3145.  
  3146.  <!--
  3147.    ============================================================
  3148.                                        GenerateSerializationAssemblies
  3149.  
  3150.    Run GenerateSerializationAssemblies on the assembly produced by this build.
  3151.  
  3152.        [IN]
  3153.        @(BuildAssemblyName) - The assembly generated by this build.
  3154.        @(BuildAssemblyPath) - The path where the assembly resides.
  3155.        @(ReferencePath) - The list of references used by this assembly.
  3156.  
  3157.        [OUT]
  3158.        @(SerializationAssembly) - The path to the serialization assembly.  Maybe we'll just append to an existing list.
  3159.     ============================================================
  3160.     -->
  3161.   <Target
  3162.       Name="GenerateSerializationAssemblies"
  3163.       Condition="'$(_SGenGenerateSerializationAssembliesConfig)' == 'On' or ('@(WebReferenceUrl)'!='' and '$(_SGenGenerateSerializationAssembliesConfig)' == 'Auto')"
  3164.       DependsOnTargets="AssignTargetPaths;Compile;ResolveKeySource"
  3165.       Inputs="$(MSBuildAllProjects);@(IntermediateAssembly)"
  3166.       Outputs="$(IntermediateOutputPath)$(_SGenDllName)">
  3167.  
  3168.     <PropertyGroup>
  3169.       <SGenMSBuildArchitecture Condition="'$(SGenMSBuildArchitecture)' == ''">$(PlatformTargetAsMSBuildArchitecture)</SGenMSBuildArchitecture>
  3170.     </PropertyGroup>
  3171.  
  3172.     <SGen
  3173.         BuildAssemblyName="$(TargetFileName)"
  3174.         BuildAssemblyPath="$(IntermediateOutputPath)"
  3175.         References="@(ReferencePath)"
  3176.         ShouldGenerateSerializer="$(SGenShouldGenerateSerializer)"
  3177.         UseProxyTypes="$(SGenUseProxyTypes)"
  3178.         UseKeep="$(SGenUseKeep)"
  3179.         KeyContainer="$(KeyContainerName)"
  3180.         KeyFile="$(KeyOriginatorFile)"
  3181.         DelaySign="$(DelaySign)"
  3182.         ToolPath="$(SGenToolPath)"
  3183.         SdkToolsPath="$(TargetFrameworkSDKToolsDirectory)"
  3184.         EnvironmentVariables="$(SGenEnvironment)"
  3185.         MSBuildArchitecture="$(SGenMSBuildArchitecture)"
  3186.         SerializationAssembly="$(IntermediateOutputPath)$(_SGenDllName)"
  3187.         Platform="$(SGenPlatformTarget)"
  3188.         Types="$(SGenSerializationTypes)">
  3189.  
  3190.       <Output TaskParameter="SerializationAssembly" ItemName="SerializationAssembly"/>
  3191.  
  3192.     </SGen>
  3193.  
  3194.   </Target>
  3195.  
  3196.   <!--
  3197.     ***********************************************************************************************
  3198.     ***********************************************************************************************
  3199.                                                                 CreateSatelliteAssemblies Section
  3200.     ***********************************************************************************************
  3201.     ***********************************************************************************************
  3202.     -->
  3203.  
  3204.   <!--
  3205.     ============================================================
  3206.                                         CreateSatelliteAssemblies
  3207.  
  3208.     Create one satellite assembly for every unique culture in the resources.
  3209.     ============================================================
  3210.     -->
  3211.   <PropertyGroup>
  3212.     <CreateSatelliteAssembliesDependsOn>
  3213.       _GenerateSatelliteAssemblyInputs;
  3214.       ComputeIntermediateSatelliteAssemblies;
  3215.       GenerateSatelliteAssemblies
  3216.     </CreateSatelliteAssembliesDependsOn>
  3217.   </PropertyGroup>
  3218.   <Target
  3219.       Name="CreateSatelliteAssemblies"
  3220.       DependsOnTargets="$(CreateSatelliteAssembliesDependsOn)" />
  3221.  
  3222.   <!--
  3223.     ============================================================
  3224.                                         _GenerateSatelliteAssemblyInputs
  3225.  
  3226.     Create the _SatelliteAssemblyResourceInputs list of inputs to the CreateSatelliteAssemblies target.
  3227.     ============================================================
  3228.     -->
  3229.   <Target Name="_GenerateSatelliteAssemblyInputs">
  3230.  
  3231.     <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."/>
  3232.     <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."/>
  3233.  
  3234.     <ItemGroup>
  3235.       <!-- _SatelliteAssemblyResourceInputs is the list of TLDA inputs that should trigger CreateSatelliteAssemblies, so listed as inputs to that target -->
  3236.       <_SatelliteAssemblyResourceInputs Include="@(EmbeddedResource->'%(OutputResource)')" Condition="'%(EmbeddedResource.WithCulture)' == 'true' and '%(EmbeddedResource.Type)' == 'Resx'" />
  3237.       <_SatelliteAssemblyResourceInputs Include="@(EmbeddedResource)" Condition="'%(EmbeddedResource.WithCulture)' == 'true' and '%(EmbeddedResource.Type)' == 'Non-Resx'" />
  3238.  
  3239.       <!-- CONSUMED FOR COMPATIBILITY REASONS ONLY. EMIT EMBEDDEDRESOURCE INSTEAD -->
  3240.       <_SatelliteAssemblyResourceInputs Include="@(ManifestResourceWithCulture)" Condition="'%(ManifestResourceWithCulture.EmittedForCompatibilityOnly)'==''">
  3241.         <Type>Resx</Type>
  3242.         <WithCulture>true</WithCulture>
  3243.       </_SatelliteAssemblyResourceInputs>
  3244.       <_SatelliteAssemblyResourceInputs Include="@(ManifestNonResxWithCultureOnDisk)" Condition="'%(ManifestNonResxWithCultureOnDisk.EmittedForCompatibilityOnly)'==''">
  3245.         <Type>Non-Resx</Type>
  3246.         <WithCulture>true</WithCulture>
  3247.       </_SatelliteAssemblyResourceInputs>
  3248.  
  3249.     </ItemGroup>
  3250.   </Target>
  3251.  
  3252.   <!--
  3253.     ============================================================
  3254.                                         GenerateSatelliteAssemblies
  3255.  
  3256.     Actually run al.exe to create the satellite assemblies.
  3257.     ============================================================
  3258.     -->
  3259.   <Target Name="GenerateSatelliteAssemblies"
  3260.           Inputs="$(MSBuildAllProjects);@(_SatelliteAssemblyResourceInputs);$(IntermediateOutputPath)$(TargetName)$(TargetExt)"
  3261.           Outputs="$(IntermediateOutputPath)%(Culture)\$(TargetName).resources.dll"
  3262.           Condition="'@(_SatelliteAssemblyResourceInputs)' != ''">
  3263.  
  3264.     <MakeDir
  3265.         Directories="@(EmbeddedResource->'$(IntermediateOutputPath)%(Culture)')" />
  3266.  
  3267.     <AL AlgorithmId="$(Satellite_AlgorithmId)"
  3268.         BaseAddress="$(Satellite_BaseAddress)"
  3269.         CompanyName="$(Satellite_CompanyName)"
  3270.         Configuration="$(Satellite_Configuration)"
  3271.         Copyright="$(Satellite_Copyright)"
  3272.         Culture="%(Culture)"
  3273.         DelaySign="$(DelaySign)"
  3274.         Description="$(Satellite_Description)"
  3275.         EmbedResources="@(_SatelliteAssemblyResourceInputs)"
  3276.         EnvironmentVariables="$(AlEnvironment)"
  3277.         EvidenceFile="$(Satellite_EvidenceFile)"
  3278.         FileVersion="$(Satellite_FileVersion)"
  3279.         Flags="$(Satellite_Flags)"
  3280.         GenerateFullPaths="$(Satellite_GenerateFullPaths)"
  3281.         KeyContainer="$(KeyContainerName)"
  3282.         KeyFile="$(KeyOriginatorFile)"
  3283.         LinkResources="@(Satellite_LinkResource)"
  3284.         MainEntryPoint="$(Satellite_MainEntryPoint)"
  3285.         OutputAssembly="$(IntermediateOutputPath)%(Culture)\$(TargetName).resources.dll"
  3286.         Platform="$(PlatformTarget)"
  3287.         ProductName="$(Satellite_ProductName)"
  3288.         ProductVersion="$(Satellite_ProductVersion)"
  3289.         ResponseFiles="@(AlResponseFile)"
  3290.         SourceModules="@(Satellite_SourceModule)"
  3291.         TargetType="$(Satellite_TargetType)"
  3292.         TemplateFile="$(IntermediateOutputPath)$(TargetName)$(TargetExt)"
  3293.         Title="$(Satellite_Title)"
  3294.         ToolPath="$(AlToolPath)"
  3295.         ToolExe ="$(AlToolExe)"
  3296.         SdkToolsPath="$(TargetFrameworkSDKToolsDirectory)"
  3297.         Trademark="$(Satellite_Trademark)"
  3298.         Version="$(Satellite_Version)"
  3299.         Win32Icon="$(Satellite_Win32Icon)"
  3300.         Win32Resource="$(Satellite_Win32Resource)">
  3301.  
  3302.       <Output TaskParameter="OutputAssembly" ItemName="FileWrites"/>
  3303.  
  3304.     </AL>
  3305.  
  3306.   </Target>
  3307.   <!--
  3308.     ============================================================
  3309.                                         ComputeIntermediateSatelliteAssemblies
  3310.  
  3311.     Compute the paths to the intermediate satellite assemblies,
  3312.     with culture attributes so we can copy them to the right place.
  3313.     ============================================================
  3314.     -->
  3315.   <PropertyGroup>
  3316.     <ComputeIntermediateSatelliteAssembliesDependsOn>
  3317.       CreateManifestResourceNames
  3318.     </ComputeIntermediateSatelliteAssembliesDependsOn>
  3319.   </PropertyGroup>
  3320.   <Target
  3321.       Name="ComputeIntermediateSatelliteAssemblies"
  3322.       Condition="@(EmbeddedResource->'%(WithCulture)') != ''"
  3323.       DependsOnTargets="$(ComputeIntermediateSatelliteAssembliesDependsOn)">
  3324.  
  3325.     <ItemGroup>
  3326.       <IntermediateSatelliteAssembliesWithTargetPath Include="$(IntermediateOutputPath)%(EmbeddedResource.Culture)\$(TargetName).resources.dll"
  3327.                                                      Condition="'%(EmbeddedResource.Culture)' != ''">
  3328.         <Culture>%(EmbeddedResource.Culture)</Culture>
  3329.         <TargetPath>%(EmbeddedResource.Culture)\$(TargetName).resources.dll</TargetPath>
  3330.       </IntermediateSatelliteAssembliesWithTargetPath>
  3331.     </ItemGroup>
  3332.   </Target>
  3333.  
  3334.   <!--
  3335.     ***********************************************************************************************
  3336.     ***********************************************************************************************
  3337.                                                                 SetWin32ManifestProperties Section
  3338.     ***********************************************************************************************
  3339.     ***********************************************************************************************
  3340.     -->
  3341.  
  3342.   <PropertyGroup>
  3343.     <EmbeddedWin32Manifest>$(Win32Manifest)</EmbeddedWin32Manifest>
  3344.   </PropertyGroup>
  3345.  
  3346.   <!--
  3347.     ============================================================
  3348.                                         SetWin32ManifestProperties
  3349.  
  3350.     Set Win32Manifest and EmbeddedManifest properties to be used later in the build.
  3351.     ============================================================
  3352.     -->
  3353.   <Target
  3354.       Name="SetWin32ManifestProperties"
  3355.       Condition="'$(Win32Manifest)'==''"
  3356.       DependsOnTargets="ResolveComReferences;ResolveNativeReferences;_SetExternalWin32ManifestProperties;_SetEmbeddedWin32ManifestProperties" />
  3357.  
  3358.   <Target
  3359.       Name="_SetExternalWin32ManifestProperties"
  3360.       Condition="'$(GenerateClickOnceManifests)'=='true' or '@(NativeReference)'!='' or '@(ResolvedIsolatedComModules)'!=''" >
  3361.  
  3362.     <PropertyGroup>
  3363.       <!-- set _DeploymentBaseManifest property to the value of $(ApplicationManifest) if the property is set,
  3364.                  but use _DeploymentBaseManifestWithTargetPath item-group if the property is not set to support backwards
  3365.                  compat with earlier MSBuild versions when manifest files were determined by the item-group. If the newer
  3366.                  property is set though, prefer that one be used to specify the manifest. -->
  3367.       <_DeploymentBaseManifest>$(ApplicationManifest)</_DeploymentBaseManifest>
  3368.       <_DeploymentBaseManifest Condition="'$(_DeploymentBaseManifest)'==''">@(_DeploymentBaseManifestWithTargetPath)</_DeploymentBaseManifest>
  3369.  
  3370.       <!-- when using external manifests, always set the NoWin32Manifest property to
  3371.                  true if there is no value set in the incoming project file so the
  3372.                  compilers that support manifest embedding know not to add
  3373.                  a manifest to their built assemblies -->
  3374.       <NoWin32Manifest Condition="'$(NoWin32Manifest)'==''">true</NoWin32Manifest>
  3375.     </PropertyGroup>
  3376.  
  3377.   </Target>
  3378.  
  3379.   <Target
  3380.       Name="_SetEmbeddedWin32ManifestProperties"
  3381.       Condition="'$(GenerateClickOnceManifests)'!='true' and '@(NativeReference)'=='' and '@(ResolvedIsolatedComModules)'==''" >
  3382.  
  3383.     <PropertyGroup>
  3384.       <EmbeddedWin32Manifest>$(ApplicationManifest)</EmbeddedWin32Manifest>
  3385.       <Win32Manifest>$(ApplicationManifest)</Win32Manifest>
  3386.     </PropertyGroup>
  3387.  
  3388.     <GetFrameworkPath Condition="'$(ApplicationManifest)'=='' and '$(NoWin32Manifest)'!='true'">
  3389.       <Output TaskParameter="FrameworkVersion40Path"  PropertyName="_FrameworkVersion40Path" />
  3390.     </GetFrameworkPath>
  3391.  
  3392.     <PropertyGroup>
  3393.       <EmbeddedWin32Manifest  Condition="'$(ApplicationManifest)'=='' and '$(NoWin32Manifest)'!='true' and Exists('$(_FrameworkVersion40Path)\default.win32manifest')">$(_FrameworkVersion40Path)\default.win32manifest</EmbeddedWin32Manifest>
  3394.     </PropertyGroup>
  3395.  
  3396.   </Target>
  3397.  
  3398.  
  3399.  
  3400.  
  3401.   <!--
  3402.     ***********************************************************************************************
  3403.     ***********************************************************************************************
  3404.                                                                 GenerateManifests Section
  3405.     ***********************************************************************************************
  3406.     ***********************************************************************************************
  3407.     -->
  3408.  
  3409.   <!--
  3410.     ============================================================
  3411.                                         GenerateManifests
  3412.  
  3413.     Generates ClickOnce application and deployment manifests or a native manifest.
  3414.     ============================================================
  3415.     -->
  3416.   <PropertyGroup>
  3417.     <GenerateManifestsDependsOn>
  3418.       SetWin32ManifestProperties;
  3419.       GenerateApplicationManifest;
  3420.       GenerateDeploymentManifest
  3421.     </GenerateManifestsDependsOn>
  3422.   </PropertyGroup>
  3423.  
  3424.   <!--
  3425.     ============================================================
  3426.                   _GenerateResolvedDeploymentManifestEntryPoint
  3427.  
  3428.     Use the ResolveManifestFiles to generate the GenerateResolvedDeploymentManifestEntryPoint
  3429.  
  3430.     ============================================================
  3431.     -->
  3432.   <Target
  3433.       Name="_GenerateResolvedDeploymentManifestEntryPoint">
  3434.     <ItemGroup>
  3435.       <_DeploymentPublishFileOfTypeManifestEntryPoint Include="@(PublishFile)" Condition="'%(FileType)'=='ManifestEntryPoint'"/>
  3436.     </ItemGroup>
  3437.  
  3438.     <ResolveManifestFiles
  3439.         TargetFrameworkVersion="$(TargetFrameworkVersion)"
  3440.         SigningManifests="$(SignManifests)"
  3441.         DeploymentManifestEntryPoint="@(ApplicationManifest)"
  3442.         PublishFiles="@(_DeploymentPublishFileOfTypeManifestEntryPoint)">
  3443.  
  3444.       <Output TaskParameter="OutputDeploymentManifestEntryPoint" ItemName="_DeploymentResolvedDeploymentManifestEntryPoint"/>
  3445.  
  3446.     </ResolveManifestFiles>
  3447.   </Target>
  3448.  
  3449.   <Target
  3450.       Name="GenerateManifests"
  3451.       Condition="'$(GenerateClickOnceManifests)'=='true' or '@(NativeReference)'!='' or '@(ResolvedIsolatedComModules)'!='' or '$(GenerateAppxManifest)' == 'true'"
  3452.       DependsOnTargets="$(GenerateManifestsDependsOn)"/>
  3453.  
  3454.   <!--
  3455.     ============================================================
  3456.                                         GenerateApplicationManifest
  3457.  
  3458.     Generates a ClickOnce or native application manifest.
  3459.     An application manifest specifies declarative application identity, dependency and security information.
  3460.  
  3461.         [IN]
  3462.         $(_DeploymentBaseManifest) - The base app.manifest from project.
  3463.         @(ResolvedIsolatedComModules) - The list of COM references to be isolated as reg-free COM dependencies for native assembly loader.
  3464.         @(_DeploymentManifestFiles) - The list of loose files (content, pdb, xml, etc.) for ClickOnce.
  3465.         @(_DeploymentManifestDependencies) - The list of application dependencies (typically this is the set of assembly dependencies in bin\) for ClickOnce.
  3466.         @(AppConfigWithTargetPath) - App config file, if present.
  3467.         $(_DeploymentManifestType) - Type of manifest to be generated, either "Native" or "ClickOnce".
  3468.  
  3469.         [OUT]
  3470.         @(ApplicationManifest) - Generated native or ClickOnce application manifest, i.e. WindowsApplication1.exe.manifest
  3471.     ============================================================
  3472.     -->
  3473.   <Target
  3474.       Name="GenerateApplicationManifest"
  3475.       DependsOnTargets="
  3476.            _DeploymentComputeNativeManifestInfo;
  3477.            _DeploymentComputeClickOnceManifestInfo;
  3478.            ResolveComReferences;
  3479.            ResolveNativeReferences;
  3480.            _GenerateResolvedDeploymentManifestEntryPoint"
  3481.       Inputs="
  3482.            $(MSBuildAllProjects);
  3483.            @(AppConfigWithTargetPath);
  3484.            $(_DeploymentBaseManifest);
  3485.            @(ResolvedIsolatedComModules);
  3486.            @(_DeploymentManifestDependencies);
  3487.            @(_DeploymentResolvedManifestEntryPoint);
  3488.            @(_DeploymentManifestFiles)"
  3489.       Outputs="@(ApplicationManifest)">
  3490.  
  3491.     <RequiresFramework35SP1Assembly
  3492.       ReferencedAssemblies="@(Reference)"
  3493.         ErrorReportUrl="$(_DeploymentFormattedErrorReportUrl)"
  3494.         TargetFrameworkVersion="$(TargetFrameworkVersion)"
  3495.         CreateDesktopShortcut="$(CreateDesktopShortcut)"
  3496.         SigningManifests="$(SignManifests)"
  3497.         Assemblies="@(_DeploymentManifestDependencies)"
  3498.         DeploymentManifestEntryPoint="@(_DeploymentResolvedDeploymentManifestEntryPoint)"
  3499.         EntryPoint="@(_DeploymentResolvedManifestEntryPoint)"
  3500.         Files="@(_DeploymentManifestFiles)"
  3501.         SuiteName="$(SuiteName)" >
  3502.  
  3503.       <Output TaskParameter="RequiresMinimumFramework35SP1" PropertyName="_DeploymentRequiresMinimumFramework35SP1" />
  3504.     </RequiresFramework35SP1Assembly>
  3505.  
  3506.     <GenerateApplicationManifest
  3507.         AssemblyName="$(_DeploymentApplicationManifestIdentity)"
  3508.         AssemblyVersion="$(_DeploymentManifestVersion)"
  3509.         ConfigFile="@(AppConfigWithTargetPath)"
  3510.         ClrVersion="$(ClrVersion)"
  3511.         Dependencies="@(_DeploymentManifestDependencies)"
  3512.         Description="$(Description)"
  3513.         EntryPoint="@(_DeploymentResolvedManifestEntryPoint)"
  3514.         ErrorReportUrl="$(_DeploymentFormattedErrorReportUrl)"
  3515.         FileAssociations="@(FileAssociation)"
  3516.         Files="@(_DeploymentManifestFiles)"
  3517.         HostInBrowser="$(HostInBrowser)"
  3518.         IconFile="@(_DeploymentManifestIconFile)"
  3519.         InputManifest="$(_DeploymentBaseManifest)"
  3520.         IsolatedComReferences="@(ResolvedIsolatedComModules)"
  3521.         ManifestType="$(_DeploymentManifestType)"
  3522.         MaxTargetPath="$(MaxTargetPath)"
  3523.         OutputManifest="@(ApplicationManifest)"
  3524.         OSVersion="$(OSVersion)"
  3525.         Platform="$(PlatformTarget)"
  3526.         Product="$(ProductName)"
  3527.         Publisher="$(PublisherName)"
  3528.         RequiresMinimumFramework35SP1="$(_DeploymentRequiresMinimumFramework35SP1)"
  3529.         SuiteName="$(SuiteName)"
  3530.         SupportUrl="$(_DeploymentFormattedSupportUrl)"
  3531.         TargetCulture="$(TargetCulture)"
  3532.         TargetFrameworkSubset="$(TargetFrameworkSubset)"
  3533.         TargetFrameworkProfile="$(TargetFrameworkProfile)"
  3534.         TargetFrameworkVersion="$(TargetFrameworkVersion)"
  3535.         TrustInfoFile="@(_DeploymentIntermediateTrustInfoFile)"
  3536.         UseApplicationTrust="$(UseApplicationTrust)">
  3537.  
  3538.       <Output TaskParameter="OutputManifest" ItemName="FileWrites"/>
  3539.  
  3540.     </GenerateApplicationManifest>
  3541.  
  3542.     <PropertyGroup>
  3543.       <_DeploymentCopyApplicationManifest>true</_DeploymentCopyApplicationManifest>
  3544.     </PropertyGroup>
  3545.  
  3546.   </Target>
  3547.  
  3548.   <!--
  3549.     ============================================================
  3550.                                         _DeploymentComputeNativeManifestInfo
  3551.  
  3552.     Compute info for native manifest generation
  3553.     ============================================================
  3554.     -->
  3555.   <Target
  3556.       Name="_DeploymentComputeNativeManifestInfo"
  3557.       Condition="'$(GenerateClickOnceManifests)'!='true'">
  3558.  
  3559.     <!-- Create list of items for manifest generation -->
  3560.     <ResolveManifestFiles NativeAssemblies="@(NativeReferenceFile);@(_DeploymentNativePrerequisite)">
  3561.       <Output TaskParameter="OutputAssemblies" ItemName="_DeploymentManifestDependencies"/>
  3562.     </ResolveManifestFiles>
  3563.  
  3564.     <PropertyGroup>
  3565.       <_DeploymentManifestType>Native</_DeploymentManifestType>
  3566.     </PropertyGroup>
  3567.  
  3568.     <!-- Obtain manifest version from the built assembly -->
  3569.     <GetAssemblyIdentity AssemblyFiles="@(IntermediateAssembly)">
  3570.       <Output TaskParameter="Assemblies" ItemName="_IntermediateAssemblyIdentity"/>
  3571.     </GetAssemblyIdentity>
  3572.  
  3573.     <PropertyGroup>
  3574.       <_DeploymentManifestVersion>@(_IntermediateAssemblyIdentity->'%(Version)')</_DeploymentManifestVersion>
  3575.     </PropertyGroup>
  3576.  
  3577.   </Target>
  3578.  
  3579.   <!--
  3580.     ============================================================
  3581.                                         _DeploymentComputeClickOnceManifestInfo
  3582.  
  3583.     Compute info for  ClickOnce manifest generation
  3584.     ============================================================
  3585.     -->
  3586.   <Target
  3587.       Name="_DeploymentComputeClickOnceManifestInfo"
  3588.       Condition="'$(GenerateClickOnceManifests)'=='true'"
  3589.       DependsOnTargets="
  3590.            CleanPublishFolder;
  3591.            _DeploymentGenerateTrustInfo">
  3592.  
  3593.     <!-- Grab just the serialization assemblies for a referenced assembly.  There may also be a symbols file in ReferenceRelatedPaths -->
  3594.     <ItemGroup>
  3595.       <_SGenDllsRelatedToCurrentDll Include="@(_ReferenceSerializationAssemblyPaths->'%(FullPath)')" Condition="'%(Extension)' == '.dll'"/>
  3596.       <_SGenDllsRelatedToCurrentDll Include="@(SerializationAssembly->'%(FullPath)')" Condition="'%(Extension)' == '.dll'"/>
  3597.     </ItemGroup>
  3598.  
  3599.     <!-- Flag primary dependencies-certain warnings emitted during application manifest generation apply only to them. -->
  3600.     <ItemGroup>
  3601.       <_DeploymentReferencePaths Include="@(ReferencePath)">
  3602.         <IsPrimary>true</IsPrimary>
  3603.       </_DeploymentReferencePaths>
  3604.     </ItemGroup>
  3605.  
  3606.     <!-- Copy the application executable from Obj folder to app.publish folder.
  3607.     This is being done to avoid Windows Forms designer memory issues that can arise while operating directly on files located in Obj directory. -->
  3608.     <Copy
  3609.       SourceFiles="@(_DeploymentManifestEntryPoint)"
  3610.       DestinationFolder="$(PublishDir)">
  3611.  
  3612.       <Output TaskParameter="DestinationFiles" ItemName="_DeploymentClickOnceApplicationExecutable" />
  3613.     </Copy>
  3614.    
  3615.     <!-- Sign the application executable located in app.publish folder.  Signing this file is done to comply with SmartScreen. -->
  3616.     <SignFile
  3617.       CertificateThumbprint="$(_DeploymentResolvedManifestCertificateThumbprint)"
  3618.       TimestampUrl="$(ManifestTimestampUrl)"
  3619.       SigningTarget="@(_DeploymentClickOnceApplicationExecutable)"
  3620.       Condition="'$(_DeploymentResolvedManifestCertificateThumbprint)'!='' and '$(_DeploymentSignClickOnceManifests)'=='true' and '$(TargetExt)' == '.exe'"
  3621.       />
  3622.  
  3623.     <!-- Create list of items for manifest generation -->
  3624.     <ResolveManifestFiles
  3625.         TargetFrameworkVersion="$(TargetFrameworkVersion)"
  3626.         SigningManifests="$(SignManifests)"
  3627.         EntryPoint="@(_DeploymentClickOnceApplicationExecutable)"
  3628.         ExtraFiles="@(_DebugSymbolsIntermediatePath);$(IntermediateOutputPath)$(TargetName).xml;@(_ReferenceRelatedPaths)"
  3629.         Files="@(ContentWithTargetPath);@(_DeploymentManifestIconFile);@(AppConfigWithTargetPath)"
  3630.         ManagedAssemblies="@(_DeploymentReferencePaths);@(ReferenceDependencyPaths);@(_SGenDllsRelatedToCurrentDll);@(SerializationAssembly)"
  3631.         NativeAssemblies="@(NativeReferenceFile);@(_DeploymentNativePrerequisite)"
  3632.         PublishFiles="@(PublishFile)"
  3633.         SatelliteAssemblies="@(IntermediateSatelliteAssembliesWithTargetPath);@(ReferenceSatellitePaths)"
  3634.         TargetCulture="$(TargetCulture)">
  3635.  
  3636.       <Output TaskParameter="OutputAssemblies" ItemName="_DeploymentManifestDependencies"/>
  3637.       <Output TaskParameter="OutputFiles" ItemName="_DeploymentManifestFiles"/>
  3638.       <Output TaskParameter="OutputEntryPoint" ItemName="_DeploymentResolvedManifestEntryPoint"/>
  3639.  
  3640.     </ResolveManifestFiles>
  3641.  
  3642.     <PropertyGroup>
  3643.       <_DeploymentManifestType>ClickOnce</_DeploymentManifestType>
  3644.     </PropertyGroup>
  3645.  
  3646.     <!-- Obtain manifest version from ApplicationVersion and ApplicationRevision properties -->
  3647.     <FormatVersion Version="$(ApplicationVersion)" Revision="$(ApplicationRevision)">
  3648.       <Output TaskParameter="OutputVersion" PropertyName="_DeploymentManifestVersion"/>
  3649.     </FormatVersion>
  3650.  
  3651.     <FormatUrl InputUrl="$(_DeploymentUrl)">
  3652.       <Output TaskParameter="OutputUrl" PropertyName="_DeploymentFormattedDeploymentUrl"/>
  3653.     </FormatUrl>
  3654.  
  3655.     <FormatUrl InputUrl="$(SupportUrl)">
  3656.       <Output TaskParameter="OutputUrl" PropertyName="_DeploymentFormattedSupportUrl"/>
  3657.     </FormatUrl>
  3658.  
  3659.     <FormatUrl InputUrl="$(ErrorReportUrl)">
  3660.       <Output TaskParameter="OutputUrl" PropertyName="_DeploymentFormattedErrorReportUrl"/>
  3661.     </FormatUrl>
  3662.  
  3663.   </Target>
  3664.  
  3665.   <!--
  3666.     ============================================================
  3667.                                         _DeploymentGenerateTrustInfo
  3668.  
  3669.     Generates the application permission set for inclusion in the generated ClickOnce application manifest.
  3670.     ============================================================
  3671.     -->
  3672.   <Target
  3673.       Name="_DeploymentGenerateTrustInfo"
  3674.       Condition="'$(TargetZone)'!=''"
  3675.       Inputs="
  3676.            $(MSBuildAllProjects);
  3677.            $(_DeploymentBaseManifest);
  3678.            "
  3679.       Outputs="@(_DeploymentIntermediateTrustInfoFile)">
  3680.  
  3681.     <GenerateTrustInfo
  3682.         BaseManifest="$(_DeploymentBaseManifest)"
  3683.         ApplicationDependencies="@(ReferencePath);@(ReferenceDependencyPaths)"
  3684.         ExcludedPermissions="$(ExcludedPermissions)"
  3685.         TargetFrameworkMoniker="$(TargetFrameworkMoniker)"
  3686.         TargetZone="$(TargetZone)"
  3687.         TrustInfoFile="@(_DeploymentIntermediateTrustInfoFile)">
  3688.  
  3689.       <Output TaskParameter="TrustInfoFile" ItemName="FileWrites"/>
  3690.  
  3691.     </GenerateTrustInfo>
  3692.  
  3693.   </Target>
  3694.  
  3695.   <!--
  3696.     ============================================================
  3697.                                         GenerateDeploymentManifest
  3698.  
  3699.     Generates a ClickOnce deployment manifest.
  3700.     An deployment manifest specifies declarative application identity and application update information.
  3701.     ============================================================
  3702.     -->
  3703.   <Target
  3704.       Name="GenerateDeploymentManifest"
  3705.       DependsOnTargets="GenerateApplicationManifest"
  3706.       Inputs="
  3707.            $(MSBuildAllProjects);
  3708.            @(ApplicationManifest)
  3709.            "
  3710.       Outputs="@(DeployManifest)">
  3711.  
  3712.     <GenerateDeploymentManifest
  3713.           AssemblyName="$(_DeploymentDeployManifestIdentity)"
  3714.           AssemblyVersion="$(_DeploymentManifestVersion)"
  3715.           CreateDesktopShortcut="$(CreateDesktopShortcut)"
  3716.           DeploymentUrl="$(_DeploymentFormattedDeploymentUrl)"
  3717.           Description="$(Description)"
  3718.           DisallowUrlActivation="$(DisallowUrlActivation)"
  3719.           EntryPoint="@(_DeploymentResolvedDeploymentManifestEntryPoint)"
  3720.           ErrorReportUrl="$(_DeploymentFormattedErrorReportUrl)"
  3721.           Install="$(Install)"
  3722.           MapFileExtensions="$(MapFileExtensions)"
  3723.           MaxTargetPath="$(MaxTargetPath)"
  3724.           MinimumRequiredVersion="$(_DeploymentBuiltMinimumRequiredVersion)"
  3725.           OutputManifest="@(DeployManifest)"
  3726.           Platform="$(PlatformTarget)"
  3727.           Product="$(ProductName)"
  3728.           Publisher="$(PublisherName)"
  3729.           SuiteName="$(SuiteName)"
  3730.           SupportUrl="$(_DeploymentFormattedSupportUrl)"
  3731.           TargetCulture="$(TargetCulture)"
  3732.           TargetFrameworkVersion="$(TargetFrameworkVersion)"
  3733.           TargetFrameworkMoniker="$(TargetFrameworkMoniker)"
  3734.           TrustUrlParameters="$(TrustUrlParameters)"
  3735.           UpdateEnabled="$(UpdateEnabled)"
  3736.           UpdateInterval="$(_DeploymentBuiltUpdateInterval)"
  3737.           UpdateMode="$(UpdateMode)"
  3738.           UpdateUnit="$(_DeploymentBuiltUpdateIntervalUnits)"
  3739.           Condition="'$(GenerateClickOnceManifests)'=='true'">
  3740.  
  3741.       <Output TaskParameter="OutputManifest" ItemName="FileWrites"/>
  3742.  
  3743.     </GenerateDeploymentManifest>
  3744.  
  3745.   </Target>
  3746.  
  3747.  
  3748.  
  3749.  
  3750.   <!--
  3751.     ***********************************************************************************************
  3752.     ***********************************************************************************************
  3753.                                                                 PrepareForRun Section
  3754.     ***********************************************************************************************
  3755.     ***********************************************************************************************
  3756.     -->
  3757.  
  3758.   <PropertyGroup>
  3759.     <SkipCopyUnchangedFiles Condition="'$(SkipCopyUnchangedFiles)' == ''">true</SkipCopyUnchangedFiles>
  3760.     <UseCommonOutputDirectory Condition="'$(UseCommonOutputDirectory)' == ''">false</UseCommonOutputDirectory>
  3761.   </PropertyGroup>
  3762.  
  3763.   <!--
  3764.     ============================================================
  3765.                                         PrepareForRun
  3766.  
  3767.     Copy the build outputs to the final directory if they have changed.
  3768.     ============================================================
  3769.     -->
  3770.   <PropertyGroup>
  3771.     <PrepareForRunDependsOn>
  3772.       CopyFilesToOutputDirectory
  3773.     </PrepareForRunDependsOn>
  3774.   </PropertyGroup>
  3775.   <Target
  3776.       Name="PrepareForRun"
  3777.       DependsOnTargets="$(PrepareForRunDependsOn)"/>
  3778.  
  3779.   <!--
  3780.     ============================================================
  3781.                                         CopyFilesToOutputDirectory
  3782.  
  3783.     Copy all build outputs, satellites and other necessary files to the final directory.
  3784.     ============================================================
  3785.     -->
  3786.   <PropertyGroup>
  3787.     <!-- By default we're not using Hard Links to copy to the output directory, and never when building in VS -->
  3788.    <CreateHardLinksForCopyAdditionalFilesIfPossible Condition="'$(BuildingInsideVisualStudio)' == 'true' or '$(CreateHardLinksForCopyAdditionalFilesIfPossible)' == ''">false</CreateHardLinksForCopyAdditionalFilesIfPossible>
  3789.  </PropertyGroup>
  3790.  
  3791.  <Target
  3792.      Name="CopyFilesToOutputDirectory"
  3793.      DependsOnTargets="
  3794.            ComputeIntermediateSatelliteAssemblies;
  3795.            _CopyFilesMarkedCopyLocal;
  3796.            _CopySourceItemsToOutputDirectory;
  3797.            _CopyAppConfigFile;
  3798.            _CopyManifestFiles;
  3799.            _CheckForCompileOutputs;
  3800.            _SGenCheckForOutputs">
  3801.  
  3802.    <PropertyGroup>
  3803.      <!-- By default we're not using Hard Links to copy to the output directory, and never when building in VS -->
  3804.       <CreateHardLinksForCopyFilesToOutputDirectoryIfPossible Condition="'$(BuildingInsideVisualStudio)' == 'true' or '$(CreateHardLinksForCopyFilesToOutputDirectoryIfPossible)' == ''">false</CreateHardLinksForCopyFilesToOutputDirectoryIfPossible>
  3805.     </PropertyGroup>
  3806.  
  3807.     <PropertyGroup>
  3808.       <CopyBuildOutputToOutputDirectory Condition="'$(CopyBuildOutputToOutputDirectory)'==''">true</CopyBuildOutputToOutputDirectory>
  3809.       <CopyOutputSymbolsToOutputDirectory Condition="'$(CopyOutputSymbolsToOutputDirectory)'==''">true</CopyOutputSymbolsToOutputDirectory>
  3810.     </PropertyGroup>
  3811.  
  3812.     <!-- Copy the build product (.dll or .exe). -->
  3813.     <Copy
  3814.         SourceFiles="@(IntermediateAssembly)"
  3815.         DestinationFolder="$(OutDir)"
  3816.         SkipUnchangedFiles="$(SkipCopyUnchangedFiles)"
  3817.         OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)"
  3818.         Retries="$(CopyRetryCount)"
  3819.         RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"
  3820.         UseHardlinksIfPossible="$(CreateHardLinksForCopyFilesToOutputDirectoryIfPossible)"
  3821.         Condition="'$(CopyBuildOutputToOutputDirectory)' == 'true' and '$(SkipCopyBuildProduct)' != 'true'"
  3822.             >
  3823.  
  3824.       <Output TaskParameter="DestinationFiles" ItemName="MainAssembly"/>
  3825.       <Output TaskParameter="DestinationFiles" ItemName="FileWrites"/>
  3826.  
  3827.     </Copy>
  3828.  
  3829.     <Message Importance="High" Text="$(MSBuildProjectName) -&gt; @(MainAssembly->'%(FullPath)')" Condition="'$(CopyBuildOutputToOutputDirectory)' == 'true' and '$(SkipCopyBuildProduct)'!='true'" />
  3830.  
  3831.     <!-- Copy the additional modules. -->
  3832.     <Copy
  3833.         SourceFiles="@(AddModules)"
  3834.         DestinationFolder="$(OutDir)"
  3835.         SkipUnchangedFiles="$(SkipCopyUnchangedFiles)"
  3836.         OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)"
  3837.         Retries="$(CopyRetryCount)"
  3838.         RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"
  3839.         UseHardlinksIfPossible="$(CreateHardLinksForCopyAdditionalFilesIfPossible)"
  3840.         Condition="'@(AddModules)' != ''"
  3841.             >
  3842.  
  3843.       <Output TaskParameter="DestinationFiles" ItemName="FileWrites"/>
  3844.  
  3845.     </Copy>
  3846.  
  3847.     <!-- Copy the serialization assembly if it exists. -->
  3848.     <Copy
  3849.         SourceFiles="$(IntermediateOutputPath)$(_SGenDllName)"
  3850.         DestinationFiles="$(OutDir)$(_SGenDllName)"
  3851.         SkipUnchangedFiles="$(SkipCopyUnchangedFiles)"
  3852.         OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)"
  3853.         Retries="$(CopyRetryCount)"
  3854.         RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"
  3855.         UseHardlinksIfPossible="$(CreateHardLinksForCopyFilesToOutputDirectoryIfPossible)"
  3856.         Condition="'$(_SGenDllCreated)'=='true'">
  3857.  
  3858.       <Output TaskParameter="DestinationFiles" ItemName="FileWrites"/>
  3859.  
  3860.     </Copy>
  3861.  
  3862.     <!-- Copy the debug information file (.pdb), if any -->
  3863.     <Copy
  3864.         SourceFiles="@(_DebugSymbolsIntermediatePath)"
  3865.         DestinationFiles="@(_DebugSymbolsOutputPath)"
  3866.         SkipUnchangedFiles="$(SkipCopyUnchangedFiles)"
  3867.         OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)"
  3868.         Retries="$(CopyRetryCount)"
  3869.         RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"
  3870.         UseHardlinksIfPossible="$(CreateHardLinksForCopyFilesToOutputDirectoryIfPossible)"
  3871.         Condition="'$(_DebugSymbolsProduced)'=='true' and '$(SkipCopyingSymbolsToOutputDirectory)' != 'true' and '$(CopyOutputSymbolsToOutputDirectory)'=='true'">
  3872.  
  3873.       <Output TaskParameter="DestinationFiles" ItemName="FileWrites"/>
  3874.  
  3875.     </Copy>
  3876.  
  3877.     <!-- Copy the resulting XML documentation file, if any. -->
  3878.     <Copy
  3879.         SourceFiles="@(DocFileItem)"
  3880.         DestinationFiles="@(FinalDocFile)"
  3881.         SkipUnchangedFiles="$(SkipCopyUnchangedFiles)"
  3882.         OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)"
  3883.         Retries="$(CopyRetryCount)"
  3884.         RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"
  3885.         UseHardlinksIfPossible="$(CreateHardLinksForCopyFilesToOutputDirectoryIfPossible)"
  3886.         Condition="'$(_DocumentationFileProduced)'=='true'">
  3887.  
  3888.       <Output TaskParameter="DestinationFiles" ItemName="FileWrites"/>
  3889.  
  3890.     </Copy>
  3891.  
  3892.     <!-- Copy satellite assemblies. -->
  3893.     <Copy
  3894.         SourceFiles="@(IntermediateSatelliteAssembliesWithTargetPath)"
  3895.         DestinationFiles="@(IntermediateSatelliteAssembliesWithTargetPath->'$(OutDir)%(Culture)\$(TargetName).resources.dll')"
  3896.         SkipUnchangedFiles="$(SkipCopyUnchangedFiles)"
  3897.         OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)"
  3898.         Retries="$(CopyRetryCount)"
  3899.         RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"
  3900.         UseHardlinksIfPossible="$(CreateHardLinksForCopyFilesToOutputDirectoryIfPossible)"
  3901.         Condition="'@(IntermediateSatelliteAssembliesWithTargetPath)' != ''"
  3902.             >
  3903.  
  3904.       <Output TaskParameter="DestinationFiles" ItemName="FileWrites"/>
  3905.  
  3906.     </Copy>
  3907.  
  3908.     <!--
  3909.         Copy COM reference wrappers, isolated COM references, COM references included by
  3910.         native (manifest) references, native (manifest) reference files themselves.
  3911.         -->
  3912.     <Copy
  3913.         SourceFiles="@(ReferenceComWrappersToCopyLocal); @(ResolvedIsolatedComModules); @(_DeploymentLooseManifestFile); @(NativeReferenceFile)"
  3914.         DestinationFolder="$(OutDir)"
  3915.         SkipUnchangedFiles="$(SkipCopyUnchangedFiles)"
  3916.         OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)"
  3917.         Retries="$(CopyRetryCount)"
  3918.         RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"
  3919.         UseHardlinksIfPossible="$(CreateHardLinksForCopyAdditionalFilesIfPossible)"
  3920.         Condition="'@(ReferenceComWrappersToCopyLocal)' != '' or '@(ResolvedIsolatedComModules)' != '' or '@(_DeploymentLooseManifestFile)' != '' or '@(NativeReferenceFile)' != '' "
  3921.             >
  3922.  
  3923.       <Output TaskParameter="DestinationFiles" ItemName="FileWritesShareable"/>
  3924.  
  3925.     </Copy>
  3926.    
  3927.     <!-- Copy the build product of WinMDExp. -->
  3928.     <Copy
  3929.         SourceFiles="@(WinMDExpArtifacts)"
  3930.         DestinationFolder="$(OutDir)"
  3931.         SkipUnchangedFiles="$(SkipCopyUnchangedFiles)"
  3932.         OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)"
  3933.         Retries="$(CopyRetryCount)"
  3934.         RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"
  3935.         UseHardlinksIfPossible="$(CreateHardLinksForCopyFilesToOutputDirectoryIfPossible)"
  3936.         Condition="'$(SkipCopyWinMDArtifact)' != 'true' and '@(WinMDExpArtifacts)' != ''"
  3937.             >
  3938.       <Output TaskParameter="DestinationFiles" ItemName="FileWrites"/>
  3939.       <Output TaskParameter="DestinationFiles" ItemName="FinalWinmdExpArtifacts" />
  3940.     </Copy>
  3941.  
  3942.     <Message Importance="High" Text="$(MSBuildProjectName) -&gt; $([System.IO.Path]::GetFullPath('$(_WindowsMetadataOutputPath)'))" Condition="'$(SkipCopyWinMDArtifact)' != 'true' and '$(_WindowsMetadataOutputPath)' != ''" />
  3943.  
  3944.   </Target>
  3945.  
  3946.   <!--
  3947.     ============================================================
  3948.                                         _CopyFilesMarkedCopyLocal
  3949.  
  3950.     Copy references that are marked as "CopyLocal" and their dependencies, including .pdbs, .xmls and satellites.
  3951.     ============================================================
  3952.     -->
  3953.   <Target
  3954.       Name="_CopyFilesMarkedCopyLocal"
  3955.       Condition="'@(ReferenceCopyLocalPaths)' != ''"
  3956.         >
  3957.  
  3958.     <PropertyGroup>
  3959.       <!-- By default we're not using Hard Links to copy to the output directory, and never when building in VS -->
  3960.      <CreateHardLinksForCopyLocalIfPossible Condition="'$(BuildingInsideVisualStudio)' == 'true' or '$(CreateHardLinksForCopyLocalIfPossible)' == ''">false</CreateHardLinksForCopyLocalIfPossible>
  3961.    </PropertyGroup>
  3962.  
  3963.    <Copy
  3964.        SourceFiles="@(ReferenceCopyLocalPaths)"
  3965.        DestinationFiles="@(ReferenceCopyLocalPaths->'$(OutDir)%(DestinationSubDirectory)%(Filename)%(Extension)')"
  3966.        SkipUnchangedFiles="$(SkipCopyUnchangedFiles)"
  3967.        OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)"
  3968.        Retries="$(CopyRetryCount)"
  3969.        RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"
  3970.        UseHardlinksIfPossible="$(CreateHardLinksForCopyLocalIfPossible)"
  3971.        Condition="'$(UseCommonOutputDirectory)' != 'true'"
  3972.            >
  3973.  
  3974.      <Output TaskParameter="DestinationFiles" ItemName="FileWritesShareable"/>
  3975.  
  3976.    </Copy>
  3977.  
  3978.  </Target>
  3979.  
  3980.  <!--
  3981.    ============================================================
  3982.                                        _CopySourceItemsToOutputDirectory
  3983.    ============================================================
  3984.    -->
  3985.  <Target
  3986.      Name="_CopySourceItemsToOutputDirectory"
  3987.      DependsOnTargets="
  3988.            GetCopyToOutputDirectoryItems;
  3989.            _CopyOutOfDateSourceItemsToOutputDirectory;
  3990.            _CopyOutOfDateSourceItemsToOutputDirectoryAlways"/>
  3991.  
  3992.  
  3993.  <!--
  3994.    ============================================================
  3995.                                        GetCopyToOutputDirectoryItems
  3996.  
  3997.    Get all project items that may need to be transferred to the output directory.
  3998.    This includes baggage items from transitively referenced projects. It would appear
  3999.    that this target computes full transitive closure of content items for all referenced
  4000.    projects; however that is not the case. It only collects the content items from its
  4001.    immediate children and not children of children. The reason this happens is that
  4002.    the ProjectReferenceWithConfiguration list that is consumed by _SplitProjectReferencesByFileExistence
  4003.    is only populated in the current project and is empty in the children. The empty list
  4004.    causes _MSBuildProjectReferenceExistent to be empty and terminates the recursion.
  4005.    ============================================================
  4006.    -->
  4007.  <PropertyGroup>
  4008.    <GetCopyToOutputDirectoryItemsDependsOn>
  4009.      AssignTargetPaths;
  4010.      _SplitProjectReferencesByFileExistence
  4011.    </GetCopyToOutputDirectoryItemsDependsOn>
  4012.  </PropertyGroup>
  4013.  <Target
  4014.      Name="GetCopyToOutputDirectoryItems"
  4015.      Returns="@(AllItemsFullPathWithTargetPath)"
  4016.      KeepDuplicateOutputs=" '$(MSBuildDisableGetCopyToOutputDirectoryItemsOptimization)' == '' "
  4017.      DependsOnTargets="$(GetCopyToOutputDirectoryItemsDependsOn)">
  4018.  
  4019.  
  4020.    <!-- 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
  4021.         cases, we can immediately discard the unwanted metadata, reducing memory usage, particularly in very large and interconnected systems of projects.
  4022.         However, if some client does require the original functionality, it is sufficient to set MSBuildDisableGetCopyToOutputDirectoryItemsOptimization to
  4023.         a non-empty value and the original behavior will be restored. -->
  4024.    <PropertyGroup Condition=" '$(MSBuildDisableGetCopyToOutputDirectoryItemsOptimization)' == '' ">
  4025.      <_GCTODIKeepDuplicates>false</_GCTODIKeepDuplicates>
  4026.      <_GCTODIKeepMetadata>CopyToOutputDirectory;TargetPath</_GCTODIKeepMetadata>
  4027.    </PropertyGroup>
  4028.  
  4029.    <!-- Get items from child projects first. -->
  4030.    <MSBuild
  4031.        Projects="@(_MSBuildProjectReferenceExistent)"
  4032.        Targets="GetCopyToOutputDirectoryItems"
  4033.        BuildInParallel="$(BuildInParallel)"
  4034.        Properties="%(_MSBuildProjectReferenceExistent.SetConfiguration); %(_MSBuildProjectReferenceExistent.SetPlatform)"
  4035.        Condition="'@(_MSBuildProjectReferenceExistent)' != '' and '$(_GetChildProjectCopyToOutputDirectoryItems)' == 'true' and '%(_MSBuildProjectReferenceExistent.Private)' != 'false' and '$(UseCommonOutputDirectory)' != 'true'"
  4036.        ContinueOnError="$(ContinueOnError)"
  4037.        RemoveProperties="%(_MSBuildProjectReferenceExistent.GlobalPropertiesToRemove)">
  4038.  
  4039.      <Output TaskParameter="TargetOutputs" ItemName="_AllChildProjectItemsWithTargetPath"/>
  4040.  
  4041.    </MSBuild>
  4042.  
  4043.    <!-- Target outputs must be full paths because they will be consumed by a different project. -->
  4044.    <ItemGroup>
  4045.      <_SourceItemsToCopyToOutputDirectoryAlways KeepDuplicates=" '$(_GCTODIKeepDuplicates)' != 'false' " KeepMetadata="$(_GCTODIKeepMetadata)" Include="@(_AllChildProjectItemsWithTargetPath->'%(FullPath)')" Condition="'%(_AllChildProjectItemsWithTargetPath.CopyToOutputDirectory)'=='Always'"/>
  4046.      <_SourceItemsToCopyToOutputDirectory       KeepDuplicates=" '$(_GCTODIKeepDuplicates)' != 'false' " KeepMetadata="$(_GCTODIKeepMetadata)" Include="@(_AllChildProjectItemsWithTargetPath->'%(FullPath)')" Condition="'%(_AllChildProjectItemsWithTargetPath.CopyToOutputDirectory)'=='PreserveNewest'"/>
  4047.    </ItemGroup>
  4048.  
  4049.    <!-- Remove items which we will never again use - they just sit around taking up memory otherwise -->
  4050.    <ItemGroup>
  4051.      <_AllChildProjectItemsWithTargetPath Remove="@(_AllChildProjectItemsWithTargetPath)"/>
  4052.    </ItemGroup>
  4053.  
  4054.    <!-- Get items from this project last so that they will be copied last. -->
  4055.    <ItemGroup>
  4056.      <_SourceItemsToCopyToOutputDirectoryAlways KeepMetadata="$(_GCTODIKeepMetadata)" Include="@(ContentWithTargetPath->'%(FullPath)')" Condition="'%(ContentWithTargetPath.CopyToOutputDirectory)'=='Always'"/>
  4057.      <_SourceItemsToCopyToOutputDirectory       KeepMetadata="$(_GCTODIKeepMetadata)" Include="@(ContentWithTargetPath->'%(FullPath)')" Condition="'%(ContentWithTargetPath.CopyToOutputDirectory)'=='PreserveNewest'"/>
  4058.    </ItemGroup>
  4059.  
  4060.    <ItemGroup>
  4061.      <_SourceItemsToCopyToOutputDirectoryAlways KeepMetadata="$(_GCTODIKeepMetadata)" Include="@(EmbeddedResource->'%(FullPath)')" Condition="'%(EmbeddedResource.CopyToOutputDirectory)'=='Always'"/>
  4062.      <_SourceItemsToCopyToOutputDirectory       KeepMetadata="$(_GCTODIKeepMetadata)" Include="@(EmbeddedResource->'%(FullPath)')" Condition="'%(EmbeddedResource.CopyToOutputDirectory)'=='PreserveNewest'"/>
  4063.    </ItemGroup>
  4064.  
  4065.    <ItemGroup>
  4066.      <_CompileItemsToCopy Include="@(Compile->'%(FullPath)')" Condition="'%(Compile.CopyToOutputDirectory)'=='Always' or '%(Compile.CopyToOutputDirectory)'=='PreserveNewest'"/>
  4067.    </ItemGroup>
  4068.  
  4069.    <AssignTargetPath Files="@(_CompileItemsToCopy)" RootFolder="$(MSBuildProjectDirectory)">
  4070.      <Output TaskParameter="AssignedFiles" ItemName="_CompileItemsToCopyWithTargetPath" />
  4071.    </AssignTargetPath>
  4072.  
  4073.    <ItemGroup>
  4074.      <_SourceItemsToCopyToOutputDirectoryAlways KeepMetadata="$(_GCTODIKeepMetadata)" Include="@(_CompileItemsToCopyWithTargetPath)" Condition="'%(_CompileItemsToCopyWithTargetPath.CopyToOutputDirectory)'=='Always'"/>
  4075.      <_SourceItemsToCopyToOutputDirectory       KeepMetadata="$(_GCTODIKeepMetadata)" Include="@(_CompileItemsToCopyWithTargetPath)" Condition="'%(_CompileItemsToCopyWithTargetPath.CopyToOutputDirectory)'=='PreserveNewest'"/>
  4076.    </ItemGroup>
  4077.  
  4078.    <ItemGroup>
  4079.      <_SourceItemsToCopyToOutputDirectoryAlways KeepMetadata="$(_GCTODIKeepMetadata)" Include="@(_NoneWithTargetPath->'%(FullPath)')" Condition="'%(_NoneWithTargetPath.CopyToOutputDirectory)'=='Always'"/>
  4080.      <_SourceItemsToCopyToOutputDirectory       KeepMetadata="$(_GCTODIKeepMetadata)" Include="@(_NoneWithTargetPath->'%(FullPath)')" Condition="'%(_NoneWithTargetPath.CopyToOutputDirectory)'=='PreserveNewest'"/>
  4081.    </ItemGroup>
  4082.  
  4083.    <ItemGroup>
  4084.      <AllItemsFullPathWithTargetPath            Include="@(_SourceItemsToCopyToOutputDirectoryAlways->'%(FullPath)');@(_SourceItemsToCopyToOutputDirectory->'%(FullPath)')"/>
  4085.    </ItemGroup>
  4086.  
  4087.  </Target>
  4088.  
  4089.  <!--
  4090.    ============================================================
  4091.                                        _CopyOutOfDateSourceItemsToOutputDirectory
  4092.  
  4093.    Copy files that have the CopyToOutputDirectory attribute set to 'PreserveNewest'.
  4094.    ============================================================
  4095.    -->
  4096.  <Target
  4097.      Name="_CopyOutOfDateSourceItemsToOutputDirectory"
  4098.      Condition=" '@(_SourceItemsToCopyToOutputDirectory)' != '' "
  4099.      Inputs="@(_SourceItemsToCopyToOutputDirectory)"
  4100.      Outputs="@(_SourceItemsToCopyToOutputDirectory->'$(OutDir)%(TargetPath)')">
  4101.  
  4102.    <!--
  4103.        Not using SkipUnchangedFiles="true" because the application may want to change
  4104.        one of these files and not have an incremental build replace it.
  4105.        -->
  4106.    <Copy
  4107.        SourceFiles = "@(_SourceItemsToCopyToOutputDirectory)"
  4108.        DestinationFiles = "@(_SourceItemsToCopyToOutputDirectory->'$(OutDir)%(TargetPath)')"
  4109.        OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)"
  4110.        Retries="$(CopyRetryCount)"
  4111.        RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"
  4112.        UseHardlinksIfPossible="$(CreateHardLinksForAdditionalFilesIfPossible)"
  4113.            >
  4114.  
  4115.      <Output TaskParameter="DestinationFiles" ItemName="FileWrites"/>
  4116.  
  4117.    </Copy>
  4118.  
  4119.  </Target>
  4120.  
  4121.  <!--
  4122.    ============================================================
  4123.                                        _CopyOutOfDateSourceItemsToOutputDirectoryAlways
  4124.  
  4125.    Copy files that have the CopyToOutputDirectory attribute set to 'Always'.
  4126.    ============================================================
  4127.    -->
  4128.  <Target
  4129.      Name="_CopyOutOfDateSourceItemsToOutputDirectoryAlways"
  4130.      Condition=" '@(_SourceItemsToCopyToOutputDirectoryAlways)' != '' ">
  4131.  
  4132.    <!--
  4133.        Not using SkipUnchangedFiles="true" because the application may want to change
  4134.        one of these files and not have an incremental build replace it.
  4135.        -->
  4136.    <Copy
  4137.        SourceFiles = "@(_SourceItemsToCopyToOutputDirectoryAlways)"
  4138.        DestinationFiles = "@(_SourceItemsToCopyToOutputDirectoryAlways->'$(OutDir)%(TargetPath)')"
  4139.        OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)"
  4140.        Retries="$(CopyRetryCount)"
  4141.        RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"
  4142.        UseHardlinksIfPossible="$(CreateHardLinksForAdditionalFilesIfPossible)"
  4143.            >
  4144.  
  4145.      <Output TaskParameter="DestinationFiles" ItemName="FileWrites"/>
  4146.  
  4147.    </Copy>
  4148.  
  4149.  </Target>
  4150.  
  4151.  <!--
  4152.    ============================================================
  4153.                                        _CopyAppConfigFile
  4154.  
  4155.    Copy the application config file.
  4156.    ============================================================
  4157.    -->
  4158.  <Target
  4159.      Name="_CopyAppConfigFile"
  4160.      Condition=" '@(AppConfigWithTargetPath)' != '' "
  4161.      Inputs="@(AppConfigWithTargetPath)"
  4162.      Outputs="@(AppConfigWithTargetPath->'$(OutDir)%(TargetPath)')">
  4163.  
  4164.    <!--
  4165.        Copy the application's .config file, if any.
  4166.         Not using SkipUnchangedFiles="true" because the application may want to change
  4167.         the app.config and not have an incremental build replace it.
  4168.         -->
  4169.     <Copy
  4170.         SourceFiles="@(AppConfigWithTargetPath)"
  4171.         DestinationFiles="@(AppConfigWithTargetPath->'$(OutDir)%(TargetPath)')"
  4172.         OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)"
  4173.         Retries="$(CopyRetryCount)"
  4174.         RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"
  4175.         UseHardlinksIfPossible="$(CreateHardLinksForAdditionalFilesIfPossible)"
  4176.             >
  4177.  
  4178.       <Output TaskParameter="DestinationFiles" ItemName="FileWrites"/>
  4179.  
  4180.     </Copy>
  4181.  
  4182.   </Target>
  4183.  
  4184.   <!--
  4185.     ================================================================
  4186.                                          _CopyManifestFiles
  4187.     ================================================================
  4188.  
  4189.     Copy the built manifests (.exe.manifest, .application/.xbap) to the final directory.
  4190.     -->
  4191.   <Target
  4192.       Name="_CopyManifestFiles"
  4193.       Condition=" '$(_DeploymentCopyApplicationManifest)'=='true' or '$(GenerateClickOnceManifests)'=='true' "
  4194.       DependsOnTargets="PrepareForBuild">
  4195.  
  4196.     <Copy
  4197.         SourceFiles="@(ApplicationManifest)"
  4198.         DestinationFolder="$(OutDir)"
  4199.         SkipUnchangedFiles="$(SkipCopyUnchangedFiles)"
  4200.         OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)"
  4201.         Retries="$(CopyRetryCount)"
  4202.         RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"
  4203.         UseHardlinksIfPossible="$(CreateHardLinksForAdditionalFilesIfPossible)"
  4204.         Condition="'$(GenerateClickOnceManifests)'=='true' or '$(_DeploymentCopyApplicationManifest)'=='true'">
  4205.  
  4206.       <Output TaskParameter="DestinationFiles" ItemName="_DeploymentMainApplicationManifest"/>
  4207.       <Output TaskParameter="DestinationFiles" ItemName="FileWrites"/>
  4208.  
  4209.     </Copy>
  4210.  
  4211.     <Message Importance="Normal" Condition="'$(_DeploymentCopyApplicationManifest)'=='true'" Text="$(MSBuildProjectName) -&gt; @(_DeploymentMainApplicationManifest->'%(FullPath)')" />
  4212.  
  4213.     <Copy
  4214.         SourceFiles="@(DeployManifest)"
  4215.         DestinationFolder="$(OutDir)"
  4216.         SkipUnchangedFiles="$(SkipCopyUnchangedFiles)"
  4217.         OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)"
  4218.         Retries="$(CopyRetryCount)"
  4219.         RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"
  4220.         UseHardlinksIfPossible="$(CreateHardLinksForAdditionalFilesIfPossible)"
  4221.         Condition="'$(GenerateClickOnceManifests)'=='true'">
  4222.  
  4223.       <Output TaskParameter="DestinationFiles" ItemName="_DeploymentMainDeployManifest"/>
  4224.       <Output TaskParameter="DestinationFiles" ItemName="FileWrites"/>
  4225.  
  4226.     </Copy>
  4227.  
  4228.     <Message Importance="Normal" Condition="'$(GenerateClickOnceManifests)'=='true'" Text="$(MSBuildProjectName) -&gt; @(_DeploymentMainDeployManifest->'%(FullPath)')" />
  4229.  
  4230.   </Target>
  4231.  
  4232.   <!--
  4233.     ================================================================
  4234.                                          _CheckForCompileOutputs
  4235.  
  4236.     Checks each file output from the main "Compile" target to make sure they really exist.
  4237.     If they do, then record them in the clean cache.
  4238.     ============================================================
  4239.     -->
  4240.   <Target
  4241.       Name="_CheckForCompileOutputs">
  4242.  
  4243.     <!--Record the main compile outputs.-->
  4244.     <ItemGroup>
  4245.       <FileWrites Include="@(IntermediateAssembly)" Condition="Exists('@(IntermediateAssembly)')"/>
  4246.     </ItemGroup>
  4247.  
  4248.     <!-- Record the .xml if one was produced. -->
  4249.     <PropertyGroup>
  4250.       <_DocumentationFileProduced Condition="!Exists('@(DocFileItem)')">false</_DocumentationFileProduced>
  4251.     </PropertyGroup>
  4252.  
  4253.     <ItemGroup>
  4254.       <FileWrites Include="@(DocFileItem)" Condition="'$(_DocumentationFileProduced)'=='true'"/>
  4255.     </ItemGroup>
  4256.  
  4257.     <!-- Record the .pdb if one was produced. -->
  4258.     <PropertyGroup>
  4259.       <_DebugSymbolsProduced Condition="!Exists('@(_DebugSymbolsIntermediatePath)')">false</_DebugSymbolsProduced>
  4260.     </PropertyGroup>
  4261.  
  4262.     <ItemGroup>
  4263.       <FileWrites Include="@(_DebugSymbolsIntermediatePath)" Condition="'$(_DebugSymbolsProduced)'=='true'"/>
  4264.     </ItemGroup>
  4265.   </Target>
  4266.  
  4267.   <!--
  4268.     ============================================================
  4269.                                         _SGenCheckForOutputs
  4270.  
  4271.     Checks each file output from the "GenerateSerializationAssemblies" target to make sure they really exist.
  4272.     If they do, then record them in the clean cache.
  4273.     ============================================================
  4274.     -->
  4275.   <Target
  4276.       Name="_SGenCheckForOutputs"
  4277.       Condition="'$(_SGenGenerateSerializationAssembliesConfig)' == 'On' or ('@(WebReferenceUrl)'!='' and '$(_SGenGenerateSerializationAssembliesConfig)' == 'Auto')"
  4278.         >
  4279.  
  4280.     <!-- Record the serializer .dll if one was produced.-->
  4281.     <PropertyGroup>
  4282.       <_SGenDllCreated Condition="Exists('$(IntermediateOutputPath)$(_SGenDllName)')">true</_SGenDllCreated>
  4283.     </PropertyGroup>
  4284.  
  4285.     <ItemGroup>
  4286.       <FileWrites Include="$(IntermediateOutputPath)$(_SGenDllName)" Condition="Exists('$(IntermediateOutputPath)$(_SGenDllName)')"/>
  4287.     </ItemGroup>
  4288.  
  4289.   </Target>
  4290.  
  4291.  
  4292.  
  4293.  
  4294.   <!--
  4295.     ***********************************************************************************************
  4296.     ***********************************************************************************************
  4297.                                                                 UnmanagedRegistration Section
  4298.     ***********************************************************************************************
  4299.     ***********************************************************************************************
  4300.     -->
  4301.  
  4302.   <!--
  4303.     ============================================================
  4304.                                         UnmanagedRegistration
  4305.  
  4306.     Registers the main assembly for COM interop.
  4307.     ============================================================
  4308.     -->
  4309.   <PropertyGroup>
  4310.     <UnmanagedRegistrationDependsOn></UnmanagedRegistrationDependsOn>
  4311.   </PropertyGroup>
  4312.   <Target
  4313.       Name="UnmanagedRegistration"
  4314.       Condition="'$(RegisterForComInterop)'=='true' and '$(OutputType)'=='library'"
  4315.       DependsOnTargets="$(UnmanagedRegistrationDependsOn)"
  4316.         >
  4317.  
  4318.     <PropertyGroup>
  4319.       <RegisterAssemblyMSBuildArchitecture Condition="'$(RegisterAssemblyMSBuildArchitecture)' == ''">$(PlatformTargetAsMSBuildArchitecture)</RegisterAssemblyMSBuildArchitecture>
  4320.     </PropertyGroup>
  4321.  
  4322.     <PropertyGroup Condition="'$(TargetFrameworkAsMSBuildRuntime)' != '' and '$(RegisterAssemblyMSBuildArchitecture)' != ''">
  4323.       <!-- Falling back to the current runtime if we are targeting CLR2 and the task host doesn't exist will lead to
  4324.           incorrect behavior in some cases, but it's the same incorrect behavior as Visual Studio 2010, and thus better
  4325.            than causing build breaks on upgrade to Win8 the way not doing so would.  For more details, see the
  4326.            corresponding comment in GenerateResource. -->
  4327.       <RegisterAssemblyMSBuildRuntime
  4328.           Condition="'$(RegisterAssemblyMSBuildRuntime)' == '' and
  4329.                     $([MSBuild]::DoesTaskHostExist(`$(TargetFrameworkAsMSBuildRuntime)`, `$(RegisterAssemblyMSBuildArchitecture)`))">$(TargetFrameworkAsMSBuildRuntime)</RegisterAssemblyMSBuildRuntime>
  4330.  
  4331.       <!-- If the targeted runtime doesn't exist, fall back to current -->
  4332.      <RegisterAssemblyMSBuildRuntime Condition="'$(RegisterAssemblyMSBuildRuntime)' == ''">CurrentRuntime</RegisterAssemblyMSBuildRuntime>
  4333.    </PropertyGroup>
  4334.  
  4335.    <RegisterAssembly
  4336.        Assemblies="@(_OutputPathItem->'%(FullPath)$(TargetFileName)')"
  4337.        TypeLibFiles="@(_OutputPathItem->'%(FullPath)$(TargetName).tlb')"
  4338.        AssemblyListFile="@(_UnmanagedRegistrationCache)"
  4339.        CreateCodeBase="true"
  4340.        MSBuildRuntime="$(RegisterAssemblyMSBuildRuntime)"
  4341.        MSBuildArchitecture="$(RegisterAssemblyMSBuildArchitecture)"
  4342.        Condition="!Exists('@(_UnmanagedRegistrationCache)')"/>
  4343.  
  4344.    <ItemGroup>
  4345.      <FileWrites Include="@(_OutputPathItem->'%(FullPath)$(TargetName).tlb')"/>
  4346.    </ItemGroup>
  4347.  </Target>
  4348.  
  4349.  
  4350.  
  4351.  
  4352.  
  4353.  <!--
  4354.    ***********************************************************************************************
  4355.    ***********************************************************************************************
  4356.                                                                IncrementalClean Section
  4357.    ***********************************************************************************************
  4358.    ***********************************************************************************************
  4359.    -->
  4360.  
  4361.  <!--
  4362.    ============================================================
  4363.                                        IncrementalClean
  4364.  
  4365.    Remove files that were produced in a prior build but weren't produced in the current build.
  4366.     The reason is that if, for example, the name of the .exe has changed we want to delete the
  4367.     old copy.
  4368.  
  4369.     Leave the Clean cache file containing only the files produced in the current build.
  4370.     ============================================================
  4371.     -->
  4372.   <Target
  4373.        Name="IncrementalClean"
  4374.        DependsOnTargets="_CleanGetCurrentAndPriorFileWrites">
  4375.  
  4376.     <!-- Subtract list of files produced in prior builds from list of files produced in this build. -->
  4377.     <ItemGroup>
  4378.       <_CleanOrphanFileWrites Include="@(_CleanPriorFileWrites)" Exclude="@(_CleanCurrentFileWrites)"/>
  4379.     </ItemGroup>
  4380.  
  4381.     <!-- Find all files in the final output directory. -->
  4382.     <FindUnderPath Path="$(OutDir)" Files="@(_CleanOrphanFileWrites)">
  4383.       <Output TaskParameter="InPath" ItemName="_CleanOrphanFileWritesInOutput"/>
  4384.     </FindUnderPath>
  4385.  
  4386.     <!-- Find all files in the intermediate output directory. -->
  4387.     <FindUnderPath Path="$(IntermediateOutputPath)"    Files="@(_CleanOrphanFileWrites)">
  4388.       <Output TaskParameter="InPath" ItemName="_CleanOrphanFileWritesInIntermediate"/>
  4389.     </FindUnderPath>
  4390.  
  4391.     <!-- Delete the orphaned files. -->
  4392.     <Delete
  4393.         Files="@(_CleanOrphanFileWritesInIntermediate);@(_CleanOrphanFileWritesInOutput)"
  4394.         TreatErrorsAsWarnings="true">
  4395.  
  4396.       <Output TaskParameter="DeletedFiles" ItemName="_CleanOrphanFilesDeleted"/>
  4397.  
  4398.     </Delete>
  4399.  
  4400.     <!-- Create a list of everything that wasn't deleted or was outside
  4401.             the current final output and intermediate output directories. -->
  4402.    <ItemGroup>
  4403.      <_CleanRemainingFileWritesAfterIncrementalClean Include="@(_CleanPriorFileWrites);@(_CleanCurrentFileWrites)" Exclude="@(_CleanOrphanFilesDeleted)"/>
  4404.    </ItemGroup>
  4405.  
  4406.    <!-- Remove duplicates. -->
  4407.    <RemoveDuplicates Inputs="@(_CleanRemainingFileWritesAfterIncrementalClean)">
  4408.      <Output TaskParameter="Filtered" ItemName="_CleanUniqueRemainingFileWritesAfterIncrementalClean"/>
  4409.    </RemoveDuplicates>
  4410.  
  4411.    <!-- Write new list of current files back to disk, replacing the existing list.-->
  4412.    <WriteLinesToFile
  4413.        File="$(IntermediateOutputPath)$(CleanFile)"
  4414.        Lines="@(_CleanUniqueRemainingFileWritesAfterIncrementalClean)"
  4415.        Condition="'@(_CleanUnfilteredPriorFileWrites)'!='@(_CleanUniqueRemainingFileWritesAfterIncrementalClean)'"
  4416.        Overwrite="true"/>
  4417.  
  4418.  </Target>
  4419.  
  4420.  <!--
  4421.    ============================================================
  4422.                                        _CleanGetCurrentAndPriorFileWrites
  4423.  
  4424.    Get the list of files built in the current build and in prior builds.
  4425.    ============================================================
  4426.    -->
  4427.  <Target
  4428.       Name="_CleanGetCurrentAndPriorFileWrites"
  4429.       DependsOnTargets="_CheckForCompileOutputs;_SGenCheckForOutputs">
  4430.  
  4431.    <!-- Read the list of files produced by a prior builds from disk. -->
  4432.    <ReadLinesFromFile File="$(IntermediateOutputPath)$(CleanFile)">
  4433.      <Output TaskParameter="Lines" ItemName="_CleanUnfilteredPriorFileWrites"/>
  4434.    </ReadLinesFromFile>
  4435.  
  4436.    <!--
  4437.        Convert the list of references to the absolute paths so we can make valid comparisons
  4438.        across two lists
  4439.         -->
  4440.    <ConvertToAbsolutePath Paths="@(_ResolveAssemblyReferenceResolvedFiles)">
  4441.      <Output TaskParameter="AbsolutePaths" ItemName="_ResolveAssemblyReferenceResolvedFilesAbsolute"/>
  4442.    </ConvertToAbsolutePath>
  4443.  
  4444.    <!--
  4445.        Subtract any resolved assembly files from *prior* file writes because deleting
  4446.        these would break subsequent builds because the assemblies would be unresolvable.
  4447.         -->
  4448.    <ItemGroup>
  4449.      <_CleanPriorFileWrites Include="@(_CleanUnfilteredPriorFileWrites)" Exclude="@(_ResolveAssemblyReferenceResolvedFilesAbsolute)"/>
  4450.    </ItemGroup>
  4451.  
  4452.    <!--
  4453.        Of shareable files, keep only those that are in the project's directory.
  4454.         We never clean shareable files outside of the project directory because
  4455.         the build may be to a common output directory and other projects may need
  4456.         them.
  4457.  
  4458.         Only subtract the outputs from ResolveAssemblyReferences target because that's the
  4459.        only "Resolve" target that tries to resolve assemblies directly from the output
  4460.        directory.
  4461.        -->
  4462.    <FindUnderPath Path="$(MSBuildProjectDirectory)" Files="@(FileWritesShareable)" UpdateToAbsolutePaths="true">
  4463.      <Output TaskParameter="InPath" ItemName="FileWrites"/>
  4464.    </FindUnderPath>
  4465.  
  4466.    <!-- Find all files in the final output directory. -->
  4467.    <FindUnderPath Path="$(OutDir)" Files="@(FileWrites)" UpdateToAbsolutePaths="true">
  4468.      <Output TaskParameter="InPath" ItemName="_CleanCurrentFileWritesInOutput"/>
  4469.    </FindUnderPath>
  4470.  
  4471.    <!-- Find all files in the intermediate output directory. -->
  4472.    <FindUnderPath Path="$(IntermediateOutputPath)" Files="@(FileWrites)" UpdateToAbsolutePaths="true">
  4473.      <Output TaskParameter="InPath" ItemName="_CleanCurrentFileWritesInIntermediate"/>
  4474.    </FindUnderPath>
  4475.  
  4476.    <!--
  4477.        Subtract any resolved assembly files from *current* file writes because deleting
  4478.        these would break subsequent builds because the assemblies would be unresolvable.
  4479.  
  4480.        Only subtract the outputs from ResolveAssemblyReferences target because that's the
  4481.         only "Resolve" target that tries to resolve assemblies directly from the output
  4482.         directory.
  4483.          -->
  4484.     <ItemGroup>
  4485.       <_CleanCurrentFileWritesWithNoReferences Include="@(_CleanCurrentFileWritesInOutput);@(_CleanCurrentFileWritesInIntermediate)" Exclude="@(_ResolveAssemblyReferenceResolvedFilesAbsolute)"/>
  4486.     </ItemGroup>
  4487.  
  4488.     <!-- Remove duplicates from files produced in this build. -->
  4489.     <RemoveDuplicates Inputs="@(_CleanCurrentFileWritesWithNoReferences)" >
  4490.       <Output TaskParameter="Filtered" ItemName="_CleanCurrentFileWrites"/>
  4491.     </RemoveDuplicates>
  4492.  
  4493.   </Target>
  4494.  
  4495.   <!--
  4496.     ***********************************************************************************************
  4497.     ***********************************************************************************************
  4498.                                                                 Clean Section
  4499.     ***********************************************************************************************
  4500.     ***********************************************************************************************
  4501.     -->
  4502.  
  4503.   <!--
  4504.     ============================================================
  4505.                                         Clean
  4506.  
  4507.     Delete all intermediate and final build outputs.
  4508.     ============================================================
  4509.     -->
  4510.   <PropertyGroup>
  4511.     <CleanDependsOn>
  4512.       BeforeClean;
  4513.       UnmanagedUnregistration;
  4514.       CoreClean;
  4515.       CleanReferencedProjects;
  4516.       CleanPublishFolder;
  4517.       AfterClean
  4518.     </CleanDependsOn>
  4519.   </PropertyGroup>
  4520.   <Target
  4521.       Name="Clean"
  4522.       Condition=" '$(_InvalidConfigurationWarning)' != 'true' "
  4523.       DependsOnTargets="$(CleanDependsOn)" />
  4524.  
  4525.   <!--
  4526.     ============================================================
  4527.                                         BeforeClean
  4528.  
  4529.     Redefine this target in your project in order to run tasks just before Clean.
  4530.     ============================================================
  4531.     -->
  4532.   <Target Name="BeforeClean"/>
  4533.  
  4534.   <!--
  4535.     ============================================================
  4536.                                         AfterClean
  4537.  
  4538.     Redefine this target in your project in order to run tasks just after Clean.
  4539.     ============================================================
  4540.     -->
  4541.   <Target Name="AfterClean"/>
  4542.  
  4543.   <!--
  4544.     ============================================================
  4545.                                         CleanReferencedProjects
  4546.  
  4547.     Call Clean target on all Referenced Projects.
  4548.     ============================================================
  4549.     -->
  4550.   <Target
  4551.       Name="CleanReferencedProjects"
  4552.       DependsOnTargets="AssignProjectConfiguration; _SplitProjectReferencesByFileExistence">
  4553.  
  4554.     <!--
  4555.         When building the project directly from the command-line, clean those referenced projects
  4556.         that exist on disk.  For IDE builds and command-line .SLN builds, the solution build manager
  4557.         takes care of this.
  4558.         -->
  4559.     <MSBuild
  4560.         Projects="@(_MSBuildProjectReferenceExistent)"
  4561.         Targets="Clean"
  4562.         Properties="%(_MSBuildProjectReferenceExistent.SetConfiguration); %(_MSBuildProjectReferenceExistent.SetPlatform)"
  4563.         BuildInParallel="$(BuildInParallel)"
  4564.         Condition="'$(BuildingInsideVisualStudio)' != 'true' and '$(BuildProjectReferences)' == 'true' and '@(_MSBuildProjectReferenceExistent)' != ''"
  4565.         ContinueOnError="$(ContinueOnError)"
  4566.         RemoveProperties="%(_MSBuildProjectReferenceExistent.GlobalPropertiesToRemove)"/>
  4567.  
  4568.   </Target>
  4569.  
  4570.   <!--
  4571.     ============================================================
  4572.                                         CoreClean
  4573.     ============================================================
  4574.     -->
  4575.   <PropertyGroup>
  4576.     <CoreCleanDependsOn></CoreCleanDependsOn>
  4577.   </PropertyGroup>
  4578.   <Target
  4579.       Name="CoreClean"
  4580.       DependsOnTargets="$(CoreCleanDependsOn)">
  4581.  
  4582.     <!-- First clean any explicitly specified cleanable files.
  4583.              Declare items of this type if you want Clean to delete them. -->
  4584.     <Delete
  4585.         Files="@(Clean)"
  4586.         TreatErrorsAsWarnings="true"/>
  4587.  
  4588.     <!-- Read in list of files that were written to disk in past builds. -->
  4589.     <ReadLinesFromFile File="$(IntermediateOutputPath)$(CleanFile)">
  4590.       <Output TaskParameter="Lines" ItemName="_CleanPriorFileWrites"/>
  4591.     </ReadLinesFromFile>
  4592.  
  4593.     <!-- Find all files in the final output directory. -->
  4594.     <FindUnderPath Path="$(OutDir)" Files="@(_CleanPriorFileWrites)">
  4595.       <Output TaskParameter="InPath" ItemName="_CleanPriorFileWritesInOutput"/>
  4596.     </FindUnderPath>
  4597.  
  4598.     <!-- Find all files in the intermediate output directory. -->
  4599.     <FindUnderPath Path="$(IntermediateOutputPath)"    Files="@(_CleanPriorFileWrites)">
  4600.       <Output TaskParameter="InPath" ItemName="_CleanPriorFileWritesInIntermediate"/>
  4601.     </FindUnderPath>
  4602.  
  4603.     <!-- Delete those files. -->
  4604.     <Delete
  4605.         Files="@(_CleanPriorFileWritesInOutput);@(_CleanPriorFileWritesInIntermediate)"
  4606.         TreatErrorsAsWarnings="true">
  4607.  
  4608.       <Output TaskParameter="DeletedFiles" ItemName="_CleanPriorFileWritesDeleted"/>
  4609.  
  4610.     </Delete>
  4611.  
  4612.     <!-- Create a list of everything that wasn't deleted. -->
  4613.    <ItemGroup>
  4614.      <_CleanRemainingFileWritesAfterClean Include="@(_CleanPriorFileWrites)" Exclude="@(_CleanPriorFileWritesDeleted)"/>
  4615.    </ItemGroup>
  4616.  
  4617.    <!-- Remove duplicates. -->
  4618.    <RemoveDuplicates Inputs="@(_CleanRemainingFileWritesAfterClean)">
  4619.      <Output TaskParameter="Filtered" ItemName="_CleanUniqueRemainingFileWrites"/>
  4620.    </RemoveDuplicates>
  4621.  
  4622.    <!-- Make sure the directory exists. -->
  4623.    <MakeDir Directories="$(IntermediateOutputPath)"/>
  4624.  
  4625.    <!-- Write new list of current files back to disk. -->
  4626.    <WriteLinesToFile File="$(IntermediateOutputPath)$(CleanFile)" Lines="@(_CleanUniqueRemainingFileWrites)" Overwrite="true" />
  4627.  
  4628.  </Target>
  4629.  
  4630.  <!--
  4631.    ============================================================
  4632.                                        _CleanRecordFileWrites
  4633.  
  4634.    Save the list of all files written to disk so that it can be used for "Clean" later.
  4635.  
  4636.    Files written in prior builds are not removed from Clean cache.
  4637.    ============================================================
  4638.    -->
  4639.  <Target
  4640.       Name="_CleanRecordFileWrites"
  4641.       DependsOnTargets="_CleanGetCurrentAndPriorFileWrites">
  4642.  
  4643.    <!--
  4644.        Merge list of files from prior builds with the current build and then
  4645.        remove duplicates.
  4646.        -->
  4647.    <RemoveDuplicates Inputs="@(_CleanPriorFileWrites);@(_CleanCurrentFileWrites)">
  4648.      <Output TaskParameter="Filtered" ItemName="_CleanUniqueFileWrites"/>
  4649.    </RemoveDuplicates>
  4650.  
  4651.    <!-- Make sure the directory exists. -->
  4652.    <MakeDir Directories="$(IntermediateOutputPath)"/>
  4653.  
  4654.    <!-- Write merged file list back to disk, replacing existing contents. -->
  4655.    <WriteLinesToFile
  4656.        File="$(IntermediateOutputPath)$(CleanFile)"
  4657.        Lines="@(_CleanUniqueFileWrites)"
  4658.        Overwrite="true" />
  4659.  
  4660.  </Target>
  4661.  
  4662.  <!--
  4663.    ============================================================
  4664.                                        CleanPublishFolder
  4665.    ============================================================
  4666.    -->
  4667.  <Target
  4668.      Name="CleanPublishFolder">
  4669.  
  4670.    <RemoveDir
  4671.        Directories="$(PublishDir)"
  4672.        Condition="'$(PublishDir)'=='$(OutputPath)app.publish\' and Exists('$(PublishDir)')"/>
  4673.  
  4674.  </Target>
  4675.  
  4676.  
  4677.  
  4678.  
  4679.  <!--
  4680.    ***********************************************************************************************
  4681.    ***********************************************************************************************
  4682.                                                                PostBuildEvent Section
  4683.    ***********************************************************************************************
  4684.    ***********************************************************************************************
  4685.    -->
  4686.  
  4687.  <!--
  4688.    ============================================================
  4689.                                        PostBuildEvent
  4690.  
  4691.    Run the post-build event. This step is driven by two parameters:
  4692.  
  4693.    (1) The $(RunPostBuildEvent) property is set by the user through the IDE and can be one of four values.
  4694.  
  4695.        - OnBuildSuccess: In this case, every step of the build must succeed for the post-build step to run.
  4696.        - <Blank>: This is the same as OnBuildSuccess.
  4697.        - OnOutputUpdated: In this case, the post-build step will run only if the main output assembly was
  4698.        actually updated.
  4699.        - Always: The post-build step is always run.
  4700.  
  4701.    (2) The $(_AssemblyTimestampBeforeCompile) and $(_AssemblyTimestampAfterCompile) values are
  4702.        set by the _TimeStampBeforeCompile and _TimeStampAfterCompile targets.  If the assembly was actually
  4703.        rebuilt during this build, then the two values will be different.
  4704.    ============================================================
  4705.    -->
  4706.  <PropertyGroup>
  4707.    <PostBuildEventDependsOn></PostBuildEventDependsOn>
  4708.  </PropertyGroup>
  4709.  <Target
  4710.      Name="PostBuildEvent"
  4711.      Condition="'$(PostBuildEvent)' != '' and ('$(RunPostBuildEvent)' != 'OnOutputUpdated' or '$(_AssemblyTimestampBeforeCompile)' != '$(_AssemblyTimestampAfterCompile)')"
  4712.      DependsOnTargets="$(PostBuildEventDependsOn)">
  4713.  
  4714.    <Exec WorkingDirectory="$(OutDir)" Command="$(PostBuildEvent)" />
  4715.  
  4716.  </Target>
  4717.  
  4718.  
  4719.  
  4720.  
  4721.  <!--
  4722.    ***********************************************************************************************
  4723.    ***********************************************************************************************
  4724.                                                                Publish Section
  4725.    ***********************************************************************************************
  4726.    ***********************************************************************************************
  4727.    -->
  4728.  
  4729.  <!--
  4730.    ============================================================
  4731.                                        Publish
  4732.  
  4733.    This target is only called when doing ClickOnce publishing outside the IDE, which implicitly builds before publishing.
  4734.    ============================================================
  4735.    -->
  4736.  <PropertyGroup>
  4737.    <PublishDependsOn Condition="'$(PublishableProject)'=='true'">
  4738.      SetGenerateManifests;
  4739.      Build;
  4740.      PublishOnly
  4741.    </PublishDependsOn>
  4742.    <PublishDependsOn Condition="'$(PublishableProject)'!='true'">
  4743.      _DeploymentUnpublishable
  4744.    </PublishDependsOn>
  4745.  </PropertyGroup>
  4746.  <Target
  4747.      Name="Publish"
  4748.      DependsOnTargets="$(PublishDependsOn)"/>
  4749.  
  4750.  <!--
  4751.    ============================================================
  4752.                                        _DeploymentUnpublishable
  4753.  
  4754.    This target is used to block an attempt to ClickOnce publish a non-publishable project, such as a ClassLibrary, when building outside the IDE.
  4755.    ============================================================
  4756.    -->
  4757.  <Target
  4758.      Name="_DeploymentUnpublishable">
  4759.  
  4760.    <Message Text="Skipping unpublishable project."/>
  4761.  
  4762.  </Target>
  4763.  
  4764.  <!--
  4765.    ============================================================
  4766.                                        SetGenerateManifests
  4767.  
  4768.    This target simply assures the GenerateClickOnceManifests property is set whenever the publish target is invoked.
  4769.    ============================================================
  4770.    -->
  4771.  <Target
  4772.      Name="SetGenerateManifests">
  4773.  
  4774.    <Error Condition="'$(OutputType)'!='winexe' and '$(OutputType)'!='exe' and '$(OutputType)'!='appcontainerexe'" Text="Publish is only valid for 'Windows Application' or 'Console Application' project types."/>
  4775.    <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."/>
  4776.  
  4777.    <PropertyGroup>
  4778.      <GenerateClickOnceManifests>true</GenerateClickOnceManifests>
  4779.    </PropertyGroup>
  4780.  
  4781.  </Target>
  4782.  
  4783.  <!--
  4784.    ============================================================
  4785.                                        PublishOnly
  4786.  
  4787.    The "PublishOnly" target is intended for ClickOnce publishing inside the IDE, where the build has already been done
  4788.    by the BuildManager.
  4789.    ============================================================
  4790.    -->
  4791.  <PropertyGroup>
  4792.    <PublishOnlyDependsOn>
  4793.      SetGenerateManifests;
  4794.      PublishBuild;
  4795.      BeforePublish;
  4796.      GenerateManifests;
  4797.      CopyFilesToOutputDirectory;
  4798.      _CopyFilesToPublishFolder;
  4799.      _DeploymentGenerateBootstrapper;
  4800.      ResolveKeySource;
  4801.      _DeploymentSignClickOnceDeployment;
  4802.      AfterPublish
  4803.    </PublishOnlyDependsOn>
  4804.  </PropertyGroup>
  4805.  <Target
  4806.      Name="PublishOnly"
  4807.      DependsOnTargets="$(PublishOnlyDependsOn)"/>
  4808.  
  4809.  <!--
  4810.    ============================================================
  4811.                                        BeforePublish
  4812.  
  4813.    Redefine this target in your project in order to run tasks just before Publish.
  4814.    ============================================================
  4815.    -->
  4816.  <Target Name="BeforePublish"/>
  4817.  
  4818.  <!--
  4819.    ============================================================
  4820.                                        AfterPublish
  4821.  
  4822.    Redefine this target in your project in order to run tasks just after Publish.
  4823.    ============================================================
  4824.    -->
  4825.  <Target Name="AfterPublish"/>
  4826.  
  4827.  <!--
  4828.    ============================================================
  4829.                                        PublishBuild
  4830.  
  4831.    Defines the set of targets that publishing is directly dependent on.
  4832.    ============================================================
  4833.    -->
  4834.  <PropertyGroup>
  4835.    <PublishBuildDependsOn>
  4836.      BuildOnlySettings;
  4837.      PrepareForBuild;
  4838.      ResolveReferences;
  4839.      PrepareResources;
  4840.      ResolveKeySource;
  4841.      GenerateSerializationAssemblies;
  4842.      CreateSatelliteAssemblies;
  4843.    </PublishBuildDependsOn>
  4844.  </PropertyGroup>
  4845.  <Target
  4846.      Name="PublishBuild"
  4847.      DependsOnTargets="$(PublishBuildDependsOn)"/>
  4848.  
  4849.  <!--
  4850.    ============================================================
  4851.                                        _CopyFilesToPublishFolder
  4852.    ============================================================
  4853.    -->
  4854.  <Target
  4855.      Name="_CopyFilesToPublishFolder">
  4856.  
  4857.    <!-- Compute name of application folder, which includes the assembly name plus formatted application version.
  4858.             The application version is formatted to use "_" in place of "." chars (i.e. "1_0_0_0" instead of "1.0.0.0").
  4859.             This is done because some servers misinterpret "." as a file extension. -->
  4860.    <FormatVersion Version="$(ApplicationVersion)" Revision="$(ApplicationRevision)" FormatType="Path">
  4861.      <Output TaskParameter="OutputVersion" PropertyName="_DeploymentApplicationVersionFragment"/>
  4862.    </FormatVersion>
  4863.  
  4864.    <PropertyGroup>
  4865.      <_DeploymentApplicationFolderName>Application Files\$(AssemblyName)_$(_DeploymentApplicationVersionFragment)</_DeploymentApplicationFolderName>
  4866.      <_DeploymentApplicationDir>$(PublishDir)$(_DeploymentApplicationFolderName)\</_DeploymentApplicationDir>
  4867.    </PropertyGroup>
  4868.  
  4869.    <PropertyGroup>
  4870.      <!-- By default we're not using Hard Links to copy to the publish directory, and never when building in VS -->
  4871.       <CreateHardLinksForPublishFilesIfPossible Condition="'$(BuildingInsideVisualStudio)' == 'true' or '$(CreateHardLinksForPublishFilesIfPossible)' == ''">false</CreateHardLinksForPublishFilesIfPossible>
  4872.     </PropertyGroup>
  4873.  
  4874.     <!-- Copy files to publish folder -->
  4875.     <Copy
  4876.         SourceFiles=
  4877.                 "@(_ApplicationManifestFinal);
  4878.                @(_DeploymentResolvedManifestEntryPoint);
  4879.                @(_DeploymentManifestFiles);
  4880.                @(ReferenceComWrappersToCopyLocal);
  4881.                @(ResolvedIsolatedComModules);
  4882.                @(_DeploymentLooseManifestFile)"
  4883.         DestinationFiles=
  4884.                 "@(_ApplicationManifestFinal->'$(_DeploymentApplicationDir)%(TargetPath)');
  4885.                @(_DeploymentManifestEntryPoint->'$(_DeploymentApplicationDir)%(TargetPath)$(_DeploymentFileMappingExtension)');
  4886.                @(_DeploymentManifestFiles->'$(_DeploymentApplicationDir)%(TargetPath)$(_DeploymentFileMappingExtension)');
  4887.                @(ReferenceComWrappersToCopyLocal->'$(_DeploymentApplicationDir)%(FileName)%(Extension)$(_DeploymentFileMappingExtension)');
  4888.                @(ResolvedIsolatedComModules->'$(_DeploymentApplicationDir)%(FileName)%(Extension)$(_DeploymentFileMappingExtension)');
  4889.                @(_DeploymentLooseManifestFile->'$(_DeploymentApplicationDir)%(FileName)%(Extension)$(_DeploymentFileMappingExtension)')"
  4890.         SkipUnchangedFiles="$(SkipCopyUnchangedFiles)"
  4891.         OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)"
  4892.         Retries="$(CopyRetryCount)"
  4893.         UseHardlinksIfPossible="$(CreateHardLinksForPublishFilesIfPossible)"
  4894.         RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"/>
  4895.  
  4896.     <Copy
  4897.         SourceFiles="@(_DeploymentManifestDependencies)"
  4898.         DestinationFiles="@(_DeploymentManifestDependencies->'$(_DeploymentApplicationDir)%(TargetPath)$(_DeploymentFileMappingExtension)')"
  4899.         SkipUnchangedFiles="$(SkipCopyUnchangedFiles)"
  4900.         OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)"
  4901.         Retries="$(CopyRetryCount)"
  4902.         RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"
  4903.         UseHardlinksIfPossible="$(CreateHardLinksForPublishFilesIfPossible)"
  4904.         Condition="'%(_DeploymentManifestDependencies.DependencyType)'=='Install'"/>
  4905.  
  4906.     <Copy
  4907.         SourceFiles="@(_ReferenceScatterPaths)"
  4908.         DestinationFiles="@(_ReferenceScatterPaths->'$(_DeploymentApplicationDir)%(Filename)%(Extension)$(_DeploymentFileMappingExtension)')"
  4909.         SkipUnchangedFiles="$(SkipCopyUnchangedFiles)"
  4910.         OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)"
  4911.         Retries="$(CopyRetryCount)"
  4912.         RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"
  4913.         UseHardlinksIfPossible="$(CreateHardLinksForPublishFilesIfPossible)"
  4914.             />
  4915.  
  4916.     <FormatUrl InputUrl="$(_DeploymentApplicationUrl)">
  4917.       <Output TaskParameter="OutputUrl" PropertyName="_DeploymentFormattedApplicationUrl"/>
  4918.     </FormatUrl>
  4919.  
  4920.     <FormatUrl InputUrl="$(_DeploymentComponentsUrl)">
  4921.       <Output TaskParameter="OutputUrl" PropertyName="_DeploymentFormattedComponentsUrl"/>
  4922.     </FormatUrl>
  4923.  
  4924.   </Target>
  4925.  
  4926.   <!--
  4927.     ============================================================
  4928.                                         _DeploymentGenerateBootstrapper
  4929.     ============================================================
  4930.     -->
  4931.   <Target
  4932.       Name="_DeploymentGenerateBootstrapper">
  4933.  
  4934.     <!-- Build setup.exe bootstrapper and copy referenced packages -->
  4935.     <GenerateBootstrapper
  4936.         ApplicationFile="$(TargetDeployManifestFileName)"
  4937.         ApplicationName="$(AssemblyName)"
  4938.         ApplicationUrl="$(_DeploymentFormattedApplicationUrl)"
  4939.         BootstrapperItems="@(BootstrapperPackage)"
  4940.         ComponentsLocation="$(BootstrapperComponentsLocation)"
  4941.         ComponentsUrl="$(_DeploymentFormattedComponentsUrl)"
  4942.         Culture="$(TargetCulture)"
  4943.         FallbackCulture="$(FallbackCulture)"
  4944.         OutputPath="$(PublishDir)"
  4945.         SupportUrl="$(_DeploymentFormattedSupportUrl)"
  4946.         Path="$(GenerateBootstrapperSdkPath)"
  4947.         VisualStudioVersion="$(VisualStudioVersion)"
  4948.         Condition="'$(BootstrapperEnabled)'=='true'"/>
  4949.  
  4950.   </Target>
  4951.  
  4952.   <!--
  4953.     ============================================================
  4954.                                         _DeploymentSignClickOnceDeployment
  4955.     ============================================================
  4956.     -->
  4957.   <Target
  4958.       Name="_DeploymentSignClickOnceDeployment">
  4959.    
  4960.     <!-- Sign manifests and the bootstrapper -->
  4961.     <SignFile
  4962.         CertificateThumbprint="$(_DeploymentResolvedManifestCertificateThumbprint)"
  4963.         TimestampUrl="$(ManifestTimestampUrl)"
  4964.         SigningTarget="$(_DeploymentApplicationDir)$(_DeploymentTargetApplicationManifestFileName)"
  4965.         TargetFrameworkVersion="$(TargetFrameworkVersion)"
  4966.         Condition="'$(_DeploymentSignClickOnceManifests)'=='true'" />
  4967.  
  4968.     <!-- Update entry point path in deploy manifest -->
  4969.     <UpdateManifest
  4970.         ApplicationPath="$(_DeploymentApplicationFolderName)\$(_DeploymentTargetApplicationManifestFileName)"
  4971.         TargetFrameworkVersion="$(TargetFrameworkVersion)"
  4972.         ApplicationManifest="$(_DeploymentApplicationDir)$(_DeploymentTargetApplicationManifestFileName)"
  4973.         InputManifest="$(OutDir)$(TargetDeployManifestFileName)"
  4974.         OutputManifest="$(PublishDir)$(TargetDeployManifestFileName)">
  4975.  
  4976.       <Output TaskParameter="OutputManifest" ItemName="PublishedDeployManifest"/>
  4977.  
  4978.     </UpdateManifest>
  4979.  
  4980.     <SignFile
  4981.         CertificateThumbprint="$(_DeploymentResolvedManifestCertificateThumbprint)"
  4982.         TimestampUrl="$(ManifestTimestampUrl)"
  4983.         SigningTarget="$(PublishDir)$(TargetDeployManifestFileName)"
  4984.         TargetFrameworkVersion="$(TargetFrameworkVersion)"
  4985.         Condition="'$(_DeploymentSignClickOnceManifests)'=='true'" />
  4986.  
  4987.     <SignFile
  4988.         CertificateThumbprint="$(_DeploymentResolvedManifestCertificateThumbprint)"
  4989.         TimestampUrl="$(ManifestTimestampUrl)"
  4990.         SigningTarget="$(PublishDir)\setup.exe"
  4991.         Condition="'$(BootstrapperEnabled)'=='true' and '$(_DeploymentSignClickOnceManifests)'=='true'" />
  4992.  
  4993.  
  4994.   </Target>
  4995.  
  4996.  
  4997.  
  4998.  
  4999.   <!--
  5000.     ***********************************************************************************************
  5001.     ***********************************************************************************************
  5002.                                                                 AllProjectOutputGroups Section
  5003.     ***********************************************************************************************
  5004.     ***********************************************************************************************
  5005.     -->
  5006.  
  5007.   <!--
  5008.     ============================================================
  5009.                                         AllProjectOutputGroups
  5010.  
  5011.     The targets below drive output groups, which provide generic information about a
  5012.     project's inputs (e.g., content files, compilation sources, etc.) and built outputs
  5013.    (e.g., built EXE/DLL, PDB, XML documentation files, etc.)
  5014.  
  5015.    Each target may produce two kinds of items:  outputs and dependencies.  Outputs are
  5016.    items from the current project; dependencies are items that are brought into the
  5017.    current project as a result of referencing other projects or components.
  5018.  
  5019.    For both outputs and dependencies, the Include attribute
  5020.    specifies the location of the output/dependency; it must be a full path.  Any number
  5021.    of additional attributes may be placed on an output/dependency item.
  5022.    ============================================================
  5023.    -->
  5024.  <Target
  5025.      Name="AllProjectOutputGroups"
  5026.      DependsOnTargets="
  5027.            BuiltProjectOutputGroup;
  5028.            DebugSymbolsProjectOutputGroup;
  5029.            DocumentationProjectOutputGroup;
  5030.            SatelliteDllsProjectOutputGroup;
  5031.            SourceFilesProjectOutputGroup;
  5032.            ContentFilesProjectOutputGroup;
  5033.            SGenFilesOutputGroup"/>
  5034.  
  5035.  <!--
  5036.    This is the key output for the BuiltProjectOutputGroup and is meant to be read directly from the IDE.
  5037.    Reading an item is faster than invoking a target.
  5038.    -->
  5039.  <ItemGroup Condition=" '$(OutputType)' != 'winmdobj' ">
  5040.    <BuiltProjectOutputGroupKeyOutput Include="@(IntermediateAssembly->'%(FullPath)')">
  5041.      <IsKeyOutput>true</IsKeyOutput>
  5042.      <FinalOutputPath>$(TargetPath)</FinalOutputPath>
  5043.      <TargetPath>$(TargetFileName)</TargetPath>
  5044.      <COM2REG Condition="'$(RegisterForComInterop)'=='true' and '$(OutputType)'=='library'">true</COM2REG>
  5045.    </BuiltProjectOutputGroupKeyOutput>
  5046.  </ItemGroup>
  5047.  
  5048.  <ItemGroup Condition=" '$(OutputType)' == 'winmdobj' ">
  5049.    <WinMDExpOutputWindowsMetadataFileItem Include="$(_IntermediateWindowsMetadataPath)" Condition="'$(_IntermediateWindowsMetadataPath)' != ''" />
  5050.    <BuiltProjectOutputGroupKeyOutput Include="@(WinMDExpOutputWindowsMetadataFileItem->'%(FullPath)')">
  5051.      <IsKeyOutput>true</IsKeyOutput>
  5052.      <FinalOutputPath>$(TargetPath)</FinalOutputPath>
  5053.      <TargetPath>$(TargetFileName)</TargetPath>
  5054.    </BuiltProjectOutputGroupKeyOutput>
  5055.  </ItemGroup>
  5056.  
  5057.  <!--
  5058.    ============================================================
  5059.                                        BuiltProjectOutputGroup
  5060.    ============================================================
  5061.    -->
  5062.  <PropertyGroup>
  5063.    <BuiltProjectOutputGroupDependsOn>PrepareForBuild</BuiltProjectOutputGroupDependsOn>
  5064.    <AddAppConfigToBuildOutputs Condition="('$(AddAppConfigToBuildOutputs)'=='') and ('$(OutputType)'!='library' and '$(OutputType)'!='winmdobj')">true</AddAppConfigToBuildOutputs>
  5065.  </PropertyGroup>
  5066.  <Target
  5067.      Name="BuiltProjectOutputGroup"
  5068.      Returns="@(BuiltProjectOutputGroupOutput)"
  5069.      DependsOnTargets="$(BuiltProjectOutputGroupDependsOn)">
  5070.  
  5071.    <ItemGroup>
  5072.      <_BuiltProjectOutputGroupOutputIntermediate Include="@(BuiltProjectOutputGroupKeyOutput)"/>
  5073.    </ItemGroup>
  5074.  
  5075.    <!-- This item represents the app.config file -->
  5076.    <ItemGroup>
  5077.      <_BuiltProjectOutputGroupOutputIntermediate Include="$(AppConfig)"  Condition="'$(AddAppConfigToBuildOutputs)'=='true'">
  5078.        <FinalOutputPath>$(TargetDir)$(TargetFileName).config</FinalOutputPath>
  5079.        <TargetPath>$(TargetFileName).config</TargetPath>
  5080.        <!-- For compatibility with 2.0 -->
  5081.        <OriginalItemSpec>$(AppConfig)</OriginalItemSpec>
  5082.      </_BuiltProjectOutputGroupOutputIntermediate>
  5083.    </ItemGroup>
  5084.  
  5085.    <ItemGroup>
  5086.      <_IsolatedComReference Include="@(COMReference)" Condition=" '%(COMReference.Isolated)' == 'true' "/>
  5087.      <_IsolatedComReference Include="@(COMFileReference)" Condition=" '%(COMFileReference.Isolated)' == 'true' "/>
  5088.    </ItemGroup>
  5089.  
  5090.    <!-- This item represents the native manifest, example: WindowsApplication1.exe.manifest or Native.ClassLibrary1.manifest -->
  5091.    <ItemGroup>
  5092.      <_BuiltProjectOutputGroupOutputIntermediate Include="$(OutDir)$(_DeploymentTargetApplicationManifestFileName)" Condition="'@(NativeReference)'!='' or '@(_IsolatedComReference)'!=''">
  5093.        <TargetPath>$(_DeploymentTargetApplicationManifestFileName)</TargetPath>
  5094.        <!-- For compatibility with 2.0 -->
  5095.        <OriginalItemSpec>$(OutDir)$(_DeploymentTargetApplicationManifestFileName)</OriginalItemSpec>
  5096.      </_BuiltProjectOutputGroupOutputIntermediate>
  5097.    </ItemGroup>
  5098.  
  5099.    <!-- Convert intermediate items into final items; this way we can get the full path for each item -->
  5100.    <ItemGroup>
  5101.      <BuiltProjectOutputGroupOutput Include="@(_BuiltProjectOutputGroupOutputIntermediate->'%(FullPath)')">
  5102.        <!-- For compatibility with 2.0 -->
  5103.        <OriginalItemSpec Condition="'%(_BuiltProjectOutputGroupOutputIntermediate.OriginalItemSpec)' == ''">%(_BuiltProjectOutputGroupOutputIntermediate.FullPath)</OriginalItemSpec>
  5104.      </BuiltProjectOutputGroupOutput>
  5105.    </ItemGroup>
  5106.  
  5107.  </Target>
  5108.  
  5109.  <!--
  5110.    ============================================================
  5111.                                        DebugSymbolsProjectOutputGroup
  5112.  
  5113.    This target performs population of the Debug Symbols project output group.
  5114.    ============================================================
  5115.    -->
  5116.  <PropertyGroup>
  5117.    <DebugSymbolsProjectOutputGroupDependsOn></DebugSymbolsProjectOutputGroupDependsOn>
  5118.  </PropertyGroup>
  5119.  <ItemGroup Condition="'$(_DebugSymbolsProduced)' != 'false' and '$(OutputType)' != 'winmdobj'">
  5120.    <DebugSymbolsProjectOutputGroupOutput Include="@(_DebugSymbolsIntermediatePath->'%(FullPath)')">
  5121.      <FinalOutputPath>@(_DebugSymbolsOutputPath->'%(FullPath)')</FinalOutputPath>
  5122.      <TargetPath>@(_DebugSymbolsIntermediatePath->'%(Filename)%(Extension)')</TargetPath>
  5123.    </DebugSymbolsProjectOutputGroupOutput>
  5124.  </ItemGroup>
  5125.  <ItemGroup Condition="'$(_DebugSymbolsProduced)' != 'false' and '$(OutputType)' == 'winmdobj'">
  5126.    <WinMDExpOutputPdbItem Include="$(WinMDExpOutputPdb)" Condition="'$(WinMDExpOutputPdb)' != ''" />
  5127.    <WinMDExpFinalOutputPdbItem Include="$(_WinMDDebugSymbolsOutputPath)" Condition="'$(_WinMDDebugSymbolsOutputPath)' != ''" />
  5128.    <DebugSymbolsProjectOutputGroupOutput Include="@(WinMDExpOutputPdbItem->'%(FullPath)')">
  5129.      <FinalOutputPath>@(WinMDExpFinalOutputPdbItem->'%(FullPath)')</FinalOutputPath>
  5130.      <TargetPath>@(WinMDExpOutputPdbItem->'%(Filename)%(Extension)')</TargetPath>
  5131.    </DebugSymbolsProjectOutputGroupOutput>
  5132.  </ItemGroup>
  5133.  <Target
  5134.      Name="DebugSymbolsProjectOutputGroup"
  5135.      Returns="@(DebugSymbolsProjectOutputGroupOutput)"
  5136.      DependsOnTargets="$(DebugSymbolsProjectOutputGroupDependsOn)"/>
  5137.  
  5138.  <!--
  5139.    ============================================================
  5140.                                        DocumentationProjectOutputGroup
  5141.  
  5142.    This target performs population of the Documentation project output group.
  5143.    ============================================================
  5144.    -->
  5145.  <PropertyGroup>
  5146.    <DocumentationProjectOutputGroupDependsOn></DocumentationProjectOutputGroupDependsOn>
  5147.  </PropertyGroup>
  5148.  <ItemGroup Condition="'$(DocumentationFile)'!='' and '$(OutputType)' != 'winmdobj'">
  5149.    <DocumentationProjectOutputGroupOutput Include="@(DocFileItem->'%(FullPath)')">
  5150.      <FinalOutputPath>@(FinalDocFile)</FinalOutputPath>
  5151.      <IsKeyOutput>true</IsKeyOutput>
  5152.      <TargetPath>@(DocFileItem->'%(Filename)%(Extension)')</TargetPath>
  5153.    </DocumentationProjectOutputGroupOutput>
  5154.  </ItemGroup>
  5155.  <ItemGroup Condition="'$(DocumentationFile)' != '' and '$(OutputType)' == 'winmdobj'">
  5156.    <WinMDOutputDocumentationFileItem Include="$(WinMDOutputDocumentationFile)" Condition="'$(WinMDOutputDocumentationFile)' != ''" />
  5157.    <WinMDExpFinalOutputDocItem Include="$(_WinMDDocFileOutputPath)" Condition="'$(_WinMDDocFileOutputPath)' != ''" />
  5158.    <DocumentationProjectOutputGroupOutput Include="@(WinMDOutputDocumentationFileItem->'%(FullPath)')">
  5159.      <FinalOutputPath>@(WinMDExpFinalOutputDocItem->'%(FullPath)')</FinalOutputPath>
  5160.      <TargetPath>@(WinMDOutputDocumentationFileItem->'%(Filename)%(Extension)')</TargetPath>
  5161.    </DocumentationProjectOutputGroupOutput>
  5162.  </ItemGroup>
  5163.  <Target
  5164.      Name="DocumentationProjectOutputGroup"
  5165.      Returns="@(DocumentationProjectOutputGroupOutput)"
  5166.      DependsOnTargets="$(DocumentationProjectOutputGroupDependsOn)"/>
  5167.  
  5168.  <!--
  5169.    ============================================================
  5170.                                        SatelliteDllsProjectOutputGroup
  5171.  
  5172.    This target performs population of the Satellite Files project output group.
  5173.    ============================================================
  5174.    -->
  5175.  <PropertyGroup>
  5176.    <SatelliteDllsProjectOutputGroupDependsOn>PrepareForBuild;PrepareResourceNames</SatelliteDllsProjectOutputGroupDependsOn>
  5177.  </PropertyGroup>
  5178.  <Target
  5179.      Name="SatelliteDllsProjectOutputGroup"
  5180.      Returns="@(SatelliteDllsProjectOutputGroupOutput)"
  5181.      DependsOnTargets="$(SatelliteDllsProjectOutputGroupDependsOn)">
  5182.  
  5183.    <ItemGroup>
  5184.      <SatelliteDllsProjectOutputGroupOutputIntermediate Include="$(IntermediateOutputPath)%(EmbeddedResource.Culture)\$(TargetName).resources.dll"
  5185.                                                         Condition="'%(WithCulture)' == 'true'">
  5186.        <TargetPath>%(EmbeddedResource.Culture)\$(TargetName).resources.dll</TargetPath>
  5187.      </SatelliteDllsProjectOutputGroupOutputIntermediate>
  5188.    </ItemGroup>
  5189.  
  5190.    <!-- Convert intermediate items into final items; this way we can get the full path for each item. -->
  5191.    <ItemGroup>
  5192.      <SatelliteDllsProjectOutputGroupOutput Include="@(SatelliteDllsProjectOutputGroupOutputIntermediate->'%(FullPath)')">
  5193.        <!-- For compatibility with 2.0 -->
  5194.        <OriginalItemSpec>%(SatelliteDllsProjectOutputGroupOutputIntermediate.Identity)</OriginalItemSpec>
  5195.      </SatelliteDllsProjectOutputGroupOutput>
  5196.    </ItemGroup>
  5197.  
  5198.  </Target>
  5199.  
  5200.  <!--
  5201.    ============================================================
  5202.                                        SourceFilesProjectOutputGroup
  5203.  
  5204.    This target performs population of the Source Files project output group.
  5205.    Source files are items in the project whose type is "Compile" and "EmbeddedResource".
  5206.    ============================================================
  5207.    -->
  5208.  <PropertyGroup>
  5209.    <SourceFilesProjectOutputGroupDependsOn>PrepareForBuild;AssignTargetPaths</SourceFilesProjectOutputGroupDependsOn>
  5210.  </PropertyGroup>
  5211.  <Target
  5212.      Name="SourceFilesProjectOutputGroup"
  5213.      Returns="@(SourceFilesProjectOutputGroupOutput)"
  5214.      DependsOnTargets="$(SourceFilesProjectOutputGroupDependsOn)">
  5215.  
  5216.    <AssignTargetPath Files="@(Compile)" RootFolder="$(MSBuildProjectDirectory)">
  5217.      <Output TaskParameter="AssignedFiles" ItemName="_CompileWithTargetPath" />
  5218.    </AssignTargetPath>
  5219.  
  5220.    <ItemGroup>
  5221.      <!-- First we deal with Compile, EmbeddedResource and AppConfig -->
  5222.      <SourceFilesProjectOutputGroupOutput Include="@(_CompileWithTargetPath->'%(FullPath)');@(EmbeddedResource->'%(FullPath)');@(_LicxFile->'%(FullPath)');@(AppConfigWithTargetPath->'%(FullPath)')"/>
  5223.  
  5224.      <!-- Include the project file -->
  5225.      <SourceFilesProjectOutputGroupOutput Include="$(MSBuildProjectFullPath)">
  5226.        <!-- For compatibility with 2.0 -->
  5227.        <OriginalItemSpec>$(MSBuildProjectFullPath)</OriginalItemSpec>
  5228.        <TargetPath>$(ProjectFileName)</TargetPath>
  5229.      </SourceFilesProjectOutputGroupOutput>
  5230.    </ItemGroup>
  5231.  
  5232.  </Target>
  5233.  
  5234.  <!-- Get just the compile items -->
  5235.  <Target Name="GetCompile" Returns="@(Compile)"/>
  5236.  
  5237.  <!--
  5238.    ============================================================
  5239.                                        ContentFilesProjectOutputGroup
  5240.  
  5241.    This target performs population of the Content Files project output group.
  5242.    Content files are items in the project whose type is "Content".
  5243.    ============================================================
  5244.    -->
  5245.  <PropertyGroup>
  5246.    <ContentFilesProjectOutputGroupDependsOn>PrepareForBuild;AssignTargetPaths</ContentFilesProjectOutputGroupDependsOn>
  5247.  </PropertyGroup>
  5248.  <Target
  5249.      Name="ContentFilesProjectOutputGroup"
  5250.      Returns="@(ContentFilesProjectOutputGroupOutput)"
  5251.      DependsOnTargets="$(ContentFilesProjectOutputGroupDependsOn)">
  5252.  
  5253.    <!-- Convert items into final items; this way we can get the full path for each item. -->
  5254.    <ItemGroup>
  5255.      <ContentFilesProjectOutputGroupOutput Include="@(ContentWithTargetPath->'%(FullPath)')"/>
  5256.    </ItemGroup>
  5257.  
  5258.  </Target>
  5259.  
  5260.  <!--
  5261.    ============================================================
  5262.                                        SGenFilesOutputGroup
  5263.  
  5264.    This target performs population of the GenerateSerializationAssemblies Files project output group.
  5265.    GenerateSerializationAssemblies files are those generated by the GenerateSerializationAssemblies target and task.
  5266.    ============================================================
  5267.    -->
  5268.  <PropertyGroup>
  5269.    <SGenFilesOutputGroupDependsOn></SGenFilesOutputGroupDependsOn>
  5270.  </PropertyGroup>
  5271.  <ItemGroup
  5272.      Condition="'$(_SGenGenerateSerializationAssembliesConfig)' == 'On' or ('@(WebReferenceUrl)'!='' and '$(_SGenGenerateSerializationAssembliesConfig)' == 'Auto')">
  5273.    <SGenFilesOutputGroupOutput Include="@(_OutputPathItem->'%(FullPath)$(_SGenDllName)')">
  5274.      <FinalOutputPath>@(_OutputPathItem->'%(FullPath)$(_SGenDllName)')</FinalOutputPath>
  5275.      <TargetPath>$(_SGenDllName)</TargetPath>
  5276.    </SGenFilesOutputGroupOutput>
  5277.  </ItemGroup>
  5278.  <Target
  5279.      Name="SGenFilesOutputGroup"
  5280.      Returns="@(SGenFilesOutputGroupOutput)"
  5281.      DependsOnTargets="$(SGenFilesOutputGroupDependsOn)"/>
  5282.  
  5283.  <!--
  5284.    ============================================================
  5285.                                        SDKRelated Output groups
  5286.  
  5287.    These targets are to gather information from the SDKs.
  5288.    ============================================================
  5289.   -->
  5290.  <!-- Get the resolved SDK reference items -->
  5291.  <Target Name="GetResolvedSDKReferences" DependsOnTargets="ResolveSDKReferences" Returns="@(ResolvedSDKReference)"/>
  5292.  
  5293.  <!--
  5294.    ============================================================
  5295.                                        PriFilesOutputGroup
  5296.  
  5297.    This target performs population of the pri files output group
  5298.    ============================================================
  5299.    -->
  5300.  <Target
  5301.      Name="PriFilesOutputGroup"
  5302.      Condition="'@(_ReferenceRelatedPaths)' != ''"
  5303.      DependsOnTargets="BuildOnlySettings;PrepareForBuild;AssignTargetPaths;ResolveReferences"
  5304.      Returns="@(PriFilesOutputGroupOutput)">
  5305.  
  5306.    <!-- This item represents dependent pri file's -->
  5307.     <ItemGroup>
  5308.       <PriFilesOutputGroupOutput Include="@(_ReferenceRelatedPaths->'%(FullPath)')" Condition="'%(Extension)' == '.pri'"/>
  5309.     </ItemGroup>
  5310.  
  5311.   </Target>
  5312.  
  5313.   <PropertyGroup>
  5314.     <SDKRedistOutputGroupDependsOn>ResolveSDKReferences;ExpandSDKReferences</SDKRedistOutputGroupDependsOn>
  5315.   </PropertyGroup>
  5316.  
  5317.   <!--
  5318.     ============================================================
  5319.                                         SDKRedistOutputGroup
  5320.  
  5321.     This target gathers the Redist folders from the SDKs which have been resolved.
  5322.     ============================================================
  5323.   -->
  5324.   <Target
  5325.       Name="SDKRedistOutputGroup"
  5326.       Returns="@(SDKRedistOutputGroupOutput)"
  5327.       DependsOnTargets="$(SDKRedistOutputGroupDependsOn)">
  5328.  
  5329.        <!-- This list starts with the least specific files to the most specific so that later files can overwrite earlier files-->
  5330.     <ItemGroup>
  5331.       <SDKRedistOutputGroupOutput Include="@(ResolvedRedistFiles)"/>
  5332.     </ItemGroup>
  5333.   </Target>
  5334.  
  5335.   <!--
  5336.     ***********************************************************************************************
  5337.     ***********************************************************************************************
  5338.                                                                 AllProjectOutputGroupsDependencies Section
  5339.     ***********************************************************************************************
  5340.     ***********************************************************************************************
  5341.     -->
  5342.  
  5343.   <!--
  5344.     ============================================================
  5345.                                         AllProjectOutputGroupsDependencies
  5346.     ============================================================
  5347.     -->
  5348.   <Target
  5349.       Name="AllProjectOutputGroupsDependencies"
  5350.       DependsOnTargets="
  5351.            BuiltProjectOutputGroupDependencies;
  5352.            DebugSymbolsProjectOutputGroupDependencies;
  5353.            SatelliteDllsProjectOutputGroupDependencies;
  5354.            DocumentationProjectOutputGroupDependencies;
  5355.            SGenFilesOutputGroupDependencies"/>
  5356.  
  5357.   <!--
  5358.     ============================================================
  5359.                                         BuiltProjectOutputGroupDependencies
  5360.  
  5361.     This target performs population of the Built project output group dependencies.
  5362.     ============================================================
  5363.     -->
  5364.   <Target
  5365.       Name="BuiltProjectOutputGroupDependencies"
  5366.       DependsOnTargets="BuildOnlySettings;PrepareForBuild;AssignTargetPaths;ResolveReferences"
  5367.       Returns="@(BuiltProjectOutputGroupDependency)">
  5368.  
  5369.     <ItemGroup>
  5370.       <BuiltProjectOutputGroupDependency  Include="@(ReferencePath->'%(FullPath)');
  5371.                                                         @(ReferenceDependencyPaths->'%(FullPath)');
  5372.                                                         @(NativeReferenceFile->'%(FullPath)');
  5373.                                                         @(_DeploymentLooseManifestFile->'%(FullPath)');
  5374.                                                         @(ResolvedIsolatedComModules->'%(FullPath)')"/>
  5375.     </ItemGroup>
  5376.  
  5377.   </Target>
  5378.  
  5379.   <!--
  5380.     ============================================================
  5381.                                         DebugSymbolsProjectOutputGroupDependencies
  5382.  
  5383.     This target performs population of the dependencies for the debug symbols project output group.
  5384.     ============================================================
  5385.     -->
  5386.   <Target
  5387.       Name="DebugSymbolsProjectOutputGroupDependencies"
  5388.       Condition="'$(DebugSymbols)'!='false'"
  5389.       DependsOnTargets="BuildOnlySettings;PrepareForBuild;AssignTargetPaths;ResolveReferences"
  5390.       Returns="@(DebugSymbolsProjectOutputGroupDependency)">
  5391.  
  5392.     <!-- This item represents dependent PDB's -->
  5393.    <ItemGroup>
  5394.      <DebugSymbolsProjectOutputGroupDependency Include="@(_ReferenceRelatedPaths->'%(FullPath)')" Condition="'%(Extension)' == '.pdb'"/>
  5395.    </ItemGroup>
  5396.  
  5397.  </Target>
  5398.  
  5399.  <!--
  5400.    ============================================================
  5401.                                        SatelliteDllsProjectOutputGroupDependencies
  5402.  
  5403.    This target performs population of the dependencies for the satellite files project output group.
  5404.    ============================================================
  5405.    -->
  5406.  <Target
  5407.      Name="SatelliteDllsProjectOutputGroupDependencies"
  5408.      DependsOnTargets="BuildOnlySettings;PrepareForBuild;AssignTargetPaths;ResolveReferences"
  5409.      Returns="@(SatelliteDllsProjectOutputGroupDependency)">
  5410.  
  5411.    <!-- This item represents dependent satellites -->
  5412.    <ItemGroup>
  5413.      <SatelliteDllsProjectOutputGroupDependency Include="@(ReferenceSatellitePaths->'%(FullPath)')"/>
  5414.    </ItemGroup>
  5415.  
  5416.  </Target>
  5417.  
  5418.  <!--
  5419.    ============================================================
  5420.                                        DocumentationProjectOutputGroupDependencies
  5421.  
  5422.    This target performs population of the dependencies for the documentation project output group.
  5423.    ============================================================
  5424.    -->
  5425.  <Target
  5426.      Name="DocumentationProjectOutputGroupDependencies"
  5427.      Condition="'$(DocumentationFile)'!=''"
  5428.      DependsOnTargets="BuildOnlySettings;PrepareForBuild;AssignTargetPaths;ResolveReferences"
  5429.      Returns="@(DocumentationProjectOutputGroupDependency)">
  5430.  
  5431.    <!-- This item represents dependent XMLs -->
  5432.    <ItemGroup>
  5433.      <DocumentationProjectOutputGroupDependency Include="@(_ReferenceRelatedPaths->'%(FullPath)')" Condition="'%(Extension)' == '.xml'"/>
  5434.    </ItemGroup>
  5435.  
  5436.  </Target>
  5437.  
  5438.  <!--
  5439.    ============================================================
  5440.                                        SGenFilesOutputGroupDependencies
  5441.  
  5442.    This target performs population of the dependencies for the GenerateSerializationAssemblies project output group.
  5443.    ============================================================
  5444.    -->
  5445.  <Target
  5446.      Name="SGenFilesOutputGroupDependencies"
  5447.      DependsOnTargets="BuildOnlySettings;PrepareForBuild;AssignTargetPaths;ResolveReferences"
  5448.      Returns="@(SGenFilesOutputGroupDependency)">
  5449.  
  5450.    <!-- This item represents sgen xml serializer dll's -->
  5451.     <ItemGroup>
  5452.       <SGenFilesOutputGroupDependency Include="@(_ReferenceSerializationAssemblyPaths->'%(FullPath)')" Condition="'%(Extension)' == '.dll'"/>
  5453.     </ItemGroup>
  5454.  
  5455.   </Target>
  5456.  
  5457.   <PropertyGroup>
  5458.     <CodeAnalysisTargets Condition="'$(CodeAnalysisTargets)'==''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CodeAnalysis\Microsoft.CodeAnalysis.targets</CodeAnalysisTargets>
  5459.   </PropertyGroup>
  5460.  
  5461.   <Import Project="$(CodeAnalysisTargets)" Condition="Exists('$(CodeAnalysisTargets)')"/>
  5462.  
  5463.   <Import Project="$(ReportingServicesTargets)" Condition="Exists('$(ReportingServicesTargets)')"/>
  5464.  
  5465.   <Import Project="$(MSBuildToolsPath)\Microsoft.NETFramework.targets" Condition="('$(TargetFrameworkIdentifier)' == ''  or '$(TargetFrameworkIdentifier)' == '.NETFramework') and ('$(TargetRuntime)' == 'Managed')"/>
  5466.  
  5467.   <PropertyGroup>
  5468.     <ImportXamlTargets Condition="'$(ImportXamlTargets)'=='' and ('$(TargetFrameworkVersion)' != 'v2.0' and '$(TargetFrameworkVersion)' != 'v3.5') and Exists('$(MSBuildToolsPath)\Microsoft.Xaml.targets')">true</ImportXamlTargets>
  5469.   </PropertyGroup>
  5470.  
  5471.   <Import Project="$(MSBuildToolsPath)\Microsoft.Xaml.targets" Condition="('$(ImportXamlTargets)' == 'true')" />
  5472.  
  5473.   <!-- 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] -->
  5474.   <!-- Underlying assumption is that there shouldn't be any other versions between v4.0.* and v4.5 -->
  5475.  <Import Project="$(MSBuildToolsPath)\Microsoft.WorkflowBuildExtensions.targets"
  5476.          Condition="('$(TargetFrameworkVersion)' != 'v2.0' and '$(TargetFrameworkVersion)' != 'v3.5' and (!$([System.String]::IsNullOrEmpty('$(TargetFrameworkVersion)')) and !$(TargetFrameworkVersion.StartsWith('v4.0')))) and Exists('$(MSBuildToolsPath)\Microsoft.WorkflowBuildExtensions.targets')"/>
  5477.  
  5478.  <!-- This import is temporary and will be removed once it is moved into the silverlight targets -->
  5479.  <Import Project="$(MSBuildToolsPath)\Microsoft.WinFX.targets" Condition="'$(TargetFrameworkIdentifier)' == 'Silverlight' and Exists('$(MSBuildToolsPath)\Microsoft.WinFX.targets')"/>
  5480.  
  5481.  <PropertyGroup>
  5482.    <MsTestToolsTargets Condition="'$(MsTestToolsTargets)'==''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\TeamTest\Microsoft.TeamTest.targets</MsTestToolsTargets>
  5483.  </PropertyGroup>
  5484.  
  5485.  <Import Project="$(MsTestToolsTargets)" Condition="Exists('$(MsTestToolsTargets)')" />
  5486.  
  5487.  <!-- App packaging support -->
  5488.  
  5489.  <!--
  5490.    Following two targets are needed to be present in every project being built
  5491.    because the app packaging targets recursively scan all projects referenced
  5492.    from projects that generate app packages for them.
  5493.  -->
  5494.  <Target Name="CleanAppxPackage" />
  5495.  <Target Name="GetPackagingOutputs" />
  5496.  
  5497.  <PropertyGroup>
  5498.    <MsAppxPackageTargets Condition="'$(MsAppxPackageTargets)'==''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\AppxPackage\Microsoft.AppXPackage.Targets</MsAppxPackageTargets>
  5499.  </PropertyGroup>
  5500.  
  5501.  <Import Project="$(MsAppxPackageTargets)" Condition="'$(WindowsAppContainer)' == 'true' and Exists('$(MsAppxPackageTargets)')" />
  5502.    
  5503.  <!-- This import is temporary and will be removed once it is moved into the silverlight targets -->
  5504.  <Import Project="$(MSBuildToolsPath)\Microsoft.Data.Entity.targets" Condition="'$(TargetFrameworkIdentifier)' == 'Silverlight' and Exists('$(MSBuildToolsPath)\Microsoft.Data.Entity.targets')"/>
  5505.  
  5506.  <Import Project="$(CustomAfterMicrosoftCommonTargets)" Condition="'$(CustomAfterMicrosoftCommonTargets)' != '' and Exists('$(CustomAfterMicrosoftCommonTargets)')"/>
  5507.  
  5508.  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.targets\ImportAfter\*" Condition="'$(ImportByWildcardAfterMicrosoftCommonTargets)' == 'true' and exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.targets\ImportAfter')"/>
  5509.  <Import Project="$(MSBuildUserExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.targets\ImportAfter\*" Condition="'$(ImportUserLocationsByWildcardAfterMicrosoftCommonTargets)' == 'true' and exists('$(MSBuildUserExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.targets\ImportAfter')"/>
  5510.  
  5511. </Project>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement