Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
6105 lines (5064 sloc) 309 KB
<!--
***********************************************************************************************
Microsoft.Common.CurrentVersion.targets
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
created a backup copy. Incorrect changes to this file will make it
impossible to load or build your projects from the command-line or the IDE.
This file defines the steps in the standard build process for .NET projects. It
contains all the steps that are common among the different .NET languages, such as
Visual Basic, and Visual C#.
Copyright (C) Microsoft Corporation. All rights reserved.
***********************************************************************************************
-->
<Project DefaultTargets="Build" TreatAsLocalProperty="OutDir" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="'$(MicrosoftCommonPropsHasBeenImported)' != 'true' and Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<ImportByWildcardBeforeMicrosoftCommonTargets Condition="'$(ImportByWildcardBeforeMicrosoftCommonTargets)' == ''">true</ImportByWildcardBeforeMicrosoftCommonTargets>
<ImportByWildcardAfterMicrosoftCommonTargets Condition="'$(ImportByWildcardAfterMicrosoftCommonTargets)' == ''">true</ImportByWildcardAfterMicrosoftCommonTargets>
<ImportUserLocationsByWildcardBeforeMicrosoftCommonTargets Condition="'$(ImportUserLocationsByWildcardBeforeMicrosoftCommonTargets)' == ''">true</ImportUserLocationsByWildcardBeforeMicrosoftCommonTargets>
<ImportUserLocationsByWildcardAfterMicrosoftCommonTargets Condition="'$(ImportUserLocationsByWildcardAfterMicrosoftCommonTargets)' == ''">true</ImportUserLocationsByWildcardAfterMicrosoftCommonTargets>
</PropertyGroup>
<Import Project="$(MSBuildUserExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.targets\ImportBefore\*" Condition="'$(ImportUserLocationsByWildcardBeforeMicrosoftCommonTargets)' == 'true' and exists('$(MSBuildUserExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.targets\ImportBefore')"/>
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.targets\ImportBefore\*" Condition="'$(ImportByWildcardBeforeMicrosoftCommonTargets)' == 'true' and exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.targets\ImportBefore')"/>
<Import Project="$(MSBuildProjectFullPath).user" Condition="Exists('$(MSBuildProjectFullPath).user')"/>
<!-- VS10 without SP1 and without VS11 will not have VisualStudioVersion set, so do that here -->
<PropertyGroup>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
</PropertyGroup>
<PropertyGroup>
<CustomBeforeMicrosoftCommonTargets Condition="'$(CustomBeforeMicrosoftCommonTargets)'==''">$(MSBuildExtensionsPath)\v$(MSBuildToolsVersion)\Custom.Before.Microsoft.Common.targets</CustomBeforeMicrosoftCommonTargets>
<CustomAfterMicrosoftCommonTargets Condition="'$(CustomAfterMicrosoftCommonTargets)'==''">$(MSBuildExtensionsPath)\v$(MSBuildToolsVersion)\Custom.After.Microsoft.Common.targets</CustomAfterMicrosoftCommonTargets>
<ReportingServicesTargets Condition="'$(ReportingServicesTargets)'==''">$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v$(VisualStudioVersion)\ReportingServices\Microsoft.ReportingServices.targets</ReportingServicesTargets>
</PropertyGroup>
<Import Project="$(CustomBeforeMicrosoftCommonTargets)" Condition="'$(CustomBeforeMicrosoftCommonTargets)' != '' and Exists('$(CustomBeforeMicrosoftCommonTargets)')"/>
<!-- By default, we are creating a managed app because .NET 2.0 projects did not have this property. -->
<PropertyGroup Condition="'$(TargetRuntime)' == ''">
<TargetRuntime>Managed</TargetRuntime>
</PropertyGroup>
<!-- Because .NET 2.0 apps did not set TargetFrameworkIdentifier, we need to set it for them here by default. If
the runtime is set to Managed, we also need to set these. Otherwise they should be blank (for instance Javascript or
Native apps) because they do not target a .NET Framework. -->
<PropertyGroup Condition="'$(TargetRuntime)' == 'Managed'">
<TargetFrameworkIdentifier Condition="'$(TargetFrameworkIdentifier)' == ''">.NETFramework</TargetFrameworkIdentifier>
<TargetFrameworkVersion Condition=" '$(TargetFrameworkVersion)' == '' ">v4.0</TargetFrameworkVersion>
</PropertyGroup>
<!-- AvailablePlatforms is the list of platform targets available. -->
<PropertyGroup>
<AvailablePlatforms Condition="'$(VisualStudioVersion)' == '10.0' or '$(VisualStudioVersion)' == ''">Any CPU,x86,x64,Itanium</AvailablePlatforms>
<AvailablePlatforms Condition="'$(VisualStudioVersion)' != '' and '$(VisualStudioVersion)' > '10.0'">Any CPU,x86,x64</AvailablePlatforms>
</PropertyGroup>
<!-- Import does NOT apply to .NETCore -->
<Import Project="Microsoft.NETFramework.props" Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework' or '$(TargetFrameworkIdentifier)' == 'Silverlight'"/>
<PropertyGroup>
<!-- Yield optimization properties -->
<YieldDuringToolExecution Condition="'$(YieldDuringToolExecution)' == ''">true</YieldDuringToolExecution>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFrameworkIdentifier)' != '' and '$(TargetFrameworkVersion)' != ''">
<TargetFrameworkMoniker Condition="'$(TargetFrameworkMoniker)' == '' and '$([System.String]::IsNullOrWhitespace($(TargetFrameworkProfile)))' != 'true'">$(TargetFrameworkIdentifier),Version=$(TargetFrameworkVersion),Profile=$(TargetFrameworkProfile)</TargetFrameworkMoniker>
<TargetFrameworkMoniker Condition="'$(TargetFrameworkMoniker)' == ''">$(TargetFrameworkIdentifier),Version=$(TargetFrameworkVersion)</TargetFrameworkMoniker>
<!-- When working off a packaged reference assemblies, do not go to machine-global locations. This property is target-framework-specific, so it cannot be overridden in msbuild.exe.config once and for all. -->
<FrameworkPathOverride Condition="'$(EnableFrameworkPathOverride)' != 'false' And '$(FrameworkPathOverride)' == '' And Exists('$(TargetFrameworkRootPath)$(TargetFrameworkIdentifier)\$(TargetFrameworkVersion)')">$(TargetFrameworkRootPath)$(TargetFrameworkIdentifier)\$(TargetFrameworkVersion)</FrameworkPathOverride>
<!-- 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
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
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).-->
<FrameworkPathOverride Condition="'$(EnableFrameworkPathOverride)' != 'false' And '$(FrameworkPathOverride)' == ''">$([Microsoft.Build.Utilities.ToolLocationHelper]::GetPathToStandardLibraries($(TargetFrameworkIdentifier), $(TargetFrameworkVersion), $(TargetFrameworkProfile), $(PlatformTarget), $(TargetFrameworkRootPath), $(TargetFrameworkFallbackSearchPaths)))</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(EnableFrameworkPathOverride)' != 'false' And !Exists('$(FrameworkPathOverride)\mscorlib.dll')">$(MSBuildFrameworkToolsPath)</FrameworkPathOverride>
</PropertyGroup>
<PropertyGroup>
<TargetPlatformIdentifier Condition="'$(TargetPlatformIdentifier)' == ''">Windows</TargetPlatformIdentifier>
<TargetPlatformVersion Condition="'$(TargetPlatformVersion)' == ''">7.0</TargetPlatformVersion>
<TargetPlatformSdkPath Condition="'$(TargetPlatformSdkPath)' == '' and '$(TargetPlatformSdkRootOverride)' != ''">$(TargetPlatformSdkRootOverride)\</TargetPlatformSdkPath>
<TargetPlatformSdkPath Condition="'$(TargetPlatformSdkPath)' == '' and '$(TargetPlatformIdentifier)' == 'Windows' and '$(OS)' == 'Windows_NT' and '$(MSBuildRuntimeType)' != 'Core'">$([MSBuild]::GetRegistryValueFromView('HKEY_LOCAL_MACHINE\Software\Microsoft\Microsoft SDKs\Windows\v$(TargetPlatformVersion)', InstallationFolder, null, RegistryView.Registry32, RegistryView.Default))</TargetPlatformSdkPath>
<TargetPlatformSdkPath Condition="'$(TargetPlatformSdkPath)' == ''">$([Microsoft.Build.Utilities.ToolLocationHelper]::GetPlatformSDKLocation($(TargetPlatformIdentifier), $(TargetPlatformVersion)))</TargetPlatformSdkPath>
<TargetPlatformSdkMetadataLocation Condition="'$(TargetPlatformSdkMetadataLocation)' == '' and Exists('$(TargetPlatformSdkPath)')">$(TargetPlatformSdkPath)Windows Metadata</TargetPlatformSdkMetadataLocation>
<TargetPlatformSdkMetadataLocation Condition="Exists('$(TargetPlatformSdkPath)') and ('$(TargetPlatformSdkMetadataLocation)' == '' or !Exists('$(TargetPlatformSdkMetadataLocation)'))">$(TargetPlatformSdkPath)References\CommonConfiguration\Neutral</TargetPlatformSdkMetadataLocation>
<TargetPlatformWinMDLocation Condition="'$(TargetPlatformWinMDLocation)' == '' and Exists('$(TargetPlatformSdkMetadataLocation)')">$(TargetPlatformSdkMetadataLocation)</TargetPlatformWinMDLocation>
<UseOSWinMdReferences Condition="'$(UseOSWinMdReferences)' == '' and ('$(TargetPlatformWinMDLocation)' == '' and '$(TargetPlatformIdentifier)' == 'Windows' and '$(TargetPlatformVersion)' &gt; '7.0')">true</UseOSWinMdReferences>
<TargetPlatformWinMDLocation Condition="'$(UseOsWinMdReferences)' == 'true'">$(WinDir)\System32\WinMetadata</TargetPlatformWinMDLocation>
<TargetPlatformMoniker Condition="'$(TargetPlatformMoniker)' == ''">$(TargetPlatformIdentifier),Version=$(TargetPlatformVersion)</TargetPlatformMoniker>
<TargetPlatformDisplayName Condition="'$(TargetPlatformDisplayName)' == ''">$([Microsoft.Build.Utilities.ToolLocationHelper]::GetPlatformSDKDisplayName($(TargetPlatformIdentifier), $(TargetPlatformVersion)))</TargetPlatformDisplayName>
</PropertyGroup>
<!--
Several properties must be set in the main project file, before using this .TARGETS file.
However, if the properties are not set, we pick some defaults.
OutDir:
Indicates the final output location for the project or solution. When building a solution,
OutDir can be used to gather multiple project outputs in one location. In addition,
OutDir is included in AssemblySearchPaths used for resolving references.
OutputPath:
This property is usually specified in the project file and is used to initialize OutDir.
OutDir and OutputPath are distinguished for legacy reasons, and OutDir should be used if at all possible.
BaseIntermediateOutputPath:
This is the top level folder where all configuration specific intermediate output folders will be created.
Default value is obj\
IntermediateOutputPath:
This is the full intermediate Output Path, and is derived from BaseIntermediateOutputPath, if none specified
(eg. obj\debug). If this property is overridden, then setting BaseIntermediateOutputPath has no effect.
-->
<PropertyGroup>
<!-- Ensure any OutputPath has a trailing slash, so it can be concatenated -->
<OutputPath Condition="'$(OutputPath)' != '' and !HasTrailingSlash('$(OutputPath)')">$(OutputPath)\</OutputPath>
<AssemblyName Condition=" '$(AssemblyName)'=='' ">$(MSBuildProjectName)</AssemblyName>
<!--
Be careful not to give OutputPath a default value in the case of an invalid Configuration/Platform.
We use OutputPath specifically to check for invalid configurations/platforms.
-->
<OutputPath Condition=" '$(Platform)'=='' and '$(Configuration)'=='' and '$(OutputPath)'=='' ">bin\Debug\</OutputPath>
<_OriginalConfiguration>$(Configuration)</_OriginalConfiguration>
<_OriginalPlatform>$(Platform)</_OriginalPlatform>
<Configuration Condition=" '$(Configuration)'=='' ">Debug</Configuration>
<ConfigurationName Condition=" '$(ConfigurationName)' == '' ">$(Configuration)</ConfigurationName>
<!-- Example, Debug -->
<Platform Condition=" '$(Platform)'=='' ">AnyCPU</Platform>
<OutputType Condition=" '$(TargetType)' != ''">$(TargetType)</OutputType>
<OutputType Condition=" '$(TargetType)' == 'Container' or '$(TargetType)' == 'DocumentContainer' ">library</OutputType>
<OutputType Condition=" '$(OutputType)' == '' ">exe</OutputType>
<DebugSymbols Condition=" '$(ConfigurationName)' == 'Debug' and '$(DebugSymbols)' == '' and '$(DebugType)'==''">true</DebugSymbols>
<!-- Whether or not a .pdb file is produced. -->
<_DebugSymbolsProduced>false</_DebugSymbolsProduced>
<_DebugSymbolsProduced Condition="'$(DebugSymbols)'=='true'">true</_DebugSymbolsProduced>
<_DebugSymbolsProduced Condition="'$(DebugType)'=='none'">false</_DebugSymbolsProduced>
<_DebugSymbolsProduced Condition="'$(DebugType)'=='pdbonly'">true</_DebugSymbolsProduced>
<_DebugSymbolsProduced Condition="'$(DebugType)'=='full'">true</_DebugSymbolsProduced>
<_DebugSymbolsProduced Condition="'$(DebugType)'=='portable'">true</_DebugSymbolsProduced>
<_DebugSymbolsProduced Condition="'$(DebugType)'=='embedded'">false</_DebugSymbolsProduced>
<!-- Whether or not a .xml file is produced. -->
<_DocumentationFileProduced>true</_DocumentationFileProduced>
<_DocumentationFileProduced Condition="'$(DocumentationFile)'==''">false</_DocumentationFileProduced>
<!-- Whether or not a reference assembly is produced. -->
<ProduceReferenceAssembly Condition="'$(ProduceReferenceAssembly)' == ''">false</ProduceReferenceAssembly>
</PropertyGroup>
<PropertyGroup Condition=" '$(OutputPath)' == '' ">
<!--
A blank OutputPath at this point means that the user passed in an invalid Configuration/Platform
combination. Whether this is considered an error or a warning depends on the value of
$(SkipInvalidConfigurations).
-->
<_InvalidConfigurationError Condition=" '$(SkipInvalidConfigurations)' != 'true' ">true</_InvalidConfigurationError>
<_InvalidConfigurationWarning Condition=" '$(SkipInvalidConfigurations)' == 'true' ">true</_InvalidConfigurationWarning>
</PropertyGroup>
<!--
IDE Macros available from both integrated builds and from command line builds.
The following properties are 'macros' that are available via IDE for
pre and post build steps.
-->
<PropertyGroup>
<TargetExt Condition="'$(TargetExt)' == '' and '$(OutputType)'=='exe'">.exe</TargetExt>
<TargetExt Condition="'$(TargetExt)' == '' and '$(OutputType)'=='winexe'">.exe</TargetExt>
<TargetExt Condition="'$(TargetExt)' == '' and '$(OutputType)'=='appcontainerexe'">.exe</TargetExt>
<TargetExt Condition="'$(TargetExt)' == '' and '$(OutputType)'=='library'">.dll</TargetExt>
<TargetExt Condition="'$(TargetExt)' == '' and '$(OutputType)'=='module'">.netmodule</TargetExt>
<TargetExt Condition="'$(TargetExt)' == '' and '$(OutputType)'=='winmdobj'">.winmdobj</TargetExt>
</PropertyGroup>
<PropertyGroup>
<!-- Required for enabling Team Build for packaging app package-generating projects -->
<OutDirWasSpecified Condition=" '$(OutDir)'!='' and '$(OutDirWasSpecified)'=='' ">true</OutDirWasSpecified>
<OutDir Condition=" '$(OutDir)' == '' ">$(OutputPath)</OutDir>
<!-- Example, bin\Debug\ -->
<!-- Ensure OutDir has a trailing slash, so it can be concatenated -->
<OutDir Condition="'$(OutDir)' != '' and !HasTrailingSlash('$(OutDir)')">$(OutDir)\</OutDir>
<ProjectName Condition=" '$(ProjectName)' == '' ">$(MSBuildProjectName)</ProjectName>
<!-- Example, MyProject -->
<!-- For projects that generate app packages or ones that want a per-project output directory, update OutDir to include the project name -->
<OutDir Condition="'$(OutDir)' != '' and '$(OutDirWasSpecified)' == 'true' and (('$(WindowsAppContainer)' == 'true' and '$(GenerateProjectSpecificOutputFolder)' != 'false') or '$(GenerateProjectSpecificOutputFolder)' == 'true')">$(OutDir)$(ProjectName)\</OutDir>
<TargetName Condition="'$(TargetName)' == '' and '$(OutputType)' == 'winmdobj' and '$(RootNamespace)' != ''">$(RootNamespace)</TargetName>
<TargetName Condition=" '$(TargetName)' == '' ">$(AssemblyName)</TargetName>
<!-- Example, MyAssembly -->
<ProjectFileName Condition=" '$(ProjectFileName)' == '' ">$(MSBuildProjectFile)</ProjectFileName>
<!-- Example, MyProject.csproj -->
<ProjectExt Condition=" '$(ProjectExt)' == '' ">$(MSBuildProjectExtension)</ProjectExt>
<!-- Example, .csproj -->
<WinMDExpOutputWindowsMetadataFilename Condition="'$(WinMDExpOutputWindowsMetadataFilename)' == '' and '$(OutputType)' == 'winmdobj'">$(TargetName).winmd</WinMDExpOutputWindowsMetadataFilename>
<TargetFileName Condition=" '$(TargetFileName)' == '' and '$(OutputType)' == 'winmdobj'">$(WinMDExpOutputWindowsMetadataFilename)</TargetFileName>
<TargetFileName Condition=" '$(TargetFileName)' == '' ">$(TargetName)$(TargetExt)</TargetFileName>
<!-- Example, MyAssembly.dll -->
</PropertyGroup>
<PropertyGroup>
<!--
The PublishableProject property is used when invoking the publish target on a solution that
contains multiple projects. The property determines which projects should be published, and
which projects should be skipped in the publish target. By default any "Windows Application"
or "Console Application" project type is publishable. However, a project that would otherwise
be published can be skipped by defining the PublishableProject property in the project itself.
-->
<_DeploymentPublishableProjectDefault Condition="'$(OutputType)'=='winexe' or '$(OutputType)'=='exe' or '$(OutputType)'=='appcontainerexe'">true</_DeploymentPublishableProjectDefault>
<PublishableProject Condition="'$(PublishableProject)'==''">$(_DeploymentPublishableProjectDefault)</PublishableProject>
<_DeploymentTargetApplicationManifestFileName Condition="'$(OutputType)'=='library'">Native.$(AssemblyName).manifest</_DeploymentTargetApplicationManifestFileName>
<!-- Example, Native.MyAssembly.manifest -->
<_DeploymentTargetApplicationManifestFileName Condition="'$(OutputType)'=='winexe'">$(TargetFileName).manifest</_DeploymentTargetApplicationManifestFileName>
<!-- Example, MyAssembly.exe.manifest -->
<_DeploymentTargetApplicationManifestFileName Condition="'$(OutputType)'=='exe'">$(TargetFileName).manifest</_DeploymentTargetApplicationManifestFileName>
<!-- Example, MyAssembly.exe.manifest -->
<_DeploymentTargetApplicationManifestFileName Condition="'$(OutputType)'=='appcontainerexe'">$(TargetFileName).manifest</_DeploymentTargetApplicationManifestFileName>
<!-- Example, MyAssembly.exe.manifest -->
<TargetDeployManifestFileName Condition="'$(TargetDeployManifestFileName)' == '' and '$(HostInBrowser)' != 'true'">$(AssemblyName).application</TargetDeployManifestFileName>
<!-- Example, MyAssembly.application -->
<TargetDeployManifestFileName Condition="'$(TargetDeployManifestFileName)' == '' and '$(HostInBrowser)' == 'true'">$(AssemblyName).xbap</TargetDeployManifestFileName>
<!-- Example, MyAssembly.xbap -->
<GenerateClickOnceManifests Condition="'$(OutputType)'=='winexe' or '$(OutputType)'=='exe' or '$(OutputType)'=='appcontainerexe'">$(GenerateManifests)</GenerateClickOnceManifests>
<_DeploymentApplicationManifestIdentity Condition="'$(OutputType)'=='library'">Native.$(AssemblyName)</_DeploymentApplicationManifestIdentity>
<_DeploymentApplicationManifestIdentity Condition="'$(OutputType)'=='winexe'">$(AssemblyName).exe</_DeploymentApplicationManifestIdentity>
<_DeploymentApplicationManifestIdentity Condition="'$(OutputType)'=='exe'">$(AssemblyName).exe</_DeploymentApplicationManifestIdentity>
<_DeploymentApplicationManifestIdentity Condition="'$(OutputType)'=='appcontainerexe'">$(AssemblyName).exe</_DeploymentApplicationManifestIdentity>
<_DeploymentDeployManifestIdentity Condition="'$(HostInBrowser)' != 'true'">$(AssemblyName).application</_DeploymentDeployManifestIdentity>
<_DeploymentDeployManifestIdentity Condition="'$(HostInBrowser)' == 'true'">$(AssemblyName).xbap</_DeploymentDeployManifestIdentity>
<_DeploymentFileMappingExtension Condition="'$(MapFileExtensions)'=='true'">.deploy</_DeploymentFileMappingExtension>
<_DeploymentFileMappingExtension Condition="'$(MapFileExtensions)'!='true'"></_DeploymentFileMappingExtension>
<_DeploymentBuiltUpdateInterval Condition="'$(UpdatePeriodically)'=='true'">$(UpdateInterval)</_DeploymentBuiltUpdateInterval>
<_DeploymentBuiltUpdateIntervalUnits Condition="'$(UpdatePeriodically)'=='true'">$(UpdateIntervalUnits)</_DeploymentBuiltUpdateIntervalUnits>
<_DeploymentBuiltUpdateInterval Condition="'$(UpdatePeriodically)'!='true'">0</_DeploymentBuiltUpdateInterval>
<_DeploymentBuiltUpdateIntervalUnits Condition="'$(UpdatePeriodically)'!='true'">Days</_DeploymentBuiltUpdateIntervalUnits>
<_DeploymentBuiltMinimumRequiredVersion Condition="'$(UpdateRequired)'=='true' and '$(Install)'=='true'">$(MinimumRequiredVersion)</_DeploymentBuiltMinimumRequiredVersion>
<MaxTargetPath Condition="'$(MaxTargetPath)'==''">100</MaxTargetPath>
</PropertyGroup>
<PropertyGroup>
<!--
By default, GenerateApplicationManifest puts all satellite assemblies to the manifest
record by default by setting TargetCulture to *.
-->
<TargetCulture Condition="'$(TargetCulture)'==''">*</TargetCulture>
<FallbackCulture Condition="'$(UICulture)'!='' and '$(FallbackCulture)'==''">$(UICulture)</FallbackCulture>
</PropertyGroup>
<ItemGroup>
<!-- Not used any more-->
<_OutputPathItem Include="$(OutDir)"/>
<_UnmanagedRegistrationCache Include="$(BaseIntermediateOutputPath)$(MSBuildProjectFile).UnmanagedRegistration.cache"/>
<_ResolveComReferenceCache Include="$(IntermediateOutputPath)$(MSBuildProjectFile).ResolveComReference.cache"/>
</ItemGroup>
<PropertyGroup>
<!-- Example, c:\MyProjects\MyProject\bin\debug\ -->
<!--
Condition intentionally omitted on this one, because it causes problems
when we pick up the value of an environment variable named TargetDir
-->
<TargetDir Condition="'$(OutDir)' != ''">$([MSBuild]::Escape($([System.IO.Path]::GetFullPath(`$([System.IO.Path]::Combine(`$(MSBuildProjectDirectory)`, `$(OutDir)`))`))))</TargetDir>
<!-- Example, c:\MyProjects\MyProject\bin\debug\MyAssembly.dll -->
<TargetPath Condition=" '$(TargetPath)' == '' ">$(TargetDir)$(TargetFileName)</TargetPath>
<TargetRefPath Condition=" '$(TargetRefPath)' == '' and '$(ProduceReferenceAssembly)' == 'true' ">$([MSBuild]::NormalizePath($(TargetDir), 'ref', $(TargetFileName)))</TargetRefPath>
<!-- Example, c:\MyProjects\MyProject\ -->
<ProjectDir Condition=" '$(ProjectDir)' == '' ">$(MSBuildProjectDirectory)\</ProjectDir>
<!-- Example, c:\MyProjects\MyProject\MyProject.csproj -->
<ProjectPath Condition=" '$(ProjectPath)' == '' ">$(ProjectDir)$(ProjectFileName)</ProjectPath>
<!-- Example, AnyCPU -->
<PlatformName Condition=" '$(PlatformName)' == '' ">$(Platform)</PlatformName>
</PropertyGroup>
<ItemGroup>
<!-- This is not used here but remains for backwards compatibility -->
<AppConfigFileDestination Include="$(OutDir)$(TargetFileName).config"/>
</ItemGroup>
<!--
IDE Macros available only from integrated builds.
The following properties are 'macros' that are available via IDE for
pre and post build steps. However, they are not defined when directly building
a project from the command line, only when building a solution.
-->
<PropertyGroup>
<DevEnvDir Condition="'$(DevEnvDir)'==''">*Undefined*</DevEnvDir>
<SolutionName Condition="'$(SolutionName)'==''">*Undefined*</SolutionName>
<!-- Example, MySolution -->
<SolutionFileName Condition="'$(SolutionFileName)'==''">*Undefined*</SolutionFileName>
<!-- Example, MySolution.sln -->
<SolutionPath Condition="'$(SolutionPath)'==''">*Undefined*</SolutionPath>
<!-- Example, f:\MySolutions\MySolution\MySolution.sln -->
<SolutionDir Condition="'$(SolutionDir)'==''">*Undefined*</SolutionDir>
<!-- Example, f:\MySolutions\MySolution\ -->
<SolutionExt Condition="'$(SolutionExt)'==''">*Undefined*</SolutionExt>
<!-- Example, .sln -->
</PropertyGroup>
<PropertyGroup>
<GenerateBindingRedirectsOutputType Condition="'$(OutputType)'=='exe' or '$(OutputType)'=='winexe'">true</GenerateBindingRedirectsOutputType>
<!-- It would be a breaking change to automatically turn on binding redirects for existing projects, so turn them on only when opting into a new framework. -->
<AutoGenerateBindingRedirects Condition="'$(AutoGenerateBindingRedirects)' == '' and '$(TargetFrameworkIdentifier)' == '.NETFramework' and '$(TargetFrameworkVersion.TrimStart(vV))' >= '4.7.2'">true</AutoGenerateBindingRedirects>
</PropertyGroup>
<PropertyGroup Condition="'$(AutoUnifyAssemblyReferences)' == ''">
<AutoUnifyAssemblyReferences>true</AutoUnifyAssemblyReferences>
<AutoUnifyAssemblyReferences Condition="'$(GenerateBindingRedirectsOutputType)' == 'true' and '$(AutoGenerateBindingRedirects)' != 'true'">false</AutoUnifyAssemblyReferences>
</PropertyGroup>
<PropertyGroup>
<BaseIntermediateOutputPath Condition="!HasTrailingSlash('$(BaseIntermediateOutputPath)')">$(BaseIntermediateOutputPath)\</BaseIntermediateOutputPath>
<CleanFile Condition="'$(CleanFile)'==''">$(MSBuildProjectFile).FileListAbsolute.txt</CleanFile>
<!-- During DesignTime Builds, skip project reference build as Design time is only queueing information.-->
<BuildProjectReferences Condition="'$(BuildProjectReferences)' == '' and '$(DesignTimeBuild)' == 'true'">false</BuildProjectReferences>
<!-- By default we will build (and if applicable, clean) all project references. But this can be used to disable that-->
<BuildProjectReferences Condition="'$(BuildProjectReferences)' == ''">true</BuildProjectReferences>
<BuildInParallel Condition="'$(BuildInParallel)' == ''">true</BuildInParallel>
<_ResolveReferenceDependencies Condition="'$(_ResolveReferenceDependencies)' == ''">false</_ResolveReferenceDependencies>
<_GetChildProjectCopyToOutputDirectoryItems Condition="'$(_GetChildProjectCopyToOutputDirectoryItems)' == ''">true</_GetChildProjectCopyToOutputDirectoryItems>
<OverwriteReadOnlyFiles Condition="'$(OverwriteReadOnlyFiles)' == ''">false</OverwriteReadOnlyFiles>
<ComReferenceNoClassMembers Condition="'$(ComReferenceNoClassMembers)' == ''">false</ComReferenceNoClassMembers>
</PropertyGroup>
<PropertyGroup Condition=" $(IntermediateOutputPath) == '' ">
<IntermediateOutputPath Condition=" '$(PlatformName)' == 'AnyCPU' ">$(BaseIntermediateOutputPath)$(Configuration)\</IntermediateOutputPath>
<IntermediateOutputPath Condition=" '$(PlatformName)' != 'AnyCPU' ">$(BaseIntermediateOutputPath)$(PlatformName)\$(Configuration)\</IntermediateOutputPath>
</PropertyGroup>
<PropertyGroup>
<IntermediateOutputPath Condition="!HasTrailingSlash('$(IntermediateOutputPath)')">$(IntermediateOutputPath)\</IntermediateOutputPath>
<_GenerateBindingRedirectsIntermediateAppConfig>$(IntermediateOutputPath)$(TargetFileName).config</_GenerateBindingRedirectsIntermediateAppConfig>
</PropertyGroup>
<ItemGroup>
<IntermediateAssembly Include="$(IntermediateOutputPath)$(TargetName)$(TargetExt)"/>
<FinalDocFile Include="@(DocFileItem->'$(OutDir)%(Filename)%(Extension)')"/>
<CopyUpToDateMarker Include="$([MSBuild]::NormalizePath('$(MSBuildProjectDirectory)', '$(IntermediateOutputPath)', '$(MSBuildProjectFile).CopyComplete'))" />
</ItemGroup>
<ItemGroup Condition="'$(ProduceReferenceAssembly)' == 'true'">
<IntermediateRefAssembly Include="$(IntermediateOutputPath)ref\$(TargetName)$(TargetExt)" Condition="'@(IntermediateRefAssembly)' == ''" />
<CreateDirectory Include="@(IntermediateRefAssembly->'%(RootDir)%(Directory)')" />
<CreateDirectory Include="$(OutDir)ref" />
</ItemGroup>
<ItemGroup Condition="'$(_DebugSymbolsProduced)' == 'true'">
<_DebugSymbolsIntermediatePath Include="$(IntermediateOutputPath)$(TargetName).compile.pdb" Condition="'$(OutputType)' == 'winmdobj' and '@(_DebugSymbolsIntermediatePath)' == ''"/>
<_DebugSymbolsIntermediatePath Include="$(IntermediateOutputPath)$(TargetName).pdb" Condition="'$(OutputType)' != 'winmdobj' and '@(_DebugSymbolsIntermediatePath)' == ''"/>
<_DebugSymbolsOutputPath Include="@(_DebugSymbolsIntermediatePath->'$(OutDir)%(Filename)%(Extension)')" />
</ItemGroup>
<PropertyGroup Condition="'$(_DebugSymbolsProduced)' == 'true' and '$(OutputType)' == 'winmdobj'">
<WinMDExpOutputPdb Condition="'$(WinMDExpOutputPdb)' == ''">$(IntermediateOutputPath)$(TargetName).pdb</WinMDExpOutputPdb>
<_WinMDDebugSymbolsOutputPath>$([System.IO.Path]::Combine('$(OutDir)', $([System.IO.Path]::GetFileName('$(WinMDExpOutputPdb)'))))</_WinMDDebugSymbolsOutputPath>
</PropertyGroup>
<PropertyGroup Condition="'$(OutputType)' == 'winmdobj' and '$(DocumentationFile)'!=''">
<WinMDOutputDocumentationFile Condition="'$(WinMDOutputDocumentationFile)' == ''">$(IntermediateOutputPath)$(TargetName).xml</WinMDOutputDocumentationFile>
<_WinMDDocFileOutputPath>$([System.IO.Path]::Combine('$(OutDir)', $([System.IO.Path]::GetFileName('$(WinMDOutputDocumentationFile)'))))</_WinMDDocFileOutputPath>
</PropertyGroup>
<PropertyGroup Condition="'$(WinMDExpOutputWindowsMetadataFilename)' != ''">
<_IntermediateWindowsMetadataPath>$(IntermediateOutputPath)$(WinMDExpOutputWindowsMetadataFilename)</_IntermediateWindowsMetadataPath>
<_WindowsMetadataOutputPath>$(OutDir)$(WinMDExpOutputWindowsMetadataFilename)</_WindowsMetadataOutputPath>
</PropertyGroup>
<ItemGroup>
<!-- Create an item for entry point of the ClickOnce application (Example: WindowsApplication1.exe) -->
<_DeploymentManifestEntryPoint Include="@(IntermediateAssembly)">
<TargetPath>$(TargetFileName)</TargetPath>
</_DeploymentManifestEntryPoint>
<!-- Create an item for the application icon if one exists in the project (Example: app.ico) -->
<!-- NOTE: The item Include and the Exists function are operating relative to the PROJECT (.csproj, .vbproj etc.) directory in this case -->
<_DeploymentManifestIconFile Include="$(ApplicationIcon)" Condition="Exists('$(ApplicationIcon)')">
<TargetPath>$(ApplicationIcon)</TargetPath>
</_DeploymentManifestIconFile>
<!-- Create an item for the output application manifest (Example: WindowsApplication1.exe.manifeset) -->
<ApplicationManifest Include="$(IntermediateOutputPath)$(_DeploymentTargetApplicationManifestFileName)">
<TargetPath>$(_DeploymentTargetApplicationManifestFileName)</TargetPath>
</ApplicationManifest>
<!-- Create an item for the final application manifest (Example: WindowsApplication1.exe.manifeset)
This item represents the final output application manifest used for project-to-project
references and for copying to the publish output location. -->
<_ApplicationManifestFinal Include="$(OutDir)$(_DeploymentTargetApplicationManifestFileName)">
<TargetPath>$(_DeploymentTargetApplicationManifestFileName)</TargetPath>
</_ApplicationManifestFinal>
<!-- Create an item for the output deploy manifest (Example: WindowsApplication1.application) -->
<DeployManifest Include="$(IntermediateOutputPath)$(TargetDeployManifestFileName)">
<TargetPath>$(TargetDeployManifestFileName)</TargetPath>
</DeployManifest>
<!-- Create an item for the intermediate trust info file -->
<_DeploymentIntermediateTrustInfoFile Include="$(IntermediateOutputPath)$(TargetName).TrustInfo.xml" Condition="'$(TargetZone)'!=''"/>
</ItemGroup>
<!--
Determine the <deploymentProvider> (_DeploymentUrl) for the ClickOnce deployment manifest.
Prefer the UpdateUrl, falling back to InstallUrl or PublishUrl if not specified.
If the UpdateUrl is specified then _DeploymentUrl is always set to the UpdateUrl.
Otherwise, only set the _DeploymentUrl if it's an installed app and updates are enabled.
-->
<PropertyGroup>
<_DeploymentUrl Condition="'$(_DeploymentUrl)'==''">$(UpdateUrl)</_DeploymentUrl>
<_DeploymentUrl Condition="'$(_DeploymentUrl)'==''">$(InstallUrl)</_DeploymentUrl>
<_DeploymentUrl Condition="'$(_DeploymentUrl)'==''">$(PublishUrl)</_DeploymentUrl>
<_DeploymentUrl Condition="!('$(UpdateUrl)'=='') and '$(Install)'=='false'"></_DeploymentUrl>
<_DeploymentUrl Condition="'$(_DeploymentUrl)'!=''">$(_DeploymentUrl)$(TargetDeployManifestFileName)</_DeploymentUrl>
<!--
Need to explicitly blank out the _DeploymentUrl when it's not used. Otherwise an
inappropriate value may be used. For example a local path from the PublishUrl
is something we never want to see in the manifest because it means you could
only install the app from that machine.
-->
<_DeploymentUrl Condition="'$(UpdateUrl)'=='' and !('$(Install)'=='true' and '$(UpdateEnabled)'=='true')"></_DeploymentUrl>
<_DeploymentUrl Condition="'$(ExcludeDeploymentUrl)'=='true'"></_DeploymentUrl>
</PropertyGroup>
<!-- Determine the URLs for the bootstrapper. -->
<PropertyGroup>
<_DeploymentApplicationUrl Condition="'$(IsWebBootstrapper)'=='true'">$(InstallUrl)</_DeploymentApplicationUrl>
<_DeploymentApplicationUrl Condition="'$(IsWebBootstrapper)'=='true' and '$(InstallUrl)'==''">$(PublishUrl)</_DeploymentApplicationUrl>
<_DeploymentComponentsUrl Condition="'$(BootstrapperComponentsLocation)'=='Absolute'">$(BootstrapperComponentsUrl)</_DeploymentComponentsUrl>
</PropertyGroup>
<!-- Output location for publish target. -->
<PropertyGroup>
<PublishDir Condition="'$(PublishDir)' != '' and !HasTrailingSlash('$(PublishDir)')">$(PublishDir)\</PublishDir>
<PublishDir Condition="'$(PublishDir)'==''">$(OutputPath)app.publish\</PublishDir>
</PropertyGroup>
<!--
ProcessorArchitecture is the target processor architecture.
-->
<PropertyGroup Condition="'$(ProcessorArchitecture)'==''">
<!--
If ProcessorArchitecture is not set, set it to PlatformTarget
Note: if $(PlatformTarget) is also blank resolve assembly reference defaults to msil which is the
desired behavior in this case
-->
<ProcessorArchitecture>$(PlatformTarget)</ProcessorArchitecture>
<!--
If Processor architecture is not set and PlatformTarget is a known target translate the
PlatformTarget into something ResolveAssemblyReference knows about
-->
<ProcessorArchitecture Condition=" '$(PlatformTarget)' == 'AnyCpu' ">msil</ProcessorArchitecture>
<ProcessorArchitecture Condition=" '$(PlatformTarget)' == 'x64' ">amd64</ProcessorArchitecture>
<ProcessorArchitecture Condition=" '$(PlatformTarget)' == 'Itanium' ">ia64</ProcessorArchitecture>
<ProcessorArchitecture Condition=" '$(PlatformTarget)' == 'x86' ">x86</ProcessorArchitecture>
<ProcessorArchitecture Condition=" '$(PlatformTarget)' == 'ARM' ">arm</ProcessorArchitecture>
</PropertyGroup>
<PropertyGroup>
<ConsiderPlatformAsProcessorArchitecture Condition="'$(ConsiderPlatformAsProcessorArchitecture)' == ''">true</ConsiderPlatformAsProcessorArchitecture>
</PropertyGroup>
<PropertyGroup Condition="'$(ProcessorArchitecture)' == '' and '$(ConsiderPlatformAsProcessorArchitecture)' == 'true'">
<!-- 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 -->
<ProcessorArchitectureAsPlatform>$(Platform)</ProcessorArchitectureAsPlatform>
<ProcessorArchitecture Condition=" '$(ProcessorArchitectureAsPlatform)' == 'AnyCpu' or '$(ProcessorArchitectureAsPlatform)' == 'Any Cpu'">msil</ProcessorArchitecture>
<ProcessorArchitecture Condition=" '$(ProcessorArchitectureAsPlatform)' == 'x64' or '$(ProcessorArchitectureAsPlatform)' == 'amd64'">amd64</ProcessorArchitecture>
<ProcessorArchitecture Condition=" '$(ProcessorArchitectureAsPlatform)' == 'Itanium' ">ia64</ProcessorArchitecture>
<ProcessorArchitecture Condition=" '$(ProcessorArchitectureAsPlatform)' == 'x86' or '$(ProcessorArchitectureAsPlatform)' == 'win32'">x86</ProcessorArchitecture>
<ProcessorArchitecture Condition=" '$(ProcessorArchitectureAsPlatform)' == 'ARM' ">arm</ProcessorArchitecture>
<!--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-->
<ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch Condition="'$(ProcessorArchitecture)'==''">None</ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
<ProcessorArchitecture Condition="'$(ProcessorArchitecture)'==''">$(PROCESSOR_ARCHITECTURE)</ProcessorArchitecture>
</PropertyGroup>
<!-- Sensible defaults for the most-commonly-desired MSBuildRuntime and MSBuildArchitecture values -->
<PropertyGroup Condition="'$(DisableOutOfProcTaskHost)' == ''">
<TargetFrameworkAsMSBuildRuntime Condition="'$(TargetFrameworkVersion)' == 'v2.0' or '$(TargetFrameworkVersion)' == 'v3.0' or '$(TargetFrameworkVersion)' == 'v3.5'">CLR2</TargetFrameworkAsMSBuildRuntime>
<TargetFrameworkAsMSBuildRuntime Condition="'$(TargetFrameworkVersion)' == 'v4.0' or '$(TargetFrameworkVersion)' == 'v4.5'">CLR4</TargetFrameworkAsMSBuildRuntime>
<TargetFrameworkAsMSBuildRuntime Condition="'$(TargetFrameworkAsMSBuildRuntime)' == ''">CurrentRuntime</TargetFrameworkAsMSBuildRuntime>
<PlatformTargetAsMSBuildArchitectureExplicitlySet Condition="'$(PlatformTargetAsMSBuildArchitecture)' != ''">true</PlatformTargetAsMSBuildArchitectureExplicitlySet>
<PlatformTargetAsMSBuildArchitectureExplicitlySet Condition="'$(PlatformTargetAsMSBuildArchitecture)' == ''">false</PlatformTargetAsMSBuildArchitectureExplicitlySet>
<PlatformTargetAsMSBuildArchitecture Condition="'$(PlatformTarget)' == 'x86' or ('$(PlatformTarget)' == 'x64' and '$(MSBuildExtensionsPath64)' != '')">$(PlatformTarget)</PlatformTargetAsMSBuildArchitecture>
<PlatformTargetAsMSBuildArchitecture Condition="'$(PlatformTarget)' == 'arm'">x86</PlatformTargetAsMSBuildArchitecture>
<PlatformTargetAsMSBuildArchitecture Condition="('$(PlatformTarget)' == 'ia64' and '$(MSBuildExtensionsPath64)' != '')">x64</PlatformTargetAsMSBuildArchitecture>
<PlatformTargetAsMSBuildArchitecture Condition="'$(PlatformTargetAsMSBuildArchitecture)' == ''">CurrentArchitecture</PlatformTargetAsMSBuildArchitecture>
</PropertyGroup>
<!-- Flavor is the project flavor. For example, Client, Smart Devices, SQL Server, etc. -->
<PropertyGroup>
<ProjectFlavor Condition="'$(ProjectFlavor)'==''">Client</ProjectFlavor>
</PropertyGroup>
<!--
The default for compilers is to not delay-sign. If $(DelaySign) is false, let the compiler
use its default rather than forcing a no-delay-sign flag to be passed in. This is so that
attributes in the source code can override this decision.
-->
<PropertyGroup>
<DelaySign Condition="'$(SignAssembly)' != 'true'">false</DelaySign>
<DelaySign Condition="'$(DelaySign)'!='true'"></DelaySign>
</PropertyGroup>
<!-- These properties control web reference proxy generation. -->
<PropertyGroup>
<WebReference_EnableProperties Condition=" '$(WebReference_EnableProperties)' == '' ">true</WebReference_EnableProperties>
<WebReference_EnableSQLTypes Condition=" '$(WebReference_EnableSQLTypes)' == '' ">true</WebReference_EnableSQLTypes>
<WebReference_EnableLegacyEventingModel Condition=" '$(WebReference_EnableLegacyEventingModel)' == '' ">false</WebReference_EnableLegacyEventingModel>
</PropertyGroup>
<!--
These parameters control where to look in the registry for directories to search for
assemblies in the assembly resolution tasks.
-->
<PropertyGroup>
<AssemblyFoldersSuffix Condition=" '$(AssemblyFoldersSuffix)' == '' ">AssemblyFoldersEx</AssemblyFoldersSuffix>
<FrameworkRegistryBase Condition=" '$(FrameworkRegistryBase)' == '' ">Software\Microsoft\$(TargetFrameworkIdentifier)</FrameworkRegistryBase>
<TargetPlatformRegistryBase Condition="'$(TargetPlatformRegistryBase)' == ''">Software\Microsoft\Microsoft SDKs\$(TargetPlatformIdentifier)</TargetPlatformRegistryBase>
<AssemblyFoldersConfigFile Condition="'$(AssemblyFoldersConfigFile)' == ''">$(MSBuildToolsPath32)\AssemblyFolders.config</AssemblyFoldersConfigFile>
<AssemblyFoldersConfigFileSearchPath Condition="Exists('$(AssemblyFoldersConfigFile)')">{AssemblyFoldersFromConfig:$(AssemblyFoldersConfigFile),$(TargetFrameworkVersion)};</AssemblyFoldersConfigFileSearchPath>
<!--
The SearchPaths property is set to find assemblies in the following order:
(1) Files from current project - indicated by {CandidateAssemblyFiles}
(2) $(ReferencePath) - the reference path property, which comes from the .USER file.
(3) The hintpath from the referenced item itself, indicated by {HintPathFromItem}.
(4) The directory of MSBuild's "target" runtime from GetFrameworkPath.
The "target" runtime folder is the folder of the runtime that MSBuild is a part of.
(5) Registered assembly folders, indicated by {Registry:*,*,*}
(6) Assembly folders from AssemblyFolders.config file (provided by Visual Studio Dev15+).
(7) Legacy registered assembly folders, indicated by {AssemblyFolders}
(8) Resolve to the GAC.
(9) Treat the reference's Include as if it were a real file name.
(10) Look in the application's output folder (like bin\debug)
-->
<AssemblySearchPaths Condition=" '$(AssemblySearchPaths)' == ''">
{CandidateAssemblyFiles};
$(ReferencePath);
{HintPathFromItem};
{TargetFrameworkDirectory};
$(AssemblyFoldersConfigFileSearchPath)
{Registry:$(FrameworkRegistryBase),$(TargetFrameworkVersion),$(AssemblyFoldersSuffix)$(AssemblyFoldersExConditions)};
{AssemblyFolders};
{GAC};
{RawFileName};
$(OutDir)
</AssemblySearchPaths>
<!--
These are the extensions that assembly reference resolution will consider for resolution.
Add new extensions here if you want to add new file types to consider (for example, .metadata_dll).
Put the most likely extensions first for reference resolution speed.
-->
<AllowedReferenceAssemblyFileExtensions Condition=" '$(AllowedReferenceAssemblyFileExtensions)' == '' ">
.winmd;
.dll;
.exe
</AllowedReferenceAssemblyFileExtensions>
<!--
These are the extensions that reference resolution will consider when looking for files related
to resolved references. Add new extensions here if you want to add new file types to consider.
-->
<AllowedReferenceRelatedFileExtensions Condition=" '$(AllowedReferenceRelatedFileExtensions)' == '' ">
.pdb;
.xml;
.pri;
.dll.config;
.exe.config
</AllowedReferenceRelatedFileExtensions>
<!--
These names are used when determining which TargetFramework subset to use. If the any of the FullReferenceAssemblyNames
are seen in the list of client subsets, RAR will assume that no client subset is being used. The list is semicolon seperated
For example : Full;Complete;AllThere
-->
<FullReferenceAssemblyNames Condition="'$(FullReferenceAssemblyNames)' == ''">Full</FullReferenceAssemblyNames>
</PropertyGroup>
<!-- ContinueOnError takes 3 values: WarnAndContinue (true), ErrorAndStop (false), and ErrorAndContinue.
Default to ErrorAndStop, since that matches the behaviour in previous versions, and what users
typically expect -->
<PropertyGroup>
<ContinueOnError Condition="'$(ContinueOnError)' == ''">false</ContinueOnError>
</PropertyGroup>
<!-- Common Project System support -->
<PropertyGroup>
<CommonXamlResourcesDirectory Condition=" '$(CommonXamlResourcesDirectory)' == '' ">$(MSBuildThisFileDirectory)$(LangName)\</CommonXamlResourcesDirectory>
</PropertyGroup>
<!-- We need to fallback to en-US in case the xaml rules are not localized (possibly happen on community languages). -->
<PropertyGroup Condition="!Exists('$(CommonXamlResourcesDirectory)')">
<CommonXamlResourcesDirectory>$(MSBuildThisFileDirectory)en-US\</CommonXamlResourcesDirectory>
</PropertyGroup>
<ItemGroup Condition=" '$(DefineCommonItemSchemas)' == 'true' ">
<PropertyPageSchema Include="$(CommonXamlResourcesDirectory)ProjectItemsSchema.xaml"/>
<PropertyPageSchema Include="
$(CommonXamlResourcesDirectory)General.xaml;
$(CommonXamlResourcesDirectory)Debugger_General.xaml">
<Context>Project</Context>
</PropertyPageSchema>
<PropertyPageSchema Include="$(CommonXamlResourcesDirectory)General.BrowseObject.xaml">
<Context>BrowseObject</Context>
</PropertyPageSchema>
<PropertyPageSchema Include="$(CommonXamlResourcesDirectory)General_File.xaml">
<Context>File</Context>
</PropertyPageSchema>
<PropertyPageSchema Include="$(CommonXamlResourcesDirectory)SCC.xaml">
<Context>Invisible</Context>
</PropertyPageSchema>
<PropertyPageSchema Include="
$(CommonXamlResourcesDirectory)Folder.xaml;
$(CommonXamlResourcesDirectory)None.xaml;
$(CommonXamlResourcesDirectory)Content.xaml;
$(CommonXamlResourcesDirectory)EmbeddedResource.xaml;
">
<Context>File;BrowseObject</Context>
</PropertyPageSchema>
<PropertyPageSchema Include="$(CommonXamlResourcesDirectory)SpecialFolder.xaml;">
<Context>File;ProjectSubscriptionService</Context>
</PropertyPageSchema>
</ItemGroup>
<PropertyGroup>
<DefineCommonReferenceSchemas Condition=" '$(DefineCommonReferenceSchemas)' == '' ">$(DefineCommonItemSchemas)</DefineCommonReferenceSchemas>
</PropertyGroup>
<ItemGroup Condition=" '$(DefineCommonReferenceSchemas)' == 'true' ">
<!-- Assembly references -->
<PropertyPageSchema Include="$(CommonXamlResourcesDirectory)assemblyreference.xaml">
<Context>;BrowseObject</Context>
</PropertyPageSchema>
<PropertyPageSchema Include="$(CommonXamlResourcesDirectory)ResolvedAssemblyReference.xaml">
<Context>ProjectSubscriptionService;BrowseObject</Context>
</PropertyPageSchema>
<!-- COM references -->
<PropertyPageSchema Include="$(CommonXamlResourcesDirectory)COMReference.xaml">
<Context>;BrowseObject</Context>
</PropertyPageSchema>
<PropertyPageSchema Include="$(CommonXamlResourcesDirectory)ResolvedCOMReference.xaml">
<Context>ProjectSubscriptionService;BrowseObject</Context>
</PropertyPageSchema>
<!-- Project references -->
<PropertyPageSchema Include="$(CommonXamlResourcesDirectory)ProjectReference.xaml">
<Context>;BrowseObject</Context>
</PropertyPageSchema>
<PropertyPageSchema Include="$(CommonXamlResourcesDirectory)ResolvedProjectReference.xaml">
<Context>ProjectSubscriptionService;BrowseObject</Context>
</PropertyPageSchema>
</ItemGroup>
<ItemGroup Condition=" '$(DefineCommonCapabilities)' == 'true' ">
<ProjectCapability Include="
AssemblyReferences;
COMReferences;
ProjectReferences;
SharedProjectReferences;
OutputGroups;
AllTargetOutputGroups;
VisualStudioWellKnownOutputGroups;
SingleFileGenerators;
DeclaredSourceItems;
UserSourceItems;
" />
<ProjectCapability Condition=" '$(TargetPlatformIdentifier)' == 'Windows' and '$(TargetPlatformVersion)' &lt; 8.0 "
Include="BuildWindowsDesktopTarget" />
</ItemGroup>
<ItemDefinitionGroup Condition=" '$(DefineExplicitDefaults)' == 'true' ">
<None>
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
</None>
<Content>
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
</Content>
<Compile>
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
</Compile>
<EmbeddedResource>
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
</EmbeddedResource>
</ItemDefinitionGroup>
<!--
Target that allows targets consuming source control confirmation to establish a dependency on targets producing this information.
Any target that reads SourceRevisionId, PrivateRepositoryUrl, SourceRoot, and other source control properties and items
should depend on this target and be conditioned on '$(SourceControlInformationFeatureSupported)' == 'true'.
SourceRevisionId property uniquely identifies the source control revision of the repository the project belongs to.
For Git repositories this id is a commit hash, for TFVC repositories it's the changeset number, etc.
PrivateRepositoryUrl property stores the URL of the repository supplied by the CI server or retrieved from source control manager.
Targets consuming this property shall not publish its value implicitly as it might inadvertently reveal an internal URL.
Instead, they shall only do so if the project sets PublishRepositoryUrl property to true. For example, the NuGet Pack target
may include the repository URL in the nuspec file generated for NuGet package produced by the project if PublishRepositoryUrl is true.
SourceRoot item group lists all source roots that the project source files reside under and their mapping to source control server URLs,
if available. This includes both source files under source control as well as source files in source packages. SourceRoot items are
used by compilers to determine path map in deterministic build and by SourceLink provider, which maps local paths to URLs of source files
stored on the source control server.
Source control information provider that sets these properties and items shall execute before this target (by including
InitializeSourceControlInformation in its BeforeTargets) and set source control properties and items that haven't been initialized yet.
-->
<Target Name="InitializeSourceControlInformation" />
<PropertyGroup>
<SourceControlInformationFeatureSupported>true</SourceControlInformationFeatureSupported>
</PropertyGroup>
<!--
***********************************************************************************************
***********************************************************************************************
Build Section
***********************************************************************************************
***********************************************************************************************
-->
<!--
============================================================
_CheckForInvalidConfigurationAndPlatform
This target checks for errors in statically defined properties. By setting BeforeTargets, we try
to ensure that the target runs before any build related targets.
If your target requires this check and is running as a BeforeTargets of one of the first targets
of $(BuildDependsOn), $(RebuildDependsOn), or $(CleanDependsOn) you will need to set your DependsOn
to this target.
============================================================
-->
<Target
Name="_CheckForInvalidConfigurationAndPlatform"
BeforeTargets="$(BuildDependsOn);Build;$(RebuildDependsOn);Rebuild;$(CleanDependsOn);Clean">
<PropertyGroup>
<_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>
<_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>
<_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>
</PropertyGroup>
<Error Condition=" '$(_InvalidConfigurationError)' == 'true' " Text="$(_InvalidConfigurationMessageText)"/>
<Warning Condition=" '$(_InvalidConfigurationWarning)' == 'true' " Text="$(_InvalidConfigurationMessageText)"/>
<Message Condition="'$(DesignTimeBuild)' != 'true'" Text="Configuration=$(Configuration)" Importance="Low" />
<Message Condition="'$(DesignTimeBuild)' != 'true'" Text="Platform=$(Platform)" Importance="Low" />
<!-- Although we try to ensure a trailing slash, it's possible to circumvent this if the property is set on the command line -->
<Error Condition="'$(OutDir)' != '' and !HasTrailingSlash('$(OutDir)')" Text="The OutDir property must end with a trailing slash." />
<Error Condition="'$(BaseIntermediateOutputPath)' != '' and !HasTrailingSlash('$(BaseIntermediateOutputPath)')" Text="The BaseIntermediateOutputPath must end with a trailing slash." />
<Error Condition="'$(IntermediateOutputPath)' != '' and !HasTrailingSlash('$(IntermediateOutputPath)')" Text="The IntermediateOutputPath must end with a trailing slash." />
<!-- Also update the value of PlatformTargetAsMSBuildArchitecture per the value of Prefer32Bit. We are doing
this here because Prefer32Bit may be set anywhere in the targets, so we can't depend on it having the
correct value when we're trying to figure out PlatformTargetAsMSBuildArchitecture -->
<PropertyGroup Condition="'$(Prefer32Bit)' == 'true' and ('$(PlatformTarget)' == 'AnyCPU' or '$(PlatformTarget)' == '') and '$(PlatformTargetAsMSBuildArchitectureExplicitlySet)' != 'true'">
<PlatformTargetAsMSBuildArchitecture>x86</PlatformTargetAsMSBuildArchitecture>
</PropertyGroup>
<!--
Log an error if the user set MSBuildProjectExtensionsPath in the body of a project. In an SDK style project
if you set a value in the body, the value is not used by the top implicit import but is used by the bottom.
This can lead to confusing behavior and builds can fail for obscure reasons.
-->
<Error Condition=" '$(_InitialMSBuildProjectExtensionsPath)' != '' And '$(MSBuildProjectExtensionsPath)' != '$(_InitialMSBuildProjectExtensionsPath)' "
Code="MSB3540"
Text="The value of the property &quot;MSBuildProjectExtensionsPath&quot; was modified after it was used by MSBuild which can lead to unexpected build results. To set this property, you must do so before Microsoft.Common.props is imported, for example by using Directory.Build.props. For more information, please visit https://go.microsoft.com/fwlink/?linkid=869650"
/>
<!--
Log a warning if:
1. $(EnableBaseIntermediateOutputPathMismatchWarning) is 'true'
2. $(BaseIntermediateOutputPath) was set in the body of a project after its default value was set in Microsoft.Common.props
3. $(BaseIntermediateOutputPath) is not the same as $(MSBuildProjectExtensionsPath)
Similar to the error above, there are cases when users set $(BaseIntermediateOutputPath) in the body of their project and things build but only by coincidence.
MSBuild does not know if $(BaseIntermediateOutputPath) changing would cause problems so tools like NuGet must set $(EnableBaseIntermediateOutputPathMismatchWarning)
to 'true'.
-->
<Warning Condition=" '$(EnableBaseIntermediateOutputPathMismatchWarning)' == 'true' And '$(_InitialBaseIntermediateOutputPath)' != '$(BaseIntermediateOutputPath)' And '$(BaseIntermediateOutputPath)' != '$(MSBuildProjectExtensionsPath)' "
Code="MSB3539"
Text="The value of the property &quot;BaseIntermediateOutputPath&quot; was modified after it was used by MSBuild which can lead to unexpected build results. Tools such as NuGet will write outputs to the path specified by the &quot;MSBuildProjectExtensionsPath&quot; instead. To set this property, you must do so before Microsoft.Common.props is imported, for example by using Directory.Build.props. For more information, please visit https://go.microsoft.com/fwlink/?linkid=869650"
/>
</Target>
<!--
============================================================
Build
The main build entry point.
============================================================
-->
<PropertyGroup>
<BuildDependsOn>
BeforeBuild;
CoreBuild;
AfterBuild
</BuildDependsOn>
</PropertyGroup>
<Target
Name="Build"
Condition=" '$(_InvalidConfigurationWarning)' != 'true' "
DependsOnTargets="$(BuildDependsOn)"
Returns="@(TargetPathWithTargetPlatformMoniker)" />
<!--
============================================================
BeforeBuild
Redefine this target in your project in order to run tasks just before Build
============================================================
-->
<Target Name="BeforeBuild"/>
<!--
============================================================
AfterBuild
Redefine this target in your project in order to run tasks just after Build
============================================================
-->
<Target Name="AfterBuild"/>
<!--
============================================================
CoreBuild
The core build step calls each of the build targets.
============================================================
-->
<PropertyGroup>
<CoreBuildDependsOn>
BuildOnlySettings;
PrepareForBuild;
PreBuildEvent;
ResolveReferences;
PrepareResources;
ResolveKeySource;
Compile;
ExportWindowsMDFile;
UnmanagedUnregistration;
GenerateSerializationAssemblies;
CreateSatelliteAssemblies;
GenerateManifests;
GetTargetPath;
PrepareForRun;
UnmanagedRegistration;
IncrementalClean;
PostBuildEvent
</CoreBuildDependsOn>
</PropertyGroup>
<Target
Name="CoreBuild"
DependsOnTargets="$(CoreBuildDependsOn)">
<OnError ExecuteTargets="_TimeStampAfterCompile;PostBuildEvent" Condition="'$(RunPostBuildEvent)'=='Always' or '$(RunPostBuildEvent)'=='OnOutputUpdated'"/>
<OnError ExecuteTargets="_CleanRecordFileWrites"/>
</Target>
<!--
============================================================
Rebuild
Delete all intermediate and final build outputs, and then build the project from scratch.
============================================================
-->
<PropertyGroup>
<_ProjectDefaultTargets Condition="'$(MSBuildProjectDefaultTargets)' != ''">$(MSBuildProjectDefaultTargets)</_ProjectDefaultTargets>
<_ProjectDefaultTargets Condition="'$(MSBuildProjectDefaultTargets)' == ''">Build</_ProjectDefaultTargets>
<RebuildDependsOn>
BeforeRebuild;
Clean;
$(_ProjectDefaultTargets);
AfterRebuild;
</RebuildDependsOn>
<RebuildDependsOn Condition=" '$(MSBuildProjectDefaultTargets)' == 'Rebuild' " >
BeforeRebuild;
Clean;
Build;
AfterRebuild;
</RebuildDependsOn>
</PropertyGroup>
<Target
Name="Rebuild"
Condition=" '$(_InvalidConfigurationWarning)' != 'true' "
DependsOnTargets="$(RebuildDependsOn)"
Returns="$(TargetPath)"/>
<!--
============================================================
BeforeRebuild
Redefine this target in your project in order to run tasks just before Rebuild
============================================================
-->
<Target Name="BeforeRebuild"/>
<!--
============================================================
AfterRebuild
Redefine this target in your project in order to run tasks just after Rebuild
============================================================
-->
<Target Name="AfterRebuild"/>
<!--
============================================================
BuildGenerateSources
Redefine this target in your project in order to run tasks for BuildGenerateSources
Set BuildPassReferences to enable P2P builds
============================================================
-->
<PropertyGroup>
<BuildGenerateSourcesAction>Build</BuildGenerateSourcesAction>
</PropertyGroup>
<Target Name="BuildGenerateSources" DependsOnTargets="BuildGenerateSourcesTraverse;$(BuildGenerateSourcesAction)" />
<Target Name="BuildGenerateSourcesTraverse" DependsOnTargets="PrepareProjectReferences">
<MSBuild
Projects="@(_MSBuildProjectReferenceExistent)"
Targets="BuildGenerateSources"
BuildInParallel="$(BuildInParallel)"
Properties="%(_MSBuildProjectReferenceExistent.SetConfiguration); %(_MSBuildProjectReferenceExistent.SetPlatform); %(_MSBuildProjectReferenceExistent.SetTargetFramework);"
Condition="'$(BuildPassReferences)' == 'true' and '@(ProjectReferenceWithConfiguration)' != '' and '@(_MSBuildProjectReferenceExistent)' != '' and '%(_MSBuildProjectReferenceExistent.BuildReference)' == 'true'"
ContinueOnError="!$(BuildingProject)"
RemoveProperties="%(_MSBuildProjectReferenceExistent.GlobalPropertiesToRemove)">
</MSBuild>
</Target>
<!--
============================================================
BuildCompile
Redefine this target in your project in order to run tasks for BuildCompile
============================================================
-->
<PropertyGroup>
<BuildCompileAction>Build</BuildCompileAction>
</PropertyGroup>
<Target Name="BuildCompile" DependsOnTargets="BuildCompileTraverse;$(BuildCompileAction)" />
<Target Name="BuildCompileTraverse" DependsOnTargets="PrepareProjectReferences">
<MSBuild
Projects="@(_MSBuildProjectReferenceExistent)"
Targets="BuildCompile"
BuildInParallel="$(BuildInParallel)"
Properties="%(_MSBuildProjectReferenceExistent.SetConfiguration); %(_MSBuildProjectReferenceExistent.SetPlatform); %(_MSBuildProjectReferenceExistent.SetTargetFramework)"
Condition="'$(BuildPassReferences)' == 'true' and '@(ProjectReferenceWithConfiguration)' != '' and '@(_MSBuildProjectReferenceExistent)' != '' and '%(_MSBuildProjectReferenceExistent.BuildReference)' == 'true'"
ContinueOnError="!$(BuildingProject)"
RemoveProperties="%(_MSBuildProjectReferenceExistent.GlobalPropertiesToRemove)">
</MSBuild>
</Target>
<!--
============================================================
BuildLink
Redefine this target in your project in order to run tasks for BuildLink
============================================================
-->
<PropertyGroup>
<BuildLinkAction>Build</BuildLinkAction>
</PropertyGroup>
<Target Name="BuildLink" DependsOnTargets="BuildLinkTraverse;$(BuildLinkAction)" />
<Target Name="BuildLinkTraverse" DependsOnTargets="PrepareProjectReferences" >
<MSBuild
Projects="@(_MSBuildProjectReferenceExistent)"
Targets="BuildLink"
BuildInParallel="$(BuildInParallel)"
Properties="%(_MSBuildProjectReferenceExistent.SetConfiguration); %(_MSBuildProjectReferenceExistent.SetPlatform); %(_MSBuildProjectReferenceExistent.SetTargetFramework)"
Condition="'$(BuildPassReferences)' == 'true' and '@(ProjectReferenceWithConfiguration)' != '' and '@(_MSBuildProjectReferenceExistent)' != '' and '%(_MSBuildProjectReferenceExistent.BuildReference)' == 'true'"
ContinueOnError="!$(BuildingProject)"
RemoveProperties="%(_MSBuildProjectReferenceExistent.GlobalPropertiesToRemove)">
</MSBuild>
</Target>
<!--
============================================================
CopyRunEnvironmentFiles
Copy environment files necessary to run the user's app to the final directory.
This is a public target that can be invoked by an IDE.
This may be used by an IDE to make the app.config file available for running
the target app.
============================================================
-->
<Target
Name="CopyRunEnvironmentFiles"
DependsOnTargets="PrepareForBuild;SetWin32ManifestProperties;_CopyAppConfigFile;_CleanRecordFileWrites"/>
<!--
============================================================
Run
Run the final build output if it is a .EXE
============================================================
-->
<PropertyGroup>
<RunDependsOn></RunDependsOn>
</PropertyGroup>
<Target
Name="Run"
DependsOnTargets="$(RunDependsOn)">
<Error Text="Cannot run '$(TargetPath)' because project output type is not '.exe'" Condition="'$(TargetExt)'!='.exe'"/>
<Exec Command="$(TargetPath) $(StartArguments)" WorkingDirectory="$(OutDir)" Condition=" '$(StartWorkingDirectory)' == '' "/>
<Exec Command="$(TargetPath) $(StartArguments)" WorkingDirectory="$(StartWorkingDirectory)" Condition=" '$(StartWorkingDirectory)' != '' "/>
</Target>
<!--
***********************************************************************************************
***********************************************************************************************
BuildOnlySettings Section
***********************************************************************************************
***********************************************************************************************
-->
<!--
============================================================
BuildOnlySettings
This target is called only when doing a real build. It is specifically not called during project load.
============================================================
-->
<PropertyGroup>
<BuildingProject>false</BuildingProject>
</PropertyGroup>
<Target
Name="BuildOnlySettings">
<PropertyGroup>
<BuildingProject>true</BuildingProject>
</PropertyGroup>
</Target>
<!--
***********************************************************************************************
***********************************************************************************************
PrepareForBuild Section
***********************************************************************************************
***********************************************************************************************
-->
<!--
============================================================
PrepareForBuild
Prepare the prerequisites for building.
============================================================
-->
<PropertyGroup>
<PrepareForBuildDependsOn>GetFrameworkPaths;GetReferenceAssemblyPaths;AssignLinkMetadata</PrepareForBuildDependsOn>
</PropertyGroup>
<Target
Name="PrepareForBuild"
DependsOnTargets="$(PrepareForBuildDependsOn)">
<ItemGroup>
<AppConfigWithTargetPath Include="$(AppConfig)" Condition="'$(AppConfig)'!=''">
<TargetPath>$(TargetFileName).config</TargetPath>
</AppConfigWithTargetPath>
</ItemGroup>
<FindAppConfigFile PrimaryList="@(None)" SecondaryList="@(Content)" TargetPath="$(TargetFileName).config" Condition="'$(AppConfig)'==''">
<Output TaskParameter="AppConfigFile" ItemName="AppConfigWithTargetPath"/>
<Output TaskParameter="AppConfigFile" PropertyName="AppConfig"/>
</FindAppConfigFile>
<!-- Create the directories for intermediate and final build products, and any other arbitrary directories. -->
<!-- We are going to continue on error here so that if the tree is read only we will still get intellisense -->
<MakeDir Directories="$(OutDir);$(IntermediateOutputPath);@(DocFileItem->'%(RelativeDir)');@(CreateDirectory)" ContinueOnError="True"/>
</Target>
<!--
============================================================
GetFrameworkPaths
Get the paths for the .NET Framework installation directory
These paths are not used directly by this .targets file but are available for pre and
post build steps.
============================================================
-->
<PropertyGroup>
<Framework40Dir>@(_TargetFramework40DirectoryItem)</Framework40Dir>
<Framework35Dir>@(_TargetFramework35DirectoryItem)</Framework35Dir>
<Framework30Dir>@(_TargetFramework30DirectoryItem)</Framework30Dir>
<Framework20Dir>@(_TargetFramework20DirectoryItem)</Framework20Dir>
<!-- 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.-->
<FrameworkDir Condition="'$(FrameworkDir)' == '' and ('$(TargetFrameworkVersion)' == 'v2.0' or '$(TargetFrameworkVersion)' == 'v3.5' or '$(TargetFrameworkVersion)' == 'v4.0')">@(_TargetFramework20DirectoryItem)</FrameworkDir>
<FrameworkDir Condition="'$(FrameworkDir)' == ''">@(_TargetFramework40DirectoryItem)</FrameworkDir>
<TargetedFrameworkDir Condition="'$(TargetedFrameworkDir)' == ''">@(_TargetedFrameworkDirectoryItem)</TargetedFrameworkDir>
<FrameworkSDKDir Condition="'$(FrameworkSDKDir)' == ''">@(_TargetFrameworkSDKDirectoryItem)</FrameworkSDKDir>
<GetFrameworkPathsDependsOn></GetFrameworkPathsDependsOn>
</PropertyGroup>
<!-- This is a generally overriden target, for example it is overriden in the Microsoft.NETFramework.targets file -->
<Target Name="GetFrameworkPaths"/>
<!--
============================================================
GetReferenceAssemblyPaths
Get the paths for the Reference Assemblies for the known versions of the
.NET Framework.
These paths are used by the build process in order to resolve the correct
assemblies from the various directories, and to support multi-targeting
============================================================
-->
<Target
Name="GetReferenceAssemblyPaths"
DependsOnTargets="$(GetReferenceAssemblyPathsDependsOn);GetFrameworkPaths">
<!-- 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 -->
<PropertyGroup>
<TargetFrameworkDirectory Condition="'@(_CombinedTargetFrameworkDirectoriesItem)' == '$(TargetFrameworkDirectory)'"/>
</PropertyGroup>
<!-- By default if there is no root path set then the task will assume it is Program Files\Reference Assemblies\Microsoft\Framework-->
<GetReferenceAssemblyPaths
Condition="'$(TargetFrameworkMoniker)' != '' and ('$(_TargetFrameworkDirectories)' == '' or '$(_FullFrameworkReferenceAssemblyPaths)' == '')"
TargetFrameworkMoniker="$(TargetFrameworkMoniker)"
RootPath="$(TargetFrameworkRootPath)"
TargetFrameworkFallbackSearchPaths="$(TargetFrameworkFallbackSearchPaths)"
BypassFrameworkInstallChecks="$(BypassFrameworkInstallChecks)"
>
<Output TaskParameter="ReferenceAssemblyPaths" PropertyName="_TargetFrameworkDirectories"/>
<Output TaskParameter="FullFrameworkReferenceAssemblyPaths" PropertyName="_FullFrameworkReferenceAssemblyPaths"/>
<Output TaskParameter="TargetFrameworkMonikerDisplayName" PropertyName="TargetFrameworkMonikerDisplayName" Condition="'$(TargetFrameworkMonikerDisplayName)' == ''"/>
</GetReferenceAssemblyPaths>
<PropertyGroup>
<TargetFrameworkDirectory>$(_TargetFrameworkDirectories);$(TargetFrameworkDirectory);$(WinFXAssemblyDirectory)</TargetFrameworkDirectory>
<TargetFrameworkDirectory Condition="'$(TargetPlatformWinMDLocation)' != '' and Exists('$(TargetPlatformWinMDLocation)')">$(TargetFrameworkDirectory);$(TargetPlatformWinMDLocation)</TargetFrameworkDirectory>
</PropertyGroup>
<!-- Remove the AssemblyFolders if no target framework directories could be found. This is to prevent us from
resolving from the assemblyfolders global location if we are not acutally targeting a framework-->
<PropertyGroup>
<RemoveAssemblyFoldersIfNoTargetFramework Condition="'$(RemoveAssemblyFoldersIfNoTargetFramework)' == ''">true</RemoveAssemblyFoldersIfNoTargetFramework>
</PropertyGroup>
<PropertyGroup Condition="'$(_TargetFrameworkDirectories)' == '' and '$(AssemblySearchPaths)' != '' and '$(RemoveAssemblyFoldersIfNoTargetFramework)' == 'true'">
<AssemblySearchPaths>$(AssemblySearchPaths.Replace('{AssemblyFolders}', '').Split(';'))</AssemblySearchPaths>
</PropertyGroup>
<ItemGroup Condition="'$(ImplicitlyExpandDesignTimeFacades)' == 'true'">
<DesignTimeFacadeDirectoryRoots Include="$(TargetFrameworkDirectory)" />
<DesignTimeFacadeDirectories Include="%(DesignTimeFacadeDirectoryRoots.Identity)Facades\" Condition="Exists('%(DesignTimeFacadeDirectoryRoots.Identity)Facades\')" />
</ItemGroup>
<PropertyGroup Condition="'@(DesignTimeFacadeDirectories)' != ''">
<TargetFrameworkDirectory>$(TargetFrameworkDirectory);@(DesignTimeFacadeDirectories)</TargetFrameworkDirectory>
</PropertyGroup>
<PropertyGroup Condition="'$(_TargetFrameworkDirectories)' == ''">
<TargetFrameworkProfile/>
</PropertyGroup>
</Target>
<!-- Returns target framework moniker. E.g. ".NETFramework,Version=v4.0.1" -->
<Target Name="GetTargetFrameworkMoniker"
Returns="$(TargetFrameworkMoniker)"/>
<!-- Returns target framework moniker display name. E.g. ".NET Framework 4 Platform Update 1 (KB2478063)" -->
<Target Name="GetTargetFrameworkMonikerDisplayName"
DependsOnTargets="GetFrameworkPaths;GetReferenceAssemblyPaths"
Returns="$(TargetFrameworkMonikerDisplayName)"/>
<!-- Returns semicolon separated list of target framework directories.
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\" -->
<Target Name="GetTargetFrameworkDirectories"
DependsOnTargets="GetFrameworkPaths;GetReferenceAssemblyPaths"
Returns="$(TargetFrameworkDirectory)"/>
<!--
============================================================
AssignLinkMetadata
For items of a certain set of whitelisted types, make sure that
if they are defined in a file other than the project file, that
they have "Link" metadata set to an appropriate default.
============================================================
-->
<Target Name="AssignLinkMetadata" Condition=" '$(SynthesizeLinkMetadata)' == 'true' ">
<!-- NONE ITEMS -->
<AssignLinkMetadata Items="@(None)"
Condition="'@(None)' != '' and '%(None.DefiningProjectFullPath)' != '$(MSBuildProjectFullPath)'">
<Output TaskParameter="OutputItems" ItemName="_Temp" />
</AssignLinkMetadata>
<ItemGroup>
<None Remove="@(_Temp)" />
<None Include="@(_Temp)" />
<_Temp Remove="@(_Temp)" />
</ItemGroup>
<!-- CONTENT ITEMS -->
<AssignLinkMetadata Items="@(Content)"
Condition="'@(Content)' != '' and '%(Content.DefiningProjectFullPath)' != '$(MSBuildProjectFullPath)'">
<Output TaskParameter="OutputItems" ItemName="_Temp" />
</AssignLinkMetadata>
<ItemGroup>
<Content Remove="@(_Temp)" />
<Content Include="@(_Temp)" />
<_Temp Remove="@(_Temp)" />
</ItemGroup>
<!-- PAGE ITEMS -->
<AssignLinkMetadata Items="@(Page)"
Condition="'@(Page)' != '' and '%(Page.DefiningProjectFullPath)' != '$(MSBuildProjectFullPath)'">
<Output TaskParameter="OutputItems" ItemName="_Temp" />
</AssignLinkMetadata>
<ItemGroup>
<Page Remove="@(_Temp)" />
<Page Include="@(_Temp)" />
<_Temp Remove="@(_Temp)" />
</ItemGroup>
<!-- APPLICATIONDEFINITION ITEMS -->
<AssignLinkMetadata Items="@(ApplicationDefinition)"
Condition="'@(ApplicationDefinition)' != '' and '%(ApplicationDefinition.DefiningProjectFullPath)' != '$(MSBuildProjectFullPath)'">
<Output TaskParameter="OutputItems" ItemName="_Temp" />
</AssignLinkMetadata>
<ItemGroup>
<ApplicationDefinition Remove="@(_Temp)" />
<ApplicationDefinition Include="@(_Temp)" />
<_Temp Remove="@(_Temp)" />
</ItemGroup>
<!-- EMBEDDEDRESOURCE ITEMS -->
<AssignLinkMetadata Items="@(EmbeddedResource)"
Condition="'@(EmbeddedResource)' != '' and '%(EmbeddedResource.DefiningProjectFullPath)' != '$(MSBuildProjectFullPath)'">
<Output TaskParameter="OutputItems" ItemName="_Temp" />
</AssignLinkMetadata>
<ItemGroup>
<EmbeddedResource Remove="@(_Temp)" />
<EmbeddedResource Include="@(_Temp)" />
<_Temp Remove="@(_Temp)" />
</ItemGroup>
</Target>
<!--
***********************************************************************************************
***********************************************************************************************
PreBuildEvent Section
***********************************************************************************************
***********************************************************************************************
-->
<!--
============================================================
PreBuildEvent
Run the pre-build event if there is one.
============================================================
-->
<PropertyGroup>
<PreBuildEventDependsOn></PreBuildEventDependsOn>
</PropertyGroup>
<Target
Name="PreBuildEvent"
Condition="'$(PreBuildEvent)'!=''"
DependsOnTargets="$(PreBuildEventDependsOn)">
<Exec WorkingDirectory="$(OutDir)" Command="$(PreBuildEvent)" />
</Target>
<!--
***********************************************************************************************
***********************************************************************************************
UnmanagedUnregistration Section
***********************************************************************************************
***********************************************************************************************
-->
<!--
============================================================
UnmanagedUnregistration
If the main assembly had previously been registered for COM interop, unregister it now.
We will re-register the new version after it has been built.
============================================================
-->
<PropertyGroup>
<UnmanagedUnregistrationDependsOn></UnmanagedUnregistrationDependsOn>
</PropertyGroup>
<Target
Name="UnmanagedUnregistration"
Condition="(('$(_AssemblyTimestampBeforeCompile)' != '$(_AssemblyTimestampAfterCompile)' or '$(RegisterForComInterop)' != 'true' or '$(OutputType)' != 'library') or
('$(_AssemblyTimestampBeforeCompile)' == '')) and
Exists('@(_UnmanagedRegistrationCache)')"
DependsOnTargets="$(UnmanagedUnregistrationDependsOn)">
<PropertyGroup>
<UnregisterAssemblyMSBuildArchitecture Condition="'$(UnregisterAssemblyMSBuildArchitecture)' == ''">$(PlatformTargetAsMSBuildArchitecture)</UnregisterAssemblyMSBuildArchitecture>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFrameworkAsMSBuildRuntime)' != '' and '$(UnregisterAssemblyMSBuildArchitecture)' != ''">
<!-- Falling back to the current runtime if we are targeting CLR2 and the task host doesn't exist will lead to
incorrect behavior in some cases, but it's the same incorrect behavior as Visual Studio 2010, and thus better
than causing build breaks on upgrade to Win8 the way not doing so would. For more details, see the
corresponding comment in GenerateResource. -->
<UnregisterAssemblyMSBuildRuntime
Condition="'$(UnregisterAssemblyMSBuildRuntime)' == '' and
$([MSBuild]::DoesTaskHostExist(`$(TargetFrameworkAsMSBuildRuntime)`, `$(UnregisterAssemblyMSBuildArchitecture)`))">$(TargetFrameworkAsMSBuildRuntime)</UnregisterAssemblyMSBuildRuntime>
<!-- If the targeted runtime doesn't exist, fall back to current -->
<UnregisterAssemblyMSBuildRuntime Condition="'$(UnregisterAssemblyMSBuildRuntime)' == ''">CurrentRuntime</UnregisterAssemblyMSBuildRuntime>
</PropertyGroup>
<UnregisterAssembly AssemblyListFile="@(_UnmanagedRegistrationCache)"
MSBuildArchitecture="$(UnregisterAssemblyMSBuildArchitecture)"
MSBuildRuntime="$(UnregisterAssemblyMSBuildRuntime)" />
</Target>
<!--
***********************************************************************************************
***********************************************************************************************
ResolveReferences Section
***********************************************************************************************
***********************************************************************************************
-->
<!--
============================================================
GetTargetFrameworkVersion
This stand-alone target returns the target framework version (i.e. v3.5, v4.0, etc.)
that would be used if we built this project.
============================================================
-->
<Target
Name="GetTargetFrameworkVersion"
Returns="$(TargetFrameworkVersion)">
</Target>
<!--
============================================================
ResolveReferences
============================================================
-->
<PropertyGroup>
<ResolveReferencesDependsOn>
BeforeResolveReferences;
AssignProjectConfiguration;
ResolveProjectReferences;
FindInvalidProjectReferences;
ResolveNativeReferences;
ResolveAssemblyReferences;
GenerateBindingRedirects;
ResolveComReferences;
AfterResolveReferences
</ResolveReferencesDependsOn>
</PropertyGroup>
<Target
Name="ResolveReferences"
Returns="@(ReferencePath)"
DependsOnTargets="$(ResolveReferencesDependsOn)"/>
<!--
============================================================
BeforeResolveReferences
Redefine this target in your project in order to run tasks just before ResolveReferences
============================================================
-->
<Target Name="BeforeResolveReferences"/>
<!--
============================================================
AfterResolveReferences
Redefine this target in your project in order to run tasks just after ResolveReferences
============================================================
-->
<Target Name="AfterResolveReferences"/>
<!--
============================================================
AssignProjectConfiguration
Assigns the appropriate configuration to each project in the list of project references passed in.
Adds to the project references passed in any project references implied by dependencies expressed in the solution file, if any.
[IN]
@(ProjectReference) - the list of all project references
[OUT]
@(ProjectReferenceWithConfiguration) - the list of project references (MSBuild and potentially VSIP projects)
with metadata values FullConfiguration, Configuration, Platform,
SetConfiguration, and SetPlatform
============================================================
-->
<Target
Name="AssignProjectConfiguration"
Condition="'$(CurrentSolutionConfigurationContents)' != '' or '@(ProjectReference)'!=''">
<PropertyGroup>
<OnlyReferenceAndBuildProjectsEnabledInSolutionConfiguration Condition="'$(OnlyReferenceAndBuildProjectsEnabledInSolutionConfiguration)' == ''">true</OnlyReferenceAndBuildProjectsEnabledInSolutionConfiguration>
<ShouldUnsetParentConfigurationAndPlatform Condition="'$(ShouldUnsetParentConfigurationAndPlatform)' == '' and ('$(BuildingInsideVisualStudio)' == 'true' or '$(BuildingSolutionFile)' == 'true')">true</ShouldUnsetParentConfigurationAndPlatform>
<ShouldUnsetParentConfigurationAndPlatform Condition="'$(ShouldUnsetParentConfigurationAndPlatform)' == ''">false</ShouldUnsetParentConfigurationAndPlatform>
<!-- Web Application projects can "secretly" reference Silverlight projects, which can take project dependencies on that same Web Application. If the project
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
want this to happen, so just turn off synthetic project reference generation for Silverlight projects. -->
<AddSyntheticProjectReferencesForSolutionDependencies Condition="'$(AddSyntheticProjectReferencesForSolutionDependencies)' == '' and '$(TargetFrameworkIdentifier)' == 'Silverlight'">false</AddSyntheticProjectReferencesForSolutionDependencies>
<!-- 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-->
<AddSyntheticProjectReferencesForSolutionDependencies Condition="'$(AddSyntheticProjectReferencesForSolutionDependencies)' == '' and '$(BuildingInsideVisualStudio)' != 'true'">true</AddSyntheticProjectReferencesForSolutionDependencies>
</PropertyGroup>
<!-- Assign a project configuration to each project reference if we're building a solution file. -->
<AssignProjectConfiguration
ProjectReferences="@(ProjectReference)"
CurrentProject="$(MSBuildProjectFullPath)"
CurrentProjectConfiguration="$(Configuration)"
CurrentProjectPlatform="$(Platform)"
DefaultToVcxPlatformMapping="$(DefaultToVcxPlatformMapping)"
VcxToDefaultPlatformMapping="$(VcxToDefaultPlatformMapping)"
OutputType="$(OutputType)"
ResolveConfigurationPlatformUsingMappings="false"
SolutionConfigurationContents="$(CurrentSolutionConfigurationContents)"
AddSyntheticProjectReferencesForSolutionDependencies="$(AddSyntheticProjectReferencesForSolutionDependencies)"
OnlyReferenceAndBuildProjectsEnabledInSolutionConfiguration = "$(OnlyReferenceAndBuildProjectsEnabledInSolutionConfiguration)"
ShouldUnsetParentConfigurationAndPlatform = "$(ShouldUnsetParentConfigurationAndPlatform)" >
<!-- EMITTED FOR COMPATIBILITY REASONS ONLY. CONSUME PROJECTREFERENCEWITHCONFIGURATION INSTEAD -->
<Output TaskParameter="AssignedProjects" ItemName="_ProjectReferenceWithConfiguration"/>
<Output TaskParameter="UnassignedProjects" ItemName="_ProjectReferenceWithConfiguration"/>
<Output TaskParameter="AssignedProjects" ItemName="ProjectReferenceWithConfiguration"/>
<Output TaskParameter="UnassignedProjects" ItemName="ProjectReferenceWithConfiguration"/>
</AssignProjectConfiguration>
<ItemGroup>
<_ProjectReferenceWithConfiguration>
<BuildReference Condition="'%(_ProjectReferenceWithConfiguration.BuildReference)' == ''">true</BuildReference>
<ReferenceOutputAssembly Condition="'%(_ProjectReferenceWithConfiguration.ReferenceOutputAssembly)' == ''">true</ReferenceOutputAssembly>
</_ProjectReferenceWithConfiguration>
<ProjectReferenceWithConfiguration>
<BuildReference Condition="'%(ProjectReferenceWithConfiguration.BuildReference)' == ''">true</BuildReference>
<ReferenceOutputAssembly Condition="'%(ProjectReferenceWithConfiguration.ReferenceOutputAssembly)' == ''">true</ReferenceOutputAssembly>
</ProjectReferenceWithConfiguration>
</ItemGroup>
</Target>
<!--
============================================================
_SplitProjectReferencesByFileExistence
Split referenced projects into two lists: those that exist on
disk and those that don't.
============================================================
-->
<Target
Name="_SplitProjectReferencesByFileExistence">
<!--
Use this task for matching projects with pre-resolved project outputs set by the IDE
if building inside the IDE. The IDE only includes non-MSBuild projects in the output list. We'll
use MSBuild to resolve MSBuild projects.
This task will resolve VSIP (3rd party) project references and create a new item list with only project references
to projects in the MSBuild format.
-->
<ResolveNonMSBuildProjectOutput
ProjectReferences="@(ProjectReferenceWithConfiguration)"
PreresolvedProjectOutputs="$(VSIDEResolvedNonMSBuildProjectOutputs)"
Condition="'$(BuildingInsideVisualStudio)'=='true' and '@(ProjectReferenceWithConfiguration)'!=''">
<Output TaskParameter="ResolvedOutputPaths" ItemName="_ResolvedProjectReferencePaths"/>
<Output TaskParameter="UnresolvedProjectReferences" ItemName="_MSBuildProjectReference"/>
</ResolveNonMSBuildProjectOutput>
<!--
If building from the command line, simply copy the ProjectReferenceWithConfiguration item list to _MSBuildProjectReference,
since we have to assume all projects are in the MSBuild format. We have no way of building
VSIP (3rd party) projects from the command line.
-->
<ItemGroup>
<_MSBuildProjectReference Include="@(ProjectReferenceWithConfiguration)" Condition="'$(BuildingInsideVisualStudio)'!='true' and '@(ProjectReferenceWithConfiguration)'!=''"/>
</ItemGroup>
<!-- Break the project list into two lists: those that exist on disk and those that don't. -->
<ItemGroup>
<_MSBuildProjectReferenceExistent Include="@(_MSBuildProjectReference)" Condition="Exists('%(Identity)')"/>
<_MSBuildProjectReferenceNonexistent Include="@(_MSBuildProjectReference)" Condition="!Exists('%(Identity)')"/>
</ItemGroup>
</Target>
<!--
====================================================================================
_GetProjectReferenceTargetFrameworkProperties
Builds the GetTargetFrameworks target of all existent project references to get a list
of all supported TargetFrameworks of the referenced projects. Calls the
GetReferenceNearestTargetFrameworkTask to determine the closest match for each project.
This allows a cross-targeting project to select how it should be configured to build
against the most appropriate target for the referring target framework.
======================================================================================
-->
<Target Name="_GetProjectReferenceTargetFrameworkProperties">
<!--
Select the moniker to send to each project reference if not already set. NugetTargetMoniker (NTM) is preferred by default over
TargetFrameworkMoniker (TFM) because it is required to disambiguate the UWP case where TFM is fixed at .NETCore,Version=v5.0 and
has floating NTM=UAP,Version=vX.Y.Z. However, in other cases (classic PCLs), NTM contains multiple values and that will cause the MSBuild
invocation below to fail by passing invalid properties. Therefore we do not use the NTM if it contains a semicolon.
-->
<PropertyGroup Condition="'$(ReferringTargetFrameworkForProjectReferences)' == ''">
<ReferringTargetFrameworkForProjectReferences Condition="'$(NugetTargetMoniker)' != '' and !$(NuGetTargetMoniker.Contains(';'))">$(NugetTargetMoniker)</ReferringTargetFrameworkForProjectReferences>
<ReferringTargetFrameworkForProjectReferences Condition="'$(NugetTargetMoniker)' == ''">$(TargetFrameworkMoniker)</ReferringTargetFrameworkForProjectReferences>
</PropertyGroup>
<!--
Honor SkipGetTargetFrameworkProperties=true metadata on project references
to mean that the project reference is known not to target multiple frameworks
and the mechanism here for selecting the best one can be skipped as an optimization.
We give this treatment to .vcxproj by default since no .vcxproj can target more
than one framework.
-->
<ItemGroup>
<_MSBuildProjectReferenceExistent Condition="'%(_MSBuildProjectReferenceExistent.SkipGetTargetFrameworkProperties)' == '' and ('%(Extension)' == '.vcxproj' or '%(Extension)' == '.nativeproj')">
<SkipGetTargetFrameworkProperties>true</SkipGetTargetFrameworkProperties>
</_MSBuildProjectReferenceExistent>
</ItemGroup>
<!--
Allow project references to specify which target framework properties to set and their values
without consulting the referenced project. This has two use cases:
1. A caller may wish to pick a compatible but sub-optimal target framework. For example,
to unit test the .NETStandard implementation using a .NETFramework caller even though
there is also a .NETFramework implementation.
2. As an escape hatch for cases where the compatibility check performed by
GetTargetFrameworkProperties is faulty.
-->
<ItemGroup>
<_MSBuildProjectReferenceExistent Condition="'%(_MSBuildProjectReferenceExistent.SetTargetFramework)' != ''">
<SkipGetTargetFrameworkProperties>true</SkipGetTargetFrameworkProperties>
</_MSBuildProjectReferenceExistent>
</ItemGroup>
<!--
Get reference target framework lists.
Note: A future optimization could cache the closest match and set the target framework on
this MSBuild task invocation. This would (optimistically) save an evaluation of the referenced
project when the answer is the same.
-->
<MSBuild
Projects="@(_MSBuildProjectReferenceExistent)"
Targets="GetTargetFrameworks"
BuildInParallel="$(BuildInParallel)"
Properties="%(_MSBuildProjectReferenceExistent.SetConfiguration); %(_MSBuildProjectReferenceExistent.SetPlatform)"
ContinueOnError="!$(BuildingProject)"
RemoveProperties="%(_MSBuildProjectReferenceExistent.GlobalPropertiesToRemove);TargetFramework;RuntimeIdentifier"
Condition="'%(_MSBuildProjectReferenceExistent.SkipGetTargetFrameworkProperties)' != 'true'"
SkipNonexistentTargets="true">
<Output TaskParameter="TargetOutputs" ItemName="_ProjectReferenceTargetFrameworkPossibilities" />
</MSBuild>
<ItemGroup>
<!--
Preserve the ItemSpec value on the _ProjectReferenceTargetFrameworkPossibilities. Because relative paths in another project
context would be incorrect, the MSBuild task invocation needs expands the project reference paths in the MSBuild task above.
This is generally OK, but if the list is copied the OriginalItemSpec can become the expanded value and cause issues correlating
a project reference back to an Item instance.
-->
<_ProjectReferenceTargetFrameworkPossibilitiesOriginalItemSpec Include="@(_ProjectReferenceTargetFrameworkPossibilities->'%(OriginalItemSpec)')"/>
<_ProjectReferenceTargetFrameworkPossibilities Remove="@(_ProjectReferenceTargetFrameworkPossibilities)" />
<_ProjectReferenceTargetFrameworkPossibilities Include="@(_ProjectReferenceTargetFrameworkPossibilitiesOriginalItemSpec)"/>
</ItemGroup>
<!-- For each reference, get closest match -->
<GetReferenceNearestTargetFrameworkTask AnnotatedProjectReferences="@(_ProjectReferenceTargetFrameworkPossibilities)"
CurrentProjectTargetFramework="$(ReferringTargetFrameworkForProjectReferences)"
CurrentProjectName="$(MSBuildProjectName)"
FallbackTargetFrameworks="$(AssetTargetFallback)"
Condition="'@(_ProjectReferenceTargetFrameworkPossibilities->Count())' != '0' and '$(ReferringTargetFrameworkForProjectReferences)' != ''">
<Output ItemName="AnnotatedProjects" TaskParameter="AssignedProjects" />
</GetReferenceNearestTargetFrameworkTask>
<ItemGroup>
<!--
If the task was skipped or the current TargetFramework is empty, AnnotatedProjects will be empty.
In this case, copy _ProjectReferenceTargetFrameworkPossibilities as is. See:
https://github.com/dotnet/sdk/issues/416
-->
<AnnotatedProjects Include="@(_ProjectReferenceTargetFrameworkPossibilities)"
Condition="'$(ReferringTargetFrameworkForProjectReferences)' == ''" />
<!-- If the NearestTargetFramework property was set and the project multi-targets, SetTargetFramework must be set. -->
<AnnotatedProjects Condition="'@(AnnotatedProjects)' == '%(Identity)' and '%(AnnotatedProjects.NearestTargetFramework)' != '' and '%(AnnotatedProjects.HasSingleTargetFramework)' != 'true'">
<SetTargetFramework>TargetFramework=%(AnnotatedProjects.NearestTargetFramework)</SetTargetFramework>
</AnnotatedProjects>
<!--
If the NearestTargetFramework property was not set or the project has a single TargetFramework, we need to Undefine
TargetFramework to avoid another project evaluation.
-->
<AnnotatedProjects Condition="'@(AnnotatedProjects)' == '%(Identity)' and ('%(AnnotatedProjects.NearestTargetFramework)' == '' or '%(AnnotatedProjects.HasSingleTargetFramework)' == 'true')">
<UndefineProperties>%(AnnotatedProjects.UndefineProperties);TargetFramework</UndefineProperties>
</AnnotatedProjects>
<!-- If the project is RID agnostic, undefine the RuntimeIdentifier property to avoid another evaluation. -->
<AnnotatedProjects Condition="'@(AnnotatedProjects)' == '%(Identity)' and '%(AnnotatedProjects.IsRidAgnostic)' == 'true'">
<UndefineProperties>%(AnnotatedProjects.UndefineProperties);RuntimeIdentifier</UndefineProperties>
</AnnotatedProjects>
<!--
Remove the items we've touched from _MSBuildProjectReferenceExistent. This will leave all projects where
SkipGetTargetFrameworkProperties was set. Then add all AnnotatedProjects back.
-->
<_MSBuildProjectReferenceExistent Remove="@(_MSBuildProjectReferenceExistent)" Condition="'%(_MSBuildProjectReferenceExistent.SkipGetTargetFrameworkProperties)' != 'true'" />
<_MSBuildProjectReferenceExistent Include="@(AnnotatedProjects)" />
</ItemGroup>
</Target>
<Target Name="GetTargetFrameworks"
Returns="@(_ThisProjectBuildMetadata)">
<ItemGroup>
<_ThisProjectBuildMetadata Include="$(MSBuildProjectFullPath)">
<TargetFrameworks Condition="'$(TargetFrameworks)' != ''">$(TargetFrameworks)</TargetFrameworks>
<TargetFrameworks Condition="'$(TargetFrameworks)' == ''">$(TargetFramework)</TargetFrameworks>
<HasSingleTargetFramework>true</HasSingleTargetFramework>
<HasSingleTargetFramework Condition="'$(IsCrossTargetingBuild)' == 'true'">false</HasSingleTargetFramework>
<!-- indicate to caller that project is RID agnostic so that a global property RuntimeIdentifier value can be removed -->
<IsRidAgnostic>false</IsRidAgnostic>
<IsRidAgnostic Condition=" '$(RuntimeIdentifier)' == '' and '$(RuntimeIdentifiers)' == '' ">true</IsRidAgnostic>
</_ThisProjectBuildMetadata>
</ItemGroup>
</Target>
<!--
============================================================
GetTargetFrameworkProperties
Overrridden by cross-targeting projects to return the set of
properties (in the form "key1=value1;...keyN=valueN") needed
to build it with the best target for the referring project's
target framework.
The referring project's $(TargetFrameworkMoniker) is passed
in as $(ReferringTargetFramework)
-->
<Target Name="GetTargetFrameworkProperties" />
<!--
============================================================
PrepareProjectReferences
Prepares project references for consumption by other targets.
[IN]
@(ProjectReference) - The list of project references.
[OUT]
@(ProjectReferenceWithConfiguration) - Project references with apporpriate metadata
@(_MSBuildProjectReferenceExistent) - Subset of @(ProjectReferenceWithConfiguration) that exist
with added SetTargetFramework metadata for cross-targeting
@(_MSBuildProjectReferenceNonExistent) - Subset of @(ProjectReferenceWithConfiguration) that do not exist
============================================================
-->
<PropertyGroup>
<PrepareProjectReferencesDependsOn>
AssignProjectConfiguration;
_SplitProjectReferencesByFileExistence;
_GetProjectReferenceTargetFrameworkProperties
</PrepareProjectReferencesDependsOn>
</PropertyGroup>
<Target Name="PrepareProjectReferences" DependsOnTargets="$(PrepareProjectReferencesDependsOn)" />
<!--
============================================================
ResolveProjectReferences
Build referenced projects:
[IN]
@(ProjectReferenceWithConfiguration) - The list of project references.
[OUT]
@(_ResolvedNativeProjectReferencePaths) - Paths to referenced native projects.
@(_ResolvedProjectReferencePaths) - Paths to referenced managed projects.
============================================================
-->
<!-- By default, the outputs of project references are passed to the compiler -->
<ItemDefinitionGroup>
<ProjectReference>
<!-- Target to build in the project reference; by default, this property is blank, indicating the default targets-->
<Targets>$(ProjectReferenceBuildTargets)</Targets>
<!-- 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. -->
<OutputItemType/>
<ReferenceSourceTarget>ProjectReference</ReferenceSourceTarget>
</ProjectReference>
</ItemDefinitionGroup>
<Target
Name="ResolveProjectReferences"
DependsOnTargets="PrepareProjectReferences"
Returns="@(_ResolvedNativeProjectReferencePaths);@(_ResolvedProjectReferencePaths)">
<!--
When building this project from the IDE, just gather the referenced build outputs.
The IDE will already have built the project, so there's no need to do it again here.
The ContinueOnError setting is here so that, during project load, as
much information as possible will be passed to the compilers.
-->
<MSBuild
Projects="@(_MSBuildProjectReferenceExistent)"
Targets="GetTargetPath"
BuildInParallel="$(BuildInParallel)"
Properties="%(_MSBuildProjectReferenceExistent.SetConfiguration); %(_MSBuildProjectReferenceExistent.SetPlatform); %(_MSBuildProjectReferenceExistent.SetTargetFramework)"
Condition="'%(_MSBuildProjectReferenceExistent.BuildReference)' == 'true' and '@(ProjectReferenceWithConfiguration)' != '' and ('$(BuildingInsideVisualStudio)' == 'true' or '$(BuildProjectReferences)' != 'true') and '$(VisualStudioVersion)' != '10.0' and '@(_MSBuildProjectReferenceExistent)' != ''"
ContinueOnError="!$(BuildingProject)"
RemoveProperties="%(_MSBuildProjectReferenceExistent.GlobalPropertiesToRemove)">
<Output TaskParameter="TargetOutputs" ItemName="_ResolvedProjectReferencePaths" Condition="'%(_MSBuildProjectReferenceExistent.ReferenceOutputAssembly)'=='true'"/>
<Output TaskParameter="TargetOutputs" ItemName="%(_MSBuildProjectReferenceExistent.OutputItemType)" Condition="'%(_MSBuildProjectReferenceExistent.OutputItemType)' != ''"/>
</MSBuild>
<!--
QUIRKING FOR DEV10
In the 4.0 version of the targets, we built the targets specified in the Targets metadata in addition to
GetTargetPath when building in the IDE. In 4.5, we changed this to just GetTargetPath because it was
causing performance trouble with certain systems that specified targets that did a significant amount of
work in the Targets metadata, expecting them to only build when doing a real build.
However, that change broke C++ unit testing in Dev10 + 4.5 scenarios, because they required use of the
Targets metadata in order to get design time builds to work properly. Thus, we need to make sure we
restore the Dev10 behavior when building on Dev10.
-->
<MSBuild
Projects="@(_MSBuildProjectReferenceExistent)"
Targets="%(_MSBuildProjectReferenceExistent.Targets);GetTargetPath"
BuildInParallel="$(BuildInParallel)"
Properties="%(_MSBuildProjectReferenceExistent.SetConfiguration); %(_MSBuildProjectReferenceExistent.SetPlatform); %(_MSBuildProjectReferenceExistent.SetTargetFramework)"
Condition="'%(_MSBuildProjectReferenceExistent.BuildReference)' == 'true' and '@(ProjectReferenceWithConfiguration)' != '' and ('$(BuildingInsideVisualStudio)' == 'true' or '$(BuildProjectReferences)' != 'true') and '$(VisualStudioVersion)' == '10.0' and '@(_MSBuildProjectReferenceExistent)' != ''"
ContinueOnError="!$(BuildingProject)"
RemoveProperties="%(_MSBuildProjectReferenceExistent.GlobalPropertiesToRemove)">
<Output TaskParameter="TargetOutputs" ItemName="_ResolvedProjectReferencePaths" Condition="'%(_MSBuildProjectReferenceExistent.ReferenceOutputAssembly)'=='true'"/>
<Output TaskParameter="TargetOutputs" ItemName="%(_MSBuildProjectReferenceExistent.OutputItemType)" Condition="'%(_MSBuildProjectReferenceExistent.OutputItemType)' != ''"/>
</MSBuild>
<!--
Build referenced projects when building from the command line.
-->
<MSBuild
Projects="@(_MSBuildProjectReferenceExistent)"
Targets="%(_MSBuildProjectReferenceExistent.Targets)"
BuildInParallel="$(BuildInParallel)"
Properties="%(_MSBuildProjectReferenceExistent.SetConfiguration); %(_MSBuildProjectReferenceExistent.SetPlatform); %(_MSBuildProjectReferenceExistent.SetTargetFramework)"
Condition="'%(_MSBuildProjectReferenceExistent.BuildReference)' == 'true' and '@(ProjectReferenceWithConfiguration)' != '' and '$(BuildingInsideVisualStudio)' != 'true' and '$(BuildProjectReferences)' == 'true' and '@(_MSBuildProjectReferenceExistent)' != ''"
ContinueOnError="$(ContinueOnError)"
RemoveProperties="%(_MSBuildProjectReferenceExistent.GlobalPropertiesToRemove)">
<Output TaskParameter="TargetOutputs" ItemName="_ResolvedProjectReferencePaths" Condition="'%(_MSBuildProjectReferenceExistent.ReferenceOutputAssembly)'=='true' or '$(DesignTimeBuild)' == 'true'"/>
<Output TaskParameter="TargetOutputs" ItemName="%(_MSBuildProjectReferenceExistent.OutputItemType)" Condition="'%(_MSBuildProjectReferenceExistent.OutputItemType)' != ''"/>
</MSBuild>
<!--
Get manifest items from the (non-exe) built project references (to feed them into ResolveNativeReference).
-->
<MSBuild
Projects="@(_MSBuildProjectReferenceExistent)"
Targets="GetNativeManifest"
BuildInParallel="$(BuildInParallel)"
Properties="%(_MSBuildProjectReferenceExistent.SetConfiguration); %(_MSBuildProjectReferenceExistent.SetPlatform); %(_MSBuildProjectReferenceExistent.SetTargetFramework)"
Condition="'%(_MSBuildProjectReferenceExistent.BuildReference)' == 'true' and '@(ProjectReferenceWithConfiguration)' != '' and '$(BuildingProject)' == 'true' and '@(_MSBuildProjectReferenceExistent)' != ''"
ContinueOnError="$(ContinueOnError)"
SkipNonexistentTargets="true"
RemoveProperties="%(_MSBuildProjectReferenceExistent.GlobalPropertiesToRemove)">
<Output TaskParameter="TargetOutputs" ItemName="NativeReference" Condition="'%(_MSBuildProjectReferenceExistent.ReferenceOutputAssembly)' == 'true'"/>
</MSBuild>
<ItemGroup>
<_ResolvedProjectReferencePaths Remove="@(_ResolvedProjectReferencePaths)" Condition="'%(_ResolvedProjectReferencePaths.ResolveableAssembly)' == 'false'" />
<!--
Copy OriginalItemSpec to OriginalProjectReferenceItemSpec, so that when ResolveAssemblyReferences
takes these items and resolves them to ReferencePath, we can still recover the _real_ OriginalItemSpec
for the unresolved reference items.
-->
<_ResolvedProjectReferencePaths>
<OriginalProjectReferenceItemSpec>%(_ResolvedProjectReferencePaths.OriginalItemSpec)</OriginalProjectReferenceItemSpec>
</_ResolvedProjectReferencePaths>
</ItemGroup>
<!-- Issue a warning for each non-existent project. -->
<Warning
Text="The referenced project '%(_MSBuildProjectReferenceNonexistent.Identity)' does not exist."
Condition="'@(ProjectReferenceWithConfiguration)' != '' and '@(_MSBuildProjectReferenceNonexistent)' != ''"/>
</Target>
<Target
Name="ResolveProjectReferencesDesignTime"
Returns="@(_ProjectReferencesFromRAR);@(_ResolvedNativeProjectReferencePaths)"
DependsOnTargets="ResolveProjectReferences;ResolveAssemblyReferences">
<!-- 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
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.
-->
<ItemGroup>
<_ProjectReferencesFromRAR Include="@(ReferencePath->WithMetadataValue('ReferenceSourceTarget', 'ProjectReference'))">
<OriginalItemSpec>%(ReferencePath.ProjectReferenceOriginalItemSpec)</OriginalItemSpec>
</_ProjectReferencesFromRAR>
</ItemGroup>
</Target>
<Target
Name="ExpandSDKReferencesDesignTime"
Returns="@(ReferencesFromSDK)"
DependsOnTargets="ExpandSDKReferences"/>
<!--
============================================================
GetTargetPath
This target returns an item containing the build product (i.e. EXE, DLL)
that would be produced if we built this project, with some relevant
metadata.
============================================================
-->
<PropertyGroup>
<GetTargetPathDependsOn>$(GetTargetPathDependsOn)</GetTargetPathDependsOn>
</PropertyGroup>
<Target
Name="GetTargetPath"
DependsOnTargets="$(GetTargetPathDependsOn)"
Returns="@(TargetPathWithTargetPlatformMoniker)" />
<!--
============================================================
GetTargetPathWithTargetPlatformMoniker
This stand-alone target returns the name and version of the target platform for this project.
NOTE: The ProjectReference protocol uses only GetTargetPath. Computing the item
in this target allows projects to override GetTargetPath without having to reimplement
the details of the metadata computation.
============================================================
-->
<PropertyGroup>
<GetTargetPathWithTargetPlatformMonikerDependsOn>$(GetTargetPathDependsOn)</GetTargetPathWithTargetPlatformMonikerDependsOn>
</PropertyGroup>
<!--NOTE: since an overridden GetTargetPath might not include a DependsOn
for this target, it's safer to establish the dependency here with a
BeforeTargets. -->
<Target
Name="GetTargetPathWithTargetPlatformMoniker"
BeforeTargets="GetTargetPath"
DependsOnTargets="$(GetTargetPathWithTargetPlatformMonikerDependsOn)"
Returns="@(TargetPathWithTargetPlatformMoniker)">
<ItemGroup>
<TargetPathWithTargetPlatformMoniker Include="$(TargetPath)">
<TargetPlatformMoniker>$(TargetPlatformMoniker)</TargetPlatformMoniker>
<TargetPlatformIdentifier>$(TargetPlatformIdentifier)</TargetPlatformIdentifier>
<TargetFrameworkIdentifier>$(TargetFrameworkIdentifier)</TargetFrameworkIdentifier>
<TargetFrameworkVersion>$(TargetFrameworkVersion.TrimStart('vV'))</TargetFrameworkVersion>
<ReferenceAssembly Condition="'$(ProduceReferenceAssembly)' == 'true'">$(TargetRefPath)</ReferenceAssembly>
<CopyUpToDateMarker>@(CopyUpToDateMarker)</CopyUpToDateMarker>
</TargetPathWithTargetPlatformMoniker>
</ItemGroup>
</Target>
<!--
============================================================
GetNativeManifest
Compute the manifest item for this project.
[IN]
$(_DeploymentApplicationManifestIdentity) - the manifest identity
@(ApplicationManifest) - the original application manifest item
[OUT]
@(ComputedApplicationManifest) - application manifest item with full hint path, if generated
============================================================
-->
<Target
Name="GetNativeManifest"
Returns="@(ComputedApplicationManifest)">
<ItemGroup>
<ComputedApplicationManifest Include="$(_DeploymentApplicationManifestIdentity)" Condition="'$(OutputType)'!='winexe' and '$(OutputType)'!='exe' and '$(OutputType)'!='appcontainerexe' and Exists('%(_ApplicationManifestFinal.FullPath)')">
<HintPath>%(_ApplicationManifestFinal.FullPath)</HintPath>
</ComputedApplicationManifest>
</ItemGroup>
</Target>
<!--
============================================================
ResolveNativeReferences
Resolve native references
[IN]
@(NativeReference) - The manifest reference (or list of manifest references)
[OUT]
@(NativeReferenceFile) - List of manifest files referenced.
@(_DeploymentNativePrerequisite) - List of native assembly prerequisites contained in the manifest.
@(ComClassReference) - List of COM components contained in the manifest.
@(COMReferenceFromNative) List of type libraries contained in the manifest.
@(COMFileReference) - List of loose files contained in the manifest.
@(_DeploymentLooseManifestFile) - List of extra files that should be published.
============================================================
-->
<Target
Name="ResolveNativeReferences"
Condition="'@(NativeReference)'!=''"
DependsOnTargets="ResolveProjectReferences">
<ResolveNativeReference
NativeReferences="@(NativeReference)"
AdditionalSearchPaths="$(ReferencePath);$(OutDir)"
>
<Output TaskParameter="ContainingReferenceFiles" ItemName="NativeReferenceFile"/>
<Output TaskParameter="ContainedPrerequisiteAssemblies" ItemName="_DeploymentNativePrerequisite"/>
<Output TaskParameter="ContainedComComponents" ItemName="ComClassReference"/>
<Output TaskParameter="ContainedTypeLibraries" ItemName="COMReferenceFromNative"/>
<Output TaskParameter="ContainedLooseTlbFiles" ItemName="COMFileReference"/>
<Output TaskParameter="ContainedLooseEtcFiles" ItemName="_DeploymentLooseManifestFile"/>
</ResolveNativeReference>
</Target>
<!--
============================================================
ResolveAssemblyReferences
Given the list of assemblies, find the closure of all assemblies that they depend on. These are
what we need to copy to the output directory.
[IN]
@(Reference) - List of assembly references as fusion names.
@(_ResolvedProjectReferencePaths) - List of project references produced by projects that this project depends on.
The 'Private' attribute on the reference corresponds to the Copy Local flag in IDE.
The 'Private' flag can have three possible values:
- 'True' means the reference should be Copied Local
- 'False' means the reference should not be Copied Local
- [Missing] means this task will decide whether to treat this reference as CopyLocal or not.
[OUT]
@(ReferencePath) - Paths to resolved primary files.
@(ReferenceDependencyPaths) - Paths to resolved dependency files.
@(_ReferenceRelatedPaths) - Paths to .xmls and .pdbs.
@(ReferenceSatellitePaths) - Paths to satellites.
@(_ReferenceSerializationAssemblyPaths) - Paths to XML serialization assemblies created by sgen.
@(_ReferenceScatterPaths) - Paths to scatter files.
@(ReferenceCopyLocalPaths) - Paths to files that should be copied to the local directory.
============================================================
-->
<PropertyGroup>
<ResolveAssemblyReferencesDependsOn>
ResolveProjectReferences;
FindInvalidProjectReferences;
GetFrameworkPaths;
GetReferenceAssemblyPaths;
PrepareForBuild;
ResolveSDKReferences;
ExpandSDKReferences;
</ResolveAssemblyReferencesDependsOn>
</PropertyGroup>
<Target
Name="ResolveAssemblyReferences"
Returns="@(ReferencePath)"
DependsOnTargets="$(ResolveAssemblyReferencesDependsOn)">
<ItemGroup>
<_ReferenceInstalledAssemblyDirectory Include="$(TargetFrameworkDirectory)" />
<_ReferenceInstalledAssemblySubsets Include="$(TargetFrameworkSubset)" />
</ItemGroup>
<!--
Only read and write cache file at build time, skip it for load time because its more
expensive to write the newly created cache file.
-->
<PropertyGroup>
<ResolveAssemblyReferencesStateFile Condition="'$(DisableRarCache)'!='true' and '$(ResolveAssemblyReferencesStateFile)' == ''">$(IntermediateOutputPath)$(MSBuildProjectFile)AssemblyReference.cache</ResolveAssemblyReferencesStateFile>
</PropertyGroup>
<!-- Make an App.Config item that exists when AutoUnify is false. -->
<ItemGroup>
<_ResolveAssemblyReferencesApplicationConfigFileForExes Include="@(AppConfigWithTargetPath)" Condition="'$(AutoGenerateBindingRedirects)'=='true' or '$(AutoUnifyAssemblyReferences)'=='false'"/>
</ItemGroup>
<PropertyGroup>
<!-- Default in task is true -->
<_FindDependencies Condition="'$(BuildingProject)' != 'true' and '$(_ResolveReferenceDependencies)' != 'true'">false</_FindDependencies>
<ResolveAssemblyReferencesSilent Condition="'$(ResolveAssemblyReferencesSilent)' == '' and '$(TraceDesignTime)' != 'true' and '$(BuildingProject)' == 'false'">true</ResolveAssemblyReferencesSilent>
<ResolveAssemblyReferencesSilent Condition="'$(ResolveAssemblyReferencesSilent)' == ''">false</ResolveAssemblyReferencesSilent>
<ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch Condition="'$(ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch)' == ''">Warning</ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
</PropertyGroup>
<ItemGroup>
<!-- 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
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
ide will show one of the references as not resolved, this will not break the build but is a display issue -->
<Reference Remove="$(AdditionalExplicitAssemblyReferences)"/>
<Reference Include="$(AdditionalExplicitAssemblyReferences)">
<Implicit>true</Implicit>
</Reference>
</ItemGroup>
<!--
Normally, as an optimization, finding dependencies of references marked with ExternallyResolved=true metadata is skipped.
However, skipping that step breaks binding redirect generation when there are conflicting versions within the externally
resolved graph.
-->
<PropertyGroup Condition="'$(FindDependenciesOfExternallyResolvedReferences)' == ''">
<FindDependenciesOfExternallyResolvedReferences>false</FindDependenciesOfExternallyResolvedReferences>
<FindDependenciesOfExternallyResolvedReferences Condition="'$(AutoGenerateBindingRedirects)' == 'true'">true</FindDependenciesOfExternallyResolvedReferences>
</PropertyGroup>
<ResolveAssemblyReference
Assemblies="@(Reference)"
AssemblyFiles="@(_ResolvedProjectReferencePaths);@(_ExplicitReference)"
TargetFrameworkDirectories="@(_ReferenceInstalledAssemblyDirectory)"
InstalledAssemblyTables="@(InstalledAssemblyTables);@(RedistList)"
IgnoreDefaultInstalledAssemblyTables="$(IgnoreDefaultInstalledAssemblyTables)"
IgnoreDefaultInstalledAssemblySubsetTables="$(IgnoreInstalledAssemblySubsetTables)"
CandidateAssemblyFiles="@(Content);@(None)"
SearchPaths="$(AssemblySearchPaths)"
AllowedAssemblyExtensions="$(AllowedReferenceAssemblyFileExtensions)"
AllowedRelatedFileExtensions="$(AllowedReferenceRelatedFileExtensions)"
TargetProcessorArchitecture="$(ProcessorArchitecture)"
AppConfigFile="@(_ResolveAssemblyReferencesApplicationConfigFileForExes)"
AutoUnify="$(AutoUnifyAssemblyReferences)"
SupportsBindingRedirectGeneration="$(GenerateBindingRedirectsOutputType)"
IgnoreVersionForFrameworkReferences="$(IgnoreVersionForFrameworkReferences)"
FindDependencies="$(_FindDependencies)"
FindSatellites="$(BuildingProject)"
FindSerializationAssemblies="$(BuildingProject)"
FindRelatedFiles="$(BuildingProject)"
Silent="$(ResolveAssemblyReferencesSilent)"
TargetFrameworkVersion="$(TargetFrameworkVersion)"
TargetFrameworkMoniker="$(TargetFrameworkMoniker)"
TargetFrameworkMonikerDisplayName="$(TargetFrameworkMonikerDisplayName)"
TargetedRuntimeVersion="$(TargetedRuntimeVersion)"
StateFile="$(ResolveAssemblyReferencesStateFile)"
InstalledAssemblySubsetTables="@(InstalledAssemblySubsetTables)"
TargetFrameworkSubsets="@(_ReferenceInstalledAssemblySubsets)"
FullTargetFrameworkSubsetNames="$(FullReferenceAssemblyNames)"
FullFrameworkFolders="$(_FullFrameworkReferenceAssemblyPaths)"
FullFrameworkAssemblyTables="@(FullFrameworkAssemblyTables)"
ProfileName="$(TargetFrameworkProfile)"
LatestTargetFrameworkDirectories="@(LatestTargetFrameworkDirectories)"
CopyLocalDependenciesWhenParentReferenceInGac="$(CopyLocalDependenciesWhenParentReferenceInGac)"
DoNotCopyLocalIfInGac="$(DoNotCopyLocalIfInGac)"
ResolvedSDKReferences="@(ResolvedSDKReference)"
WarnOrErrorOnTargetArchitectureMismatch="$(ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch)"
IgnoreTargetFrameworkAttributeVersionMismatch ="$(ResolveAssemblyReferenceIgnoreTargetFrameworkAttributeVersionMismatch)"
FindDependenciesOfExternallyResolvedReferences="$(FindDependenciesOfExternallyResolvedReferences)"
ContinueOnError="$(ContinueOnError)"
Condition="'@(Reference)'!='' or '@(_ResolvedProjectReferencePaths)'!='' or '@(_ExplicitReference)' != ''"
>
<Output TaskParameter="ResolvedFiles" ItemName="ReferencePath"/>
<Output TaskParameter="ResolvedFiles" ItemName="_ResolveAssemblyReferenceResolvedFiles"/>
<Output TaskParameter="ResolvedDependencyFiles" ItemName="ReferenceDependencyPaths"/>
<Output TaskParameter="RelatedFiles" ItemName="_ReferenceRelatedPaths"/>
<Output TaskParameter="SatelliteFiles" ItemName="ReferenceSatellitePaths"/>
<Output TaskParameter="SerializationAssemblyFiles" ItemName="_ReferenceSerializationAssemblyPaths"/>
<Output TaskParameter="ScatterFiles" ItemName="_ReferenceScatterPaths"/>
<Output TaskParameter="CopyLocalFiles" ItemName="ReferenceCopyLocalPaths"/>
<Output TaskParameter="SuggestedRedirects" ItemName="SuggestedBindingRedirects"/>
<Output TaskParameter="FilesWritten" ItemName="FileWrites"/>
<Output TaskParameter="DependsOnSystemRuntime" PropertyName="DependsOnSystemRuntime"/>
<Output TaskParameter="DependsOnNETStandard" PropertyName="_DependsOnNETStandard"/>
</ResolveAssemblyReference>
</Target>
<!--
============================================================
FindReferenceAssembliesForReferences
Given the list of references, create a list of assemblies to pass to the compiler that
includes reference assemblies rather than implementation assemblies where possible.
[IN]
@(ReferencePath) - List of assembly references as resolved paths with ReferenceAssembly metadata
[OUT]
@(ReferencePathWithRefAssemblies) - Paths to resolved reference (or implementation) assemblies.
============================================================
-->
<Target Name="FindReferenceAssembliesForReferences"
DependsOnTargets="ResolveReferences">
<ItemGroup>
<!-- Reference assemblies are not produced in all cases, but it's easier to consume them
if this metadatum is always populated. Ensure that it points to the implementation
assembly unless already specified. -->
<ReferencePath Condition="'%(ReferencePath.ReferenceAssembly)' == ''">
<ReferenceAssembly>%(FullPath)</ReferenceAssembly>
</ReferencePath>
<ReferencePathWithRefAssemblies Include="@(ReferencePath->'%(ReferenceAssembly)')"
Condition="'$(CompileUsingReferenceAssemblies)' != 'false'">
<OriginalPath Condition="'%(ReferencePath.Identity)' != '@(ReferencePath->'%(ReferenceAssembly)')'">%(ReferencePath.Identity)</OriginalPath>
</ReferencePathWithRefAssemblies>
<ReferencePathWithRefAssemblies Include="@(ReferencePath)"
Condition="'$(CompileUsingReferenceAssemblies)' == 'false'" />
</ItemGroup>
</Target>
<!--
====================================================================================================
GenerateBindingRedirects
Inject the binding redirects into the app config file based on suggested redirects as output from
ResolveAssemblyReferences.
[IN]
@(AppConfigWithTargetPath) - Path to the source app config file. This can be null if the project
doesn't contain an app config file.
$(TargetFileName) - The file name of the build target.
[OUT]
@(OutputAppConfigFile) - Path to the output app config file in the intermediate directory.
====================================================================================================
-->
<Target Name="GenerateBindingRedirects"
Inputs="$(MSBuildAllProjects);@(AppConfigFile);$(ResolveAssemblyReferencesStateFile);$(IntermediateOutputPath);@(SuggestedBindingRedirects)"
Outputs="$(_GenerateBindingRedirectsIntermediateAppConfig)"
Condition="'$(AutoGenerateBindingRedirects)' == 'true' and '$(GenerateBindingRedirectsOutputType)' == 'true'">
<GenerateBindingRedirects
AppConfigFile="@(AppConfigWithTargetPath)"
TargetName="$(TargetFileName).config"
OutputAppConfigFile="$(_GenerateBindingRedirectsIntermediateAppConfig)"
SuggestedRedirects="@(SuggestedBindingRedirects)"
>
<Output TaskParameter="OutputAppConfigFile" ItemName="FileWrites" />
</GenerateBindingRedirects>
</Target>
<!--
====================================================================================================
GenerateBindingRedirectsUpdateAppConfig
Updates the project to use the generated app.config content. This needs to run regardless of
inputs/outputs so it is seperate from GenerateBindingRedirects.
====================================================================================================
-->
<Target Name="GenerateBindingRedirectsUpdateAppConfig"
AfterTargets="GenerateBindingRedirects"
Condition="'$(AutoGenerateBindingRedirects)' == 'true' and '$(GenerateBindingRedirectsOutputType)' == 'true' and Exists('$(_GenerateBindingRedirectsIntermediateAppConfig)')">
<PropertyGroup>
<AppConfig>$(_GenerateBindingRedirectsIntermediateAppConfig)</AppConfig>
</PropertyGroup>
<ItemGroup>
<AppConfigWithTargetPath Remove="@(AppConfigWithTargetPath)" />
<AppConfigWithTargetPath Include="$(AppConfig)">
<TargetPath>$(TargetFileName).config</TargetPath>
</AppConfigWithTargetPath>
</ItemGroup>
</Target>
<!--
===========================================================================================
GetInstalledSDKs
Gets the list of SDKs installed in the SDKDirectoryRoot and SDKRegistryRoot locations
These paths are used by the ResolveSDKReference task and the ResolveAssemblyReference task.
===========================================================================================
-->
<PropertyGroup>
<SDKReferenceRegistryRoot Condition="'$(SDKReferenceRegistryRoot)' == ''">Software\Microsoft\Microsoft SDKs</SDKReferenceRegistryRoot>
<SDKReferenceDirectoryRoot Condition="'$(SDKReferenceDirectoryRoot)' == ''">$(LocalAppData)\Microsoft SDKs;$(MSBuildProgramFiles32)\Microsoft SDKs</SDKReferenceDirectoryRoot>
<!-- Manifest driven extension SDK locations -->
<SDKExtensionDirectoryRoot Condition="'$(SDKExtensionDirectoryRoot)' == '' and '$(SDKIdentifier)' != ''">$(MSBuildProgramFiles32)\Microsoft SDKs\Windows Kits\10;$(MSBuildProgramFiles32)\Windows Kits\10</SDKExtensionDirectoryRoot>
<!-- UAP projects by default should support Windows 8.1 SDKs -->
<SupportWindows81SDKs Condition="'$(SupportWindows81SDKs)' == '' and '$(Support81SDKs)' != 'false' and '$(TargetPlatformIdentifier)' == 'UAP'">true</SupportWindows81SDKs>
<TargetPlatformIdentifierWindows81 Condition="'$(TargetPlatformIdentifierWindows81)' == '' and '$(SupportWindows81SDKs)' == 'true'">Windows</TargetPlatformIdentifierWindows81>
<TargetPlatformVersionWindows81 Condition="'$(TargetPlatformVersionWindows81)' == '' and '$(SupportWindows81SDKs)' == 'true'">8.1</TargetPlatformVersionWindows81>
<!-- Desktop and phone SDKs often have the exact same identifiers, don't enable phone by default -->
<SupportWindowsPhone81SDKs Condition="'$(SupportWindowsPhone81SDKs)' == '' and '$(Support81SDKs)' != 'false' and '$(TargetPlatformIdentifier)' == 'UAP'">false</SupportWindowsPhone81SDKs>
<TargetPlatformIdentifierWindowsPhone81 Condition="'$(TargetPlatformIdentifierWindowsPhone81)' == '' and '$(SupportWindowsPhone81SDKs)' == 'true'">WindowsPhoneApp</TargetPlatformIdentifierWindowsPhone81>
<TargetPlatformVersionWindowsPhone81 Condition="'$(TargetPlatformVersionWindowsPhone81)' == '' and '$(SupportWindowsPhone81SDKs)' == 'true'">8.1</TargetPlatformVersionWindowsPhone81>
</PropertyGroup>
<Target
Name="GetInstalledSDKLocations"
Condition="'@(SDKReference)' != ''"
DependsOnTargets="$(GetInstalledSDKLocationsDependsOn)"
Returns="@(InstalledSDKLocations)"
>
<GetInstalledSDKLocations
SDKDirectoryRoots="$(SDKReferenceDirectoryRoot)"
SDKExtensionDirectoryRoots="$(SDKExtensionDirectoryRoot)"
SDKRegistryRoot="$(SDKReferenceRegistryRoot)"
TargetPlatformVersion="$(TargetPlatformVersion)"
TargetPlatformIdentifier="$(TargetPlatformIdentifier)"
>
<Output TaskParameter="InstalledSDKs" ItemName="InstalledSDKLocations"/>
</GetInstalledSDKLocations>
<!-- Also lookup 8.1 SDKs if requested -->
<GetInstalledSDKLocations
SDKDirectoryRoots="$(SDKReferenceDirectoryRoot)"
SDKExtensionDirectoryRoots=""
SDKRegistryRoot="$(SDKReferenceRegistryRoot)"
TargetPlatformVersion="$(TargetPlatformVersionWindows81)"
TargetPlatformIdentifier="$(TargetPlatformIdentifierWindows81)"
Condition="'$(SupportWindows81SDKs)' == 'true' and '$(TargetPlatformIdentifierWindows81)' != '' and '$(TargetPlatformVersionWindows81)' != ''"
WarnWhenNoSDKsFound="false"
>
<Output TaskParameter="InstalledSDKs" ItemName="InstalledSDKLocations"/>
</GetInstalledSDKLocations>
<GetInstalledSDKLocations
SDKDirectoryRoots="$(SDKReferenceDirectoryRoot)"
SDKExtensionDirectoryRoots=""
SDKRegistryRoot="$(SDKReferenceRegistryRoot)"
TargetPlatformVersion="$(TargetPlatformVersionWindowsPhone81)"
TargetPlatformIdentifier="$(TargetPlatformIdentifierWindowsPhone81)"
Condition="'$(SupportWindowsPhone81SDKs)' == 'true' and '$(TargetPlatformIdentifierWindowsPhone81)' != '' and '$(TargetPlatformVersionWindowsPhone81)' != ''"
WarnWhenNoSDKsFound="false"
>
<Output TaskParameter="InstalledSDKs" ItemName="InstalledSDKLocations"/>
</GetInstalledSDKLocations>
</Target>
<!--
============================================================
ResolveSDKReferences
Given a list of SDKReference items and a list of resolved winmd files which may contain metadata as to which sdk they came from
we need to find the sdk root folders on disk and populate a ResolvedSDKReference item which has the full path to the SDK ROOT
and the sdk identity as a piece of metadata.
[IN]
@(SDKReference) - List of sdk references (the identity in the sdk manifest file).
@(ReferencePath) -List of resolved assemblies, we are interested in the ones which have IsWinMDFile set to true.
[OUT]
@(ResolvedSDKReference) - Full path to the root of the SDK
============================================================
-->
<PropertyGroup>
<ResolveSDKReferencesDependsOn>
GetInstalledSDKLocations
</ResolveSDKReferencesDependsOn>
</PropertyGroup>
<PropertyGroup>
<TargetedSDKConfiguration Condition="'$(TargetedSDKConfiguration)' == '' and '_$(Configuration)' == '_Debug'">Debug</TargetedSDKConfiguration>
<TargetedSDKConfiguration Condition="'$(TargetedSDKConfiguration)' == '' and '_$(Configuration)' == '_Release'">Retail</TargetedSDKConfiguration>
<TargetedSDKConfiguration Condition="'$(TargetedSDKConfiguration)' == ''">Retail</TargetedSDKConfiguration>
<TargetedSDKArchitecture Condition="'$(TargetedSDKArchitecture)' == ''">$(ProcessorArchitecture)</TargetedSDKArchitecture>
<TargetedSDKArchitecture Condition="'$(TargetedSDKArchitecture)' == ''">Neutral</TargetedSDKArchitecture>
</PropertyGroup>
<PropertyGroup>
<ShouldMarkCertainSDKReferencesAsRuntimeOnly Condition="'$(ShouldMarkCertainSDKReferencesAsRuntimeOnly)' == ''">true</ShouldMarkCertainSDKReferencesAsRuntimeOnly>
</PropertyGroup>
<ItemGroup Condition="'$(ShouldMarkCertainSDKReferencesAsRuntimeOnly)' == 'true'">
<!-- Dependencies that are specified as runtime-only dependencies. Therefore the associated files are not used to build Appx package. -->
<!-- TODO: Do we need to do anything like this for the new SDK? -->
<RuntimeReferenceOnlySDKDependencies Condition = "'$(TargetPlatformVersion)' == '8.1'" Include="Microsoft.VCLibs, Version=11.0"/>
</ItemGroup>
<Target
Name="ResolveSDKReferences"
Returns="@(ResolvedSDKReference)"
DependsOnTargets="$(ResolveSDKReferencesDependsOn)">
<ResolveSDKReference
SDKReferences="@(SDKReference)"
RuntimeReferenceOnlySDKDependencies="@(RuntimeReferenceOnlySDKDependencies)"
References="@(Reference)"
TargetPlatformVersion="$(TargetPlatformVersion)"
TargetPlatformIdentifier="$(TargetPlatformIdentifier)"
WarnOnMissingPlatformVersion="$(SDKReferenceWarnOnMissingMaxPlatformVersion)"
ProjectName="$(MSBuildProjectName)"
TargetedSDKConfiguration="$(TargetedSDKConfiguration)"
TargetedSDKArchitecture="$(TargetedSDKArchitecture)"
InstalledSDKs ="@(InstalledSDKLocations)"
LogResolutionErrorsAsWarnings ="$(LogSDKReferenceResolutionErrorsAsWarnings)"
Prefer32Bit ="$(Prefer32Bit)"
ContinueOnError="$(ContinueOnError)"
Condition="'@(SDKReference)'!=''">
<Output TaskParameter="ResolvedSDKReferences" ItemName="ResolvedSDKReference"/>
</ResolveSDKReference>
</Target>
<Target
Name="ResolveSDKReferencesDesignTime"
Returns="@(ResolvedSDKReference)"
DependsOnTargets="ResolveSDKReferences" />
<!--
============================================================
FindInvalidProjectReferences
Find project to project references with target platform version higher than the one used by the current project and
creates a list of invalid references to be unresolved. It issues a warning for each invalid reference.
[IN]
$(TargetPlatformVersion) - Project's target platform version
@(_ProjectReferenceTargetPlatformMonikers) - List of monikers of all referenced projects gathered by the helper
target GetTargetPlatformMonikers.
[OUT]
@(InvalidProjectReferences) - List of invalid project references
============================================================
-->
<PropertyGroup>
<FindInvalidProjectReferencesDependsOn>
GetReferenceTargetPlatformMonikers
</FindInvalidProjectReferencesDependsOn>
</PropertyGroup>
<Target
Name="FindInvalidProjectReferences"
Condition ="'$(FindInvalidProjectReferences)' == 'true'"
DependsOnTargets="$(FindInvalidProjectReferencesDependsOn)">
<FindInvalidProjectReferences
TargetPlatformVersion="$(TargetPlatformVersion)"
TargetPlatformIdentifier="$(TargetPlatformIdentifier)"
ProjectReferences="@(TargetPathWithTargetPlatformMoniker)">
<Output TaskParameter="InvalidReferences" ItemName="InvalidProjectReferences" />
</FindInvalidProjectReferences>
<ItemGroup>
<_ResolvedProjectReferencePaths Remove="@(InvalidProjectReferences)" />
</ItemGroup>
</Target>
<Target Name="GetReferenceTargetPlatformMonikers" DependsOnTargets="PrepareProjectReferences">
<MSBuild
Projects="@(_MSBuildProjectReferenceExistent)"
Properties="%(_MSBuildProjectReferenceExistent.SetConfiguration); %(_MSBuildProjectReferenceExistent.SetPlatform); %(_MSBuildProjectReferenceExistent.SetTargetFramework)"
Targets="GetTargetPathWithTargetPlatformMoniker"
BuildInParallel="$(BuildInParallel)"
ContinueOnError="!$(BuildingProject)"
RemoveProperties="%(_MSBuildProjectReferenceExistent.GlobalPropertiesToRemove)">
<Output TaskParameter="TargetOutputs" ItemName="TargetPathWithTargetPlatformMoniker" />
</MSBuild>
</Target>
<!--
============================================================
ExpandSDKReferences
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)
as part of the assemblies passed to the compiler.
Project systems or project which do not want to reference all dlls or winmd files should override this target to do nothing.
============================================================
-->
<PropertyGroup>
<ExpandSDKReferencesDependsOn>
ResolveSDKReferences
</ExpandSDKReferencesDependsOn>
<ExpandSDKAllowedReferenceExtensions Condition="'$(ExpandSDKAllowedReferenceExtensions)' == ''">
.winmd;
.dll
</ExpandSDKAllowedReferenceExtensions>
</PropertyGroup>
<Target Name="ExpandSDKReferences"
Returns="@(ReferencesFromSDK)"
DependsOnTargets="$(ExpandSDKReferencesDependsOn)"
>
<GetSDKReferenceFiles
ResolvedSDKReferences="@(ResolvedSDKReference)"
ReferenceExtensions="$(ExpandSDKAllowedReferenceExtensions)"
TargetSDKIdentifier="$(SDKIdentifier)"
TargetSDKVersion="$(SDKVersion)"
TargetPlatformIdentifier="$(TargetPlatformIdentifier)"
TargetPlatformVersion="$(TargetPlatformVersion)"
LogRedistFilesList="$(GetSDKReferenceFilesLogRedistFilesList)"
LogRedistConflictWithinSDKAsWarning ="$(GetSDKReferenceFilesLogRedistConflictsWithinSDKAsWarning)"
LogRedistConflictBetweenSDKsAsWarning ="$(GetSDKReferenceFilesLogRedistConflictsBetweenSDKsAsWarning)"
LogReferencesList="$(GetSDKReferenceFilesLogReferencesList)"
LogReferenceConflictWithinSDKAsWarning ="$(GetSDKReferenceFilesLogReferenceConflictsWithinSDKAsWarning)"
LogReferenceConflictBetweenSDKsAsWarning ="$(GetSDKReferenceFilesLogReferenceConflictsBetweenSDKsAsWarning)"
CacheFileFolderPath ="$(GetSDKReferenceFilesCacheFolder)"
LogCacheFileExceptions="$(GetSDKReferenceFilesLogCacheFileExceptions)"
Condition="'@(ResolvedSDKReference)'!=''">
<Output TaskParameter="References" ItemName="ReferencePath"/>
<Output TaskParameter="References" ItemName="ReferencesFromSDK"/>
<Output TaskParameter="References" ItemName="_ResolveAssemblyReferenceResolvedFiles"/>
<Output TaskParameter="CopyLocalFiles" ItemName="ReferenceCopyLocalPaths"/>
<Output TaskParameter="RedistFiles" ItemName="ResolvedRedistFiles"/>
</GetSDKReferenceFiles>
</Target>
<!--
============================================================
ExportWindowsMDFile
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
through the winmdexp tool in order to generate the resulting WinMD file.
===========================================================
-->
<Target Name="ExportWindowsMDFile"
DependsOnTargets="Compile"
Condition="'$(ExportWinMDFile)' == 'true'"
Inputs="@(IntermediateAssembly);@(DocFileItem);@(_DebugSymbolsIntermediatePath);@(ReferencePathWithRefAssemblies);$(MSBuildAllProjects)"
Outputs="$(_IntermediateWindowsMetadataPath);$(WinMDExpOutputPdb);$(WinMDOutputDocumentationFile)"
>
<PropertyGroup>
<!-- Will be copied by the "copy WinMD artifacts" step instead -->
<CopyBuildOutputToOutputDirectory>false</CopyBuildOutputToOutputDirectory>
<CopyOutputSymbolsToOutputDirectory>false</CopyOutputSymbolsToOutputDirectory>
<CopyDocumentationFileToOutputDirectory>false</CopyDocumentationFileToOutputDirectory>
<WinMdExpToolPath Condition="'$(WinMdExpToolPath)' == ''">$(TargetFrameworkSDKToolsDirectory)</WinMdExpToolPath>
<WinMdExpUTF8Ouput Condition="'$(WinMdExpUTF8Ouput)' == ''">true</WinMdExpUTF8Ouput>
</PropertyGroup>
<WinMDExp WinMDModule="@(IntermediateAssembly)"
References="@(ReferencePathWithRefAssemblies)"
DisabledWarnings="$(WinMdExpNoWarn)"
InputDocumentationFile="@(DocFileItem)"
OutputDocumentationFile="$(WinMDOutputDocumentationFile)"
TreatWarningsAsErrors="$(TreatWarningsAsErrors)"
InputPDBFile="@(_DebugSymbolsIntermediatePath)"
OutputPDBFile="$(WinMDExpOutputPdb)"
OutputWindowsMetadataFile="$(_IntermediateWindowsMetadataPath)"
EnvironmentVariables="$(WinMDExpEnvironment)"
UTF8Output="$(WinMdExpUTF8Ouput)"
SdkToolsPath="$(WinMdExpToolPath)"
AssemblyUnificationPolicy="$(WinMDExpAssemblyUnificationPolicy)">
<Output TaskParameter="OutputWindowsMetadataFile" ItemName="FileWrites"/>
</WinMDExp>
<ItemGroup>
<WinMDExpArtifacts Include="$(_IntermediateWindowsMetadataPath)"/>
<WinMDExpArtifacts Include="$(WinMDOutputDocumentationFile)"/>
<WinMDExpArtifacts Include="$(WinMDExpOutputPdb)"/>
<FileWrites Include="$(WinMDOutputDocumentationFile);$(WinMDExpOutputPdb)"/>
</ItemGroup>
</Target>
<Target
Name="ResolveAssemblyReferencesDesignTime"
Returns="@(_ReferencesFromRAR)"
DependsOnTargets="ResolveProjectReferences;ResolveAssemblyReferences">
<!-- We need to do this here because we only want references which have been passed into rar but are not project to project references. -->
<ItemGroup>
<_ReferencesFromRAR Include="@(ReferencePath->WithMetadataValue('ReferenceSourceTarget', 'ResolveAssemblyReference'))"/>
</ItemGroup>
</Target>
<PropertyGroup>
<ProjectDesignTimeAssemblyResolutionSearchPaths Condition=" '$(ProjectDesignTimeAssemblyResolutionSearchPaths)' == '' ">
{CandidateAssemblyFiles};
$(ReferencePath);
{HintPathFromItem};
{TargetFrameworkDirectory};
{Registry:$(FrameworkRegistryBase),$(TargetFrameworkVersion),$(AssemblyFoldersSuffix)$(AssemblyFoldersExConditions)};
{RawFileName};
$(TargetDir)
</ProjectDesignTimeAssemblyResolutionSearchPaths>
</PropertyGroup>
<!--
==============================================================
DesignTimeResolveAssemblyReferences
Given the list of assemblies, resolve their reference paths.
This target is called by Visual Studio at run time in order to filter references
according to the targeted framework.
[IN]
@(DesignTimeReference) - List of assembly references as simple/fusion names.
[OUT]
@(ReferencePath) - Paths to resolved primary files.
==============================================================
-->
<PropertyGroup>
<DesignTimeResolveAssemblyReferencesDependsOn>
GetFrameworkPaths;
GetReferenceAssemblyPaths;
ResolveReferences
</DesignTimeResolveAssemblyReferencesDependsOn>
</PropertyGroup>
<Target
Name="DesignTimeResolveAssemblyReferences"
Condition="'$(DesignTimeReference)'!=''"
DependsOnTargets="$(DesignTimeResolveAssemblyReferencesDependsOn)">
<ItemGroup>
<_DesignTimeReferenceInstalledAssemblyDirectory Include="$(TargetFrameworkDirectory)" />
</ItemGroup>
<PropertyGroup>
<DesignTimeResolveAssemblyReferencesStateFile Condition="'$(DisableRarCache)'!='true'">$(IntermediateOutputPath)$(MSBuildProjectFile)DesignTimeResolveAssemblyReferences.cache</DesignTimeResolveAssemblyReferencesStateFile>
</PropertyGroup>
<PropertyGroup>
<DesignTimeAssemblySearchPaths Condition=" '$(DesignTimeAssemblySearchPaths)' == '' ">
{CandidateAssemblyFiles};
$(ReferencePath);
{HintPathFromItem};
{TargetFrameworkDirectory};
{Registry:$(FrameworkRegistryBase),$(TargetFrameworkVersion),$(AssemblyFoldersSuffix)$(AssemblyFoldersExConditions)};
{RawFileName};
$(OutDir)
</DesignTimeAssemblySearchPaths>
</PropertyGroup>
<PropertyGroup>
<DesignTimeFindDependencies Condition=" '$(DesignTimeFindDependencies)' == '' ">false</DesignTimeFindDependencies>
<DesignTimeIgnoreVersionForFrameworkReferences Condition=" '$(DesignTimeIgnoreVersionForFrameworkReferences)' == '' ">false</DesignTimeIgnoreVersionForFrameworkReferences>
<DesignTimeFindSatellites Condition=" '$(DesignTimeFindSatellites)' == '' ">false</DesignTimeFindSatellites>
<DesignTimeFindSerializationAssemblies Condition=" '$(DesignTimeFindSerializationAssemblies)' == '' ">false</DesignTimeFindSerializationAssemblies>
<DesignTimeFindRelatedFiles Condition=" '$(DesignTimeFindRelatedFiles)' == '' ">false</DesignTimeFindRelatedFiles>
<DesignTimeSilentResolution Condition=" '$(DesignTimeSilentResolution)' == '' and '$(TraceDesignTime)' != 'true'">true</DesignTimeSilentResolution>
<DesignTimeAutoUnify Condition="'$(DesignTimeAutoUnify)' == ''">false</DesignTimeAutoUnify>
</PropertyGroup>
<ItemGroup>
<_DesignTimeReferenceAssemblies Include ="$(DesignTimeReference)" />
</ItemGroup>
<ItemGroup>
<_RARResolvedReferencePath Include="@(ReferencePath)" />
<ReferencePath Remove="@(ReferencePath)" />
</ItemGroup>
<ResolveAssemblyReference
Assemblies="@(_DesignTimeReferenceAssemblies)"
TargetFrameworkDirectories="@(_DesignTimeReferenceInstalledAssemblyDirectory)"
SearchPaths="$(DesignTimeAssemblySearchPaths)"
AllowedAssemblyExtensions="$(AllowedReferenceAssemblyFileExtensions)"
TargetProcessorArchitecture="$(ProcessorArchitecture)"
CandidateAssemblyFiles="@(Content);@(None);@(_RARResolvedReferencePath)"
FindDependencies="$(DesignTimeFindDependencies)"
AutoUnify="$(DesignTimeAutoUnify)"
IgnoreVersionForFrameworkReferences="$(DesignTimeIgnoreVersionForFrameworkReferences)"
FindSatellites="$(DesignTimeFindSatellites)"
FindSerializationAssemblies="$(DesignTimeFindSerializationAssemblies)"
FindRelatedFiles="$(DesignTimeFindRelatedFiles)"
Silent="$(DesignTimeSilentResolution)"
TargetFrameworkVersion="$(TargetFrameworkVersion)"
TargetFrameworkMoniker="$(TargetFrameworkMoniker)"
TargetFrameworkMonikerDisplayName="$(TargetFrameworkMonikerDisplayName)"
TargetedRuntimeVersion="$(TargetedRuntimeVersion)"
StateFile="$(DesignTimeResolveAssemblyReferencesStateFile)"
InstalledAssemblySubsetTables="@(InstalledAssemblySubsetTables)"
IgnoreDefaultInstalledAssemblySubsetTables="$(IgnoreInstalledAssemblySubsetTables)"
TargetFrameworkSubsets="@(_ReferenceInstalledAssemblySubsets)"
FullTargetFrameworkSubsetNames="$(FullReferenceAssemblyNames)"
FullFrameworkFolders="$(_FullFrameworkReferenceAssemblyPaths)"
FullFrameworkAssemblyTables="@(FullFrameworkAssemblyTables)"
ProfileName="$(TargetFrameworkProfile)"
ResolvedSDKReferences="@(ResolvedSDKReference)"
IgnoreTargetFrameworkAttributeVersionMismatch ="$(DesignTimeIgnoreTargetFrameworkAttributeVersionMismatch)"
>
<Output TaskParameter="ResolvedFiles" ItemName="DesignTimeReferencePath"/>
<Output TaskParameter="FilesWritten" ItemName="FileWrites"/>
</ResolveAssemblyReference>
</Target>
<!--
============================================================
ResolveComReferences
Resolve COM references
[IN]
@(COMReference) - The list of COM references
$(BaseIntermediateOutputPath) - The output directory in which to generate wrapper assemblies
[OUT]
@(ReferencePath) - Paths to referenced wrappers.
If ResolveComReferences is invoked from the IDE, PrepareForBuild may need to run to create directories.
============================================================
-->
<PropertyGroup>
<ComReferenceExecuteAsTool Condition="'$(ComReferenceExecuteAsTool)'==''">false</ComReferenceExecuteAsTool>
</PropertyGroup>
<Target
Name="ResolveComReferences"
Condition="'@(COMReference)'!='' or '@(COMFileReference)'!=''"
Returns="@(ReferencePath)"
DependsOnTargets="PrepareForBuild;ResolveKeySource;ResolveAssemblyReferences"
>
<PropertyGroup Condition=" '$(InteropOutputPath)' == '' ">
<InteropOutputPath>$(IntermediateOutputPath)</InteropOutputPath>
</PropertyGroup>
<MakeDir Directories="$(InteropOutputPath)"/>
<!--
Note: This task should not be batched, since it relies on having all the COM references fed into it at once.
-->
<PropertyGroup>
<ResolveComReferenceMSBuildArchitecture Condition="'$(ResolveComReferenceMSBuildArchitecture)' == ''">$(PlatformTargetAsMSBuildArchitecture)</ResolveComReferenceMSBuildArchitecture>
<ResolveComReferenceToolPath Condition="'$(ResolveComReferenceToolPath)' == ''">$(TargetFrameworkSDKToolsDirectory)</ResolveComReferenceToolPath>
<ResolveComReferenceSilent Condition="'$(ResolveComReferenceSilent)' == ''">false</ResolveComReferenceSilent>
</PropertyGroup>
<ResolveComReference
TypeLibNames="@(COMReference)"
TypeLibFiles="@(COMFileReference)"
ResolvedAssemblyReferences="@(ReferencePath)"
WrapperOutputDirectory="$(InteropOutputPath)"
IncludeVersionInInteropName="$(IncludeVersionInInteropName)"
KeyContainer="$(KeyContainerName)"
KeyFile="$(KeyOriginatorFile)"
DelaySign="$(DelaySign)"
StateFile="@(_ResolveComReferenceCache)"
TargetFrameworkVersion="$(TargetFrameworkVersion)"
TargetProcessorArchitecture="$(ProcessorArchitecture)"
NoClassMembers="$(ComReferenceNoClassMembers)"
Silent="$(ResolveComReferenceSilent)"
EnvironmentVariables="$(ResolveComReferenceEnvironment)"
SdkToolsPath="$(ResolveComReferenceToolPath)"
ExecuteAsTool="$(ComReferenceExecuteAsTool)"
MSBuildArchitecture="$(ResolveComReferenceMSBuildArchitecture)"
ContinueOnError="$(ContinueOnError)">
<Output TaskParameter="ResolvedFiles" ItemName="ReferencePath"/>
<Output TaskParameter="ResolvedFiles" ItemName="ComReferenceWrappers"/>
<Output TaskParameter="ResolvedFiles" ItemName="FileWrites"/>
<!-- This output list only includes items with Isolated attribute set to True. It's done by the task itself. -->
<Output TaskParameter="ResolvedModules" ItemName="ResolvedIsolatedComModules"/>
</ResolveComReference>
<ItemGroup>
<FileWrites Include="@(_ResolveComReferenceCache)"/>
<ReferenceComWrappersToCopyLocal Include="@(ComReferenceWrappers)" Condition="'%(ComReferenceWrappers.CopyLocal)'!='false'"/>
</ItemGroup>
</Target>
<Target
Name="ResolveComReferencesDesignTime"
Returns="@(ComReferenceWrappers)"
DependsOnTargets="ResolveComReferences" />
<!--
============================================================
ResolveFrameworkReferences
Overrridden by Microsoft.NET.Sdk to return
ResolvedFrameworkReference items in order to populate the
Frameworks node of the Solution Explorer in the IDE.
-->
<Target Name="ResolveFrameworkReferences" />
<!--
***********************************************************************************************
***********************************************************************************************
PrepareResources Section
***********************************************************************************************
***********************************************************************************************
-->
<!--
============================================================
PrepareResources
Prepare resources for the Compile step.
============================================================
-->
<PropertyGroup>
<PrepareResourcesDependsOn>
PrepareResourceNames;
ResGen;
CompileLicxFiles
</PrepareResourcesDependsOn>
</PropertyGroup>
<Target
Name="PrepareResources"
DependsOnTargets="$(PrepareResourcesDependsOn)"/>
<!--
============================================================
PrepareResourceNames
Prepare the names of resource files.
============================================================
-->
<PropertyGroup>
<PrepareResourceNamesDependsOn>
AssignTargetPaths;
SplitResourcesByCulture;
CreateManifestResourceNames;
CreateCustomManifestResourceNames
</PrepareResourceNamesDependsOn>
</PropertyGroup>
<Target
Name="PrepareResourceNames"
DependsOnTargets="$(PrepareResourceNamesDependsOn)"/>
<!--
============================================================
AssignTargetPaths
This target creates <TargetPath> tags for items. <TargetPath> is a relative folder plus filename
for the destination of this item.
============================================================
-->
<PropertyGroup>
<AssignTargetPathsDependsOn></AssignTargetPathsDependsOn>
</PropertyGroup>
<Target
Name="AssignTargetPaths"
DependsOnTargets="$(AssignTargetPathsDependsOn)">
<ItemGroup>
<_Temporary Remove="@(_Temporary)" />
</ItemGroup>
<!-- AssignTargetPath generates TargetPath metadata that is consumed by CreateManifestResourceNames target for manifest name generation -->
<AssignTargetPath Files="@(EmbeddedResource)" RootFolder="$(MSBuildProjectDirectory)">
<Output TaskParameter="AssignedFiles" ItemName="_Temporary" />
</AssignTargetPath>
<ItemGroup>
<!-- Replace items in EmbeddedResource with the items emitted by the AssignTargetPath task that have the TargetPath metadata -->
<EmbeddedResource Remove="@(_Temporary)" />
<EmbeddedResource Include="@(_Temporary)" />
<_Temporary Remove="@(_Temporary)" />
</ItemGroup>
<AssignTargetPath Files="@(Content)" RootFolder="$(MSBuildProjectDirectory)">
<Output TaskParameter="AssignedFiles" ItemName="ContentWithTargetPath" />
</AssignTargetPath>
<AssignTargetPath Files="@(None)" RootFolder="$(MSBuildProjectDirectory)">
<Output TaskParameter="AssignedFiles" ItemName="_NoneWithTargetPath" />
</AssignTargetPath>
<AssignTargetPath Files="@(BaseApplicationManifest)" RootFolder="$(MSBuildProjectDirectory)">
<Output TaskParameter="AssignedFiles" ItemName="_DeploymentBaseManifestWithTargetPath"/>
</AssignTargetPath>
<AssignTargetPath Files="@(None)" RootFolder="$(MSBuildProjectDirectory)" Condition="'@(_DeploymentBaseManifestWithTargetPath)'=='' and '%(None.Extension)'=='.manifest'">
<Output TaskParameter="AssignedFiles" ItemName="_DeploymentBaseManifestWithTargetPath" />
</AssignTargetPath>
</Target>
<!--
============================================================
GetItemTargetPaths
This target returns all items that have TargetPath metadata assigned by the AssignTargetPaths target.
============================================================
-->
<Target
Name="GetItemTargetPaths"
DependsOnTargets="AssignTargetPaths"
Returns="
@(EmbeddedResource);
@(ContentWithTargetPath);
@(_NoneWithTargetPath);
@(_DeploymentBaseManifestWithTargetPath);
" />
<!--
============================================================
SplitResourcesByCulture
Split EmbeddedResource items into five lists based on whether
they are resx files, licx files or other resources and whether they should be localized. Also adds Type and Culture
metadata. Type indicates whether the resource is "Resx" or "Non-Resx".
[IN]/[OUT]
@(EmbeddedResource) - The raw list of resources.
[OUT]
@(_LicxFile) - The EmbeddedResource items with extension equal to '.licx'.
============================================================
-->
<Target
Name="SplitResourcesByCulture"
DependsOnTargets="AssignTargetPaths">
<Warning Condition="'@(ResxWithNoCulture)'!=''" Code="MSB9000" Text="ResxWithNoCulture item type is deprecated. Use EmbeddedResource items instead."/>
<Warning Condition="'@(ResxWithCulture)'!=''" Code="MSB9001" Text="ResxWithCulture item type is deprecated. Use EmbeddedResource items instead."/>
<Warning Condition="'@(NonResxWithCulture)'!=''" Code="MSB9002" Text="NonResxWithCulture item type is deprecated. Use EmbeddedResource items instead."/>
<Warning Condition="'@(NonResxWithNoCulture)'!=''" Code="MSB9003" Text="NonResxWithNoCulture item type is deprecated. Use EmbeddedResource items instead."/>
<ItemGroup>
<_LicxFile Include="@(EmbeddedResource)" Condition="'%(Extension)'=='.licx'"/>
<!-- CONSUMED FOR COMPATIBILITY REASONS ONLY. EMIT EMBEDDEDRESOURCE INSTEAD -->
<EmbeddedResource Include="@(ResxWithNoCulture);@(ResxWithCulture)">
<Type>Resx</Type>
</EmbeddedResource>
<EmbeddedResource Include="@(NonResxWithCulture);@(NonResxWithNoCulture)">
<Type>Non-Resx</Type>
</EmbeddedResource>
</ItemGroup>
<AssignCulture Files="@(EmbeddedResource)" Condition="'%(Extension)'!='.licx'">
<!-- Create the list of culture resx and embedded resource files -->
<Output TaskParameter="AssignedFilesWithCulture" ItemName="_MixedResourceWithCulture"/>
<!-- Create the list of non-culture resx and embedded resource files -->
<Output TaskParameter="AssignedFilesWithNoCulture" ItemName="_MixedResourceWithNoCulture"/>
</AssignCulture>
<ItemGroup>
<!-- Remove EmbeddedResource items that we have processed already
i.e. either Licx, or resources that don't have culture info -->
<EmbeddedResource Remove="@(_MixedResourceWithCulture)" />
<EmbeddedResource Remove="@(_MixedResourceWithNoCulture)" />
<EmbeddedResource Remove="@(_LicxFile)" />
<!-- Add back everything except Licx, so that we have culture info -->
<EmbeddedResource Include="@(_MixedResourceWithNoCulture);@(_MixedResourceWithCulture)" Condition="'%(Extension)'=='.resx' or '%(Extension)'=='.restext'">
<Type Condition="'%(_MixedResourceWithNoCulture.Type)'=='' and '%(_MixedResourceWithCulture.Type)'==''">Resx</Type>
</EmbeddedResource>
<EmbeddedResource Include="@(_MixedResourceWithNoCulture);@(_MixedResourceWithCulture)" Condition="'%(Extension)'!='.resx' and '%(Extension)'!='.restext'">
<Type Condition="'%(_MixedResourceWithNoCulture.Type)'=='' and '%(_MixedResourceWithCulture.Type)'==''">Non-Resx</Type>
</EmbeddedResource>
<!-- EMITTED FOR COMPATIBILITY REASONS ONLY. CONSUME EMBEDDEDRESOURCE INSTEAD -->
<ResxWithNoCulture Remove="@(ResxWithNoCulture)"/>
<NonResxWithNoCulture Remove="@(NonResxWithNoCulture)"/>
<ResxWithCulture Remove="@(ResxWithCulture)"/>
<NonResxWithCulture Remove="@(NonResxWithCulture)"/>
<ResxWithNoCulture Include="@(_MixedResourceWithNoCulture)" Condition="'%(WithCulture)'=='false' and ('%(Extension)'=='.resx' or '%(Extension)'=='.restext')"/>
<NonResxWithNoCulture Include="@(_MixedResourceWithNoCulture)" Condition="'%(WithCulture)'=='false' and ('%(Extension)'!='.resx' and '%(Extension)'!='.restext')"/>
<ResxWithCulture Include="@(_MixedResourceWithCulture)" Condition="'%(WithCulture)'=='true' and ('%(Extension)'=='.resx' or '%(Extension)'=='.restext')"/>
<NonResxWithCulture Include="@(_MixedResourceWithCulture)" Condition="'%(WithCulture)'=='true' and ('%(Extension)'!='.resx' and '%(Extension)'!='.restext')"/>
<!-- Clean up temporary lists -->
<_MixedResourceWithNoCulture Remove="@(_MixedResourceWithNoCulture)" />
<_MixedResourceWithCulture Remove="@(_MixedResourceWithCulture)" />
</ItemGroup>
</Target>
<!--
=======================================================================
CreateCustomManifestResourceNames
Allows custom manifest resource name generation tasks to plug
into the build process
=======================================================================
-->
<PropertyGroup>
<CreateCustomManifestResourceNamesDependsOn></CreateCustomManifestResourceNamesDependsOn>
</PropertyGroup>
<Target
Name="CreateCustomManifestResourceNames"
DependsOnTargets="$(CreateCustomManifestResourceNamesDependsOn)"/>
<!--
============================================================
ResGen
Run GenerateResource on the given resx files.
============================================================
-->
<PropertyGroup>
<ResGenDependsOn>ResolveAssemblyReferences;SplitResourcesByCulture;BeforeResGen;CoreResGen;AfterResGen</ResGenDependsOn>
<CoreResGenDependsOn>FindReferenceAssembliesForReferences</CoreResGenDependsOn>
<UseSourcePath Condition="'$(UseSourcePath)'==''">true</UseSourcePath>
<ResGenExecuteAsTool Condition="'$(ResGenExecuteAsTool)'==''">false</ResGenExecuteAsTool>
</PropertyGroup>
<Target
Name="ResGen"
DependsOnTargets="$(ResGenDependsOn)"/>
<!--
============================================================
BeforeResGen
Redefine this target in your project in order to run tasks just before Resgen.
============================================================
-->
<Target Name="BeforeResGen"/>
<!--
============================================================
AfterResGen
Redefine this target in your project in order to run tasks just after Resgen.
============================================================
-->
<Target Name="AfterResGen"/>
<!--
============================================================
CoreResGen
============================================================
-->
<Target
Name="CoreResGen"
DependsOnTargets="$(CoreResGenDependsOn)">
<ItemGroup>
<_Temporary Remove="@(_Temporary)" />
</ItemGroup>
<PropertyGroup>
<GenerateResourceMSBuildArchitecture Condition="'$(GenerateResourceMSBuildArchitecture)' == ''">$(PlatformTargetAsMSBuildArchitecture)</GenerateResourceMSBuildArchitecture>
<ResgenToolPath Condition="'$(ResgenToolPath)' == ''">$(TargetFrameworkSDKToolsDirectory)</ResgenToolPath>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFrameworkAsMSBuildRuntime)' != '' and '$(GenerateResourceMSBuildArchitecture)' != ''">
<!-- 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
user know there's something wrong than just silently generate something that's probably not quite right. However, in a few
circumstances, there are tasks that are already aware of runtime / bitness concerns, in which case even if we go ahead and run
the more recent version of the task, it should be able to generate something correct. GenerateResource is one such task, so
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
back to the current task since it's still mostly correct.
In particular, we need to do this because otherwise people with Dev10 on a machine that they upgrade to Win8 will be broken:
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
the 8.0A SDK, which they won't have installed, and thus without this fallback mechanism, their projects targeting v3.5 will
suddenly start failing to build.-->
<GenerateResourceMSBuildRuntime
Condition="'$(GenerateResourceMSBuildRuntime)' == '' and
$([MSBuild]::DoesTaskHostExist(`$(TargetFrameworkAsMSBuildRuntime)`, `$(GenerateResourceMSBuildArchitecture)`))">$(TargetFrameworkAsMSBuildRuntime)</GenerateResourceMSBuildRuntime>
<!-- If the targeted runtime doesn't exist, fall back to current -->
<GenerateResourceMSBuildRuntime Condition="'$(GenerateResourceMSBuildRuntime)' == ''">CurrentRuntime</GenerateResourceMSBuildRuntime>
</PropertyGroup>
<!-- 4.0 task has some new parameters that we want to make use of if we're targeting 4.0 -->
<GenerateResource
Sources="@(EmbeddedResource)"
UseSourcePath="$(UseSourcePath)"
References="@(ReferencePathWithRefAssemblies)"
UsePreserializedResources="$(GenerateResourceUsePreserializedResources)"
AdditionalInputs="$(MSBuildAllProjects)"
NeverLockTypeAssemblies="$(GenerateResourceNeverLockTypeAssemblies)"
StateFile="$(IntermediateOutputPath)$(MSBuildProjectFile).GenerateResource.cache"
StronglyTypedClassName="%(EmbeddedResource.StronglyTypedClassName)"
StronglyTypedFileName="%(EmbeddedResource.StronglyTypedFileName)"
StronglyTypedLanguage="%(EmbeddedResource.StronglyTypedLanguage)"
StronglyTypedNamespace="%(EmbeddedResource.StronglyTypedNamespace)"
StronglyTypedManifestPrefix="%(EmbeddedResource.StronglyTypedManifestPrefix)"
PublicClass="%(EmbeddedResource.PublicClass)"
OutputResources="@(EmbeddedResource->'$(IntermediateOutputPath)%(ManifestResourceName).resources')"
Condition="'%(EmbeddedResource.Type)' == 'Resx' and '%(EmbeddedResource.GenerateResource)' != 'false' and '$(GenerateResourceMSBuildRuntime)' != 'CLR2'"
SdkToolsPath="$(ResgenToolPath)"
ExecuteAsTool="$(ResGenExecuteAsTool)"
EnvironmentVariables="$(ResGenEnvironment)"
MSBuildRuntime="$(GenerateResourceMSBuildRuntime)"
MSBuildArchitecture="$(GenerateResourceMSBuildArchitecture)">
<Output TaskParameter="FilesWritten" ItemName="FileWrites"/>
<Output TaskParameter="StronglyTypedFileName" ItemName="Compile"/>
<!-- Gather Sources as an output since it will contain OutputResource metadata indicating the final output resource that it was compiled into -->
<Output TaskParameter="Sources" ItemName="_Temporary" />
</GenerateResource>
<!-- But we can't use those parameters if we're targeting 3.5, since we're using the 3.5 task -->
<GenerateResource
Sources="@(EmbeddedResource)"
UseSourcePath="$(UseSourcePath)"
References="@(ReferencePath)"
AdditionalInputs="$(MSBuildAllProjects)"
NeverLockTypeAssemblies="$(GenerateResourceNeverLockTypeAssemblies)"
StateFile="$(IntermediateOutputPath)$(MSBuildProjectFile).GenerateResource.cache"
StronglyTypedClassName="%(EmbeddedResource.StronglyTypedClassName)"
StronglyTypedFileName="%(EmbeddedResource.StronglyTypedFileName)"
StronglyTypedLanguage="%(EmbeddedResource.StronglyTypedLanguage)"
StronglyTypedNamespace="%(EmbeddedResource.StronglyTypedNamespace)"
StronglyTypedManifestPrefix="%(EmbeddedResource.StronglyTypedManifestPrefix)"
PublicClass="%(EmbeddedResource.PublicClass)"
OutputResources="@(EmbeddedResource->'$(IntermediateOutputPath)%(ManifestResourceName).resources')"
MSBuildRuntime="$(GenerateResourceMSBuildRuntime)"
MSBuildArchitecture="$(GenerateResourceMSBuildArchitecture)"
Condition="'%(EmbeddedResource.Type)' == 'Resx' and '%(EmbeddedResource.GenerateResource)' != 'false' and '$(GenerateResourceMSBuildRuntime)' == 'CLR2'">
<Output TaskParameter="FilesWritten" ItemName="FileWrites"/>
<Output TaskParameter="StronglyTypedFileName" ItemName="Compile"/>
<!-- Gather Sources as an output since it will contain OutputResource metadata indicating the final output resource that it was compiled into -->
<Output TaskParameter="Sources" ItemName="_Temporary" />
</GenerateResource>
<ItemGroup>
<EmbeddedResource Remove="@(_Temporary)" />
<!-- Add back the Sources list (with OutputResource metadata) that we output from GenerateResource into EmbeddedResource -->
<EmbeddedResource Include="@(_Temporary)" />
<_Temporary Remove="@(_Tem