← all demos
Project(DefaultTargets="Build", TreatAsLocalProperty="OutDir")
if '$(MicrosoftCommonPropsHasBeenImported)' != 'true' and Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props'):
Import "$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props"
PropertyGroup
if '$(ImportByWildcardBeforeMicrosoftCommonTargets)' == '':
ImportByWildcardBeforeMicrosoftCommonTargets = true
if '$(ImportByWildcardAfterMicrosoftCommonTargets)' == '':
ImportByWildcardAfterMicrosoftCommonTargets = true
if '$(ImportUserLocationsByWildcardBeforeMicrosoftCommonTargets)' == '':
ImportUserLocationsByWildcardBeforeMicrosoftCommonTargets = true
if '$(ImportUserLocationsByWildcardAfterMicrosoftCommonTargets)' == '':
ImportUserLocationsByWildcardAfterMicrosoftCommonTargets = true
if '$(ImportUserLocationsByWildcardBeforeMicrosoftCommonTargets)' == 'true' and exists('$(MSBuildUserExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.targets\ImportBefore'):
Import "$(MSBuildUserExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.targets\ImportBefore\*"
if '$(ImportByWildcardBeforeMicrosoftCommonTargets)' == 'true' and exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.targets\ImportBefore'):
Import "$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.targets\ImportBefore\*"
if Exists('$(MSBuildProjectFullPath).user'):
Import "$(MSBuildProjectFullPath).user"
PropertyGroup
if '$(VisualStudioVersion)' == '':
VisualStudioVersion = 10.0
PropertyGroup
if '$(CustomBeforeMicrosoftCommonTargets)'=='':
CustomBeforeMicrosoftCommonTargets = $(MSBuildExtensionsPath)\v$(MSBuildToolsVersion)\Custom.Before.Microsoft.Common.targets
if '$(CustomAfterMicrosoftCommonTargets)'=='':
CustomAfterMicrosoftCommonTargets = $(MSBuildExtensionsPath)\v$(MSBuildToolsVersion)\Custom.After.Microsoft.Common.targets
if '$(ReportingServicesTargets)'=='':
ReportingServicesTargets = $(MSBuildExtensionsPath)\Microsoft\VisualStudio\v$(VisualStudioVersion)\ReportingServices\Microsoft.ReportingServices.targets
if '$(CustomBeforeMicrosoftCommonTargets)' != '' and Exists('$(CustomBeforeMicrosoftCommonTargets)'):
Import "$(CustomBeforeMicrosoftCommonTargets)"
if '$(TargetRuntime)' == '':
PropertyGroup
TargetRuntime = Managed
if '$(TargetRuntime)' == 'Managed':
PropertyGroup
if '$(TargetFrameworkIdentifier)' == '':
TargetFrameworkIdentifier = .NETFramework
if '$(TargetFrameworkVersion)' == '':
TargetFrameworkVersion = v4.0
PropertyGroup
if '$(VisualStudioVersion)' == '10.0' or '$(VisualStudioVersion)' == '':
AvailablePlatforms = Any CPU,x86,x64,Itanium
if '$(VisualStudioVersion)' != '' and '$(VisualStudioVersion)' > '10.0':
AvailablePlatforms = Any CPU,x86,x64
if '$(TargetFrameworkIdentifier)' == '.NETFramework' or '$(TargetFrameworkIdentifier)' == 'Silverlight':
Import "Microsoft.NETFramework.props"
if '$(TargetFrameworkIdentifier)' == '.NETStandard' or '$(TargetFrameworkIdentifier)' == '.NETCoreApp':
Import "Microsoft.NET.props"
PropertyGroup
if '$(GenerateFullPaths)' == '':
GenerateFullPaths = true
if '$(YieldDuringToolExecution)' == '':
YieldDuringToolExecution = true
if '$(TargetFrameworkIdentifier)' != '' and '$(TargetFrameworkVersion)' != '':
PropertyGroup
if '$(TargetFrameworkMoniker)' == '' and '$([System.String]::IsNullOrWhitespace($(TargetFrameworkProfile)))' != 'true':
TargetFrameworkMoniker = $(TargetFrameworkIdentifier),Version=$(TargetFrameworkVersion),Profile=$(TargetFrameworkProfile)
if '$(TargetFrameworkMoniker)' == '':
TargetFrameworkMoniker = $(TargetFrameworkIdentifier),Version=$(TargetFrameworkVersion)
if '$(EnableFrameworkPathOverride)' != 'false' And '$(FrameworkPathOverride)' == '' And Exists('$(TargetFrameworkRootPath)$(TargetFrameworkIdentifier)\$(TargetFrameworkVersion)'):
FrameworkPathOverride = $(TargetFrameworkRootPath)$(TargetFrameworkIdentifier)\$(TargetFrameworkVersion)
if '$(EnableFrameworkPathOverride)' != 'false' And '$(FrameworkPathOverride)' == '':
FrameworkPathOverride = $([Microsoft.Build.Utilities.ToolLocationHelper]::GetPathToStandardLibraries($(TargetFrameworkIdentifier), $(TargetFrameworkVersion), $(TargetFrameworkProfile), $(PlatformTarget), $(TargetFrameworkRootPath), $(TargetFrameworkFallbackSearchPaths)))
if '$(EnableFrameworkPathOverride)' != 'false' And !Exists('$(FrameworkPathOverride)\mscorlib.dll'):
FrameworkPathOverride = $(MSBuildFrameworkToolsPath)
PropertyGroup
if '$(TargetPlatformIdentifier)' == '' and '$(_EnableDefaultWindowsPlatform)' != 'false':
TargetPlatformIdentifier = Windows
if '$(TargetPlatformVersion)' == '' and '$(_EnableDefaultWindowsPlatform)' != 'false':
TargetPlatformVersion = 7.0
if '$(TargetPlatformSdkPath)' == '' and '$(TargetPlatformSdkRootOverride)' != '':
TargetPlatformSdkPath = $(TargetPlatformSdkRootOverride)\
if '$(TargetPlatformSdkPath)' == '' and '$(TargetPlatformIdentifier)' == 'Windows' and $([MSBuild]::IsOSPlatform('Windows')) and '$(MSBuildRuntimeType)' != 'Core':
TargetPlatformSdkPath = $([MSBuild]::GetRegistryValueFromView('HKEY_LOCAL_MACHINE\Software\Microsoft\Microsoft SDKs\Windows\v$(TargetPlatformVersion)', InstallationFolder, null, RegistryView.Registry32, RegistryView.Default))
if '$(TargetPlatformSdkPath)' == '':
TargetPlatformSdkPath = $([Microsoft.Build.Utilities.ToolLocationHelper]::GetPlatformSDKLocation($(TargetPlatformIdentifier), $(TargetPlatformVersion)))
if '$(TargetPlatformSdkMetadataLocation)' == '' and Exists('$(TargetPlatformSdkPath)'):
TargetPlatformSdkMetadataLocation = $(TargetPlatformSdkPath)Windows Metadata
if Exists('$(TargetPlatformSdkPath)') and ('$(TargetPlatformSdkMetadataLocation)' == '' or !Exists('$(TargetPlatformSdkMetadataLocation)')):
TargetPlatformSdkMetadataLocation = $(TargetPlatformSdkPath)References\CommonConfiguration\Neutral
if '$(TargetPlatformWinMDLocation)' == '' and Exists('$(TargetPlatformSdkMetadataLocation)'):
TargetPlatformWinMDLocation = $(TargetPlatformSdkMetadataLocation)
if '$(UseOSWinMdReferences)' == '' and ('$(TargetPlatformWinMDLocation)' == '' and '$(TargetPlatformIdentifier)' == 'Windows' and '$(TargetPlatformVersion)' > '7.0'):
UseOSWinMdReferences = true
if '$(UseOsWinMdReferences)' == 'true':
TargetPlatformWinMDLocation = $(WinDir)\System32\WinMetadata
if '$(TargetPlatformMoniker)' == '' and '$(TargetPlatformIdentifier)' != '' and '$(TargetPlatformVersion)' != '':
TargetPlatformMoniker = $(TargetPlatformIdentifier),Version=$(TargetPlatformVersion)
if '$(TargetPlatformDisplayName)' == '':
TargetPlatformDisplayName = $([Microsoft.Build.Utilities.ToolLocationHelper]::GetPlatformSDKDisplayName($(TargetPlatformIdentifier), $(TargetPlatformVersion)))
PropertyGroup
_OriginalPlatform = $(Platform)
_OriginalConfiguration = $(Configuration)
if '$(_OriginalPlatform)' != '' and '$(_OriginalConfiguration)' != '' and '$(OutputPath)' == '':
_OutputPathWasMissing = true
if '$(BaseOutputPath)' != '':
BaseOutputPathWasSpecified = true
PropertyGroup
if '$(Platform)' == '':
Platform = AnyCPU
if '$(PlatformName)' == '':
PlatformName = $(Platform)
if '$(Configuration)' == '':
Configuration = Debug
if '$(ConfigurationName)' == '':
ConfigurationName = $(Configuration)
if '$(BaseOutputPath)' == '':
BaseOutputPath = bin\
if !HasTrailingSlash('$(BaseOutputPath)'):
BaseOutputPath = $(BaseOutputPath)\
if '$(OutputPath)' == '' and '$(PlatformName)' == 'AnyCPU':
OutputPath = $(BaseOutputPath)$(Configuration)\
if '$(OutputPath)' == '' and '$(PlatformName)' != 'AnyCPU':
OutputPath = $(BaseOutputPath)$(PlatformName)\$(Configuration)\
if !HasTrailingSlash('$(OutputPath)'):
OutputPath = $(OutputPath)\
if '$(BaseIntermediateOutputPath)' == '':
BaseIntermediateOutputPath = obj\
if !HasTrailingSlash('$(BaseIntermediateOutputPath)'):
BaseIntermediateOutputPath = $(BaseIntermediateOutputPath)\
if '$(IntermediateOutputPath)' == '' and '$(PlatformName)' == 'AnyCPU':
IntermediateOutputPath = $(BaseIntermediateOutputPath)$(Configuration)\
if '$(IntermediateOutputPath)' == '' and '$(PlatformName)' != 'AnyCPU':
IntermediateOutputPath = $(BaseIntermediateOutputPath)$(PlatformName)\$(Configuration)\
if !HasTrailingSlash('$(IntermediateOutputPath)'):
IntermediateOutputPath = $(IntermediateOutputPath)\
PropertyGroup
if '$(TargetType)' != '':
OutputType = $(TargetType)
if '$(TargetType)' == 'Container' or '$(TargetType)' == 'DocumentContainer':
OutputType = library
if '$(OutputType)' == '':
OutputType = exe
if '$(ConfigurationName)' == 'Debug' and '$(DebugSymbols)' == '' and '$(DebugType)'=='':
DebugSymbols = true
_DebugSymbolsProduced = false
if '$(DebugSymbols)'=='true':
_DebugSymbolsProduced = true
if '$(DebugType)'=='none':
_DebugSymbolsProduced = false
if '$(DebugType)'=='pdbonly':
_DebugSymbolsProduced = true
if '$(DebugType)'=='full':
_DebugSymbolsProduced = true
if '$(DebugType)'=='portable':
_DebugSymbolsProduced = true
if '$(DebugType)'=='embedded':
_DebugSymbolsProduced = false
if '$(ProduceOnlyReferenceAssembly)'=='true':
_DebugSymbolsProduced = false
_DocumentationFileProduced = true
if '$(DocumentationFile)'=='':
_DocumentationFileProduced = false
if '$(ProduceReferenceAssembly)' == '':
ProduceReferenceAssembly = false
if '$(BaseOutputPathWasSpecified)' != 'true' and '$(_OutputPathWasMissing)' == 'true':
PropertyGroup
if '$(SkipInvalidConfigurations)' == 'true':
_InvalidConfigurationMessageSeverity = Warning
if '$(SkipInvalidConfigurations)' != 'true':
_InvalidConfigurationMessageSeverity = Error
PropertyGroup
if '$(TargetExt)' == '' and '$(OutputType)'=='exe':
TargetExt = .exe
if '$(TargetExt)' == '' and '$(OutputType)'=='winexe':
TargetExt = .exe
if '$(TargetExt)' == '' and '$(OutputType)'=='appcontainerexe':
TargetExt = .exe
if '$(TargetExt)' == '' and '$(OutputType)'=='library':
TargetExt = .dll
if '$(TargetExt)' == '' and '$(OutputType)'=='module':
TargetExt = .netmodule
if '$(TargetExt)' == '' and '$(OutputType)'=='winmdobj':
TargetExt = .winmdobj
PropertyGroup
if '$(OutDir)'!='' and '$(OutDirWasSpecified)'=='':
OutDirWasSpecified = true
if '$(OutDir)' == '':
OutDir = $(OutputPath)
if '$(OutDir)' != '' and !HasTrailingSlash('$(OutDir)'):
OutDir = $(OutDir)\
if '$(ProjectName)' == '':
ProjectName = $(MSBuildProjectName)
if '$(OutDir)' != '' and '$(OutDirWasSpecified)' == 'true' and (('$(WindowsAppContainer)' == 'true' and '$(GenerateProjectSpecificOutputFolder)' != 'false') or '$(GenerateProjectSpecificOutputFolder)' == 'true'):
OutDir = $(OutDir)$(ProjectName)\
if '$(AssemblyName)'=='':
AssemblyName = $(MSBuildProjectName)
if '$(TargetName)' == '' and '$(OutputType)' == 'winmdobj' and '$(RootNamespace)' != '':
TargetName = $(RootNamespace)
if '$(TargetName)' == '':
TargetName = $(AssemblyName)
if '$(ProjectFileName)' == '':
ProjectFileName = $(MSBuildProjectFile)
if '$(ProjectExt)' == '':
ProjectExt = $(MSBuildProjectExtension)
if '$(WinMDExpOutputWindowsMetadataFilename)' == '' and '$(OutputType)' == 'winmdobj':
WinMDExpOutputWindowsMetadataFilename = $(TargetName).winmd
if '$(TargetFileName)' == '' and '$(OutputType)' == 'winmdobj':
TargetFileName = $(WinMDExpOutputWindowsMetadataFilename)
if '$(TargetFileName)' == '':
TargetFileName = $(TargetName)$(TargetExt)
PropertyGroup
if '$(OutputType)'=='winexe' or '$(OutputType)'=='exe' or '$(OutputType)'=='appcontainerexe':
_DeploymentPublishableProjectDefault = true
if '$(PublishableProject)'=='':
PublishableProject = $(_DeploymentPublishableProjectDefault)
if '$(OutputType)'=='library':
_DeploymentTargetApplicationManifestFileName = Native.$(AssemblyName).manifest
if '$(OutputType)'=='winexe':
_DeploymentTargetApplicationManifestFileName = $(TargetFileName).manifest
if '$(OutputType)'=='exe':
_DeploymentTargetApplicationManifestFileName = $(TargetFileName).manifest
if '$(OutputType)'=='appcontainerexe':
_DeploymentTargetApplicationManifestFileName = $(TargetFileName).manifest
if '$(TargetDeployManifestFileName)' == '' and '$(HostInBrowser)' != 'true':
TargetDeployManifestFileName = $(AssemblyName).application
if '$(TargetDeployManifestFileName)' == '' and '$(HostInBrowser)' == 'true':
TargetDeployManifestFileName = $(AssemblyName).xbap
if '$(OutputType)'=='winexe' or '$(OutputType)'=='exe' or '$(OutputType)'=='appcontainerexe':
GenerateClickOnceManifests = $(GenerateManifests)
if '$(OutputType)'=='library':
_DeploymentApplicationManifestIdentity = Native.$(AssemblyName)
if '$(OutputType)'=='winexe':
_DeploymentApplicationManifestIdentity = $(AssemblyName).exe
if '$(OutputType)'=='exe':
_DeploymentApplicationManifestIdentity = $(AssemblyName).exe
if '$(OutputType)'=='appcontainerexe':
_DeploymentApplicationManifestIdentity = $(AssemblyName).exe
if '$(HostInBrowser)' != 'true':
_DeploymentDeployManifestIdentity = $(AssemblyName).application
if '$(HostInBrowser)' == 'true':
_DeploymentDeployManifestIdentity = $(AssemblyName).xbap
if '$(MapFileExtensions)'=='true':
_DeploymentFileMappingExtension = .deploy
if '$(MapFileExtensions)'!='true':
_DeploymentFileMappingExtension
if '$(UpdatePeriodically)'=='true':
_DeploymentBuiltUpdateInterval = $(UpdateInterval)
if '$(UpdatePeriodically)'=='true':
_DeploymentBuiltUpdateIntervalUnits = $(UpdateIntervalUnits)
if '$(UpdatePeriodically)'!='true':
_DeploymentBuiltUpdateInterval = 0
if '$(UpdatePeriodically)'!='true':
_DeploymentBuiltUpdateIntervalUnits = Days
if '$(UpdateRequired)'=='true' and '$(Install)'=='true':
_DeploymentBuiltMinimumRequiredVersion = $(MinimumRequiredVersion)
if '$(TargetFrameworkIdentifier)' == '.NETCoreApp':
_DeploymentLauncherBased = true
if '$(MaxTargetPath)'=='':
MaxTargetPath = 100
PropertyGroup
if '$(TargetCulture)'=='':
TargetCulture = *
if '$(UICulture)'!='' and '$(FallbackCulture)'=='':
FallbackCulture = $(UICulture)
ItemGroup
_OutputPathItem += "$(OutDir)"
_UnmanagedRegistrationCache += "$(BaseIntermediateOutputPath)$(MSBuildProjectFile).UnmanagedRegistration.cache"
_ResolveComReferenceCache += "$(IntermediateOutputPath)$(MSBuildProjectFile).ResolveComReference.cache"
PropertyGroup
if '$(OutDir)' != '':
TargetDir = $([MSBuild]::Escape($([System.IO.Path]::GetFullPath(`$([System.IO.Path]::Combine(`$(MSBuildProjectDirectory)`, `$(OutDir)`))`))))
if '$(TargetPath)' == '':
TargetPath = $(TargetDir)$(TargetFileName)
if '$(TargetRefPath)' == '' and '$(ProduceReferenceAssembly)' == 'true' and '$(ProduceReferenceAssemblyInOutDir)' == 'true':
TargetRefPath = $([MSBuild]::NormalizePath($(TargetDir), 'ref', $(TargetFileName)))
if '$(TargetRefPath)' == '' and '$(ProduceReferenceAssembly)' == 'true':
TargetRefPath = $([MSBuild]::NormalizePath($(MSBuildProjectDirectory), $(IntermediateOutputPath), 'ref', $(TargetFileName)))
if '$(ProjectDir)' == '':
ProjectDir = $([MSBuild]::EnsureTrailingSlash($(MSBuildProjectDirectory)))
if '$(ProjectPath)' == '':
ProjectPath = $(ProjectDir)$(ProjectFileName)
ItemGroup
AppConfigFileDestination += "$(OutDir)$(TargetFileName).config"
PropertyGroup
if '$(DevEnvDir)'=='':
DevEnvDir = *Undefined*
if '$(SolutionName)'=='':
SolutionName = *Undefined*
if '$(SolutionFileName)'=='':
SolutionFileName = *Undefined*
if '$(SolutionPath)'=='':
SolutionPath = *Undefined*
if '$(SolutionDir)'=='':
SolutionDir = *Undefined*
if '$(SolutionExt)'=='':
SolutionExt = *Undefined*
PropertyGroup
if '$(OutputType)'=='exe' or '$(OutputType)'=='winexe':
GenerateBindingRedirectsOutputType = true
if '$(AutoGenerateBindingRedirects)' == '' and '$(TargetFrameworkIdentifier)' == '.NETFramework' and '$(TargetFrameworkVersion.TrimStart(vV))' >= '4.7.2':
AutoGenerateBindingRedirects = true
if '$(AutoUnifyAssemblyReferences)' == '':
PropertyGroup
AutoUnifyAssemblyReferences = true
if '$(GenerateBindingRedirectsOutputType)' == 'true' and '$(AutoGenerateBindingRedirects)' != 'true':
AutoUnifyAssemblyReferences = false
PropertyGroup
if '$(CleanFile)'=='':
CleanFile = $(MSBuildProjectFile).FileListAbsolute.txt
if '$(BuildProjectReferences)' == '' and '$(DesignTimeBuild)' == 'true':
BuildProjectReferences = false
if '$(BuildProjectReferences)' == '':
BuildProjectReferences = true
if '$(BuildInParallel)' == '':
BuildInParallel = true
if '$(_ResolveReferenceDependencies)' == '':
_ResolveReferenceDependencies = false
if '$(_GetChildProjectCopyToOutputDirectoryItems)' == '':
_GetChildProjectCopyToOutputDirectoryItems = true
if '$(OverwriteReadOnlyFiles)' == '':
OverwriteReadOnlyFiles = false
if '$(ComReferenceNoClassMembers)' == '':
ComReferenceNoClassMembers = false
PropertyGroup
_GenerateBindingRedirectsIntermediateAppConfig = $(IntermediateOutputPath)$(TargetFileName).config
if '$(MSBuildCopyMarkerName)' == '':
PropertyGroup
MSBuildCopyMarkerName = $(MSBuildProjectFile)
if '$(MSBuildCopyMarkerName.Length)' > '17':
MSBuildCopyMarkerName = $([MSBuild]::SubstringByAsciiChars($(MSBuildProjectFile), 0, 8)).$([MSBuild]::StableStringHash($(MSBuildProjectFile)).ToString("X8"))
MSBuildCopyMarkerName = $(MSBuildCopyMarkerName).Up2Date
ItemGroup
IntermediateAssembly += "$(IntermediateOutputPath)$(TargetName)$(TargetExt)"
FinalDocFile += "@(DocFileItem->'$(OutDir)%(Filename)%(Extension)')"
CopyUpToDateMarker += "$([MSBuild]::NormalizePath('$(MSBuildProjectDirectory)', '$(IntermediateOutputPath)', '$(MSBuildCopyMarkerName)'))"
if '$(ProduceReferenceAssembly)' == 'true':
ItemGroup
if '@(IntermediateRefAssembly)' == '':
IntermediateRefAssembly += "$(IntermediateOutputPath)refint\$(TargetName)$(TargetExt)"
CreateDirectory += "@(IntermediateRefAssembly->'%(RootDir)%(Directory)')"
if '$(ProduceReferenceAssemblyInOutDir)' == 'true':
CreateDirectory += "$(OutDir)ref"
if '$(ProduceReferenceAssemblyInOutDir)' != 'true':
CreateDirectory += "$(IntermediateOutputPath)ref"
if '$(_DebugSymbolsProduced)' == 'true':
ItemGroup
if '$(OutputType)' == 'winmdobj' and '@(_DebugSymbolsIntermediatePath)' == '':
_DebugSymbolsIntermediatePath += "$(IntermediateOutputPath)$(TargetName).compile.pdb"
if '$(OutputType)' != 'winmdobj' and '@(_DebugSymbolsIntermediatePath)' == '':
_DebugSymbolsIntermediatePath += "$(IntermediateOutputPath)$(TargetName).pdb"
_DebugSymbolsOutputPath += "@(_DebugSymbolsIntermediatePath->'$(OutDir)%(Filename)%(Extension)')"
if '$(_DebugSymbolsProduced)' == 'true' and '$(OutputType)' == 'winmdobj':
PropertyGroup
if '$(WinMDExpOutputPdb)' == '':
WinMDExpOutputPdb = $(IntermediateOutputPath)$(TargetName).pdb
_WinMDDebugSymbolsOutputPath = $([System.IO.Path]::Combine('$(OutDir)', $([System.IO.Path]::GetFileName('$(WinMDExpOutputPdb)'))))
if '$(OutputType)' == 'winmdobj' and '$(DocumentationFile)'!='':
PropertyGroup
if '$(WinMDOutputDocumentationFile)' == '':
WinMDOutputDocumentationFile = $(IntermediateOutputPath)$(TargetName).xml
_WinMDDocFileOutputPath = $([System.IO.Path]::Combine('$(OutDir)', $([System.IO.Path]::GetFileName('$(WinMDOutputDocumentationFile)'))))
if '$(WinMDExpOutputWindowsMetadataFilename)' != '':
PropertyGroup
_IntermediateWindowsMetadataPath = $(IntermediateOutputPath)$(WinMDExpOutputWindowsMetadataFilename)
_WindowsMetadataOutputPath = $(OutDir)$(WinMDExpOutputWindowsMetadataFilename)
PropertyGroup
_SupportedArchitectures = amd64 arm64
ItemGroup
_DeploymentManifestEntryPoint += "@(IntermediateAssembly)"
TargetPath = $(TargetFileName)
if Exists('$(ApplicationIcon)'):
_DeploymentManifestIconFile += "$(ApplicationIcon)"
TargetPath = $(ApplicationIcon)
ApplicationManifest += "$(IntermediateOutputPath)$(_DeploymentTargetApplicationManifestFileName)"
TargetPath = $(_DeploymentTargetApplicationManifestFileName)
_ApplicationManifestFinal += "$(OutDir)$(_DeploymentTargetApplicationManifestFileName)"
TargetPath = $(_DeploymentTargetApplicationManifestFileName)
DeployManifest += "$(IntermediateOutputPath)$(TargetDeployManifestFileName)"
TargetPath = $(TargetDeployManifestFileName)
if '$(TargetZone)'!='':
_DeploymentIntermediateTrustInfoFile += "$(IntermediateOutputPath)$(TargetName).TrustInfo.xml"
PropertyGroup
if '$(_DeploymentUrl)'=='':
_DeploymentUrl = $(UpdateUrl)
if '$(_DeploymentUrl)'=='':
_DeploymentUrl = $(InstallUrl)
if '$(_DeploymentUrl)'=='':
_DeploymentUrl = $(PublishUrl)
if !('$(UpdateUrl)'=='') and '$(Install)'=='false':
_DeploymentUrl
if '$(_DeploymentUrl)'!='':
_DeploymentUrl = $(_DeploymentUrl)$(TargetDeployManifestFileName)
if '$(UpdateUrl)'=='' and !('$(Install)'=='true' and '$(UpdateEnabled)'=='true'):
_DeploymentUrl
if '$(ExcludeDeploymentUrl)'=='true':
_DeploymentUrl
PropertyGroup
if '$(IsWebBootstrapper)'=='true':
_DeploymentApplicationUrl = $(InstallUrl)
if '$(IsWebBootstrapper)'=='true' and '$(InstallUrl)'=='':
_DeploymentApplicationUrl = $(PublishUrl)
if '$(BootstrapperComponentsLocation)'=='Absolute':
_DeploymentComponentsUrl = $(BootstrapperComponentsUrl)
PropertyGroup
if '$(PublishDir)' != '' and !HasTrailingSlash('$(PublishDir)'):
PublishDir = $(PublishDir)\
if '$(PublishDir)'=='':
PublishDir = $([MSBuild]::EnsureTrailingSlash('$(OutputPath)'))app.publish\
PropertyGroup
ClickOncePublishDir = $(PublishDir)
if !HasTrailingSlash('$(ClickOncePublishDir)'):
ClickOncePublishDir = $(ClickOncePublishDir)\
if '$(ProcessorArchitecture)'=='':
PropertyGroup
ProcessorArchitecture = $(PlatformTarget)
if '$(PlatformTarget)' == 'AnyCpu':
ProcessorArchitecture = msil
if '$(PlatformTarget)' == 'x64':
ProcessorArchitecture = amd64
if '$(PlatformTarget)' == 'Itanium':
ProcessorArchitecture = ia64
if '$(PlatformTarget)' == 'x86':
ProcessorArchitecture = x86
if '$(PlatformTarget)' == 'ARM':
ProcessorArchitecture = arm
PropertyGroup
if '$(ConsiderPlatformAsProcessorArchitecture)' == '':
ConsiderPlatformAsProcessorArchitecture = true
if '$(ProcessorArchitecture)' == '' and '$(ConsiderPlatformAsProcessorArchitecture)' == 'true':
PropertyGroup
ProcessorArchitectureAsPlatform = $(Platform)
if '$(ProcessorArchitectureAsPlatform)' == 'AnyCpu' or '$(ProcessorArchitectureAsPlatform)' == 'Any Cpu':
ProcessorArchitecture = msil
if '$(ProcessorArchitectureAsPlatform)' == 'x64' or '$(ProcessorArchitectureAsPlatform)' == 'amd64':
ProcessorArchitecture = amd64
if '$(ProcessorArchitectureAsPlatform)' == 'Itanium':
ProcessorArchitecture = ia64
if '$(ProcessorArchitectureAsPlatform)' == 'x86' or '$(ProcessorArchitectureAsPlatform)' == 'win32':
ProcessorArchitecture = x86
if '$(ProcessorArchitectureAsPlatform)' == 'ARM':
ProcessorArchitecture = arm
if '$(ProcessorArchitecture)'=='':
ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch = None
if '$(ProcessorArchitecture)'=='':
ProcessorArchitecture = $(PROCESSOR_ARCHITECTURE)
if '$(DisableOutOfProcTaskHost)' == '' and '$(MSBuildRuntimeType)' == 'Full':
PropertyGroup
if '$(TargetFrameworkVersion)' == 'v2.0' or '$(TargetFrameworkVersion)' == 'v3.0' or '$(TargetFrameworkVersion)' == 'v3.5':
TargetFrameworkAsMSBuildRuntime = CLR2
if '$(TargetFrameworkVersion)' == 'v4.0' or '$(TargetFrameworkVersion)' == 'v4.5':
TargetFrameworkAsMSBuildRuntime = CLR4
if '$(TargetFrameworkAsMSBuildRuntime)' == '':
TargetFrameworkAsMSBuildRuntime = CurrentRuntime
if '$(PlatformTargetAsMSBuildArchitecture)' != '':
PlatformTargetAsMSBuildArchitectureExplicitlySet = true
if '$(PlatformTargetAsMSBuildArchitecture)' == '':
PlatformTargetAsMSBuildArchitectureExplicitlySet = false
if '$(PlatformTarget)' == 'x86' or ('$(PlatformTarget)' == 'x64' and '$(MSBuildExtensionsPath64)' != ''):
PlatformTargetAsMSBuildArchitecture = $(PlatformTarget)
if '$(PlatformTarget)' == 'arm':
PlatformTargetAsMSBuildArchitecture = x86
if ('$(PlatformTarget)' == 'ia64' and '$(MSBuildExtensionsPath64)' != ''):
PlatformTargetAsMSBuildArchitecture = x64
if '$(PlatformTargetAsMSBuildArchitecture)' == '':
PlatformTargetAsMSBuildArchitecture = CurrentArchitecture
PropertyGroup
if '$(ProjectFlavor)'=='':
ProjectFlavor = Client
PropertyGroup
if '$(SignAssembly)' != 'true':
DelaySign = false
if '$(DelaySign)'!='true':
DelaySign
PropertyGroup
if '$(WebReference_EnableProperties)' == '':
WebReference_EnableProperties = true
if '$(WebReference_EnableSQLTypes)' == '':
WebReference_EnableSQLTypes = true
if '$(WebReference_EnableLegacyEventingModel)' == '':
WebReference_EnableLegacyEventingModel = false
PropertyGroup
if '$(AssemblyFoldersSuffix)' == '':
AssemblyFoldersSuffix = AssemblyFoldersEx
if '$(FrameworkRegistryBase)' == '':
FrameworkRegistryBase = Software\Microsoft\$(TargetFrameworkIdentifier)
if '$(TargetPlatformRegistryBase)' == '':
TargetPlatformRegistryBase = Software\Microsoft\Microsoft SDKs\$(TargetPlatformIdentifier)
if '$(AssemblyFoldersConfigFile)' == '':
AssemblyFoldersConfigFile = $([MSBuild]::GetToolsDirectory32())\AssemblyFolders.config
if Exists('$(AssemblyFoldersConfigFile)'):
AssemblyFoldersConfigFileSearchPath = {AssemblyFoldersFromConfig:$(AssemblyFoldersConfigFile),$(TargetFrameworkVersion)};
if '$(AllowedReferenceAssemblyFileExtensions)' == '':
AllowedReferenceAssemblyFileExtensions =
| .winmd;
| .dll;
| .exe
if '$(AllowedReferenceRelatedFileExtensions)' == '':
AllowedReferenceRelatedFileExtensions =
| .pdb;
| .xml;
| .pri;
| .dll.config;
| .exe.config
if '$(FullReferenceAssemblyNames)' == '':
FullReferenceAssemblyNames = Full
if $(AssemblySearchPaths) == '':
PropertyGroup
if '$(AssemblySearchPath_UseCandidateAssemblyFiles)' != 'false':
AssemblySearchPaths = {CandidateAssemblyFiles}
if '$(AssemblySearchPath_UseReferencePath)' != 'false':
AssemblySearchPaths = $(AssemblySearchPaths);$(ReferencePath)
if '$(AssemblySearchPath_UseHintPathFromItem)' != 'false':
AssemblySearchPaths = $(AssemblySearchPaths);{HintPathFromItem}
if '$(AssemblySearchPath_UseTargetFrameworkDirectory)' != 'false':
AssemblySearchPaths = $(AssemblySearchPaths);{TargetFrameworkDirectory}
if '$(AssemblySearchPath_UseAssemblyFoldersConfigFileSearchPath)' != 'false':
AssemblySearchPaths = $(AssemblySearchPaths);$(AssemblyFoldersConfigFileSearchPath)
if '$(AssemblySearchPath_UseRegistry)' != 'false':
AssemblySearchPaths = $(AssemblySearchPaths);{Registry:$(FrameworkRegistryBase),$(TargetFrameworkVersion),$(AssemblyFoldersSuffix)$(AssemblyFoldersExConditions)}
if '$(AssemblySearchPath_UseAssemblyFolders)' != 'false':
AssemblySearchPaths = $(AssemblySearchPaths);{AssemblyFolders}
if '$(AssemblySearchPath_UseGAC)' != 'false':
AssemblySearchPaths = $(AssemblySearchPaths);{GAC}
if '$(AssemblySearchPath_UseRawFileName)' != 'false':
AssemblySearchPaths = $(AssemblySearchPaths);{RawFileName}
if '$(AssemblySearchPath_UseOutDir)' != 'false':
AssemblySearchPaths = $(AssemblySearchPaths);$(OutDir)
PropertyGroup
if '$(ContinueOnError)' == '':
ContinueOnError = false
PropertyGroup
MSBuildWarningsAsMessages = $(MSBuildWarningsAsMessages);$(NoWarn)
if '$(MSBuildWarningsAsErrors)'=='':
MSBuildWarningsAsErrors = $(WarningsAsErrors)
if '$(MSBuildWarningsNotAsErrors)'=='':
MSBuildWarningsNotAsErrors = $(WarningsNotAsErrors)
PropertyGroup
if '$(CommonXamlResourcesDirectory)' == '':
CommonXamlResourcesDirectory = $(MSBuildThisFileDirectory)$(LangName)\
if !Exists('$(CommonXamlResourcesDirectory)'):
PropertyGroup
CommonXamlResourcesDirectory = $(MSBuildThisFileDirectory)en-US\
if '$(DefineCommonItemSchemas)' == 'true':
ItemGroup
PropertyPageSchema += "$(CommonXamlResourcesDirectory)ProjectItemsSchema.xaml"
PropertyPageSchema += "
$(CommonXamlResourcesDirectory)General.xaml;
$(CommonXamlResourcesDirectory)Debugger_General.xaml"
Context = Project
PropertyPageSchema += "$(CommonXamlResourcesDirectory)General.BrowseObject.xaml"
Context = BrowseObject
PropertyPageSchema += "$(CommonXamlResourcesDirectory)General_File.xaml"
Context = File
PropertyPageSchema += "$(CommonXamlResourcesDirectory)SCC.xaml"
Context = Invisible
PropertyPageSchema += "
$(CommonXamlResourcesDirectory)Folder.xaml;
$(CommonXamlResourcesDirectory)None.xaml;
$(CommonXamlResourcesDirectory)Content.xaml;
$(CommonXamlResourcesDirectory)EmbeddedResource.xaml;
"
Context = File;BrowseObject
PropertyPageSchema += "$(CommonXamlResourcesDirectory)SpecialFolder.xaml;"
Context = File;ProjectSubscriptionService
PropertyGroup
if '$(DefineCommonReferenceSchemas)' == '':
DefineCommonReferenceSchemas = $(DefineCommonItemSchemas)
if '$(DefineCommonReferenceSchemas)' == 'true':
ItemGroup
PropertyPageSchema += "$(CommonXamlResourcesDirectory)assemblyreference.xaml"
Context = ;BrowseObject
PropertyPageSchema += "$(CommonXamlResourcesDirectory)ResolvedAssemblyReference.xaml"
Context = ProjectSubscriptionService;BrowseObject
PropertyPageSchema += "$(CommonXamlResourcesDirectory)COMReference.xaml"
Context = ;BrowseObject
PropertyPageSchema += "$(CommonXamlResourcesDirectory)ResolvedCOMReference.xaml"
Context = ProjectSubscriptionService;BrowseObject
PropertyPageSchema += "$(CommonXamlResourcesDirectory)ProjectReference.xaml"
Context = ;BrowseObject
PropertyPageSchema += "$(CommonXamlResourcesDirectory)ResolvedProjectReference.xaml"
Context = ProjectSubscriptionService;BrowseObject
if '$(DefineCommonCapabilities)' == 'true':
ItemGroup
ProjectCapability += "
AssemblyReferences;
COMReferences;
ProjectReferences;
SharedProjectReferences;
OutputGroups;
AllTargetOutputGroups;
VisualStudioWellKnownOutputGroups;
SingleFileGenerators;
DeclaredSourceItems;
UserSourceItems;
"
if '$(TargetPlatformIdentifier)' == 'Windows' and '$(TargetPlatformVersion)' < 8.0:
ProjectCapability += "BuildWindowsDesktopTarget"
if '$(DefineExplicitDefaults)' == 'true':
ItemDefinitionGroup
None
CopyToOutputDirectory = Never
Content
CopyToOutputDirectory = Never
Compile
CopyToOutputDirectory = Never
EmbeddedResource
CopyToOutputDirectory = Never
Target InitializeSourceControlInformation
PropertyGroup
SourceControlInformationFeatureSupported = true
Target _AddOutputPathToGlobalPropertiesToRemove
PropertyGroup
if '$(PassOutputPathToReferencedProjects)'=='false':
_GlobalPropertiesToRemoveFromProjectReferences = $(_GlobalPropertiesToRemoveFromProjectReferences);OutputPath
Target _CheckForInvalidConfigurationAndPlatform(
BeforeTargets="$(BuildDependsOn);Build;$(RebuildDependsOn);Rebuild;$(CleanDependsOn);Clean")
PropertyGroup
if '$(BuildingInsideVisualStudio)' == 'true':
_InvalidConfigurationMessageResourceName = CommonSdk.InvalidConfigurationTextWhenBuildingInsideVisualStudio
if '$(BuildingInsideVisualStudio)' != 'true':
_InvalidConfigurationMessageResourceName = CommonSdk.InvalidConfigurationTextWhenBuildingOutsideVisualStudio
if '$(_InvalidConfigurationMessageSeverity)' != '':
MSBuildInternalMessage(
FormatArguments="$(MSBuildProjectFile);$(_OriginalConfiguration);$(_OriginalPlatform)",
ResourceName="$(_InvalidConfigurationMessageResourceName)",
Severity="$(_InvalidConfigurationMessageSeverity)")
if '$(DesignTimeBuild)' != 'true':
Message(Importance="Low", Text="Configuration=$(Configuration)")
if '$(DesignTimeBuild)' != 'true':
Message(Importance="Low", Text="Platform=$(Platform)")
if '$(OutDir)' != '' and !HasTrailingSlash('$(OutDir)'):
MSBuildInternalMessage(
FormatArguments="OutDir",
ResourceName="CommonSdk.PropertyWithTrailingSlash",
Severity="Error")
if '$(IntermediateOutputPath)' != '' and !HasTrailingSlash('$(IntermediateOutputPath)'):
MSBuildInternalMessage(
FormatArguments="IntermediateOutputPath",
ResourceName="CommonSdk.PropertyWithTrailingSlash",
Severity="Error")
if '$(BaseIntermediateOutputPath)' != '' and !HasTrailingSlash('$(BaseIntermediateOutputPath)'):
MSBuildInternalMessage(
FormatArguments="BaseIntermediateOutputPath",
ResourceName="CommonSdk.PropertyWithTrailingSlash",
Severity="Error")
if '$(Prefer32Bit)' == 'true' and ('$(PlatformTarget)' == 'AnyCPU' or '$(PlatformTarget)' == '') and '$(PlatformTargetAsMSBuildArchitectureExplicitlySet)' != 'true':
PropertyGroup
PlatformTargetAsMSBuildArchitecture = x86
if '$(Prefer32Bit)' == 'true' and '$(PreferNativeArm64)' == 'true':
MSBuildInternalMessage(
ResourceName="CommonSdk.Prefer32BitAndPreferNativeArm64Enabled",
Severity="Error")
if '$(NoWin32Manifest)' == 'true' and '$(PreferNativeArm64)' == 'true':
MSBuildInternalMessage(
ResourceName="CommonSdk.NoWin32ManifestAndPreferNativeArm64Enabled",
Severity="Error")
if '$(PreferNativeArm64)' == 'true' and '$(Platform)' != 'AnyCPU':
MSBuildInternalMessage(
FormatArguments="$(Platform)",
ResourceName="CommonSdk.PlatformIsAnyCPUAndPreferNativeArm64Enabled",
Severity="Warning")
if '$(_InitialMSBuildProjectExtensionsPath)' != '' And '$(MSBuildProjectExtensionsPath)' != '$(_InitialMSBuildProjectExtensionsPath)':
MSBuildInternalMessage(
ResourceName="CommonSdk.MSBuildProjectExtensionsPathModifiedAfterUse",
Severity="Error")
if '$(EnableBaseIntermediateOutputPathMismatchWarning)' == 'true' And '$(_InitialBaseIntermediateOutputPath)' != '$(BaseIntermediateOutputPath)' And '$(BaseIntermediateOutputPath)' != '$(MSBuildProjectExtensionsPath)':
MSBuildInternalMessage(
ResourceName="CommonSdk.BaseIntermediateOutputPathMismatchWarning",
Severity="Warning")
PropertyGroup
BuildDependsOn =
| BeforeBuild;
| CoreBuild;
| AfterBuild
if '$(_InvalidConfigurationWarning)' != 'true':
Target Build(
DependsOnTargets="$(BuildDependsOn)",
Returns="@(TargetPathWithTargetPlatformMoniker)")
Target BeforeBuild
Target AfterBuild
PropertyGroup
CoreBuildDependsOn =
| BuildOnlySettings;
| PrepareForBuild;
| PreBuildEvent;
| ResolveReferences;
| PrepareResources;
| ResolveKeySource;
| Compile;
| ExportWindowsMDFile;
| UnmanagedUnregistration;
| GenerateSerializationAssemblies;
| CreateSatelliteAssemblies;
| GenerateManifests;
| GetTargetPath;
| PrepareForRun;
| UnmanagedRegistration;
| IncrementalClean;
| PostBuildEvent
Target CoreBuild(DependsOnTargets="$(CoreBuildDependsOn)")
if '$(RunPostBuildEvent)'=='Always' or '$(RunPostBuildEvent)'=='OnOutputUpdated':
OnError(ExecuteTargets="_TimeStampAfterCompile;PostBuildEvent")
OnError(ExecuteTargets="_CleanRecordFileWrites")
PropertyGroup
if '$(MSBuildProjectDefaultTargets)' != '':
_ProjectDefaultTargets = $(MSBuildProjectDefaultTargets)
if '$(MSBuildProjectDefaultTargets)' == '':
_ProjectDefaultTargets = Build
RebuildDependsOn =
| BeforeRebuild;
| Clean;
| $(_ProjectDefaultTargets);
| AfterRebuild;
if '$(MSBuildProjectDefaultTargets)' == 'Rebuild':
RebuildDependsOn =
| BeforeRebuild;
| Clean;
| Build;
| AfterRebuild;
if '$(_InvalidConfigurationWarning)' != 'true':
Target Rebuild(DependsOnTargets="$(RebuildDependsOn)", Returns="$(TargetPath)")
Target BeforeRebuild
Target AfterRebuild
PropertyGroup
BuildGenerateSourcesAction = Build
Target BuildGenerateSources(
DependsOnTargets=[
BuildGenerateSourcesTraverse
$(BuildGenerateSourcesAction)
])
Target BuildGenerateSourcesTraverse(DependsOnTargets="PrepareProjectReferences")
if '$(BuildPassReferences)' == 'true' and '@(ProjectReferenceWithConfiguration)' != '' and '@(_MSBuildProjectReferenceExistent)' != '' and '%(_MSBuildProjectReferenceExistent.BuildReference)' == 'true':
MSBuild(
BuildInParallel="$(BuildInParallel)",
ContinueOnError="!$(BuildingProject)",
Projects="@(_MSBuildProjectReferenceExistent)",
Properties="%(_MSBuildProjectReferenceExistent.SetConfiguration); %(_MSBuildProjectReferenceExistent.SetPlatform); %(_MSBuildProjectReferenceExistent.SetTargetFramework);",
RemoveProperties="%(_MSBuildProjectReferenceExistent.GlobalPropertiesToRemove)$(_GlobalPropertiesToRemoveFromProjectReferences)",
Targets="BuildGenerateSources")
if '$(IsGraphBuild)' == 'true' and '$(BuildPassReferences)' == 'true':
ItemGroup
ProjectReferenceTargets += "BuildGenerateSources"(Targets="BuildGenerateSources")
PropertyGroup
BuildCompileAction = Build
Target BuildCompile(
DependsOnTargets=[
BuildCompileTraverse
$(BuildCompileAction)
])
Target BuildCompileTraverse(DependsOnTargets="PrepareProjectReferences")
if '$(BuildPassReferences)' == 'true' and '@(ProjectReferenceWithConfiguration)' != '' and '@(_MSBuildProjectReferenceExistent)' != '' and '%(_MSBuildProjectReferenceExistent.BuildReference)' == 'true':
MSBuild(
BuildInParallel="$(BuildInParallel)",
ContinueOnError="!$(BuildingProject)",
Projects="@(_MSBuildProjectReferenceExistent)",
Properties="%(_MSBuildProjectReferenceExistent.SetConfiguration); %(_MSBuildProjectReferenceExistent.SetPlatform); %(_MSBuildProjectReferenceExistent.SetTargetFramework)",
RemoveProperties="%(_MSBuildProjectReferenceExistent.GlobalPropertiesToRemove)$(_GlobalPropertiesToRemoveFromProjectReferences)",
Targets="BuildCompile")
if '$(IsGraphBuild)' == 'true' and '$(BuildPassReferences)' == 'true':
ItemGroup
ProjectReferenceTargets += "BuildCompile"(Targets="BuildCompile")
PropertyGroup
BuildLinkAction = Build
Target BuildLink(
DependsOnTargets=[
BuildLinkTraverse
$(BuildLinkAction)
])
Target BuildLinkTraverse(DependsOnTargets="PrepareProjectReferences")
if '$(BuildPassReferences)' == 'true' and '@(ProjectReferenceWithConfiguration)' != '' and '@(_MSBuildProjectReferenceExistent)' != '' and '%(_MSBuildProjectReferenceExistent.BuildReference)' == 'true':
MSBuild(
BuildInParallel="$(BuildInParallel)",
ContinueOnError="!$(BuildingProject)",
Projects="@(_MSBuildProjectReferenceExistent)",
Properties="%(_MSBuildProjectReferenceExistent.SetConfiguration); %(_MSBuildProjectReferenceExistent.SetPlatform); %(_MSBuildProjectReferenceExistent.SetTargetFramework)",
RemoveProperties="%(_MSBuildProjectReferenceExistent.GlobalPropertiesToRemove)$(_GlobalPropertiesToRemoveFromProjectReferences)",
Targets="BuildLink")
if '$(IsGraphBuild)' == 'true' and '$(BuildPassReferences)' == 'true':
ItemGroup
ProjectReferenceTargets += "BuildLink"(Targets="BuildLink")
Target CopyRunEnvironmentFiles(
DependsOnTargets=[
PrepareForBuild
SetWin32ManifestProperties
_CopyAppConfigFile
_CleanRecordFileWrites
])
PropertyGroup
RunDependsOn
Target Run(DependsOnTargets="$(RunDependsOn)")
if '$(TargetExt)'!='.exe':
MSBuildInternalMessage(
FormatArguments="$(TargetPath)",
ResourceName="CommonSdk.RunTargetDependsOnMessage",
Severity="Error")
if '$(StartWorkingDirectory)' == '':
Exec(Command="$(TargetPath) $(StartArguments)", WorkingDirectory="$(OutDir)")
if '$(StartWorkingDirectory)' != '':
Exec(Command="$(TargetPath) $(StartArguments)", WorkingDirectory="$(StartWorkingDirectory)")
PropertyGroup
BuildingProject = false
Target BuildOnlySettings
PropertyGroup
BuildingProject = true
PropertyGroup
PrepareForBuildDependsOn = $(PrepareForBuildDependsOn);GetFrameworkPaths;GetReferenceAssemblyPaths;AssignLinkMetadata
Target PrepareForBuild(DependsOnTargets="$(PrepareForBuildDependsOn)")
ItemGroup
if '$(AppConfig)'!='':
AppConfigWithTargetPath += "$(AppConfig)"
TargetPath = $(TargetFileName).config
if '$(AppConfig)'=='':
FindAppConfigFile(
PrimaryList="@(None)",
SecondaryList="@(Content)",
TargetPath="$(TargetFileName).config")
Output(ItemName="AppConfigWithTargetPath", TaskParameter="AppConfigFile")
Output(PropertyName="AppConfig", TaskParameter="AppConfigFile")
MakeDir(
ContinueOnError="true",
Directories="$(OutDir);$(IntermediateOutputPath);@(DocFileItem->'%(RelativeDir)');@(CreateDirectory)")
PropertyGroup
Framework40Dir = @(_TargetFramework40DirectoryItem)
Framework35Dir = @(_TargetFramework35DirectoryItem)
Framework30Dir = @(_TargetFramework30DirectoryItem)
Framework20Dir = @(_TargetFramework20DirectoryItem)
if '$(FrameworkDir)' == '' and ('$(TargetFrameworkVersion)' == 'v2.0' or '$(TargetFrameworkVersion)' == 'v3.5' or '$(TargetFrameworkVersion)' == 'v4.0'):
FrameworkDir = @(_TargetFramework20DirectoryItem)
if '$(FrameworkDir)' == '':
FrameworkDir = @(_TargetFramework40DirectoryItem)
if '$(TargetedFrameworkDir)' == '':
TargetedFrameworkDir = @(_TargetedFrameworkDirectoryItem)
if '$(FrameworkSDKDir)' == '':
FrameworkSDKDir = @(_TargetFrameworkSDKDirectoryItem)
GetFrameworkPathsDependsOn
Target GetFrameworkPaths
Target GetReferenceAssemblyPaths(
DependsOnTargets=[
$(GetReferenceAssemblyPathsDependsOn)
GetFrameworkPaths
])
PropertyGroup
if '@(_CombinedTargetFrameworkDirectoriesItem)' == '$(TargetFrameworkDirectory)':
TargetFrameworkDirectory
if '$(TargetFrameworkMoniker)' != '' and ('$(_TargetFrameworkDirectories)' == '' or '$(_FullFrameworkReferenceAssemblyPaths)' == ''):
GetReferenceAssemblyPaths(
BypassFrameworkInstallChecks="$(BypassFrameworkInstallChecks)",
ContinueOnError="!$(BuildingProject)",
RootPath="$(TargetFrameworkRootPath)",
TargetFrameworkFallbackSearchPaths="$(TargetFrameworkFallbackSearchPaths)",
TargetFrameworkMoniker="$(TargetFrameworkMoniker)")
Output(PropertyName="_TargetFrameworkDirectories", TaskParameter="ReferenceAssemblyPaths")
Output(
PropertyName="_FullFrameworkReferenceAssemblyPaths",
TaskParameter="FullFrameworkReferenceAssemblyPaths")
if '$(TargetFrameworkMonikerDisplayName)' == '':
Output(
PropertyName="TargetFrameworkMonikerDisplayName",
TaskParameter="TargetFrameworkMonikerDisplayName")
PropertyGroup
TargetFrameworkDirectory = $(_TargetFrameworkDirectories);$(TargetFrameworkDirectory);$(WinFXAssemblyDirectory)
if '$(TargetPlatformWinMDLocation)' != '' and Exists('$(TargetPlatformWinMDLocation)'):
TargetFrameworkDirectory = $(TargetFrameworkDirectory);$(TargetPlatformWinMDLocation)
PropertyGroup
if '$(RemoveAssemblyFoldersIfNoTargetFramework)' == '':
RemoveAssemblyFoldersIfNoTargetFramework = true
if '$(_TargetFrameworkDirectories)' == '' and '$(AssemblySearchPaths)' != '' and '$(RemoveAssemblyFoldersIfNoTargetFramework)' == 'true':
PropertyGroup
AssemblySearchPaths = $(AssemblySearchPaths.Replace('{AssemblyFolders}', '').Split(';'))
if '$(ImplicitlyExpandDesignTimeFacades)' == 'true':
ItemGroup
DesignTimeFacadeDirectoryRoots += "$(TargetFrameworkDirectory)"
if Exists('%(DesignTimeFacadeDirectoryRoots.Identity)Facades\'):
DesignTimeFacadeDirectories += "%(DesignTimeFacadeDirectoryRoots.Identity)Facades\"
if '@(DesignTimeFacadeDirectories)' != '':
PropertyGroup
TargetFrameworkDirectory = $(TargetFrameworkDirectory);@(DesignTimeFacadeDirectories)
if '$(_TargetFrameworkDirectories)' == '':
PropertyGroup
TargetFrameworkProfile
// Returns target framework moniker. E.g. ".NETFramework,Version=v4.0.1"
Target GetTargetFrameworkMoniker(Returns="$(TargetFrameworkMoniker)")
Target GetTargetFrameworkMonikerDisplayName(
DependsOnTargets=[
GetFrameworkPaths
GetReferenceAssemblyPaths
],
Returns="$(TargetFrameworkMonikerDisplayName)")
Target GetTargetFrameworkDirectories(
DependsOnTargets=[
GetFrameworkPaths
GetReferenceAssemblyPaths
],
Returns="$(TargetFrameworkDirectory)")
if '$(SynthesizeLinkMetadata)' == 'true':
Target AssignLinkMetadata
if '@(None)' != '' and '%(None.DefiningProjectFullPath)' != '$(MSBuildProjectFullPath)':
AssignLinkMetadata(Items="@(None)")
Output(ItemName="_Temp", TaskParameter="OutputItems")
ItemGroup
None -= "@(_Temp)"
None += "@(_Temp)"
_Temp -= "@(_Temp)"
if '@(Content)' != '' and '%(Content.DefiningProjectFullPath)' != '$(MSBuildProjectFullPath)':
AssignLinkMetadata(Items="@(Content)")
Output(ItemName="_Temp", TaskParameter="OutputItems")
ItemGroup
Content -= "@(_Temp)"
Content += "@(_Temp)"
_Temp -= "@(_Temp)"
if '@(Page)' != '' and '%(Page.DefiningProjectFullPath)' != '$(MSBuildProjectFullPath)':
AssignLinkMetadata(Items="@(Page)")
Output(ItemName="_Temp", TaskParameter="OutputItems")
ItemGroup
Page -= "@(_Temp)"
Page += "@(_Temp)"
_Temp -= "@(_Temp)"
if '@(ApplicationDefinition)' != '' and '%(ApplicationDefinition.DefiningProjectFullPath)' != '$(MSBuildProjectFullPath)':
AssignLinkMetadata(Items="@(ApplicationDefinition)")
Output(ItemName="_Temp", TaskParameter="OutputItems")
ItemGroup
ApplicationDefinition -= "@(_Temp)"
ApplicationDefinition += "@(_Temp)"
_Temp -= "@(_Temp)"
if '@(EmbeddedResource)' != '' and '%(EmbeddedResource.DefiningProjectFullPath)' != '$(MSBuildProjectFullPath)':
AssignLinkMetadata(Items="@(EmbeddedResource)")
Output(ItemName="_Temp", TaskParameter="OutputItems")
ItemGroup
EmbeddedResource -= "@(_Temp)"
EmbeddedResource += "@(_Temp)"
_Temp -= "@(_Temp)"
if '@(Resource)' != '' and '%(Resource.DefiningProjectFullPath)' != '$(MSBuildProjectFullPath)' and $([MSBuild]::AreFeaturesEnabled('17.10')):
AssignLinkMetadata(Items="@(Resource)")
Output(ItemName="_Temp", TaskParameter="OutputItems")
if $([MSBuild]::AreFeaturesEnabled('17.10')):
ItemGroup
Resource -= "@(_Temp)"
Resource += "@(_Temp)"
_Temp -= "@(_Temp)"
PropertyGroup
PreBuildEventDependsOn
if '$(PreBuildEvent)'!='':
Target PreBuildEvent(DependsOnTargets="$(PreBuildEventDependsOn)")
Exec(Command="$(PreBuildEvent)", WorkingDirectory="$(OutDir)")
PropertyGroup
UnmanagedUnregistrationDependsOn
if (('$(_AssemblyTimestampBeforeCompile)' != '$(_AssemblyTimestampAfterCompile)' or '$(RegisterForComInterop)' != 'true' or '$(OutputType)' != 'library') or ('$(_AssemblyTimestampBeforeCompile)' == '')) and Exists('@(_UnmanagedRegistrationCache)'):
Target UnmanagedUnregistration(DependsOnTargets="$(UnmanagedUnregistrationDependsOn)")
PropertyGroup
if '$(UnregisterAssemblyMSBuildArchitecture)' == '':
UnregisterAssemblyMSBuildArchitecture = $(PlatformTargetAsMSBuildArchitecture)
if '$(TargetFrameworkAsMSBuildRuntime)' != '' and '$(UnregisterAssemblyMSBuildArchitecture)' != '':
PropertyGroup
if '$(UnregisterAssemblyMSBuildRuntime)' == '' and $([MSBuild]::DoesTaskHostExist(`$(TargetFrameworkAsMSBuildRuntime)`, `$(UnregisterAssemblyMSBuildArchitecture)`)):
UnregisterAssemblyMSBuildRuntime = $(TargetFrameworkAsMSBuildRuntime)
if '$(UnregisterAssemblyMSBuildRuntime)' == '':
UnregisterAssemblyMSBuildRuntime = CurrentRuntime
UnregisterAssembly(
AssemblyListFile="@(_UnmanagedRegistrationCache)",
MSBuildArchitecture="$(UnregisterAssemblyMSBuildArchitecture)",
MSBuildRuntime="$(UnregisterAssemblyMSBuildRuntime)")
Target GetTargetFrameworkVersion(Returns="$(TargetFrameworkVersion)")
PropertyGroup
ResolveReferencesDependsOn =
| BeforeResolveReferences;
| AssignProjectConfiguration;
| ResolveProjectReferences;
| FindInvalidProjectReferences;
| ResolveNativeReferences;
| ResolveAssemblyReferences;
| GenerateBindingRedirects;
| GenerateBindingRedirectsUpdateAppConfig;
| ResolveComReferences;
| AfterResolveReferences
Target ResolveReferences(
DependsOnTargets="$(ResolveReferencesDependsOn)",
Returns="@(ReferencePath)")
Target BeforeResolveReferences
Target AfterResolveReferences
Target IgnoreJavaScriptOutputAssembly(BeforeTargets="AssignProjectConfiguration")
ItemGroup
if '%(ProjectReference.Extension)' == '.esproj' and '%(ProjectReference.ReferenceOutputAssembly)' == '':
ProjectReference
ReferenceOutputAssembly = false
if '$(CurrentSolutionConfigurationContents)' != '' or '@(ProjectReference)'!='':
Target AssignProjectConfiguration
PropertyGroup
if '$(OnlyReferenceAndBuildProjectsEnabledInSolutionConfiguration)' == '':
OnlyReferenceAndBuildProjectsEnabledInSolutionConfiguration = true
if '$(ShouldUnsetParentConfigurationAndPlatform)' == '' and ('$(BuildingInsideVisualStudio)' == 'true' or '$(BuildingSolutionFile)' == 'true'):
ShouldUnsetParentConfigurationAndPlatform = true
if '$(ShouldUnsetParentConfigurationAndPlatform)' == '':
ShouldUnsetParentConfigurationAndPlatform = false
if '$(AddSyntheticProjectReferencesForSolutionDependencies)' == '' and '$(TargetFrameworkIdentifier)' == 'Silverlight':
AddSyntheticProjectReferencesForSolutionDependencies = false
if '$(AddSyntheticProjectReferencesForSolutionDependencies)' == '' and '$(BuildingInsideVisualStudio)' != 'true':
AddSyntheticProjectReferencesForSolutionDependencies = true
AssignProjectConfiguration(
AddSyntheticProjectReferencesForSolutionDependencies="$(AddSyntheticProjectReferencesForSolutionDependencies)",
CurrentProject="$(MSBuildProjectFullPath)",
CurrentProjectConfiguration="$(Configuration)",
CurrentProjectPlatform="$(Platform)",
DefaultToVcxPlatformMapping="$(DefaultToVcxPlatformMapping)",
OnlyReferenceAndBuildProjectsEnabledInSolutionConfiguration="$(OnlyReferenceAndBuildProjectsEnabledInSolutionConfiguration)",
OutputType="$(OutputType)",
ProjectReferences="@(ProjectReference)",
ResolveConfigurationPlatformUsingMappings="false",
ShouldUnsetParentConfigurationAndPlatform="$(ShouldUnsetParentConfigurationAndPlatform)",
SolutionConfigurationContents="$(CurrentSolutionConfigurationContents)",
VcxToDefaultPlatformMapping="$(VcxToDefaultPlatformMapping)")
Output(ItemName="_ProjectReferenceWithConfiguration", TaskParameter="AssignedProjects")
Output(ItemName="_ProjectReferenceWithConfiguration", TaskParameter="UnassignedProjects")
Output(ItemName="ProjectReferenceWithConfiguration", TaskParameter="AssignedProjects")
Output(ItemName="ProjectReferenceWithConfiguration", TaskParameter="UnassignedProjects")
ItemGroup
_ProjectReferenceWithConfiguration
if '%(_ProjectReferenceWithConfiguration.BuildReference)' == '':
BuildReference = true
if '%(_ProjectReferenceWithConfiguration.ReferenceOutputAssembly)' == '':
ReferenceOutputAssembly = true
ProjectReferenceWithConfiguration
if '%(ProjectReferenceWithConfiguration.BuildReference)' == '':
BuildReference = true
if '%(ProjectReferenceWithConfiguration.ReferenceOutputAssembly)' == '':
ReferenceOutputAssembly = true
Target _SplitProjectReferencesByFileExistence
if '$(BuildingInsideVisualStudio)'=='true' and '@(ProjectReferenceWithConfiguration)'!='':
ResolveNonMSBuildProjectOutput(
PreresolvedProjectOutputs="$(VSIDEResolvedNonMSBuildProjectOutputs)",
ProjectReferences="@(ProjectReferenceWithConfiguration)")
Output(ItemName="_ResolvedProjectReferencePaths", TaskParameter="ResolvedOutputPaths")
Output(ItemName="_MSBuildProjectReference", TaskParameter="UnresolvedProjectReferences")
ItemGroup
if '$(BuildingInsideVisualStudio)'!='true' and '@(ProjectReferenceWithConfiguration)'!='':
_MSBuildProjectReference += "@(ProjectReferenceWithConfiguration)"
ItemGroup
if '$(_BuildNonexistentProjectsByDefault)' == 'true' or Exists('%(Identity)'):
_MSBuildProjectReferenceExistent += "@(_MSBuildProjectReference)"
if '$(_BuildNonexistentProjectsByDefault)' != 'true' and !Exists('%(Identity)'):
_MSBuildProjectReferenceNonexistent += "@(_MSBuildProjectReference)"
PropertyGroup
if '$(UseDefaultPlatformLookupTables)' == '':
UseDefaultPlatformLookupTables = true
if '$(EnableDynamicPlatformResolution)' == 'true' and '@(_MSBuildProjectReferenceExistent)' != '':
Target _GetProjectReferencePlatformProperties
ItemGroup
if '%(_MSBuildProjectReferenceExistent.SetPlatform)' != '':
_MSBuildProjectReferenceExistent
SkipGetPlatformProperties = true
ItemGroup
if '%(_MSBuildProjectReferenceExistent.SkipGetPlatformProperties)' != 'true':
_ProjectReferencePlatformPossibilities += "@(_MSBuildProjectReferenceExistent)"
ItemGroup
if '$(MSBuildProjectExtension)' != '.vcxproj' and '$(MSBuildProjectExtension)' != '.nativeproj' and '%(_ProjectReferencePlatformPossibilities.IsVcxOrNativeProj)' == 'true':
_ProjectReferencePlatformPossibilities
if '$(UseDefaultPlatformLookupTables)' == 'true' and '$(PlatformLookupTable)' == '':
PlatformLookupTable = x86=Win32
if ('$(MSBuildProjectExtension)' == '.vcxproj' or '$(MSBuildProjectExtension)' == '.nativeproj') and '%(_ProjectReferencePlatformPossibilities.IsVcxOrNativeProj)' != 'true':
_ProjectReferencePlatformPossibilities
if '$(UseDefaultPlatformLookupTables)' == 'true' and '$(PlatformLookupTable)' == '':
PlatformLookupTable = Win32=x86
if '@(_ProjectReferencePlatformPossibilities)' != '':
GetCompatiblePlatform(
AnnotatedProjects="@(_ProjectReferencePlatformPossibilities)",
CurrentProjectPlatform="$(Platform)",
PlatformLookupTable="$(PlatformLookupTable)")
Output(
ItemName="_ProjectsWithPlatformAssignment",
TaskParameter="AssignedProjectsWithPlatform")
if '@(_ProjectsWithPlatformAssignment)' != '':
ItemGroup
ProjectsWithNearestPlatform += "@(_ProjectsWithPlatformAssignment)"
if '%(ProjectsWithNearestPlatform.Identity)' != '' and '%(ProjectsWithNearestPlatform.NearestPlatform)' != '':
ProjectsWithNearestPlatform
SetPlatform = Platform=%(ProjectsWithNearestPlatform.NearestPlatform)
if '%(ProjectsWithNearestPlatform.Identity)' != '' and '%(ProjectsWithNearestPlatform.NearestPlatform)' == '':
ProjectsWithNearestPlatform
UndefineProperties = %(ProjectsWithNearestPlatform.UndefineProperties);Platform
if '%(_MSBuildProjectReferenceExistent.SkipGetPlatformProperties)' != 'true':
_MSBuildProjectReferenceExistent -= "@(_MSBuildProjectReferenceExistent)"
_MSBuildProjectReferenceExistent += "@(ProjectsWithNearestPlatform)"
Target _GetProjectReferenceTargetFrameworkProperties(
DependsOnTargets="_AddOutputPathToGlobalPropertiesToRemove")
if '$(ReferringTargetFrameworkForProjectReferences)' == '':
PropertyGroup
if '$(NuGetTargetMoniker)' != '' and !$(NuGetTargetMoniker.Contains(';')):
ReferringTargetFrameworkForProjectReferences = $(NuGetTargetMoniker)
if '$(NuGetTargetMoniker)' == '':
ReferringTargetFrameworkForProjectReferences = $(TargetFrameworkMoniker)
ItemGroup
if '%(_MSBuildProjectReferenceExistent.SkipGetTargetFrameworkProperties)' == '' and ('%(Extension)' == '.vcxproj' or '%(Extension)' == '.nativeproj'):
_MSBuildProjectReferenceExistent
if '$(EnableDynamicPlatformResolution)' != 'true':
SkipGetTargetFrameworkProperties = true
UndefineProperties = %(_MSBuildProjectReferenceExistent.UndefineProperties);TargetFramework
ItemGroup
if '%(_MSBuildProjectReferenceExistent.SetTargetFramework)' != '':
_MSBuildProjectReferenceExistent
if '$(EnableDynamicPlatformResolution)' != 'true':
SkipGetTargetFrameworkProperties = true
if '%(_MSBuildProjectReferenceExistent.SkipGetTargetFrameworkProperties)' != 'true' and '$(EnableDynamicPlatformResolution)' != 'true':
MSBuild(
BuildInParallel="$(BuildInParallel)",
ContinueOnError="!$(BuildingProject)",
Projects="@(_MSBuildProjectReferenceExistent)",
Properties="%(_MSBuildProjectReferenceExistent.SetConfiguration); %(_MSBuildProjectReferenceExistent.SetPlatform)",
RemoveProperties="%(_MSBuildProjectReferenceExistent.GlobalPropertiesToRemove);TargetFramework;RuntimeIdentifier;SelfContained;$(_GlobalPropertiesToRemoveFromProjectReferences)",
SkipNonexistentTargets="true",
Targets="GetTargetFrameworks")
Output(
ItemName="_ProjectReferenceTargetFrameworkPossibilities",
TaskParameter="TargetOutputs")
if '%(_MSBuildProjectReferenceExistent.SkipGetTargetFrameworkProperties)' != 'true' and '$(EnableDynamicPlatformResolution)' == 'true':
MSBuild(
BuildInParallel="$(BuildInParallel)",
ContinueOnError="!$(BuildingProject)",
Projects="@(_MSBuildProjectReferenceExistent)",
RemoveProperties="%(_MSBuildProjectReferenceExistent.GlobalPropertiesToRemove);TargetFramework;RuntimeIdentifier;SelfContained;Platform;Configuration;$(_GlobalPropertiesToRemoveFromProjectReferences)",
SkipNonexistentTargets="true",
Targets="GetTargetFrameworks")
Output(
ItemName="_ProjectReferenceTargetFrameworkPossibilities",
TaskParameter="TargetOutputs")
ItemGroup
_ProjectReferenceTargetFrameworkPossibilitiesOriginalItemSpec += "@(_ProjectReferenceTargetFrameworkPossibilities->'%(OriginalItemSpec)')"
_ProjectReferenceTargetFrameworkPossibilities -= "@(_ProjectReferenceTargetFrameworkPossibilities)"
_ProjectReferenceTargetFrameworkPossibilities += "@(_ProjectReferenceTargetFrameworkPossibilitiesOriginalItemSpec)"
if '@(_ProjectReferenceTargetFrameworkPossibilities)' != '' and '$(ReferringTargetFrameworkForProjectReferences)' != '' And '$(GetReferenceNearestTargetFrameworkTaskSupportsTargetFrameworkPropertyParameter)' == 'true' and '%(_ProjectReferenceTargetFrameworkPossibilities.IsVcxOrNativeProj)' != 'true':
GetReferenceNearestTargetFrameworkTask(
AnnotatedProjectReferences="@(_ProjectReferenceTargetFrameworkPossibilities)",
CurrentProjectName="$(MSBuildProjectName)",
CurrentProjectTargetFramework="$(ReferringTargetFrameworkForProjectReferences)",
CurrentProjectTargetFrameworkProperty="$(TargetFramework)",
CurrentProjectTargetPlatform="$(TargetPlatformMoniker)",
FallbackTargetFrameworks="$(AssetTargetFallback)")
Output(ItemName="AnnotatedProjects", TaskParameter="AssignedProjects")
if '@(_ProjectReferenceTargetFrameworkPossibilities)' != '' and '$(ReferringTargetFrameworkForProjectReferences)' != '' And '$(GetReferenceNearestTargetFrameworkTaskSupportsTargetPlatformParameter)' == 'true' and '$(GetReferenceNearestTargetFrameworkTaskSupportsTargetFrameworkPropertyParameter)' != 'true' and '%(_ProjectReferenceTargetFrameworkPossibilities.IsVcxOrNativeProj)' != 'true':
GetReferenceNearestTargetFrameworkTask(
AnnotatedProjectReferences="@(_ProjectReferenceTargetFrameworkPossibilities)",
CurrentProjectName="$(MSBuildProjectName)",
CurrentProjectTargetFramework="$(ReferringTargetFrameworkForProjectReferences)",
CurrentProjectTargetPlatform="$(TargetPlatformMoniker)",
FallbackTargetFrameworks="$(AssetTargetFallback)")
Output(ItemName="AnnotatedProjects", TaskParameter="AssignedProjects")
if '@(_ProjectReferenceTargetFrameworkPossibilities)' != '' and '$(ReferringTargetFrameworkForProjectReferences)' != '' And '$(GetReferenceNearestTargetFrameworkTaskSupportsTargetPlatformParameter)' != 'true' and '%(_ProjectReferenceTargetFrameworkPossibilities.IsVcxOrNativeProj)' != 'true':
GetReferenceNearestTargetFrameworkTask(
AnnotatedProjectReferences="@(_ProjectReferenceTargetFrameworkPossibilities)",
CurrentProjectName="$(MSBuildProjectName)",
CurrentProjectTargetFramework="$(ReferringTargetFrameworkForProjectReferences)",
FallbackTargetFrameworks="$(AssetTargetFallback)")
Output(ItemName="AnnotatedProjects", TaskParameter="AssignedProjects")
ItemGroup
if '$(ReferringTargetFrameworkForProjectReferences)' == '' or ('$(EnableDynamicPlatformResolution)' == 'true' and '%(_ProjectReferenceTargetFrameworkPossibilities.IsVcxOrNativeProj)' == 'true'):
AnnotatedProjects += "@(_ProjectReferenceTargetFrameworkPossibilities)"
SetRidAgnosticValueForProjects(Projects="@(AnnotatedProjects)")
Output(ItemName="UpdatedAnnotatedProjects", TaskParameter="UpdatedProjects")
ItemGroup
AnnotatedProjects -= "@(AnnotatedProjects)"
AnnotatedProjects += "@(UpdatedAnnotatedProjects)"
UpdatedAnnotatedProjects -= "@(UpdatedAnnotatedProjects)"
if '%(AnnotatedProjects.Identity)' != '' and '%(AnnotatedProjects.NearestTargetFramework)' != '' and '%(AnnotatedProjects.HasSingleTargetFramework)' != 'true':
AnnotatedProjects
SetTargetFramework = TargetFramework=%(AnnotatedProjects.NearestTargetFramework)
if '%(AnnotatedProjects.Identity)' != '' and ('%(AnnotatedProjects.NearestTargetFramework)' == '' or '%(AnnotatedProjects.HasSingleTargetFramework)' == 'true'):
AnnotatedProjects
UndefineProperties = %(AnnotatedProjects.UndefineProperties);TargetFramework
if '%(AnnotatedProjects.Identity)' != '' and '%(AnnotatedProjects.IsRidAgnostic)' != 'false':
AnnotatedProjects
UndefineProperties = %(AnnotatedProjects.UndefineProperties);RuntimeIdentifier;SelfContained
if '%(_MSBuildProjectReferenceExistent.SkipGetTargetFrameworkProperties)' != 'true':
_MSBuildProjectReferenceExistent -= "@(_MSBuildProjectReferenceExistent)"
_MSBuildProjectReferenceExistent += "@(AnnotatedProjects)"
Target GetTargetFrameworks(
DependsOnTargets="GetTargetFrameworksWithPlatformForSingleTargetFramework",
Returns="@(_ThisProjectBuildMetadata)")
if '$(IsCrossTargetingBuild)' == 'true':
MSBuildInternalMessage(
ResourceName="CommonSdk.CrossTargetingGetTargetFrameworks",
Severity="Error")
CombineXmlElements(
RootElementName="AdditionalProjectProperties",
XmlElements="@(_TargetFrameworkInfo->'%(AdditionalPropertiesFromProject)')")
Output(PropertyName="_AdditionalPropertiesFromProject", TaskParameter="Result")
ItemGroup
_ThisProjectBuildMetadata += "$(MSBuildProjectFullPath)"
TargetFrameworks = @(_TargetFrameworkInfo)
TargetFrameworkMonikers = @(_TargetFrameworkInfo->'%(TargetFrameworkMonikers)')
TargetPlatformMonikers = @(_TargetFrameworkInfo->'%(TargetPlatformMonikers)')
AdditionalPropertiesFromProject = $(_AdditionalPropertiesFromProject)
HasSingleTargetFramework = true
IsRidAgnostic = @(_TargetFrameworkInfo->'%(IsRidAgnostic)')
if '$(MSBuildProjectExtension)' == '.vcxproj' or '$(MSBuildProjectExtension)' == '.nativeproj':
IsVcxOrNativeProj = true
copy properties:
Platform
Platforms
if '$(UsePlatformFromProjectConfiguration)' != 'false' and '@(ProjectConfiguration)' != '' and ('$(MSBuildProjectExtension)' == '.vcxproj' or '$(MSBuildProjectExtension)' == '.nativeproj'):
Platforms = @(ProjectConfiguration->'%(Platform)'->Distinct())
Target GetTargetFrameworksWithPlatformForSingleTargetFramework(Returns="@(_TargetFrameworkInfo)")
ItemGroup
_AdditionalTargetFrameworkInfoPropertyWithValue += "@(AdditionalTargetFrameworkInfoProperty)"
Value = $(%(AdditionalTargetFrameworkInfoProperty.Identity))
PropertyGroup
if '$(_UseAttributeForTargetFrameworkInfoPropertyNames)' == '':
_UseAttributeForTargetFrameworkInfoPropertyNames = false
CombineTargetFrameworkInfoProperties(
PropertiesAndValues="@(_AdditionalTargetFrameworkInfoPropertyWithValue)",
RootElementName="$(TargetFramework)",
UseAttributeForTargetFrameworkInfoPropertyNames="$(_UseAttributeForTargetFrameworkInfoPropertyNames)")
Output(PropertyName="_AdditionalTargetFrameworkInfoProperties", TaskParameter="Result")
ItemGroup
_TargetFrameworkInfo += "$(TargetFramework)"
TargetFrameworks = $(TargetFramework)
TargetFrameworkMonikers = $(TargetFrameworkMoniker)
TargetPlatformMonikers = $(TargetPlatformMoniker)
if '$(TargetPlatformMoniker)' == '':
TargetPlatformMonikers = None
AdditionalPropertiesFromProject = $(_AdditionalTargetFrameworkInfoProperties)
IsRidAgnostic = $(IsRidAgnostic)
if '%(IsRidAgnostic)' == '' and '$(RuntimeIdentifier)' == '' and '$(RuntimeIdentifiers)' == '':
IsRidAgnostic = true
if '%(IsRidAgnostic)' == '':
IsRidAgnostic = false
Target GetTargetFrameworkProperties
PropertyGroup
PrepareProjectReferencesDependsOn =
| AssignProjectConfiguration;
| _SplitProjectReferencesByFileExistence;
| _GetProjectReferenceTargetFrameworkProperties;
| _GetProjectReferencePlatformProperties
Target PrepareProjectReferences(DependsOnTargets="$(PrepareProjectReferencesDependsOn)")
ItemDefinitionGroup
ProjectReference
Targets = $(ProjectReferenceBuildTargets)
OutputItemType
ReferenceSourceTarget = ProjectReference
Target ResolveProjectReferences(
DependsOnTargets="PrepareProjectReferences",
Returns="@(_ResolvedNativeProjectReferencePaths);@(_ResolvedProjectReferencePaths)")
if '%(_MSBuildProjectReferenceExistent.BuildReference)' == 'true' and '@(ProjectReferenceWithConfiguration)' != '' and ('$(BuildingInsideVisualStudio)' == 'true' or '$(BuildProjectReferences)' != 'true') and '$(VisualStudioVersion)' != '10.0' and '@(_MSBuildProjectReferenceExistent)' != '':
MSBuild(
BuildInParallel="$(BuildInParallel)",
ContinueOnError="!$(BuildingProject)",
Projects="@(_MSBuildProjectReferenceExistent)",
Properties="%(_MSBuildProjectReferenceExistent.SetConfiguration); %(_MSBuildProjectReferenceExistent.SetPlatform); %(_MSBuildProjectReferenceExistent.SetTargetFramework)",
RemoveProperties="%(_MSBuildProjectReferenceExistent.GlobalPropertiesToRemove)$(_GlobalPropertiesToRemoveFromProjectReferences)",
Targets="GetTargetPath")
if '%(_MSBuildProjectReferenceExistent.ReferenceOutputAssembly)'=='true':
Output(ItemName="_ResolvedProjectReferencePaths", TaskParameter="TargetOutputs")
if '%(_MSBuildProjectReferenceExistent.OutputItemType)' != '':
Output(
ItemName="%(_MSBuildProjectReferenceExistent.OutputItemType)",
TaskParameter="TargetOutputs")
if '%(_MSBuildProjectReferenceExistent.BuildReference)' == 'true' and '@(ProjectReferenceWithConfiguration)' != '' and '$(BuildingInsideVisualStudio)' != 'true' and '$(BuildProjectReferences)' == 'true' and '@(_MSBuildProjectReferenceExistent)' != '':
MSBuild(
BuildInParallel="$(BuildInParallel)",
ContinueOnError="$(ContinueOnError)",
Projects="@(_MSBuildProjectReferenceExistent)",
Properties="%(_MSBuildProjectReferenceExistent.SetConfiguration); %(_MSBuildProjectReferenceExistent.SetPlatform); %(_MSBuildProjectReferenceExistent.SetTargetFramework)",
RemoveProperties="%(_MSBuildProjectReferenceExistent.GlobalPropertiesToRemove)$(_GlobalPropertiesToRemoveFromProjectReferences)",
Targets="%(_MSBuildProjectReferenceExistent.Targets)")
if '%(_MSBuildProjectReferenceExistent.ReferenceOutputAssembly)'=='true' or '$(DesignTimeBuild)' == 'true':
Output(ItemName="_ResolvedProjectReferencePaths", TaskParameter="TargetOutputs")
if '%(_MSBuildProjectReferenceExistent.OutputItemType)' != '':
Output(
ItemName="%(_MSBuildProjectReferenceExistent.OutputItemType)",
TaskParameter="TargetOutputs")
if '%(_MSBuildProjectReferenceExistent.BuildReference)' == 'true' and '@(ProjectReferenceWithConfiguration)' != '' and '$(BuildingProject)' == 'true' and '@(_MSBuildProjectReferenceExistent)' != '':
MSBuild(
BuildInParallel="$(BuildInParallel)",
ContinueOnError="$(ContinueOnError)",
Projects="@(_MSBuildProjectReferenceExistent)",
Properties="%(_MSBuildProjectReferenceExistent.SetConfiguration); %(_MSBuildProjectReferenceExistent.SetPlatform); %(_MSBuildProjectReferenceExistent.SetTargetFramework)",
RemoveProperties="%(_MSBuildProjectReferenceExistent.GlobalPropertiesToRemove)$(_GlobalPropertiesToRemoveFromProjectReferences)",
SkipNonexistentTargets="true",
Targets="GetNativeManifest")
if '%(_MSBuildProjectReferenceExistent.ReferenceOutputAssembly)' == 'true':
Output(ItemName="NativeReference", TaskParameter="TargetOutputs")
ItemGroup
if '%(_ResolvedProjectReferencePaths.ResolveableAssembly)' == 'false':
_ResolvedProjectReferencePaths -= "@(_ResolvedProjectReferencePaths)"
_ResolvedProjectReferencePaths
OriginalProjectReferenceItemSpec = %(_ResolvedProjectReferencePaths.OriginalItemSpec)
PropertyGroup
if '@(ProjectReferenceWithConfiguration)' != '' and '@(_MSBuildProjectReferenceNonexistent)' != '' and '$(ErrorOnMissingProjectReference)' != 'True':
_NonExistentProjectReferenceSeverity = Warning
if '@(ProjectReferenceWithConfiguration)' != '' and '@(_MSBuildProjectReferenceNonexistent)' != '' and '$(ErrorOnMissingProjectReference)' == 'True':
_NonExistentProjectReferenceSeverity = Error
if '$(_NonExistentProjectReferenceSeverity)' != '':
MSBuildInternalMessage(
FormatArguments="@(_MSBuildProjectReferenceNonexistent->'%(Identity)')",
ResourceName="CommonSdk.NonExistentProjectReference",
Severity="$(_NonExistentProjectReferenceSeverity)")
Target ResolveProjectReferencesDesignTime(
DependsOnTargets=[
ResolveProjectReferences
ResolveAssemblyReferences
],
Returns="@(_ProjectReferencesFromRAR);@(_ResolvedNativeProjectReferencePaths)")
ItemGroup
_ProjectReferencesFromRAR += "@(ReferencePath->WithMetadataValue('ReferenceSourceTarget', 'ProjectReference'))"
OriginalItemSpec = %(ReferencePath.ProjectReferenceOriginalItemSpec)
Target ExpandSDKReferencesDesignTime(
DependsOnTargets="ExpandSDKReferences",
Returns="@(ReferencesFromSDK)")
Target GetTargetPath(
DependsOnTargets="$(GetTargetPathDependsOn)",
Returns="@(TargetPathWithTargetPlatformMoniker)")
PropertyGroup
GetTargetPathWithTargetPlatformMonikerDependsOn = $(GetTargetPathDependsOn)
Target GetTargetPathWithTargetPlatformMoniker(
BeforeTargets="GetTargetPath",
DependsOnTargets="$(GetTargetPathWithTargetPlatformMonikerDependsOn)",
Returns="@(TargetPathWithTargetPlatformMoniker)")
ItemGroup
TargetPathWithTargetPlatformMoniker += "$(TargetPath)"
copy properties:
TargetPlatformMoniker
TargetPlatformIdentifier
TargetFrameworkIdentifier
TargetFrameworkVersion = $(TargetFrameworkVersion.TrimStart('vV'))
if '$(ProduceReferenceAssembly)' == 'true':
ReferenceAssembly = $(TargetRefPath)
CopyUpToDateMarker = @(CopyUpToDateMarker)
Target GetNativeManifest(Returns="@(ComputedApplicationManifest)")
ItemGroup
if '$(OutputType)'!='winexe' and '$(OutputType)'!='exe' and '$(OutputType)'!='appcontainerexe' and Exists('%(_ApplicationManifestFinal.FullPath)'):
ComputedApplicationManifest += "$(_DeploymentApplicationManifestIdentity)"
HintPath = %(_ApplicationManifestFinal.FullPath)
if '@(NativeReference)'!='':
Target ResolveNativeReferences(DependsOnTargets="ResolveProjectReferences")
ResolveNativeReference(
AdditionalSearchPaths="$(ReferencePath);$(OutDir)",
NativeReferences="@(NativeReference)")
Output(ItemName="NativeReferenceFile", TaskParameter="ContainingReferenceFiles")
Output(
ItemName="_DeploymentNativePrerequisite",
TaskParameter="ContainedPrerequisiteAssemblies")
Output(ItemName="ComClassReference", TaskParameter="ContainedComComponents")
Output(ItemName="COMReferenceFromNative", TaskParameter="ContainedTypeLibraries")
Output(ItemName="COMFileReference", TaskParameter="ContainedLooseTlbFiles")
Output(ItemName="_DeploymentLooseManifestFile", TaskParameter="ContainedLooseEtcFiles")
PropertyGroup
ResolveAssemblyReferencesDependsOn =
| ResolveProjectReferences;
| FindInvalidProjectReferences;
| GetFrameworkPaths;
| GetReferenceAssemblyPaths;
| PrepareForBuild;
| ResolveSDKReferences;
| ExpandSDKReferences;
Target ResolveAssemblyReferences(
DependsOnTargets="$(ResolveAssemblyReferencesDependsOn)",
Returns="@(ReferencePath)")
ItemGroup
_ReferenceInstalledAssemblyDirectory += "$(TargetFrameworkDirectory)"
_ReferenceInstalledAssemblySubsets += "$(TargetFrameworkSubset)"
PropertyGroup
if '$(DisableRarCache)'!='true' and '$(ResolveAssemblyReferencesStateFile)' == '':
ResolveAssemblyReferencesStateFile = $(IntermediateOutputPath)$(MSBuildProjectFile).AssemblyReference.cache
PropertyGroup
if '$(AllowResolveAssemblyReferencesOutOfProcNode)' == '':
AllowResolveAssemblyReferencesOutOfProcNode = false
ItemGroup
if '$(AutoGenerateBindingRedirects)'=='true' or '$(AutoUnifyAssemblyReferences)'=='false':
_ResolveAssemblyReferencesApplicationConfigFileForExes += "@(AppConfigWithTargetPath)"
PropertyGroup
if '$(BuildingProject)' != 'true' and '$(_ResolveReferenceDependencies)' != 'true':
_FindDependencies = false
if '$(ResolveAssemblyReferencesSilent)' == '' and '$(TraceDesignTime)' != 'true' and '$(BuildingProject)' == 'false':
ResolveAssemblyReferencesSilent = true
if '$(ResolveAssemblyReferencesSilent)' == '':
ResolveAssemblyReferencesSilent = false
if '$(ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch)' == '':
ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch = Warning
if '$(ResolveAssemblyReferencesFindRelatedSatellites)' == '':
ResolveAssemblyReferencesFindRelatedSatellites = $(BuildingProject)
if '$(ResolveAssemblyReferencesFindSerializationAssemblies)' == '':
ResolveAssemblyReferencesFindSerializationAssemblies = $(BuildingProject)
if '$(ResolveAssemblyReferencesFindRelatedFiles)' == '':
ResolveAssemblyReferencesFindRelatedFiles = $(BuildingProject)
if '$(ResolveAssemblyReferenceOutputUnresolvedAssemblyConflicts)' == '':
ResolveAssemblyReferenceOutputUnresolvedAssemblyConflicts = false
ItemGroup
Reference -= "$(AdditionalExplicitAssemblyReferences)"
Reference += "$(AdditionalExplicitAssemblyReferences)"
Implicit = true
if '$(NonCultureResourceDirectories)' != '':
ItemGroup
NonCultureResourceDirectory += "$(NonCultureResourceDirectories)"
if '$(EnableCustomCulture)' == '':
PropertyGroup
EnableCustomCulture = false
if '$(FindDependenciesOfExternallyResolvedReferences)' == '':
PropertyGroup
FindDependenciesOfExternallyResolvedReferences = false
if '$(AutoGenerateBindingRedirects)' == 'true':
FindDependenciesOfExternallyResolvedReferences = true
if '@(Reference)'!='' or '@(_ResolvedProjectReferencePaths)'!='' or '@(_ExplicitReference)' != '':
ResolveAssemblyReference(
AllowOutOfProcNode="$(AllowResolveAssemblyReferencesOutOfProcNode)",
AllowedAssemblyExtensions="$(AllowedReferenceAssemblyFileExtensions)",
AllowedRelatedFileExtensions="$(AllowedReferenceRelatedFileExtensions)",
AppConfigFile="@(_ResolveAssemblyReferencesApplicationConfigFileForExes)",
Assemblies="@(Reference)",
AssemblyFiles="@(_ResolvedProjectReferencePaths);@(_ExplicitReference)",
AssemblyInformationCacheOutputPath="$(AssemblyInformationCacheOutputPath)",
AssemblyInformationCachePaths="$(AssemblyInformationCachePaths)",
AutoUnify="$(AutoUnifyAssemblyReferences)",
CandidateAssemblyFiles="@(Content);@(None)",
ContinueOnError="$(ContinueOnError)",
CopyLocalDependenciesWhenParentReferenceInGac="$(CopyLocalDependenciesWhenParentReferenceInGac)",
DoNotCopyLocalIfInGac="$(DoNotCopyLocalIfInGac)",
EnableCustomCulture="$(EnableCustomCulture)",
FindDependencies="$(_FindDependencies)",
FindDependenciesOfExternallyResolvedReferences="$(FindDependenciesOfExternallyResolvedReferences)",
FindRelatedFiles="$(ResolveAssemblyReferencesFindRelatedFiles)",
FindSatellites="$(ResolveAssemblyReferencesFindRelatedSatellites)",
FindSerializationAssemblies="$(ResolveAssemblyReferencesFindSerializationAssemblies)",
FullFrameworkAssemblyTables="@(FullFrameworkAssemblyTables)",
FullFrameworkFolders="$(_FullFrameworkReferenceAssemblyPaths)",
FullTargetFrameworkSubsetNames="$(FullReferenceAssemblyNames)",
IgnoreDefaultInstalledAssemblySubsetTables="$(IgnoreInstalledAssemblySubsetTables)",
IgnoreDefaultInstalledAssemblyTables="$(IgnoreDefaultInstalledAssemblyTables)",
IgnoreTargetFrameworkAttributeVersionMismatch="$(ResolveAssemblyReferenceIgnoreTargetFrameworkAttributeVersionMismatch)",
IgnoreVersionForFrameworkReferences="$(IgnoreVersionForFrameworkReferences)",
InstalledAssemblySubsetTables="@(InstalledAssemblySubsetTables)",
InstalledAssemblyTables="@(InstalledAssemblyTables);@(RedistList)",
LatestTargetFrameworkDirectories="@(LatestTargetFrameworkDirectories)",
NonCultureResourceDirectories="@(NonCultureResourceDirectory)",
OutputUnresolvedAssemblyConflicts="$(ResolveAssemblyReferenceOutputUnresolvedAssemblyConflicts)",
ProfileName="$(TargetFrameworkProfile)",
ResolvedSDKReferences="@(ResolvedSDKReference)",
SearchPaths="$(AssemblySearchPaths)",
Silent="$(ResolveAssemblyReferencesSilent)",
StateFile="$(ResolveAssemblyReferencesStateFile)",
SupportsBindingRedirectGeneration="$(GenerateBindingRedirectsOutputType)",
TargetFrameworkDirectories="@(_ReferenceInstalledAssemblyDirectory)",
TargetFrameworkMoniker="$(TargetFrameworkMoniker)",
TargetFrameworkMonikerDisplayName="$(TargetFrameworkMonikerDisplayName)",
TargetFrameworkSubsets="@(_ReferenceInstalledAssemblySubsets)",
TargetFrameworkVersion="$(TargetFrameworkVersion)",
TargetProcessorArchitecture="$(ProcessorArchitecture)",
TargetedRuntimeVersion="$(TargetedRuntimeVersion)",
WarnOrErrorOnTargetArchitectureMismatch="$(ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch)")
Output(ItemName="ReferencePath", TaskParameter="ResolvedFiles")
Output(ItemName="_ResolveAssemblyReferenceResolvedFiles", TaskParameter="ResolvedFiles")
Output(ItemName="ReferenceDependencyPaths", TaskParameter="ResolvedDependencyFiles")
Output(ItemName="_ReferenceRelatedPaths", TaskParameter="RelatedFiles")
Output(ItemName="ReferenceSatellitePaths", TaskParameter="SatelliteFiles")
Output(
ItemName="_ReferenceSerializationAssemblyPaths",
TaskParameter="SerializationAssemblyFiles")
Output(ItemName="_ReferenceScatterPaths", TaskParameter="ScatterFiles")
Output(ItemName="ReferenceCopyLocalPaths", TaskParameter="CopyLocalFiles")
Output(ItemName="SuggestedBindingRedirects", TaskParameter="SuggestedRedirects")
Output(ItemName="FileWrites", TaskParameter="FilesWritten")
Output(PropertyName="DependsOnSystemRuntime", TaskParameter="DependsOnSystemRuntime")
Output(PropertyName="_DependsOnNETStandard", TaskParameter="DependsOnNETStandard")
Output(
ItemName="ResolveAssemblyReferenceUnresolvedAssemblyConflicts",
TaskParameter="UnresolvedAssemblyConflicts")
Target FindReferenceAssembliesForReferences(DependsOnTargets="ResolveReferences")
ItemGroup
if '%(ReferencePath.ReferenceAssembly)' == '':
ReferencePath
ReferenceAssembly = %(FullPath)
if '$(CompileUsingReferenceAssemblies)' != 'false':
ReferencePathWithRefAssemblies += "@(ReferencePath->'%(ReferenceAssembly)')"
if '%(ReferencePath.Identity)' != '@(ReferencePath->'%(ReferenceAssembly)')':
OriginalPath = %(ReferencePath.Identity)
if '$(CompileUsingReferenceAssemblies)' == 'false':
ReferencePathWithRefAssemblies += "@(ReferencePath)"
if '$(AutoGenerateBindingRedirects)' == 'true' and '$(GenerateBindingRedirectsOutputType)' == 'true' and '@(SuggestedBindingRedirects)' != '' and '$(DesignTimeBuild)' != 'true' and '$(BuildingProject)' == 'true':
Target GenerateBindingRedirects(
DependsOnTargets="_GenerateSuggestedBindingRedirectsCache",
Inputs="$(MSBuildAllProjects);@(AppConfigWithTargetPath);$(SuggestedBindingRedirectsCacheFile)",
Outputs="$(_GenerateBindingRedirectsIntermediateAppConfig)")
GenerateBindingRedirects(
AppConfigFile="@(AppConfigWithTargetPath)",
OutputAppConfigFile="$(_GenerateBindingRedirectsIntermediateAppConfig)",
SuggestedRedirects="@(SuggestedBindingRedirects)",
TargetName="$(TargetFileName).config")
ItemGroup
FileWrites += "$(_GenerateBindingRedirectsIntermediateAppConfig)"
if '$(AutoGenerateBindingRedirects)' == 'true' and '$(GenerateBindingRedirectsOutputType)' == 'true':
Target GenerateBindingRedirectsUpdateAppConfig
PropertyGroup
if Exists('$(_GenerateBindingRedirectsIntermediateAppConfig)'):
_NewGenerateBindingRedirectsIntermediateAppConfig = true
if $(_NewGenerateBindingRedirectsIntermediateAppConfig) == 'true':
AppConfig = $(_GenerateBindingRedirectsIntermediateAppConfig)
if $(_NewGenerateBindingRedirectsIntermediateAppConfig) == 'true':
ItemGroup
AppConfigWithTargetPath -= "@(AppConfigWithTargetPath)"
AppConfigWithTargetPath += "$(AppConfig)"
TargetPath = $(TargetFileName).config
PropertyGroup
if '$(SDKReferenceRegistryRoot)' == '':
SDKReferenceRegistryRoot = Software\Microsoft\Microsoft SDKs
if '$(SDKReferenceDirectoryRoot)' == '':
SDKReferenceDirectoryRoot = $(LocalAppData)\Microsoft SDKs;$(MSBuildProgramFiles32)\Microsoft SDKs
if '$(SDKExtensionDirectoryRoot)' == '' and '$(SDKIdentifier)' != '':
SDKExtensionDirectoryRoot = $(MSBuildProgramFiles32)\Microsoft SDKs\Windows Kits\10;$(WindowsKitsRoot)
if '$(SupportWindows81SDKs)' == '' and '$(Support81SDKs)' != 'false' and '$(TargetPlatformIdentifier)' == 'UAP':
SupportWindows81SDKs = true
if '$(TargetPlatformIdentifierWindows81)' == '' and '$(SupportWindows81SDKs)' == 'true':
TargetPlatformIdentifierWindows81 = Windows
if '$(TargetPlatformVersionWindows81)' == '' and '$(SupportWindows81SDKs)' == 'true':
TargetPlatformVersionWindows81 = 8.1
if '$(SupportWindowsPhone81SDKs)' == '' and '$(Support81SDKs)' != 'false' and '$(TargetPlatformIdentifier)' == 'UAP':
SupportWindowsPhone81SDKs = false
if '$(TargetPlatformIdentifierWindowsPhone81)' == '' and '$(SupportWindowsPhone81SDKs)' == 'true':
TargetPlatformIdentifierWindowsPhone81 = WindowsPhoneApp
if '$(TargetPlatformVersionWindowsPhone81)' == '' and '$(SupportWindowsPhone81SDKs)' == 'true':
TargetPlatformVersionWindowsPhone81 = 8.1
if '@(SDKReference)' != '':
Target GetInstalledSDKLocations(
DependsOnTargets="$(GetInstalledSDKLocationsDependsOn)",
Returns="@(InstalledSDKLocations)")
GetInstalledSDKLocations(
SDKDirectoryRoots="$(SDKReferenceDirectoryRoot)",
SDKExtensionDirectoryRoots="$(SDKExtensionDirectoryRoot)",
SDKRegistryRoot="$(SDKReferenceRegistryRoot)",
TargetPlatformIdentifier="$(TargetPlatformIdentifier)",
TargetPlatformVersion="$(TargetPlatformVersion)")
Output(ItemName="InstalledSDKLocations", TaskParameter="InstalledSDKs")
if '$(SupportWindows81SDKs)' == 'true' and '$(TargetPlatformIdentifierWindows81)' != '' and '$(TargetPlatformVersionWindows81)' != '':
GetInstalledSDKLocations(
SDKDirectoryRoots="$(SDKReferenceDirectoryRoot)",
SDKRegistryRoot="$(SDKReferenceRegistryRoot)",
TargetPlatformIdentifier="$(TargetPlatformIdentifierWindows81)",
TargetPlatformVersion="$(TargetPlatformVersionWindows81)",
WarnWhenNoSDKsFound="false",
SDKExtensionDirectoryRoots)
Output(ItemName="InstalledSDKLocations", TaskParameter="InstalledSDKs")
if '$(SupportWindowsPhone81SDKs)' == 'true' and '$(TargetPlatformIdentifierWindowsPhone81)' != '' and '$(TargetPlatformVersionWindowsPhone81)' != '':
GetInstalledSDKLocations(
SDKDirectoryRoots="$(SDKReferenceDirectoryRoot)",
SDKRegistryRoot="$(SDKReferenceRegistryRoot)",
TargetPlatformIdentifier="$(TargetPlatformIdentifierWindowsPhone81)",
TargetPlatformVersion="$(TargetPlatformVersionWindowsPhone81)",
WarnWhenNoSDKsFound="false",
SDKExtensionDirectoryRoots)
Output(ItemName="InstalledSDKLocations", TaskParameter="InstalledSDKs")
PropertyGroup
ResolveSDKReferencesDependsOn = GetInstalledSDKLocations
PropertyGroup
if '$(TargetedSDKConfiguration)' == '' and '_$(Configuration)' == '_Debug':
TargetedSDKConfiguration = Debug
if '$(TargetedSDKConfiguration)' == '' and '_$(Configuration)' == '_Release':
TargetedSDKConfiguration = Retail
if '$(TargetedSDKConfiguration)' == '':
TargetedSDKConfiguration = Retail
if '$(TargetedSDKArchitecture)' == '':
TargetedSDKArchitecture = $(ProcessorArchitecture)
if '$(TargetedSDKArchitecture)' == '':
TargetedSDKArchitecture = Neutral
PropertyGroup
if '$(ShouldMarkCertainSDKReferencesAsRuntimeOnly)' == '':
ShouldMarkCertainSDKReferencesAsRuntimeOnly = true
if '$(ShouldMarkCertainSDKReferencesAsRuntimeOnly)' == 'true':
ItemGroup
if '$(TargetPlatformVersion)' == '8.1':
RuntimeReferenceOnlySDKDependencies += "Microsoft.VCLibs, Version=11.0"
Target ResolveSDKReferences(
DependsOnTargets="$(ResolveSDKReferencesDependsOn)",
Returns="@(ResolvedSDKReference)")
if '@(SDKReference)'!='':
ResolveSDKReference(
ContinueOnError="$(ContinueOnError)",
InstalledSDKs="@(InstalledSDKLocations)",
LogResolutionErrorsAsWarnings="$(LogSDKReferenceResolutionErrorsAsWarnings)",
Prefer32Bit="$(Prefer32Bit)",
ProjectName="$(MSBuildProjectName)",
References="@(Reference)",
RuntimeReferenceOnlySDKDependencies="@(RuntimeReferenceOnlySDKDependencies)",
SDKReferences="@(SDKReference)",
TargetPlatformIdentifier="$(TargetPlatformIdentifier)",
TargetPlatformVersion="$(TargetPlatformVersion)",
TargetedSDKArchitecture="$(TargetedSDKArchitecture)",
TargetedSDKConfiguration="$(TargetedSDKConfiguration)",
WarnOnMissingPlatformVersion="$(SDKReferenceWarnOnMissingMaxPlatformVersion)")
Output(ItemName="ResolvedSDKReference", TaskParameter="ResolvedSDKReferences")
Target ResolveSDKReferencesDesignTime(
DependsOnTargets="ResolveSDKReferences",
Returns="@(ResolvedSDKReference)")
PropertyGroup
FindInvalidProjectReferencesDependsOn = GetReferenceTargetPlatformMonikers
if '$(FindInvalidProjectReferences)' == 'true':
Target FindInvalidProjectReferences(DependsOnTargets="$(FindInvalidProjectReferencesDependsOn)")
FindInvalidProjectReferences(
ProjectReferences="@(_ProjectReferenceTargetPlatformMonikers)",
TargetPlatformIdentifier="$(TargetPlatformIdentifier)",
TargetPlatformVersion="$(TargetPlatformVersion)")
Output(ItemName="InvalidProjectReferences", TaskParameter="InvalidReferences")
ItemGroup
_ResolvedProjectReferencePaths -= "@(InvalidProjectReferences)"
Target GetReferenceTargetPlatformMonikers(DependsOnTargets="PrepareProjectReferences")
MSBuild(
BuildInParallel="$(BuildInParallel)",
ContinueOnError="!$(BuildingProject)",
Projects="@(_MSBuildProjectReferenceExistent)",
Properties="%(_MSBuildProjectReferenceExistent.SetConfiguration); %(_MSBuildProjectReferenceExistent.SetPlatform); %(_MSBuildProjectReferenceExistent.SetTargetFramework)",
RemoveProperties="%(_MSBuildProjectReferenceExistent.GlobalPropertiesToRemove)$(_GlobalPropertiesToRemoveFromProjectReferences)",
Targets="GetTargetPathWithTargetPlatformMoniker")
Output(ItemName="_ProjectReferenceTargetPlatformMonikers", TaskParameter="TargetOutputs")
if '$(IsGraphBuild)' == 'true' and '$(FindInvalidProjectReferences)' == 'true':
ItemGroup
ProjectReferenceTargets += "Build"(Targets="GetTargetPathWithTargetPlatformMoniker")
PropertyGroup
ExpandSDKReferencesDependsOn = ResolveSDKReferences
if '$(ExpandSDKAllowedReferenceExtensions)' == '':
ExpandSDKAllowedReferenceExtensions =
| .winmd;
| .dll
Target ExpandSDKReferences(
DependsOnTargets="$(ExpandSDKReferencesDependsOn)",
Returns="@(ReferencesFromSDK)")
if '@(ResolvedSDKReference)'!='':
GetSDKReferenceFiles(
CacheFileFolderPath="$(GetSDKReferenceFilesCacheFolder)",
LogCacheFileExceptions="$(GetSDKReferenceFilesLogCacheFileExceptions)",
LogRedistConflictBetweenSDKsAsWarning="$(GetSDKReferenceFilesLogRedistConflictsBetweenSDKsAsWarning)",
LogRedistConflictWithinSDKAsWarning="$(GetSDKReferenceFilesLogRedistConflictsWithinSDKAsWarning)",
LogRedistFilesList="$(GetSDKReferenceFilesLogRedistFilesList)",
LogReferenceConflictBetweenSDKsAsWarning="$(GetSDKReferenceFilesLogReferenceConflictsBetweenSDKsAsWarning)",
LogReferenceConflictWithinSDKAsWarning="$(GetSDKReferenceFilesLogReferenceConflictsWithinSDKAsWarning)",
LogReferencesList="$(GetSDKReferenceFilesLogReferencesList)",
ReferenceExtensions="$(ExpandSDKAllowedReferenceExtensions)",
ResolvedSDKReferences="@(ResolvedSDKReference)",
TargetPlatformIdentifier="$(TargetPlatformIdentifier)",
TargetPlatformVersion="$(TargetPlatformVersion)",
TargetSDKIdentifier="$(SDKIdentifier)",
TargetSDKVersion="$(SDKVersion)")
Output(ItemName="ReferencePath", TaskParameter="References")
Output(ItemName="ReferencesFromSDK", TaskParameter="References")
Output(ItemName="_ResolveAssemblyReferenceResolvedFiles", TaskParameter="References")
Output(ItemName="ReferenceCopyLocalPaths", TaskParameter="CopyLocalFiles")
Output(ItemName="ResolvedRedistFiles", TaskParameter="RedistFiles")
if '$(ExportWinMDFile)' == 'true':
Target ExportWindowsMDFile(
DependsOnTargets="Compile",
Inputs="@(IntermediateAssembly);@(DocFileItem);@(_DebugSymbolsIntermediatePath);@(ReferencePathWithRefAssemblies);$(MSBuildAllProjects)",
Outputs="$(_IntermediateWindowsMetadataPath);$(WinMDExpOutputPdb);$(WinMDOutputDocumentationFile)")
PropertyGroup
CopyBuildOutputToOutputDirectory = false
CopyOutputSymbolsToOutputDirectory = false
CopyDocumentationFileToOutputDirectory = false
if '$(WinMdExpToolPath)' == '':
WinMdExpToolPath = $(TargetFrameworkSDKToolsDirectory)
if '$(WinMdExpUTF8Ouput)' == '':
WinMdExpUTF8Ouput = true
WinMDExp(
AssemblyUnificationPolicy="$(WinMDExpAssemblyUnificationPolicy)",
DisabledWarnings="$(WinMdExpNoWarn)",
EnvironmentVariables="$(WinMDExpEnvironment)",
InputDocumentationFile="@(DocFileItem)",
InputPDBFile="@(_DebugSymbolsIntermediatePath)",
OutputDocumentationFile="$(WinMDOutputDocumentationFile)",
OutputPDBFile="$(WinMDExpOutputPdb)",
OutputWindowsMetadataFile="$(_IntermediateWindowsMetadataPath)",
References="@(ReferencePathWithRefAssemblies)",
SdkToolsPath="$(WinMdExpToolPath)",
TreatWarningsAsErrors="$(TreatWarningsAsErrors)",
UTF8Output="$(WinMdExpUTF8Ouput)",
WinMDModule="@(IntermediateAssembly)")
Output(ItemName="FileWrites", TaskParameter="OutputWindowsMetadataFile")
ItemGroup
WinMDExpArtifacts += "$(_IntermediateWindowsMetadataPath)"
WinMDExpArtifacts += "$(WinMDOutputDocumentationFile)"
WinMDExpArtifacts += "$(WinMDExpOutputPdb)"
FileWrites += "$(WinMDOutputDocumentationFile);$(WinMDExpOutputPdb)"
Target ResolveAssemblyReferencesDesignTime(
DependsOnTargets=[
ResolveProjectReferences
ResolveAssemblyReferences
],
Returns="@(_ReferencesFromRAR)")
ItemGroup
_ReferencesFromRAR += "@(ReferencePath->WithMetadataValue('ReferenceSourceTarget', 'ResolveAssemblyReference'))"
PropertyGroup
if '$(ProjectDesignTimeAssemblyResolutionSearchPaths)' == '':
ProjectDesignTimeAssemblyResolutionSearchPaths =
| {CandidateAssemblyFiles};
| $(ReferencePath);
| {HintPathFromItem};
| {TargetFrameworkDirectory};
| {Registry:$(FrameworkRegistryBase),$(TargetFrameworkVersion),$(AssemblyFoldersSuffix)$(AssemblyFoldersExConditions)};
| {RawFileName};
| $(TargetDir)
PropertyGroup
DesignTimeResolveAssemblyReferencesDependsOn =
| GetFrameworkPaths;
| GetReferenceAssemblyPaths;
| ResolveReferences
if '$(DesignTimeReference)'!='':
Target DesignTimeResolveAssemblyReferences(
DependsOnTargets="$(DesignTimeResolveAssemblyReferencesDependsOn)")
ItemGroup
_DesignTimeReferenceInstalledAssemblyDirectory += "$(TargetFrameworkDirectory)"
PropertyGroup
if '$(DisableRarCache)'!='true':
DesignTimeResolveAssemblyReferencesStateFile = $(IntermediateOutputPath)$(MSBuildProjectFile)DesignTimeResolveAssemblyReferences.cache
PropertyGroup
if '$(DesignTimeAssemblySearchPaths)' == '':
DesignTimeAssemblySearchPaths =
| {CandidateAssemblyFiles};
| $(ReferencePath);
| {HintPathFromItem};
| {TargetFrameworkDirectory};
| {Registry:$(FrameworkRegistryBase),$(TargetFrameworkVersion),$(AssemblyFoldersSuffix)$(AssemblyFoldersExConditions)};
| {RawFileName};
| $(OutDir)
PropertyGroup
if '$(DesignTimeFindDependencies)' == '':
DesignTimeFindDependencies = false
if '$(DesignTimeIgnoreVersionForFrameworkReferences)' == '':
DesignTimeIgnoreVersionForFrameworkReferences = false
if '$(DesignTimeFindSatellites)' == '':
DesignTimeFindSatellites = false
if '$(DesignTimeFindSerializationAssemblies)' == '':
DesignTimeFindSerializationAssemblies = false
if '$(DesignTimeFindRelatedFiles)' == '':
DesignTimeFindRelatedFiles = false
if '$(DesignTimeSilentResolution)' == '' and '$(TraceDesignTime)' != 'true':
DesignTimeSilentResolution = true
if '$(DesignTimeAutoUnify)' == '':
DesignTimeAutoUnify = false
ItemGroup
_DesignTimeReferenceAssemblies += "$(DesignTimeReference)"
ItemGroup
_RARResolvedReferencePath += "@(ReferencePath)"
ReferencePath -= "@(ReferencePath)"
ResolveAssemblyReference(
AllowedAssemblyExtensions="$(AllowedReferenceAssemblyFileExtensions)",
Assemblies="@(_DesignTimeReferenceAssemblies)",
AutoUnify="$(DesignTimeAutoUnify)",
CandidateAssemblyFiles="@(Content);@(None);@(_RARResolvedReferencePath)",
FindDependencies="$(DesignTimeFindDependencies)",
FindRelatedFiles="$(DesignTimeFindRelatedFiles)",
FindSatellites="$(DesignTimeFindSatellites)",
FindSerializationAssemblies="$(DesignTimeFindSerializationAssemblies)",
FullFrameworkAssemblyTables="@(FullFrameworkAssemblyTables)",
FullFrameworkFolders="$(_FullFrameworkReferenceAssemblyPaths)",
FullTargetFrameworkSubsetNames="$(FullReferenceAssemblyNames)",
IgnoreDefaultInstalledAssemblySubsetTables="$(IgnoreInstalledAssemblySubsetTables)",
IgnoreTargetFrameworkAttributeVersionMismatch="$(DesignTimeIgnoreTargetFrameworkAttributeVersionMismatch)",
IgnoreVersionForFrameworkReferences="$(DesignTimeIgnoreVersionForFrameworkReferences)",
InstalledAssemblySubsetTables="@(InstalledAssemblySubsetTables)",
ProfileName="$(TargetFrameworkProfile)",
ResolvedSDKReferences="@(ResolvedSDKReference)",
SearchPaths="$(DesignTimeAssemblySearchPaths)",
Silent="$(DesignTimeSilentResolution)",
StateFile="$(DesignTimeResolveAssemblyReferencesStateFile)",
TargetFrameworkDirectories="@(_DesignTimeReferenceInstalledAssemblyDirectory)",
TargetFrameworkMoniker="$(TargetFrameworkMoniker)",
TargetFrameworkMonikerDisplayName="$(TargetFrameworkMonikerDisplayName)",
TargetFrameworkSubsets="@(_ReferenceInstalledAssemblySubsets)",
TargetFrameworkVersion="$(TargetFrameworkVersion)",
TargetProcessorArchitecture="$(ProcessorArchitecture)",
TargetedRuntimeVersion="$(TargetedRuntimeVersion)")
Output(ItemName="DesignTimeReferencePath", TaskParameter="ResolvedFiles")
Output(ItemName="FileWrites", TaskParameter="FilesWritten")
PropertyGroup
if '$(ComReferenceExecuteAsTool)'=='':
ComReferenceExecuteAsTool = false
if '@(COMReference)'!='' or '@(COMFileReference)'!='':
Target ResolveComReferences(
DependsOnTargets=[
PrepareForBuild
ResolveKeySource
ResolveAssemblyReferences
],
Returns="@(ReferencePath)")
if '$(InteropOutputPath)' == '':
PropertyGroup
InteropOutputPath = $(IntermediateOutputPath)
MakeDir(Directories="$(InteropOutputPath)")
PropertyGroup
if '$(ResolveComReferenceMSBuildArchitecture)' == '':
ResolveComReferenceMSBuildArchitecture = $(PlatformTargetAsMSBuildArchitecture)
if '$(ResolveComReferenceToolPath)' == '':
ResolveComReferenceToolPath = $(TargetFrameworkSDKToolsDirectory)
if '$(ResolveComReferenceSilent)' == '':
ResolveComReferenceSilent = false
ResolveComReference(
ContinueOnError="$(ContinueOnError)",
DelaySign="$(DelaySign)",
EnvironmentVariables="$(ResolveComReferenceEnvironment)",
ExecuteAsTool="$(ComReferenceExecuteAsTool)",
IncludeVersionInInteropName="$(IncludeVersionInInteropName)",
KeyContainer="$(KeyContainerName)",
KeyFile="$(KeyOriginatorFile)",
MSBuildArchitecture="$(ResolveComReferenceMSBuildArchitecture)",
NoClassMembers="$(ComReferenceNoClassMembers)",
ResolvedAssemblyReferences="@(ReferencePath)",
SdkToolsPath="$(ResolveComReferenceToolPath)",
Silent="$(ResolveComReferenceSilent)",
StateFile="@(_ResolveComReferenceCache)",
TargetFrameworkVersion="$(TargetFrameworkVersion)",
TargetProcessorArchitecture="$(ProcessorArchitecture)",
TypeLibFiles="@(COMFileReference)",
TypeLibNames="@(COMReference)",
WrapperOutputDirectory="$(InteropOutputPath)")
Output(ItemName="ReferencePath", TaskParameter="ResolvedFiles")
Output(ItemName="ComReferenceWrappers", TaskParameter="ResolvedFiles")
Output(ItemName="FileWrites", TaskParameter="ResolvedFiles")
Output(ItemName="ResolvedIsolatedComModules", TaskParameter="ResolvedModules")
ItemGroup
FileWrites += "@(_ResolveComReferenceCache)"
if '%(ComReferenceWrappers.CopyLocal)'!='false':
ReferenceComWrappersToCopyLocal += "@(ComReferenceWrappers)"
if '@(ReferencePath)'!=''and '$(DesignTimeBuild)' == 'true':
Target _GetAssembliesMetadata(
DependsOnTargets="ResolveComReferences",
Returns="@(_AssembliesMetadata)")
GetAssembliesMetadata(AssemblyPaths="@(ReferencePath)", ContinueOnError="$(ContinueOnError)")
Output(ItemName="_AssembliesMetadata", TaskParameter="AssembliesMetadata")
Target ResolveComReferencesDesignTime(
DependsOnTargets="ResolveComReferences",
Returns="@(ComReferenceWrappers)")
Target ResolveFrameworkReferences
PropertyGroup
PrepareResourcesDependsOn =
| $(PrepareResourcesDependsOn);
| PrepareResourceNames;
| ResGen;
| CompileLicxFiles
Target PrepareResources(DependsOnTargets="$(PrepareResourcesDependsOn)")
PropertyGroup
PrepareResourceNamesDependsOn =
| AssignTargetPaths;
| SplitResourcesByCulture;
| CreateManifestResourceNames;
| CreateCustomManifestResourceNames
Target PrepareResourceNames(DependsOnTargets="$(PrepareResourceNamesDependsOn)")
PropertyGroup
AssignTargetPathsDependsOn
Target AssignTargetPaths(DependsOnTargets="$(AssignTargetPathsDependsOn)")
ItemGroup
_Temporary -= "@(_Temporary)"
AssignTargetPath(Files="@(EmbeddedResource)", RootFolder="$(MSBuildProjectDirectory)")
Output(ItemName="_Temporary", TaskParameter="AssignedFiles")
ItemGroup
EmbeddedResource -= "@(_Temporary)"
EmbeddedResource += "@(_Temporary)"
_Temporary -= "@(_Temporary)"
AssignTargetPath(Files="@(Content)", RootFolder="$(MSBuildProjectDirectory)")
Output(ItemName="ContentWithTargetPath", TaskParameter="AssignedFiles")
AssignTargetPath(Files="@(None)", RootFolder="$(MSBuildProjectDirectory)")
Output(ItemName="_NoneWithTargetPath", TaskParameter="AssignedFiles")
AssignTargetPath(Files="@(BaseApplicationManifest)", RootFolder="$(MSBuildProjectDirectory)")
Output(ItemName="_DeploymentBaseManifestWithTargetPath", TaskParameter="AssignedFiles")
if '@(_DeploymentBaseManifestWithTargetPath)'=='' and '%(None.Extension)'=='.manifest':
AssignTargetPath(Files="@(None)", RootFolder="$(MSBuildProjectDirectory)")
Output(ItemName="_DeploymentBaseManifestWithTargetPath", TaskParameter="AssignedFiles")
Target GetItemTargetPaths(
DependsOnTargets="AssignTargetPaths",
Returns="
@(EmbeddedResource);
@(ContentWithTargetPath);
@(_NoneWithTargetPath);
@(_DeploymentBaseManifestWithTargetPath);
")
Target SplitResourcesByCulture(DependsOnTargets="AssignTargetPaths")
PropertyGroup
if '$(RespectAlreadyAssignedItemCulture)' == '':
RespectAlreadyAssignedItemCulture = false
if '$(WarnOnCultureOverwritten)' == '':
WarnOnCultureOverwritten = false
if '@(ResxWithNoCulture)'!='':
MSBuildInternalMessage(
FormatArguments="MSB9000;ResxWithNoCulture",
ResourceName="CommonSdk.SplitResourcesByCultureEmbeddedResourceMessage",
Severity="Warning")
if '@(ResxWithCulture)'!='':
MSBuildInternalMessage(
FormatArguments="MSB9001;ResxWithCulture",
ResourceName="CommonSdk.SplitResourcesByCultureEmbeddedResourceMessage",
Severity="Warning")
if '@(NonResxWithCulture)'!='':
MSBuildInternalMessage(
FormatArguments="MSB9002;NonResxWithCulture",
ResourceName="CommonSdk.SplitResourcesByCultureEmbeddedResourceMessage",
Severity="Warning")
if '@(NonResxWithNoCulture)'!='':
MSBuildInternalMessage(
FormatArguments="MSB9003;NonResxWithNoCulture",
ResourceName="CommonSdk.SplitResourcesByCultureEmbeddedResourceMessage",
Severity="Warning")
ItemGroup
if '%(Extension)'=='.licx':
_LicxFile += "@(EmbeddedResource)"
EmbeddedResource += "@(ResxWithNoCulture);@(ResxWithCulture)"
Type = Resx
EmbeddedResource += "@(NonResxWithCulture);@(NonResxWithNoCulture)"
Type = Non-Resx
if '%(Extension)'!='.licx':
AssignCulture(
Files="@(EmbeddedResource)",
RespectAlreadyAssignedItemCulture="$(RespectAlreadyAssignedItemCulture)",
WarnOnCultureOverwritten="$(WarnOnCultureOverwritten)")
Output(ItemName="_MixedResourceWithCulture", TaskParameter="AssignedFilesWithCulture")
Output(ItemName="_MixedResourceWithNoCulture", TaskParameter="AssignedFilesWithNoCulture")
ItemGroup
EmbeddedResource -= "@(_MixedResourceWithCulture)"
EmbeddedResource -= "@(_MixedResourceWithNoCulture)"
EmbeddedResource -= "@(_LicxFile)"
if '%(Extension)'=='.resx' or '%(Extension)'=='.restext':
EmbeddedResource += "@(_MixedResourceWithNoCulture);@(_MixedResourceWithCulture)"
if '%(_MixedResourceWithNoCulture.Type)'=='' and '%(_MixedResourceWithCulture.Type)'=='':
Type = Resx
if '%(Extension)'!='.resx' and '%(Extension)'!='.restext':
EmbeddedResource += "@(_MixedResourceWithNoCulture);@(_MixedResourceWithCulture)"
if '%(_MixedResourceWithNoCulture.Type)'=='' and '%(_MixedResourceWithCulture.Type)'=='':
Type = Non-Resx
ResxWithNoCulture -= "@(ResxWithNoCulture)"
NonResxWithNoCulture -= "@(NonResxWithNoCulture)"
ResxWithCulture -= "@(ResxWithCulture)"
NonResxWithCulture -= "@(NonResxWithCulture)"
if '%(WithCulture)'=='false' and ('%(Extension)'=='.resx' or '%(Extension)'=='.restext'):
ResxWithNoCulture += "@(_MixedResourceWithNoCulture)"
if '%(WithCulture)'=='false' and ('%(Extension)'!='.resx' and '%(Extension)'!='.restext'):
NonResxWithNoCulture += "@(_MixedResourceWithNoCulture)"
if '%(WithCulture)'=='true' and ('%(Extension)'=='.resx' or '%(Extension)'=='.restext'):
ResxWithCulture += "@(_MixedResourceWithCulture)"
if '%(WithCulture)'=='true' and ('%(Extension)'!='.resx' and '%(Extension)'!='.restext'):
NonResxWithCulture += "@(_MixedResourceWithCulture)"
_MixedResourceWithNoCulture -= "@(_MixedResourceWithNoCulture)"
_MixedResourceWithCulture -= "@(_MixedResourceWithCulture)"
PropertyGroup
CreateCustomManifestResourceNamesDependsOn
Target CreateCustomManifestResourceNames(
DependsOnTargets="$(CreateCustomManifestResourceNamesDependsOn)")
PropertyGroup
ResGenDependsOn = ResolveAssemblyReferences;SplitResourcesByCulture;BeforeResGen;CoreResGen;AfterResGen
CoreResGenDependsOn = FindReferenceAssembliesForReferences
if '$(UseSourcePath)'=='':
UseSourcePath = true
if '$(ResGenExecuteAsTool)'=='':
ResGenExecuteAsTool = false
Target ResGen(DependsOnTargets="$(ResGenDependsOn)")
Target BeforeResGen
Target AfterResGen
Target CoreResGen(DependsOnTargets="$(CoreResGenDependsOn)")
ItemGroup
_Temporary -= "@(_Temporary)"
PropertyGroup
if '$(GenerateResourceMSBuildArchitecture)' == '':
GenerateResourceMSBuildArchitecture = $(PlatformTargetAsMSBuildArchitecture)
if '$(ResgenToolPath)' == '':
ResgenToolPath = $(TargetFrameworkSDKToolsDirectory)
if '$(TargetFrameworkAsMSBuildRuntime)' != '' and '$(GenerateResourceMSBuildArchitecture)' != '':
PropertyGroup
if '$(GenerateResourceMSBuildRuntime)' == '' and $([MSBuild]::DoesTaskHostExist(`$(TargetFrameworkAsMSBuildRuntime)`, `$(GenerateResourceMSBuildArchitecture)`)):
GenerateResourceMSBuildRuntime = $(TargetFrameworkAsMSBuildRuntime)
if '$(GenerateResourceMSBuildRuntime)' == '':
GenerateResourceMSBuildRuntime = CurrentRuntime
if '%(EmbeddedResource.Type)' == 'Resx' and '%(EmbeddedResource.GenerateResource)' != 'false' and '$(GenerateResourceMSBuildRuntime)' != 'CLR2':
GenerateResource(
AdditionalInputs="$(MSBuildAllProjects)",
EnvironmentVariables="$(ResGenEnvironment)",
ExecuteAsTool="$(ResGenExecuteAsTool)",
MSBuildArchitecture="$(GenerateResourceMSBuildArchitecture)",
MSBuildRuntime="$(GenerateResourceMSBuildRuntime)",
NeverLockTypeAssemblies="$(GenerateResourceNeverLockTypeAssemblies)",
OutputResources="@(EmbeddedResource->'$(IntermediateOutputPath)%(ManifestResourceName).resources')",
PublicClass="%(EmbeddedResource.PublicClass)",
References="@(ReferencePathWithRefAssemblies)",
SdkToolsPath="$(ResgenToolPath)",
Sources="@(EmbeddedResource)",
StateFile="$(IntermediateOutputPath)$(MSBuildProjectFile).GenerateResource.cache",
StronglyTypedClassName="%(EmbeddedResource.StronglyTypedClassName)",
StronglyTypedFileName="%(EmbeddedResource.StronglyTypedFileName)",
StronglyTypedLanguage="%(EmbeddedResource.StronglyTypedLanguage)",
StronglyTypedManifestPrefix="%(EmbeddedResource.StronglyTypedManifestPrefix)",
StronglyTypedNamespace="%(EmbeddedResource.StronglyTypedNamespace)",
UsePreserializedResources="$(GenerateResourceUsePreserializedResources)",
UseSourcePath="$(UseSourcePath)",
WarnOnBinaryFormatterUse="$(GenerateResourceWarnOnBinaryFormatterUse)")
Output(ItemName="FileWrites", TaskParameter="FilesWritten")
Output(ItemName="Compile", TaskParameter="StronglyTypedFileName")
Output(ItemName="_Temporary", TaskParameter="Sources")
if '%(EmbeddedResource.Type)' == 'Resx' and '%(EmbeddedResource.GenerateResource)' != 'false' and '$(GenerateResourceMSBuildRuntime)' == 'CLR2':
GenerateResource(
AdditionalInputs="$(MSBuildAllProjects)",
MSBuildArchitecture="$(GenerateResourceMSBuildArchitecture)",
MSBuildRuntime="$(GenerateResourceMSBuildRuntime)",
NeverLockTypeAssemblies="$(GenerateResourceNeverLockTypeAssemblies)",
OutputResources="@(EmbeddedResource->'$(IntermediateOutputPath)%(ManifestResourceName).resources')",
PublicClass="%(EmbeddedResource.PublicClass)",
References="@(ReferencePath)",
Sources="@(EmbeddedResource)",
StateFile="$(IntermediateOutputPath)$(MSBuildProjectFile).GenerateResource.cache",
StronglyTypedClassName="%(EmbeddedResource.StronglyTypedClassName)",
StronglyTypedFileName="%(EmbeddedResource.StronglyTypedFileName)",
StronglyTypedLanguage="%(EmbeddedResource.StronglyTypedLanguage)",
StronglyTypedManifestPrefix="%(EmbeddedResource.StronglyTypedManifestPrefix)",
StronglyTypedNamespace="%(EmbeddedResource.StronglyTypedNamespace)",
UseSourcePath="$(UseSourcePath)")
Output(ItemName="FileWrites", TaskParameter="FilesWritten")
Output(ItemName="Compile", TaskParameter="StronglyTypedFileName")
Output(ItemName="_Temporary", TaskParameter="Sources")
ItemGroup
EmbeddedResource -= "@(_Temporary)"
EmbeddedResource += "@(_Temporary)"
_Temporary -= "@(_Temporary)"
if '%(EmbeddedResource.WithCulture)'=='false' and '%(EmbeddedResource.Type)' == 'Resx':
ManifestResourceWithNoCulture += "@(EmbeddedResource->'%(OutputResource)')"
EmittedForCompatibilityOnly = true
if '%(EmbeddedResource.WithCulture)'=='false' and '%(EmbeddedResource.Type)' == 'Non-Resx':
ManifestNonResxWithNoCultureOnDisk += "@(EmbeddedResource)"
EmittedForCompatibilityOnly = true
if '%(EmbeddedResource.WithCulture)'=='true' and '%(EmbeddedResource.Type)' == 'Resx':
ManifestResourceWithCulture += "@(EmbeddedResource->'%(OutputResource)')"
EmittedForCompatibilityOnly = true
if '%(EmbeddedResource.WithCulture)'=='true' and '%(EmbeddedResource.Type)' == 'Non-Resx':
ManifestNonResxWithCultureOnDisk += "@(EmbeddedResource)"
EmittedForCompatibilityOnly = true
PropertyGroup
CompileLicxFilesDependsOn
if '@(_LicxFile)'!='':
Target CompileLicxFiles(
DependsOnTargets="$(CompileLicxFilesDependsOn)",
Inputs="$(MSBuildAllProjects);@(_LicxFile);@(ReferencePathWithRefAssemblies);@(ReferenceDependencyPaths)",
Outputs="$(IntermediateOutputPath)$(TargetFileName).licenses")
PropertyGroup
if '$(LCMSBuildArchitecture)' == '':
LCMSBuildArchitecture = $(PlatformTargetAsMSBuildArchitecture)
LC(
EnvironmentVariables="$(LCEnvironment)",
LicenseTarget="$(TargetFileName)",
MSBuildArchitecture="$(LCMSBuildArchitecture)",
NoLogo="$(NoLogo)",
OutputDirectory="$(IntermediateOutputPath)",
OutputLicense="$(IntermediateOutputPath)$(TargetFileName).licenses",
ReferencedAssemblies="@(ReferencePathWithRefAssemblies);@(ReferenceDependencyPaths)",
SdkToolsPath="$(TargetFrameworkSDKToolsDirectory)",
Sources="@(_LicxFile)",
TargetFrameworkVersion="$(TargetFrameworkVersion)",
ToolPath="$(LCToolPath)")
Output(ItemName="CompiledLicenseFile", TaskParameter="OutputLicense")
Output(ItemName="FileWrites", TaskParameter="OutputLicense")
if $(SignManifests) == 'true' or $(SignAssembly) == 'true':
Target ResolveKeySource
ResolveKeySource(
CertificateFile="$(ManifestKeyFile)",
CertificateThumbprint="$(ManifestCertificateThumbprint)",
ContinueOnError="!$(BuildingProject)",
KeyFile="$(AssemblyOriginatorKeyFile)",
ShowImportDialogDespitePreviousFailures="$(BuildingProject)",
SuppressAutoClosePasswordPrompt="$(BuildingInsideVisualStudio)")
if '$(SignAssembly)' == 'true':
Output(PropertyName="KeyOriginatorFile", TaskParameter="ResolvedKeyFile")
if '$(SignAssembly)' == 'true':
Output(PropertyName="KeyContainerName", TaskParameter="ResolvedKeyContainer")
if '$(SignManifests)' == 'true':
Output(
PropertyName="_DeploymentResolvedManifestCertificateThumbprint",
TaskParameter="ResolvedThumbprint")
PropertyGroup
CompileDependsOn =
| ResolveReferences;
| ResolveKeySource;
| SetWin32ManifestProperties;
| _SetPreferNativeArm64Win32ManifestProperties;
| FindReferenceAssembliesForReferences;
| _GenerateCompileInputs;
| BeforeCompile;
| _TimeStampBeforeCompile;
| _GenerateCompileDependencyCache;
| CoreCompile;
| _TimeStampAfterCompile;
| AfterCompile;
Target Compile(DependsOnTargets="$(CompileDependsOn)")
Target _GenerateCompileInputs
if '@(ManifestResourceWithNoCulture)'!='' and '%(ManifestResourceWithNoCulture.EmittedForCompatibilityOnly)'=='':
MSBuildInternalMessage(
FormatArguments="MSB9004;ManifestResourceWithNoCulture;false;Resx",
ResourceName="CommonSdk.ManifestResourceWithNoCultureWarning",
Severity="Warning")
if '@(ManifestNonResxWithNoCultureOnDisk)'!='' and '%(ManifestNonResxWithNoCultureOnDisk.EmittedForCompatibilityOnly)'=='':
MSBuildInternalMessage(
FormatArguments="MSB9005;ManifestNonResxWithNoCultureOnDisk;false;Non-Resx",
ResourceName="CommonSdk.ManifestResourceWithNoCultureWarning",
Severity="Warning")
ItemGroup
if '%(EmbeddedResource.WithCulture)' == 'false' and '%(EmbeddedResource.Type)' == 'Resx':
_CoreCompileResourceInputs += "@(EmbeddedResource->'%(OutputResource)')"
if '%(EmbeddedResource.WithCulture)' == 'false' and '%(EmbeddedResource.Type)' == 'Non-Resx':
_CoreCompileResourceInputs += "@(EmbeddedResource)"
if '%(ManifestResourceWithNoCulture.EmittedForCompatibilityOnly)'=='':
_CoreCompileResourceInputs += "@(ManifestResourceWithNoCulture)"
Type = Resx
WithCulture = false
if '%(ManifestNonResxWithNoCultureOnDisk.EmittedForCompatibilityOnly)'=='':
_CoreCompileResourceInputs += "@(ManifestNonResxWithNoCultureOnDisk)"
Type = Non-Resx
WithCulture = false
if '$(TargetFrameworkMoniker)' != '':
PropertyGroup
if '$(TargetFrameworkMonikerAssemblyAttributesFileClean)' == '' and '$(TargetFrameworkMonikerAssemblyAttributesPath)' != '':
TargetFrameworkMonikerAssemblyAttributesFileClean = true
if '$(TargetFrameworkMonikerAssemblyAttributesPath)' == '':
TargetFrameworkMonikerAssemblyAttributesPath = $([System.IO.Path]::Combine('$(IntermediateOutputPath)','$(TargetFrameworkMoniker).AssemblyAttributes$(DefaultLanguageSourceExtension)'))
PropertyGroup
if '$(GenerateTargetFrameworkAttribute)' == '' and '$(TargetFrameworkMoniker)' != '' and '$(TargetingClr2Framework)' != 'true':
GenerateTargetFrameworkAttribute = true
if '$(TargetFrameworkMonikerAssemblyAttributesFileClean)' == 'true':
ItemGroup
Clean += "$(TargetFrameworkMonikerAssemblyAttributesPath)"
if '@(Compile)' != '' and '$(GenerateTargetFrameworkAttribute)' == 'true':
Target GenerateTargetFrameworkMonikerAttribute(
DependsOnTargets=[
PrepareForBuild
GetReferenceAssemblyPaths
],
BeforeTargets="BeforeCompile",
Inputs="$(MSBuildToolsPath)\Microsoft.Common.targets",
Outputs="$(TargetFrameworkMonikerAssemblyAttributesPath)")
if '@(Compile)' != '' and '$(TargetFrameworkMonikerAssemblyAttributeText)' != '':
WriteLinesToFile(
ContinueOnError="true",
File="$(TargetFrameworkMonikerAssemblyAttributesPath)",
Lines="$(TargetFrameworkMonikerAssemblyAttributeText)",
Overwrite="true")
if '@(Compile)' != '' and '$(TargetFrameworkMonikerAssemblyAttributeText)' != '':
ItemGroup
Compile += "$(TargetFrameworkMonikerAssemblyAttributesPath)"
if '$(AssemblyAttributesPath)' != '':
PropertyGroup
if '$(GenerateAdditionalSources)' == '':
GenerateAdditionalSources = true
if '$(AssemblyAttributesPath)' != '':
ItemGroup
if '$(AssemblyAttributesFileClean)' != 'false':
Clean += "$(AssemblyAttributesPath)"
if '@(AssemblyAttributes)' != '' and '$(GenerateAdditionalSources)' == 'true':
Target GenerateAdditionalSources(
DependsOnTargets=[
PrepareForBuild
GetReferenceAssemblyPaths
],
BeforeTargets="BeforeCompile",
Inputs="$(MSBuildAllProjects)",
Outputs="$(AssemblyAttributesPath)")
WriteCodeFragment(
AssemblyAttributes="@(AssemblyAttributes)",
Language="$(Language)",
OutputFile="$(AssemblyAttributesPath)")
Output(ItemName="Compile", TaskParameter="OutputFile")
Output(ItemName="FileWrites", TaskParameter="OutputFile")
Target BeforeCompile
Target AfterCompile
if '$(RunPostBuildEvent)'=='OnOutputUpdated' or ('$(RegisterForComInterop)'=='true' and '$(OutputType)'=='library'):
Target _TimeStampBeforeCompile
PropertyGroup
_AssemblyTimestampBeforeCompile = %(IntermediateAssembly.ModifiedTime)
if '$(DesignTimeBuild)' != 'true' and '$(BuildingProject)' == 'true':
Target _GenerateSuggestedBindingRedirectsCache(DependsOnTargets="ResolveAssemblyReferences")
PropertyGroup
SuggestedBindingRedirectsCacheFile = $(IntermediateOutputPath)$(MSBuildProjectFile).SuggestedBindingRedirects.cache
Hash(ItemsToHash="@(SuggestedBindingRedirects)")
Output(PropertyName="SuggestedBindingRedirectsHash", TaskParameter="HashResult")
WriteLinesToFile(
File="$(SuggestedBindingRedirectsCacheFile)",
Lines="$(SuggestedBindingRedirectsHash)",
Overwrite="true",
WriteOnlyWhenDifferent="true")
ItemGroup
FileWrites += "$(SuggestedBindingRedirectsCacheFile)"
if '$(DesignTimeBuild)' != 'true' and '$(BuildingProject)' == 'true':
Target _GenerateCompileDependencyCache(
DependsOnTargets=[
ResolveAssemblyReferences
_GenerateCompileInputs
])
ItemGroup
CustomAdditionalCompileInputs += "$(IntermediateOutputPath)$(MSBuildProjectFile).CoreCompileInputs.cache"
CoreCompileCache += "@(Compile)"
CoreCompileCache += "@(ReferencePath)"
CoreCompileCache += "$(DefineConstants)"
CoreCompileCache += "$(LangVersion)"
CoreCompileCache += "$(Deterministic)"
CoreCompileCache += "$(PathMap)"
CoreCompileCache += "@(_CoreCompileResourceInputs)"
Hash(
IgnoreCase="$([MSBuild]::ValueOrDefault(`$(CoreCompileCacheIgnoreCase)`, `true`))",
ItemsToHash="@(CoreCompileCache)")
Output(PropertyName="CoreCompileDependencyHash", TaskParameter="HashResult")
WriteLinesToFile(
File="$(IntermediateOutputPath)$(MSBuildProjectFile).CoreCompileInputs.cache",
Lines="$(CoreCompileDependencyHash)",
Overwrite="true",
WriteOnlyWhenDifferent="true")
ItemGroup
FileWrites += "$(IntermediateOutputPath)$(MSBuildProjectFile).CoreCompileInputs.cache"
if '$(RunPostBuildEvent)'=='OnOutputUpdated' or ('$(RegisterForComInterop)'=='true' and '$(OutputType)'=='library'):
Target _TimeStampAfterCompile
PropertyGroup
_AssemblyTimestampAfterCompile = %(IntermediateAssembly.ModifiedTime)
if ('$(BuildingInsideVisualStudio)' == 'true') and ('$(BuildingOutOfProcess)' != 'true') and (('$(BuildingProject)' == 'false') or ('$(UseHostCompilerIfAvailable)' == 'true')):
Target _ComputeNonExistentFileProperty
PropertyGroup
NonExistentFile = __NonExistentSubDir__\__NonExistentFile__
PropertyGroup
_SGenDllName = $(TargetName).XmlSerializers.dll
_SGenDllCreated = false
_SGenGenerateSerializationAssembliesConfig = $(GenerateSerializationAssemblies)
if '$(GenerateSerializationAssemblies)' == '':
_SGenGenerateSerializationAssembliesConfig = Auto
if '$(ConfigurationName)'=='Debug' and '$(_SGenGenerateSerializationAssembliesConfig)' == 'Auto':
_SGenGenerateSerializationAssembliesConfig = Off
if '$(SGenUseProxyTypes)' == '':
SGenUseProxyTypes = true
if '$(SGenUseKeep)'=='':
SGenUseKeep = false
if '$(SGenShouldGenerateSerializer)' == '':
SGenShouldGenerateSerializer = true
if '$(_SGenGenerateSerializationAssembliesConfig)' == 'On' or ('@(WebReferenceUrl)'!='' and '$(_SGenGenerateSerializationAssembliesConfig)' == 'Auto'):
Target GenerateSerializationAssemblies(
DependsOnTargets=[
AssignTargetPaths
Compile
ResolveKeySource
],
Inputs="$(MSBuildAllProjects);@(IntermediateAssembly)",
Outputs="$(IntermediateOutputPath)$(_SGenDllName)")
PropertyGroup
if '$(SGenMSBuildArchitecture)' == '':
SGenMSBuildArchitecture = $(PlatformTargetAsMSBuildArchitecture)
SGen(
BuildAssemblyName="$(TargetFileName)",
BuildAssemblyPath="$(IntermediateOutputPath)",
DelaySign="$(DelaySign)",
EnvironmentVariables="$(SGenEnvironment)",
KeyContainer="$(KeyContainerName)",
KeyFile="$(KeyOriginatorFile)",
MSBuildArchitecture="$(SGenMSBuildArchitecture)",
Platform="$(SGenPlatformTarget)",
References="@(ReferencePath)",
SdkToolsPath="$(TargetFrameworkSDKToolsDirectory)",
SerializationAssembly="$(IntermediateOutputPath)$(_SGenDllName)",
ShouldGenerateSerializer="$(SGenShouldGenerateSerializer)",
ToolPath="$(SGenToolPath)",
Types="$(SGenSerializationTypes)",
UseKeep="$(SGenUseKeep)",
UseProxyTypes="$(SGenUseProxyTypes)")
Output(ItemName="SerializationAssembly", TaskParameter="SerializationAssembly")
PropertyGroup
CreateSatelliteAssembliesDependsOn =
| $(CreateSatelliteAssembliesDependsOn);
| _GenerateSatelliteAssemblyInputs;
| ComputeIntermediateSatelliteAssemblies;
| GenerateSatelliteAssemblies
Target CreateSatelliteAssemblies(DependsOnTargets="$(CreateSatelliteAssembliesDependsOn)")
Target _GenerateSatelliteAssemblyInputs
if '@(ManifestResourceWithCulture)'!='' and '%(ManifestResourceWithCulture.EmittedForCompatibilityOnly)'=='':
MSBuildInternalMessage(
FormatArguments="MSB9006;ManifestResourceWithCulture;true;Resx",
ResourceName="CommonSdk.ManifestResourceWithNoCultureWarning",
Severity="Warning")
if '@(ManifestNonResxWithCultureOnDisk)'!='' and '%(ManifestNonResxWithCultureOnDisk.EmittedForCompatibilityOnly)'=='':
MSBuildInternalMessage(
FormatArguments="MSB9007;ManifestNonResxWithCultureOnDisk;true;Non-Resx",
ResourceName="CommonSdk.ManifestResourceWithNoCultureWarning",
Severity="Warning")
ItemGroup
if '%(EmbeddedResource.WithCulture)' == 'true' and '%(EmbeddedResource.Type)' == 'Resx':
_SatelliteAssemblyResourceInputs += "@(EmbeddedResource->'%(OutputResource)')"
if '%(EmbeddedResource.WithCulture)' == 'true' and '%(EmbeddedResource.Type)' == 'Non-Resx':
_SatelliteAssemblyResourceInputs += "@(EmbeddedResource)"
if '%(ManifestResourceWithCulture.EmittedForCompatibilityOnly)'=='':
_SatelliteAssemblyResourceInputs += "@(ManifestResourceWithCulture)"
Type = Resx
WithCulture = true
if '%(ManifestNonResxWithCultureOnDisk.EmittedForCompatibilityOnly)'=='':
_SatelliteAssemblyResourceInputs += "@(ManifestNonResxWithCultureOnDisk)"
Type = Non-Resx
WithCulture = true
if '@(_SatelliteAssemblyResourceInputs)' != '' and '$(GenerateSatelliteAssembliesForCore)' != 'true':
Target GenerateSatelliteAssemblies(
Inputs="$(MSBuildAllProjects);@(_SatelliteAssemblyResourceInputs);$(IntermediateOutputPath)$(TargetName)$(TargetExt)",
Outputs="$(IntermediateOutputPath)%(Culture)\$(TargetName).resources.dll")
PropertyGroup
if '$(_ALExeToolPath)' == '':
_ALExeToolPath = $(TargetFrameworkSDKToolsDirectory)
MakeDir(Directories="@(EmbeddedResource->'$(IntermediateOutputPath)%(Culture)')")
AL(
AlgorithmId="$(Satellite_AlgorithmId)",
BaseAddress="$(Satellite_BaseAddress)",
CompanyName="$(Satellite_CompanyName)",
Configuration="$(Satellite_Configuration)",
Copyright="$(Satellite_Copyright)",
Culture="%(Culture)",
DelaySign="$(DelaySign)",
Description="$(Satellite_Description)",
EmbedResources="@(_SatelliteAssemblyResourceInputs)",
EnvironmentVariables="$(AlEnvironment)",
EvidenceFile="$(Satellite_EvidenceFile)",
FileVersion="$(Satellite_FileVersion)",
Flags="$(Satellite_Flags)",
GenerateFullPaths="$(Satellite_GenerateFullPaths)",
KeyContainer="$(KeyContainerName)",
KeyFile="$(KeyOriginatorFile)",
LinkResources="@(Satellite_LinkResource)",
MainEntryPoint="$(Satellite_MainEntryPoint)",
OutputAssembly="$(IntermediateOutputPath)%(Culture)\$(TargetName).resources.dll",
Platform="$(PlatformTarget)",
ProductName="$(Satellite_ProductName)",
ProductVersion="$(Satellite_ProductVersion)",
ResponseFiles="@(AlResponseFile)",
SdkToolsPath="$(_ALExeToolPath)",
SourceModules="@(Satellite_SourceModule)",
TargetType="$(Satellite_TargetType)",
TemplateFile="$(IntermediateOutputPath)$(TargetName)$(TargetExt)",
Title="$(Satellite_Title)",
ToolExe="$(AlToolExe)",
ToolPath="$(AlToolPath)",
Trademark="$(Satellite_Trademark)",
Version="$(Satellite_Version)",
Win32Icon="$(Satellite_Win32Icon)",
Win32Resource="$(Satellite_Win32Resource)")
Output(ItemName="FileWrites", TaskParameter="OutputAssembly")
PropertyGroup
ComputeIntermediateSatelliteAssembliesDependsOn = CreateManifestResourceNames
if @(EmbeddedResource->'%(WithCulture)') != '':
Target ComputeIntermediateSatelliteAssemblies(
DependsOnTargets="$(ComputeIntermediateSatelliteAssembliesDependsOn)")
ItemGroup
if '%(EmbeddedResource.Culture)' != '':
IntermediateSatelliteAssembliesWithTargetPath += "$(IntermediateOutputPath)%(EmbeddedResource.Culture)\$(TargetName).resources.dll"
Culture = %(EmbeddedResource.Culture)
TargetPath = %(EmbeddedResource.Culture)\$(TargetName).resources.dll
PropertyGroup
EmbeddedWin32Manifest = $(Win32Manifest)
if '$(Win32Manifest)'=='':
Target SetWin32ManifestProperties(
DependsOnTargets=[
ResolveComReferences
ResolveNativeReferences
_SetExternalWin32ManifestProperties
_SetEmbeddedWin32ManifestProperties
])
if '$(GenerateClickOnceManifests)'=='true' or '@(NativeReference)'!='' or '@(ResolvedIsolatedComModules)'!='':
Target _SetExternalWin32ManifestProperties
PropertyGroup
_DeploymentBaseManifest = $(ApplicationManifest)
if '$(_DeploymentBaseManifest)'=='':
_DeploymentBaseManifest = @(_DeploymentBaseManifestWithTargetPath)
if '$(NoWin32Manifest)'=='':
NoWin32Manifest = true
if '$(GenerateClickOnceManifests)'!='true' and '@(NativeReference)'=='' and '@(ResolvedIsolatedComModules)'=='':
Target _SetEmbeddedWin32ManifestProperties
PropertyGroup
EmbeddedWin32Manifest = $(ApplicationManifest)
Win32Manifest = $(ApplicationManifest)
if '$(ApplicationManifest)'=='' and '$(NoWin32Manifest)'!='true' and '$(PreferNativeArm64)' != 'true':
GetFrameworkPath
Output(PropertyName="_FrameworkVersion40Path", TaskParameter="FrameworkVersion40Path")
PropertyGroup
if '$(ApplicationManifest)'=='' and '$(NoWin32Manifest)'!='true' and '$(PreferNativeArm64)' != 'true' and Exists('$(_FrameworkVersion40Path)\default.win32manifest'):
EmbeddedWin32Manifest = $(_FrameworkVersion40Path)\default.win32manifest
if '$(PreferNativeArm64)'=='true' and '$(NoWin32Manifest)'!='true':
Target _SetPreferNativeArm64Win32ManifestProperties(
DependsOnTargets="SetWin32ManifestProperties")
AddToWin32Manifest(
ApplicationManifest="$(Win32Manifest)",
OutputDirectory="$(IntermediateOutputPath)",
SupportedArchitectures="$(_SupportedArchitectures)")
Output(PropertyName="_Win32Manifest", TaskParameter="ManifestPath")
PropertyGroup
if '$(_Win32Manifest)' != '':
Win32Manifest = $(_Win32Manifest)
PropertyGroup
GenerateManifestsDependsOn =
| SetWin32ManifestProperties;
| GenerateApplicationManifest;
| GenerateDeploymentManifest
Target _GenerateResolvedDeploymentManifestEntryPoint
ItemGroup
if '%(FileType)'=='ManifestEntryPoint':
_DeploymentPublishFileOfTypeManifestEntryPoint += "@(PublishFile)"
ResolveManifestFiles(
DeploymentManifestEntryPoint="@(ApplicationManifest)",
PublishFiles="@(_DeploymentPublishFileOfTypeManifestEntryPoint)",
SigningManifests="$(SignManifests)",
TargetFrameworkIdentifier="$(TargetFrameworkIdentifier)",
TargetFrameworkVersion="$(TargetFrameworkVersion)")
Output(
ItemName="_DeploymentResolvedDeploymentManifestEntryPoint",
TaskParameter="OutputDeploymentManifestEntryPoint")
if '$(GenerateClickOnceManifests)'=='true' or '@(NativeReference)'!='' or '@(ResolvedIsolatedComModules)'!='' or '$(GenerateAppxManifest)' == 'true':
Target GenerateManifests(DependsOnTargets="$(GenerateManifestsDependsOn)")
Target GenerateApplicationManifest(
DependsOnTargets=[
_DeploymentSetClickOnceVersions
_DeploymentGenerateLauncher
_DeploymentComputeNativeManifestInfo
_DeploymentComputeClickOnceManifestInfo
ResolveComReferences
ResolveNativeReferences
_GenerateResolvedDeploymentManifestEntryPoint
],
Inputs="
$(MSBuildAllProjects);
@(AppConfigWithTargetPath);
$(_DeploymentBaseManifest);
@(ResolvedIsolatedComModules);
@(_DeploymentManifestDependencies);
@(_DeploymentResolvedManifestEntryPoint);
@(_DeploymentManifestFiles)",
Outputs="@(ApplicationManifest)")
RequiresFramework35SP1Assembly(
Assemblies="@(_DeploymentManifestDependencies)",
CreateDesktopShortcut="$(CreateDesktopShortcut)",
DeploymentManifestEntryPoint="@(_DeploymentResolvedDeploymentManifestEntryPoint)",
EntryPoint="@(_DeploymentResolvedManifestEntryPoint)",
ErrorReportUrl="$(_DeploymentFormattedErrorReportUrl)",
Files="@(_DeploymentManifestFiles)",
ReferencedAssemblies="@(Reference)",
SigningManifests="$(SignManifests)",
SuiteName="$(SuiteName)",
TargetFrameworkVersion="$(TargetFrameworkVersion)")
Output(
PropertyName="_DeploymentRequiresMinimumFramework35SP1",
TaskParameter="RequiresMinimumFramework35SP1")
GenerateApplicationManifest(
AssemblyName="$(_DeploymentApplicationManifestIdentity)",
AssemblyVersion="$(_DeploymentManifestVersion)",
ClrVersion="$(ClrVersion)",
ConfigFile="@(AppConfigWithTargetPath)",
Dependencies="@(_DeploymentManifestDependencies)",
Description="$(Description)",
EntryPoint="@(_DeploymentResolvedManifestEntryPoint)",
ErrorReportUrl="$(_DeploymentFormattedErrorReportUrl)",
FileAssociations="@(FileAssociation)",
Files="@(_DeploymentManifestFiles)",
HostInBrowser="$(HostInBrowser)",
IconFile="@(_DeploymentManifestIconFile)",
InputManifest="$(_DeploymentBaseManifest)",
IsolatedComReferences="@(ResolvedIsolatedComModules)",
LauncherBasedDeployment="$(_DeploymentLauncherBased)",
ManifestType="$(_DeploymentManifestType)",
MaxTargetPath="$(MaxTargetPath)",
OSVersion="$(OSVersion)",
OutputManifest="@(ApplicationManifest)",
Platform="$(_DeploymentPlatformTarget)",
Product="$(ProductName)",
Publisher="$(PublisherName)",
RequiresMinimumFramework35SP1="$(_DeploymentRequiresMinimumFramework35SP1)",
SuiteName="$(SuiteName)",
SupportUrl="$(_DeploymentFormattedSupportUrl)",
TargetCulture="$(TargetCulture)",
TargetFrameworkProfile="$(TargetFrameworkProfile)",
TargetFrameworkSubset="$(TargetFrameworkSubset)",
TargetFrameworkVersion="$(_DeploymentManifestTargetFrameworkVersion)",
TrustInfoFile="@(_DeploymentIntermediateTrustInfoFile)",
UseApplicationTrust="$(UseApplicationTrust)")
Output(ItemName="FileWrites", TaskParameter="OutputManifest")
if '$(PreferNativeArm64)'=='true':
AddToWin32Manifest(
ApplicationManifest="@(ApplicationManifest)",
OutputDirectory="$(IntermediateOutputPath)",
SupportedArchitectures="$(_SupportedArchitectures)")
PropertyGroup
_DeploymentCopyApplicationManifest = true
if '$(GenerateClickOnceManifests)'=='true':
Target _DeploymentSetClickOnceVersions
PropertyGroup
_DeploymentManifestTargetFrameworkMoniker = $(TargetFrameworkMoniker)
_DeploymentManifestTargetFrameworkVersion = $(TargetFrameworkVersion)
if '$(GenerateClickOnceManifests)'=='true' and '$(_DeploymentLauncherBased)' == 'true':
Target _DeploymentGenerateLauncher
if '$(UseAppHost)' == 'true' and '$(_IsExecutable)' == 'true' and exists('$(AppHostIntermediatePath)'):
ItemGroup
EntryPointForLauncher += "$(AppHostIntermediatePath)"(TargetPath="$(AssemblyName).exe")
ContentWithTargetPath += "@(EntryPointForLauncher)"
if '$(EntryPointForLauncher)'=='':
ItemGroup
EntryPointForLauncher += "$(_DeploymentManifestEntryPoint)"
GenerateLauncher(
AssemblyName="$(_DeploymentApplicationManifestIdentity)",
EntryPoint="@(EntryPointForLauncher)",
OutputPath="$(IntermediateOutputPath)",
VisualStudioVersion="$(VisualStudioVersion)")
Output(ItemName="_DeploymentManifestLauncherEntryPoint", TaskParameter="OutputEntryPoint")
PropertyGroup
if '$(DeploymentManifestTargetFrameworkVersionOverride)' == '':
_DeploymentManifestTargetFrameworkVersion = v4.5
if '$(DeploymentManifestTargetFrameworkVersionOverride)' != '':
_DeploymentManifestTargetFrameworkVersion = $(DeploymentManifestTargetFrameworkVersionOverride)
_DeploymentManifestTargetFrameworkMoniker = .NETFramework,Version=$(_DeploymentManifestTargetFrameworkVersion)
if '$(_DeploymentSignClickOnceManifests)'=='true':
SignFile(
CertificateThumbprint="$(_DeploymentResolvedManifestCertificateThumbprint)",
SigningTarget="@(_DeploymentManifestLauncherEntryPoint)",
TargetFrameworkIdentifier="$(TargetFrameworkIdentifier)",
TargetFrameworkVersion="$(TargetFrameworkVersion)",
TimestampUrl="$(ManifestTimestampUrl)")
if '$(_DeploymentSignClickOnceManifests)'=='true':
SignFile(
CertificateThumbprint="$(_DeploymentResolvedManifestCertificateThumbprint)",
SigningTarget="@(_DeploymentManifestEntryPoint)",
TargetFrameworkIdentifier="$(TargetFrameworkIdentifier)",
TargetFrameworkVersion="$(TargetFrameworkVersion)",
TimestampUrl="$(ManifestTimestampUrl)")
if '$(_DeploymentSignClickOnceManifests)'=='true' and '$(UseAppHost)' == 'true' and '$(PublishSingleFile)' != 'true' and '$(_IsExecutable)' == 'true' and exists('$(AppHostIntermediatePath)'):
SignFile(
CertificateThumbprint="$(_DeploymentResolvedManifestCertificateThumbprint)",
SigningTarget="$(AppHostIntermediatePath)",
TargetFrameworkIdentifier="$(TargetFrameworkIdentifier)",
TargetFrameworkVersion="$(TargetFrameworkVersion)",
TimestampUrl="$(ManifestTimestampUrl)")
ItemGroup
ContentWithTargetPath += "@(_DeploymentManifestEntryPoint)"
_DeploymentManifestEntryPoint -= "@(_DeploymentManifestEntryPoint)"
_DeploymentManifestEntryPoint += "@(_DeploymentManifestLauncherEntryPoint)"
if '$(GenerateClickOnceManifests)'!='true':
Target _DeploymentComputeNativeManifestInfo
ResolveManifestFiles(
NativeAssemblies="@(NativeReferenceFile);@(_DeploymentNativePrerequisite)")
Output(ItemName="_DeploymentManifestDependencies", TaskParameter="OutputAssemblies")
PropertyGroup
_DeploymentManifestType = Native
GetAssemblyIdentity(AssemblyFiles="@(IntermediateAssembly)")
Output(ItemName="_IntermediateAssemblyIdentity", TaskParameter="Assemblies")
PropertyGroup
_DeploymentManifestVersion = @(_IntermediateAssemblyIdentity->'%(Version)')
if '$(GenerateClickOnceManifests)'=='true':
Target _DeploymentComputeClickOnceManifestInfo(
DependsOnTargets="$(DeploymentComputeClickOnceManifestInfoDependsOn)")
ItemGroup
if '%(Extension)' == '.dll':
_SGenDllsRelatedToCurrentDll += "@(_ReferenceSerializationAssemblyPaths->'%(FullPath)')"
if '%(Extension)' == '.dll':
_SGenDllsRelatedToCurrentDll += "@(SerializationAssembly->'%(FullPath)')"
if !exists('$(ProjectLockFile)'):
ItemGroup
if '%(CopyLocal)' == 'false':
_CopyLocalFalseRefPaths += "@(ReferencePath)"
_CopyLocalFalseRefPathsWithExclusion += "@(_CopyLocalFalseRefPaths)"(
Exclude="@(ReferenceCopyLocalPaths);@(_NETStandardLibraryNETFrameworkLib)")
if '$(PublishSingleFile)' != 'true':
ItemGroup
_ClickOnceSatelliteAssemblies += "@(IntermediateSatelliteAssembliesWithTargetPath);@(ReferenceSatellitePaths)"
ItemGroup
if ('%(Extension)' == '.dll' Or '%(Extension)' == '.exe' Or '%(Extension)' == '.md') and ('%(ReferenceCopyLocalPaths.CopyToPublishDirectory)' != 'false'):
_DeploymentReferencePaths += "@(ReferenceCopyLocalPaths)"
IsPrimary = true
_DeploymentReferencePaths += "@(_CopyLocalFalseRefPathsWithExclusion)"
if '$(PublishSingleFile)' != 'true':
ItemGroup
_ManifestManagedReferences += "@(_DeploymentReferencePaths);@(ReferenceDependencyPaths);@(_SGenDllsRelatedToCurrentDll);@(SerializationAssembly);@(ReferenceCOMWrappersToCopyLocal)"(
Exclude="@(_ClickOnceSatelliteAssemblies);@(_ReferenceScatterPaths);@(_ExcludedAssembliesFromManifestGeneration)")
if '$(PublishSingleFile)' != 'true':
ItemGroup
if '%(RuntimeTargetsCopyLocalItems.CopyLocal)' == 'true':
_ClickOnceRuntimeCopyLocalItems += "@(RuntimeTargetsCopyLocalItems)"
if '%(NativeCopyLocalItems.CopyLocal)' == 'true':
_ClickOnceRuntimeCopyLocalItems += "@(NativeCopyLocalItems)"
_ClickOnceRuntimeCopyLocalItems -= "@(_DeploymentReferencePaths)"
if '$(PublishProtocol)' == 'ClickOnce':
_ClickOnceTransitiveContentItemsTemp += "@(_TransitiveItemsToCopyToOutputDirectory->WithoutMetadataValue('CopyToPublishDirectory', 'Never')->'%(TargetPath)')"
SavedIdentity = %(Identity)
if '%(Identity)'=='@(PublishFile)' Or '%(Extension)'=='.exe' Or '%(Extension)'=='.dll':
_ClickOnceTransitiveContentItems += "@(_ClickOnceTransitiveContentItemsTemp->'%(SavedIdentity)')"
_ClickOnceContentItems += "@(ContentWithTargetPath->WithoutMetadataValue('CopyToPublishDirectory', 'Never'))"
_ClickOnceContentItems += "@(_ClickOnceTransitiveContentItems)"
if '$(PublishProtocol)'=='Clickonce' And ('%(_NoneWithTargetPath.CopyToOutputDirectory)'=='Always' or '%(_NoneWithTargetPath.CopyToOutputDirectory)'=='PreserveNewest' or '%(_NoneWithTargetPath.CopyToOutputDirectory)'=='IfDifferent'):
_ClickOnceNoneItemsTemp += "@(_NoneWithTargetPath->WithoutMetadataValue('CopyToPublishDirectory', 'Never')->'%(TargetPath)')"
SavedIdentity = %(Identity)
if '%(Identity)'=='@(PublishFile)' Or '%(Extension)'=='.exe' Or '%(Extension)'=='.dll':
_ClickOnceNoneItems += "@(_ClickOnceNoneItemsTemp->'%(SavedIdentity)')"
_ClickOnceFiles += "@(_ClickOnceContentItems);@(_DeploymentManifestIconFile);@(AppConfigWithTargetPath);@(NetCoreRuntimeJsonFilesForClickOnce);@(_ClickOnceRuntimeCopyLocalItems);@(_ClickOnceNoneItems)"
_ClickOnceNoneItemsTemp -= "@(_ClickOnceNoneItemsTemp)"
_ClickOnceNoneItems -= "@(_ClickOnceNoneItems)"
_ClickOnceTransitiveContentItemsTemp -= "@(_ClickOnceTransitiveContentItemsTemp)"
_ClickOnceTransitiveContentItems -= "@(_ClickOnceTransitiveContentItems)"
_ClickOnceContentItems -= "@(_ClickOnceContentItems)"
_ClickOnceRuntimeCopyLocalItems -= "@(_ClickOnceRuntimeCopyLocalItems)"
if '$(PublishSingleFile)' == 'true':
ItemGroup
_ClickOnceFiles += "$(PublishedSingleFilePath);@(_DeploymentManifestIconFile)"
_ClickOnceFiles += "@(_FilesExcludedFromBundle)"
_FileAssociationIcons += "%(FileAssociation.DefaultIcon)"
if '%(Identity)'=='@(_FileAssociationIcons)':
_ClickOnceFiles += "@(ContentWithTargetPath)"
if '$(_DeploymentSignClickOnceManifests)'=='true' and '$(_DeploymentLauncherBased)' == 'true' and '$(PublishSingleFile)' == 'true':
SignFile(
CertificateThumbprint="$(_DeploymentResolvedManifestCertificateThumbprint)",
SigningTarget="$(PublishedSingleFilePath)",
TargetFrameworkIdentifier="$(TargetFrameworkIdentifier)",
TargetFrameworkVersion="$(TargetFrameworkVersion)",
TimestampUrl="$(ManifestTimestampUrl)")
if '$(PublishReadyToRun)' == 'true' and '$(PublishSingleFile)' != 'true':
ItemGroup
_ManifestManagedReferences -= "@(_ReadyToRunCompileList)"
_ClickOnceFiles -= "@(_ReadyToRunCompileList)"
_ClickOnceFiles += "@(_ReadyToRunFilesToPublish)"
if '%(Filename)%(Extension)' == '$(TargetFileName)':
_ClickOnceTargetFile += "@(_ReadyToRunFilesToPublish)"
if '$(_DeploymentSignClickOnceManifests)' == 'true' and '$(PublishReadyToRun)' == 'true' and '$(PublishSingleFile)' != 'true':
SignFile(
CertificateThumbprint="$(_DeploymentResolvedManifestCertificateThumbprint)",
SigningTarget="@(_ClickOnceTargetFile)",
TargetFrameworkIdentifier="$(TargetFrameworkIdentifier)",
TargetFrameworkVersion="$(TargetFrameworkVersion)",
TimestampUrl="$(ManifestTimestampUrl)")
Copy(
DestinationFolder="$(ClickOncePublishDir)",
SourceFiles="@(_DeploymentManifestEntryPoint)")
Output(
ItemName="_DeploymentClickOnceApplicationExecutable",
TaskParameter="DestinationFiles")
if '$(_DeploymentResolvedManifestCertificateThumbprint)'!='' and '$(_DeploymentSignClickOnceManifests)'=='true' and '$(TargetExt)' == '.exe':
SignFile(
CertificateThumbprint="$(_DeploymentResolvedManifestCertificateThumbprint)",
SigningTarget="@(_DeploymentClickOnceApplicationExecutable)",
TimestampUrl="$(ManifestTimestampUrl)")
ResolveManifestFiles(
AssemblyName="$(_DeploymentApplicationManifestIdentity)",
EntryPoint="@(_DeploymentClickOnceApplicationExecutable)",
ExtraFiles="@(_DebugSymbolsIntermediatePath);$(IntermediateOutputPath)$(TargetName).xml;@(_ReferenceRelatedPaths)",
Files="@(_ClickOnceFiles)",
IsSelfContainedPublish="$(SelfContained)",
IsSingleFilePublish="$(PublishSingleFile)",
LauncherBasedDeployment="$(_DeploymentLauncherBased)",
ManagedAssemblies="@(_ManifestManagedReferences)",
NativeAssemblies="@(NativeReferenceFile);@(_DeploymentNativePrerequisite)",
PublishFiles="@(PublishFile)",
RuntimePackAssets="@(RuntimePackAsset)",
SatelliteAssemblies="@(_ClickOnceSatelliteAssemblies)",
SigningManifests="$(SignManifests)",
TargetCulture="$(TargetCulture)",
TargetFrameworkIdentifier="$(TargetFrameworkIdentifier)",
TargetFrameworkVersion="$(TargetFrameworkVersion)")
Output(
ItemName="_DeploymentManifestDependenciesUnfiltered",
TaskParameter="OutputAssemblies")
Output(ItemName="_DeploymentManifestFiles", TaskParameter="OutputFiles")
Output(ItemName="_DeploymentResolvedManifestEntryPoint", TaskParameter="OutputEntryPoint")
ItemGroup
if !('%(_DeploymentManifestDependenciesUnfiltered.CopyLocal)' == 'false' And '%(_DeploymentManifestDependenciesUnfiltered.DependencyType)' != 'Install'):
_DeploymentManifestDependencies += "@(_DeploymentManifestDependenciesUnfiltered)"
PropertyGroup
_DeploymentManifestType = ClickOnce
PropertyGroup
if '$(_DeploymentLauncherBased)' != 'true':
_DeploymentPlatformTarget = $(PlatformTarget)
FormatVersion(Revision="$(ApplicationRevision)", Version="$(ApplicationVersion)")
Output(PropertyName="_DeploymentManifestVersion", TaskParameter="OutputVersion")
FormatUrl(InputUrl="$(_DeploymentUrl)")
Output(PropertyName="_DeploymentFormattedDeploymentUrl", TaskParameter="OutputUrl")
FormatUrl(InputUrl="$(SupportUrl)")
Output(PropertyName="_DeploymentFormattedSupportUrl", TaskParameter="OutputUrl")
FormatUrl(InputUrl="$(ErrorReportUrl)")
Output(PropertyName="_DeploymentFormattedErrorReportUrl", TaskParameter="OutputUrl")
if '$(TargetZone)'!='':
Target _DeploymentGenerateTrustInfo(
Inputs="
$(MSBuildAllProjects);
$(_DeploymentBaseManifest);
",
Outputs="@(_DeploymentIntermediateTrustInfoFile)")
GenerateTrustInfo(
ApplicationDependencies="@(ReferencePath);@(ReferenceDependencyPaths)",
BaseManifest="$(_DeploymentBaseManifest)",
ExcludedPermissions="$(ExcludedPermissions)",
TargetFrameworkMoniker="$(TargetFrameworkMoniker)",
TargetZone="$(TargetZone)",
TrustInfoFile="@(_DeploymentIntermediateTrustInfoFile)")
Output(ItemName="FileWrites", TaskParameter="TrustInfoFile")
Target GenerateDeploymentManifest(
DependsOnTargets="GenerateApplicationManifest",
Inputs="
$(MSBuildAllProjects);
@(ApplicationManifest)
",
Outputs="@(DeployManifest)")
if '$(GenerateClickOnceManifests)'=='true':
GenerateDeploymentManifest(
AssemblyName="$(_DeploymentDeployManifestIdentity)",
AssemblyVersion="$(_DeploymentManifestVersion)",
CreateDesktopShortcut="$(CreateDesktopShortcut)",
DeploymentUrl="$(_DeploymentFormattedDeploymentUrl)",
Description="$(Description)",
DisallowUrlActivation="$(DisallowUrlActivation)",
EntryPoint="@(_DeploymentResolvedDeploymentManifestEntryPoint)",
ErrorReportUrl="$(_DeploymentFormattedErrorReportUrl)",
Install="$(Install)",
LauncherBasedDeployment="$(_DeploymentLauncherBased)",
MapFileExtensions="$(MapFileExtensions)",
MaxTargetPath="$(MaxTargetPath)",
MinimumRequiredVersion="$(_DeploymentBuiltMinimumRequiredVersion)",
OutputManifest="@(DeployManifest)",
Platform="$(_DeploymentPlatformTarget)",
Product="$(ProductName)",
Publisher="$(PublisherName)",
SuiteName="$(SuiteName)",
SupportUrl="$(_DeploymentFormattedSupportUrl)",
TargetCulture="$(TargetCulture)",
TargetFrameworkMoniker="$(_DeploymentManifestTargetFrameworkMoniker)",
TargetFrameworkVersion="$(_DeploymentManifestTargetFrameworkVersion)",
TrustUrlParameters="$(TrustUrlParameters)",
UpdateEnabled="$(UpdateEnabled)",
UpdateInterval="$(_DeploymentBuiltUpdateInterval)",
UpdateMode="$(UpdateMode)",
UpdateUnit="$(_DeploymentBuiltUpdateIntervalUnits)")
Output(ItemName="FileWrites", TaskParameter="OutputManifest")
PropertyGroup
if '$(SkipCopyUnchangedFiles)' == '':
SkipCopyUnchangedFiles = true
if '$(UseCommonOutputDirectory)' == '':
UseCommonOutputDirectory = false
PropertyGroup
PrepareForRunDependsOn = CopyFilesToOutputDirectory
Target PrepareForRun(DependsOnTargets="$(PrepareForRunDependsOn)")
PropertyGroup
if '$(BuildingInsideVisualStudio)' == 'true' or '$(CreateHardLinksForCopyAdditionalFilesIfPossible)' == '':
CreateHardLinksForCopyAdditionalFilesIfPossible = false
if '$(BuildingInsideVisualStudio)' == 'true' or '$(CreateSymbolicLinksForCopyAdditionalFilesIfPossible)' == '':
CreateSymbolicLinksForCopyAdditionalFilesIfPossible = false
Target CopyFilesToOutputDirectory(
DependsOnTargets=[
ComputeIntermediateSatelliteAssemblies
_CopyFilesMarkedCopyLocal
_CopySourceItemsToOutputDirectory
_CopyAppConfigFile
_CopyManifestFiles
_CheckForCompileOutputs
_SGenCheckForOutputs
])
PropertyGroup
if '$(BuildingInsideVisualStudio)' == 'true' or '$(CreateHardLinksForCopyFilesToOutputDirectoryIfPossible)' == '':
CreateHardLinksForCopyFilesToOutputDirectoryIfPossible = false
if '$(BuildingInsideVisualStudio)' == 'true' or '$(CreateSymbolicLinksForCopyFilesToOutputDirectoryIfPossible)' == '':
CreateSymbolicLinksForCopyFilesToOutputDirectoryIfPossible = false
if '$(BuildingInsideVisualStudio)' == 'true' or '$(ErrorIfLinkFailsForCopyFilesToOutputDirectory)' == '':
ErrorIfLinkFailsForCopyFilesToOutputDirectory = false
PropertyGroup
if '$(CopyBuildOutputToOutputDirectory)'=='':
CopyBuildOutputToOutputDirectory = true
if '$(CopyOutputSymbolsToOutputDirectory)'=='':
CopyOutputSymbolsToOutputDirectory = true
if '$(CopyDocumentationFileToOutputDirectory)'=='':
CopyDocumentationFileToOutputDirectory = true
if '$(CopyBuildOutputToOutputDirectory)' == 'true' and '$(SkipCopyBuildProduct)' != 'true':
Copy(
DestinationFolder="$(OutDir)",
ErrorIfLinkFails="$(ErrorIfLinkFailsForCopyFilesToOutputDirectory)",
OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)",
Retries="$(CopyRetryCount)",
RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)",
SkipUnchangedFiles="$(SkipCopyUnchangedFiles)",
SourceFiles="@(IntermediateAssembly)",
UseHardlinksIfPossible="$(CreateHardLinksForCopyFilesToOutputDirectoryIfPossible)",
UseSymboliclinksIfPossible="$(CreateSymbolicLinksForCopyFilesToOutputDirectoryIfPossible)")
Output(ItemName="MainAssembly", TaskParameter="DestinationFiles")
Output(ItemName="FileWrites", TaskParameter="DestinationFiles")
Output(
PropertyName="_WroteMainAssemblyToOutputDirectory",
TaskParameter="WroteAtLeastOneFile")
if '$(ProduceReferenceAssembly)' == 'true' and '$(CopyBuildOutputToOutputDirectory)' == 'true' and '$(SkipCopyBuildProduct)' != 'true':
CopyRefAssembly(DestinationPath="$(TargetRefPath)", SourcePath="@(IntermediateRefAssembly)")
Output(ItemName="ReferenceAssembly", TaskParameter="DestinationPath")
Output(ItemName="FileWrites", TaskParameter="DestinationPath")
if '$(CopyBuildOutputToOutputDirectory)' == 'true' and '$(SkipCopyBuildProduct)'!='true':
Message(Importance="High", Text="$(MSBuildProjectName) -> @(MainAssembly->'%(FullPath)')")
if ('$(ProduceReferenceAssembly)' == 'true' and '$(_WroteMainAssemblyToOutputDirectory)' == 'true') or '$(_CopyLocalReferencesCopiedInThisBuild)' == 'true':
Touch(AlwaysCreate="true", Files="@(CopyUpToDateMarker)")
if '$(ProduceReferenceAssembly)' == 'true':
ItemGroup
FileWrites += "@(CopyUpToDateMarker)"
if '@(AddModules)' != '':
Copy(
DestinationFolder="$(OutDir)",
OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)",
Retries="$(CopyRetryCount)",
RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)",
SkipUnchangedFiles="$(SkipCopyUnchangedFiles)",
SourceFiles="@(AddModules)",
UseHardlinksIfPossible="$(CreateHardLinksForCopyAdditionalFilesIfPossible)",
UseSymboliclinksIfPossible="$(CreateSymbolicLinksForCopyAdditionalFilesIfPossible)")
Output(ItemName="FileWrites", TaskParameter="DestinationFiles")
if '$(_SGenDllCreated)'=='true':
Copy(
DestinationFiles="$(OutDir)$(_SGenDllName)",
ErrorIfLinkFails="$(ErrorIfLinkFailsForCopyFilesToOutputDirectory)",
OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)",
Retries="$(CopyRetryCount)",
RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)",
SkipUnchangedFiles="$(SkipCopyUnchangedFiles)",
SourceFiles="$(IntermediateOutputPath)$(_SGenDllName)",
UseHardlinksIfPossible="$(CreateHardLinksForCopyFilesToOutputDirectoryIfPossible)",
UseSymboliclinksIfPossible="$(CreateSymbolicLinksForCopyFilesToOutputDirectoryIfPossible)")
Output(ItemName="FileWrites", TaskParameter="DestinationFiles")
if '$(_DebugSymbolsProduced)'=='true' and '$(SkipCopyingSymbolsToOutputDirectory)' != 'true' and '$(CopyOutputSymbolsToOutputDirectory)'=='true':
Copy(
DestinationFiles="@(_DebugSymbolsOutputPath)",
ErrorIfLinkFails="$(ErrorIfLinkFailsForCopyFilesToOutputDirectory)",
OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)",
Retries="$(CopyRetryCount)",
RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)",
SkipUnchangedFiles="$(SkipCopyUnchangedFiles)",
SourceFiles="@(_DebugSymbolsIntermediatePath)",
UseHardlinksIfPossible="$(CreateHardLinksForCopyFilesToOutputDirectoryIfPossible)",
UseSymboliclinksIfPossible="$(CreateSymbolicLinksForCopyFilesToOutputDirectoryIfPossible)")
Output(ItemName="FileWrites", TaskParameter="DestinationFiles")
if '$(_DocumentationFileProduced)'=='true' and '$(CopyDocumentationFileToOutputDirectory)'=='true':
Copy(
DestinationFiles="@(FinalDocFile)",
ErrorIfLinkFails="$(ErrorIfLinkFailsForCopyFilesToOutputDirectory)",
OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)",
Retries="$(CopyRetryCount)",
RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)",
SkipUnchangedFiles="$(SkipCopyUnchangedFiles)",
SourceFiles="@(DocFileItem)",
UseHardlinksIfPossible="$(CreateHardLinksForCopyFilesToOutputDirectoryIfPossible)",
UseSymboliclinksIfPossible="$(CreateSymbolicLinksForCopyFilesToOutputDirectoryIfPossible)")
Output(ItemName="FileWrites", TaskParameter="DestinationFiles")
if '@(IntermediateSatelliteAssembliesWithTargetPath)' != '':
Copy(
DestinationFiles="@(IntermediateSatelliteAssembliesWithTargetPath->'$(OutDir)%(Culture)\$(TargetName).resources.dll')",
ErrorIfLinkFails="$(ErrorIfLinkFailsForCopyFilesToOutputDirectory)",
OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)",
Retries="$(CopyRetryCount)",
RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)",
SkipUnchangedFiles="$(SkipCopyUnchangedFiles)",
SourceFiles="@(IntermediateSatelliteAssembliesWithTargetPath)",
UseHardlinksIfPossible="$(CreateHardLinksForCopyFilesToOutputDirectoryIfPossible)",
UseSymboliclinksIfPossible="$(CreateSymbolicLinksForCopyFilesToOutputDirectoryIfPossible)")
Output(ItemName="FileWrites", TaskParameter="DestinationFiles")
if '@(ReferenceComWrappersToCopyLocal)' != '' or '@(ResolvedIsolatedComModules)' != '' or '@(_DeploymentLooseManifestFile)' != '' or '@(NativeReferenceFile)' != '':
Copy(
DestinationFolder="$(OutDir)",
OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)",
Retries="$(CopyRetryCount)",
RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)",
SkipUnchangedFiles="$(SkipCopyUnchangedFiles)",
SourceFiles="@(ReferenceComWrappersToCopyLocal); @(ResolvedIsolatedComModules); @(_DeploymentLooseManifestFile); @(NativeReferenceFile)",
UseHardlinksIfPossible="$(CreateHardLinksForCopyAdditionalFilesIfPossible)",
UseSymboliclinksIfPossible="$(CreateSymbolicLinksForCopyAdditionalFilesIfPossible)")
Output(ItemName="FileWritesShareable", TaskParameter="DestinationFiles")
if '$(SkipCopyWinMDArtifact)' != 'true' and '@(WinMDExpArtifacts)' != '':
Copy(
DestinationFolder="$(OutDir)",
ErrorIfLinkFails="$(ErrorIfLinkFailsForCopyFilesToOutputDirectory)",
OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)",
Retries="$(CopyRetryCount)",
RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)",
SkipUnchangedFiles="$(SkipCopyUnchangedFiles)",
SourceFiles="@(WinMDExpArtifacts)",
UseHardlinksIfPossible="$(CreateHardLinksForCopyFilesToOutputDirectoryIfPossible)",
UseSymboliclinksIfPossible="$(CreateSymbolicLinksForCopyFilesToOutputDirectoryIfPossible)")
Output(ItemName="FileWrites", TaskParameter="DestinationFiles")
Output(ItemName="FinalWinmdExpArtifacts", TaskParameter="DestinationFiles")
if '$(SkipCopyWinMDArtifact)' != 'true' and '$(_WindowsMetadataOutputPath)' != '':
Message(
Importance="High",
Text="$(MSBuildProjectName) -> $([System.IO.Path]::GetFullPath('$(_WindowsMetadataOutputPath)'))")
if '@(ReferenceCopyLocalPaths)' != '':
Target _CopyFilesMarkedCopyLocal
PropertyGroup
if '$(BuildingInsideVisualStudio)' == 'true' or '$(CreateHardLinksForCopyLocalIfPossible)' == '':
CreateHardLinksForCopyLocalIfPossible = false
if '$(BuildingInsideVisualStudio)' == 'true' or '$(CreateSymbolicLinksForCopyLocalIfPossible)' == '':
CreateSymbolicLinksForCopyLocalIfPossible = false
if '$(UseCommonOutputDirectory)' != 'true':
Copy(
DestinationFiles="@(ReferenceCopyLocalPaths->'$(OutDir)%(DestinationSubDirectory)%(Filename)%(Extension)')",
OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)",
Retries="$(CopyRetryCount)",
RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)",
SkipUnchangedFiles="$(SkipCopyUnchangedFiles)",
SourceFiles="@(ReferenceCopyLocalPaths)",
UseHardlinksIfPossible="$(CreateHardLinksForCopyLocalIfPossible)",
UseSymboliclinksIfPossible="$(CreateSymbolicLinksForCopyLocalIfPossible)")
Output(ItemName="FileWritesShareable", TaskParameter="DestinationFiles")
Output(ItemName="ReferencesCopiedInThisBuild", TaskParameter="CopiedFiles")
Output(PropertyName="WroteAtLeastOneFile", TaskParameter="WroteAtLeastOneFile")
PropertyGroup
if '@(ReferencesCopiedInThisBuild)' != '' and '$(WroteAtLeastOneFile)' == 'true':
_CopyLocalReferencesCopiedInThisBuild = true
ItemGroup
FileWrites += "@(CopyUpToDateMarker)"
Target _CopySourceItemsToOutputDirectory(
DependsOnTargets=[
GetCopyToOutputDirectoryItems
_CopyOutOfDateSourceItemsToOutputDirectory
_CopyOutOfDateSourceItemsToOutputDirectoryAlways
_CopyDifferingSourceItemsToOutputDirectory
])
PropertyGroup
_TargetsThatPrepareProjectReferences = _SplitProjectReferencesByFileExistence
if '$(MSBuildCopyContentTransitively)' == '':
MSBuildCopyContentTransitively = true
if '$(MSBuildCopyContentTransitively)' == 'true':
_TargetsThatPrepareProjectReferences =
| AssignProjectConfiguration;
| _SplitProjectReferencesByFileExistence
GetCopyToOutputDirectoryItemsDependsOn =
| $(GetCopyToOutputDirectoryItemsDependsOn);
| AssignTargetPaths;
| $(_TargetsThatPrepareProjectReferences);
| _GetProjectReferenceTargetFrameworkProperties;
| _PopulateCommonStateForGetCopyToOutputDirectoryItems
_RecursiveTargetForContentCopying = GetCopyToOutputDirectoryItems
if '$(MSBuildCopyContentTransitively)' == 'false':
_RecursiveTargetForContentCopying = _GetCopyToOutputDirectoryItemsFromThisProject
if '$(IsGraphBuild)' == 'true' and '$(IsCrossTargetingBuild)' != 'true':
PropertyGroup
if '$(BuildProjectReferences)' == '' or '$(BuildProjectReferences)' == 'true':
_MainReferenceTargetForBuild = .projectReferenceTargetsOrDefaultTargets
if '$(_MainReferenceTargetForBuild)' == '':
_MainReferenceTargetForBuild = GetTargetPath
ProjectReferenceTargetsForBuild = $(_MainReferenceTargetForBuild);GetNativeManifest;$(_RecursiveTargetForContentCopying);$(ProjectReferenceTargetsForBuild)
if '$(IsGraphBuild)' == 'true':
PropertyGroup
ProjectReferenceTargetsForClean = Clean;$(ProjectReferenceTargetsForClean)
ProjectReferenceTargetsForRebuild = $(ProjectReferenceTargetsForClean);$(ProjectReferenceTargetsForBuild);$(ProjectReferenceTargetsForRebuild)
if '$(IsGraphBuild)' == 'true':
ItemGroup
if '$(ProjectReferenceTargetsForBuildInOuterBuild)' != '':
ProjectReferenceTargets += "Build"(
OuterBuild="true",
Targets="$(ProjectReferenceTargetsForBuildInOuterBuild)")
if '$(IsCrossTargetingBuild)' != 'true':
ProjectReferenceTargets += "Build"(
OuterBuild="true",
SkipNonexistentTargets="true",
Targets="GetTargetFrameworks")
if '$(ProjectReferenceTargetsForBuild)' != '':
ProjectReferenceTargets += "Build"(Targets="$(ProjectReferenceTargetsForBuild)")
if '$(ProjectReferenceTargetsForCleanInOuterBuild)' != '':
ProjectReferenceTargets += "Clean"(
OuterBuild="true",
Targets="$(ProjectReferenceTargetsForCleanInOuterBuild)")
if '$(IsCrossTargetingBuild)' != 'true':
ProjectReferenceTargets += "Clean"(
OuterBuild="true",
SkipNonexistentTargets="true",
Targets="GetTargetFrameworks")
if '$(ProjectReferenceTargetsForClean)' != '':
ProjectReferenceTargets += "Clean"(Targets="$(ProjectReferenceTargetsForClean)")
if '$(IsCrossTargetingBuild)' != 'true':
ProjectReferenceTargets += "Build"(
SkipNonexistentTargets="true",
Targets="GetTargetFrameworksWithPlatformForSingleTargetFramework")
if '$(IsCrossTargetingBuild)' != 'true':
ProjectReferenceTargets += "Clean"(
SkipNonexistentTargets="true",
Targets="GetTargetFrameworksWithPlatformForSingleTargetFramework")
if '$(IsCrossTargetingBuild)' != 'true':
ProjectReferenceTargets += "Rebuild"(
SkipNonexistentTargets="true",
Targets="GetTargetFrameworksWithPlatformForSingleTargetFramework")
if '$(ProjectReferenceTargetsForRebuild)' != '':
ProjectReferenceTargets += "Rebuild"(Targets="$(ProjectReferenceTargetsForRebuild)")
Target _PopulateCommonStateForGetCopyToOutputDirectoryItems
if '$(MSBuildDisableGetCopyToOutputDirectoryItemsOptimization)' == '':
PropertyGroup
_GCTODIKeepDuplicates = false
_GCTODIKeepMetadata = CopyToOutputDirectory;TargetPath
Target _GetCopyToOutputDirectoryItemsFromTransitiveProjectReferences(
DependsOnTargets=[
_PopulateCommonStateForGetCopyToOutputDirectoryItems
_AddOutputPathToGlobalPropertiesToRemove
],
Returns="@(_CopyToOutputDirectoryTransitiveItems)")
if '@(_MSBuildProjectReferenceExistent)' != '' and '$(_GetChildProjectCopyToOutputDirectoryItems)' == 'true' and '%(_MSBuildProjectReferenceExistent.Private)' != 'false' and '$(UseCommonOutputDirectory)' != 'true':
MSBuild(
BuildInParallel="$(BuildInParallel)",
ContinueOnError="$(ContinueOnError)",
Projects="@(_MSBuildProjectReferenceExistent)",
Properties="%(_MSBuildProjectReferenceExistent.SetConfiguration); %(_MSBuildProjectReferenceExistent.SetPlatform); %(_MSBuildProjectReferenceExistent.SetTargetFramework)",
RemoveProperties="%(_MSBuildProjectReferenceExistent.GlobalPropertiesToRemove)$(_GlobalPropertiesToRemoveFromProjectReferences)",
SkipNonexistentTargets="true",
Targets="$(_RecursiveTargetForContentCopying)")
Output(ItemName="_AllChildProjectItemsWithTargetPath", TaskParameter="TargetOutputs")
ItemGroup
if '%(_AllChildProjectItemsWithTargetPath.CopyToOutputDirectory)'=='Always':
_CopyToOutputDirectoryTransitiveItems += "@(_AllChildProjectItemsWithTargetPath->'%(FullPath)')"(
KeepDuplicates=" '$(_GCTODIKeepDuplicates)' != 'false' ",
KeepMetadata="$(_GCTODIKeepMetadata)")
if '%(_AllChildProjectItemsWithTargetPath.CopyToOutputDirectory)'=='PreserveNewest':
_CopyToOutputDirectoryTransitiveItems += "@(_AllChildProjectItemsWithTargetPath->'%(FullPath)')"(
KeepDuplicates=" '$(_GCTODIKeepDuplicates)' != 'false' ",
KeepMetadata="$(_GCTODIKeepMetadata)")
if '%(_AllChildProjectItemsWithTargetPath.CopyToOutputDirectory)'=='IfDifferent':
_CopyToOutputDirectoryTransitiveItems += "@(_AllChildProjectItemsWithTargetPath->'%(FullPath)')"(
KeepDuplicates=" '$(_GCTODIKeepDuplicates)' != 'false' ",
KeepMetadata="$(_GCTODIKeepMetadata)")
ItemGroup
_AllChildProjectItemsWithTargetPath -= "@(_AllChildProjectItemsWithTargetPath)"
ItemGroup
if '%(ContentWithTargetPath.CopyToOutputDirectory)'=='Always' AND '%(ContentWithTargetPath.MSBuildSourceProjectFile)'!='':
_CopyToOutputDirectoryTransitiveItems += "@(ContentWithTargetPath->'%(FullPath)')"(
KeepMetadata="$(_GCTODIKeepMetadata)")
if '%(ContentWithTargetPath.CopyToOutputDirectory)'=='PreserveNewest' AND '%(ContentWithTargetPath.MSBuildSourceProjectFile)'!='':
_CopyToOutputDirectoryTransitiveItems += "@(ContentWithTargetPath->'%(FullPath)')"(
KeepMetadata="$(_GCTODIKeepMetadata)")
if '%(ContentWithTargetPath.CopyToOutputDirectory)'=='IfDifferent' AND '%(ContentWithTargetPath.MSBuildSourceProjectFile)'!='':
_CopyToOutputDirectoryTransitiveItems += "@(ContentWithTargetPath->'%(FullPath)')"(
KeepMetadata="$(_GCTODIKeepMetadata)")
ItemGroup
if '%(EmbeddedResource.CopyToOutputDirectory)'=='Always' AND '%(EmbeddedResource.MSBuildSourceProjectFile)'!='':
_CopyToOutputDirectoryTransitiveItems += "@(EmbeddedResource->'%(FullPath)')"(
KeepMetadata="$(_GCTODIKeepMetadata)")
if '%(EmbeddedResource.CopyToOutputDirectory)'=='PreserveNewest' AND '%(EmbeddedResource.MSBuildSourceProjectFile)'!='':
_CopyToOutputDirectoryTransitiveItems += "@(EmbeddedResource->'%(FullPath)')"(
KeepMetadata="$(_GCTODIKeepMetadata)")
if '%(EmbeddedResource.CopyToOutputDirectory)'=='IfDifferent' AND '%(EmbeddedResource.MSBuildSourceProjectFile)'!='':
_CopyToOutputDirectoryTransitiveItems += "@(EmbeddedResource->'%(FullPath)')"(
KeepMetadata="$(_GCTODIKeepMetadata)")
ItemGroup
if ('%(Compile.CopyToOutputDirectory)'=='Always' or '%(Compile.CopyToOutputDirectory)'=='PreserveNewest' or '%(Compile.CopyToOutputDirectory)'=='IfDifferent') AND '%(Compile.MSBuildSourceProjectFile)'!='':
_CompileItemsToCopy += "@(Compile->'%(FullPath)')"
AssignTargetPath(Files="@(_CompileItemsToCopy)", RootFolder="$(MSBuildProjectDirectory)")
Output(ItemName="_CompileItemsToCopyWithTargetPath", TaskParameter="AssignedFiles")
ItemGroup
if '%(_CompileItemsToCopyWithTargetPath.CopyToOutputDirectory)'=='Always':
_CopyToOutputDirectoryTransitiveItems += "@(_CompileItemsToCopyWithTargetPath)"(
KeepMetadata="$(_GCTODIKeepMetadata)")
if '%(_CompileItemsToCopyWithTargetPath.CopyToOutputDirectory)'=='PreserveNewest':
_CopyToOutputDirectoryTransitiveItems += "@(_CompileItemsToCopyWithTargetPath)"(
KeepMetadata="$(_GCTODIKeepMetadata)")
if '%(_CompileItemsToCopyWithTargetPath.CopyToOutputDirectory)'=='IfDifferent':
_CopyToOutputDirectoryTransitiveItems += "@(_CompileItemsToCopyWithTargetPath)"(
KeepMetadata="$(_GCTODIKeepMetadata)")
ItemGroup
if '%(_NoneWithTargetPath.CopyToOutputDirectory)'=='Always' AND '%(_NoneWithTargetPath.MSBuildSourceProjectFile)'!='':
_CopyToOutputDirectoryTransitiveItems += "@(_NoneWithTargetPath->'%(FullPath)')"(
KeepMetadata="$(_GCTODIKeepMetadata)")
if '%(_NoneWithTargetPath.CopyToOutputDirectory)'=='PreserveNewest' AND '%(_NoneWithTargetPath.MSBuildSourceProjectFile)'!='':
_CopyToOutputDirectoryTransitiveItems += "@(_NoneWithTargetPath->'%(FullPath)')"(
KeepMetadata="$(_GCTODIKeepMetadata)")
if '%(_NoneWithTargetPath.CopyToOutputDirectory)'=='IfDifferent' AND '%(_NoneWithTargetPath.MSBuildSourceProjectFile)'!='':
_CopyToOutputDirectoryTransitiveItems += "@(_NoneWithTargetPath->'%(FullPath)')"(
KeepMetadata="$(_GCTODIKeepMetadata)")
Target _GetCopyToOutputDirectoryItemsFromThisProject(
DependsOnTargets=[
AssignTargetPaths
_PopulateCommonStateForGetCopyToOutputDirectoryItems
],
Returns="@(_ThisProjectItemsToCopyToOutputDirectory)")
ItemGroup
if '%(ContentWithTargetPath.CopyToOutputDirectory)'=='Always' AND '%(ContentWithTargetPath.MSBuildSourceProjectFile)'=='':
_ThisProjectItemsToCopyToOutputDirectory += "@(ContentWithTargetPath->'%(FullPath)')"(
KeepMetadata="$(_GCTODIKeepMetadata)")
if '%(ContentWithTargetPath.CopyToOutputDirectory)'=='PreserveNewest' AND '%(ContentWithTargetPath.MSBuildSourceProjectFile)'=='':
_ThisProjectItemsToCopyToOutputDirectory += "@(ContentWithTargetPath->'%(FullPath)')"(
KeepMetadata="$(_GCTODIKeepMetadata)")
if '%(ContentWithTargetPath.CopyToOutputDirectory)'=='IfDifferent' AND '%(ContentWithTargetPath.MSBuildSourceProjectFile)'=='':
_ThisProjectItemsToCopyToOutputDirectory += "@(ContentWithTargetPath->'%(FullPath)')"(
KeepMetadata="$(_GCTODIKeepMetadata)")
ItemGroup
if '%(EmbeddedResource.CopyToOutputDirectory)'=='Always' AND '%(EmbeddedResource.MSBuildSourceProjectFile)'=='':
_ThisProjectItemsToCopyToOutputDirectory += "@(EmbeddedResource->'%(FullPath)')"(
KeepMetadata="$(_GCTODIKeepMetadata)")
if '%(EmbeddedResource.CopyToOutputDirectory)'=='PreserveNewest' AND '%(EmbeddedResource.MSBuildSourceProjectFile)'=='':
_ThisProjectItemsToCopyToOutputDirectory += "@(EmbeddedResource->'%(FullPath)')"(
KeepMetadata="$(_GCTODIKeepMetadata)")
if '%(EmbeddedResource.CopyToOutputDirectory)'=='IfDifferent' AND '%(EmbeddedResource.MSBuildSourceProjectFile)'=='':
_ThisProjectItemsToCopyToOutputDirectory += "@(EmbeddedResource->'%(FullPath)')"(
KeepMetadata="$(_GCTODIKeepMetadata)")
ItemGroup
if ('%(Compile.CopyToOutputDirectory)'=='Always' or '%(Compile.CopyToOutputDirectory)'=='PreserveNewest' or '%(Compile.CopyToOutputDirectory)'=='IfDifferent') AND '%(Compile.MSBuildSourceProjectFile)'=='':
_CompileItemsToCopy += "@(Compile->'%(FullPath)')"
AssignTargetPath(Files="@(_CompileItemsToCopy)", RootFolder="$(MSBuildProjectDirectory)")
Output(ItemName="_CompileItemsToCopyWithTargetPath", TaskParameter="AssignedFiles")
ItemGroup
if '%(_CompileItemsToCopyWithTargetPath.CopyToOutputDirectory)'=='Always':
_ThisProjectItemsToCopyToOutputDirectory += "@(_CompileItemsToCopyWithTargetPath)"(
KeepMetadata="$(_GCTODIKeepMetadata)")
if '%(_CompileItemsToCopyWithTargetPath.CopyToOutputDirectory)'=='PreserveNewest':
_ThisProjectItemsToCopyToOutputDirectory += "@(_CompileItemsToCopyWithTargetPath)"(
KeepMetadata="$(_GCTODIKeepMetadata)")
if '%(_CompileItemsToCopyWithTargetPath.CopyToOutputDirectory)'=='IfDifferent':
_ThisProjectItemsToCopyToOutputDirectory += "@(_CompileItemsToCopyWithTargetPath)"(
KeepMetadata="$(_GCTODIKeepMetadata)")
ItemGroup
if '%(_NoneWithTargetPath.CopyToOutputDirectory)'=='Always' AND '%(_NoneWithTargetPath.MSBuildSourceProjectFile)'=='':
_ThisProjectItemsToCopyToOutputDirectory += "@(_NoneWithTargetPath->'%(FullPath)')"(
KeepMetadata="$(_GCTODIKeepMetadata)")
if '%(_NoneWithTargetPath.CopyToOutputDirectory)'=='PreserveNewest' AND '%(_NoneWithTargetPath.MSBuildSourceProjectFile)'=='':
_ThisProjectItemsToCopyToOutputDirectory += "@(_NoneWithTargetPath->'%(FullPath)')"(
KeepMetadata="$(_GCTODIKeepMetadata)")
if '%(_NoneWithTargetPath.CopyToOutputDirectory)'=='IfDifferent' AND '%(_NoneWithTargetPath.MSBuildSourceProjectFile)'=='':
_ThisProjectItemsToCopyToOutputDirectory += "@(_NoneWithTargetPath->'%(FullPath)')"(
KeepMetadata="$(_GCTODIKeepMetadata)")
Target GetCopyToOutputDirectoryItems(
DependsOnTargets="$(GetCopyToOutputDirectoryItemsDependsOn)",
KeepDuplicateOutputs=" '$(MSBuildDisableGetCopyToOutputDirectoryItemsOptimization)' == '' ",
Returns="@(AllItemsFullPathWithTargetPath)")
CallTarget(Targets="_GetCopyToOutputDirectoryItemsFromTransitiveProjectReferences")
Output(ItemName="_TransitiveItemsToCopyToOutputDirectory", TaskParameter="TargetOutputs")
CallTarget(Targets="_GetCopyToOutputDirectoryItemsFromThisProject")
Output(ItemName="_ThisProjectItemsToCopyToOutputDirectory", TaskParameter="TargetOutputs")
if '$(CopyConflictingTransitiveContent)' == 'false':
ItemGroup
_TransitiveItemsToCopyToOutputDirectory -= "@(_ThisProjectItemsToCopyToOutputDirectory)"(
MatchOnMetadata="TargetPath",
MatchOnMetadataOptions="PathLike")
ItemGroup
if '%(_TransitiveItemsToCopyToOutputDirectory.CopyToOutputDirectory)'=='Always':
_TransitiveItemsToCopyToOutputDirectoryAlways += "@(_TransitiveItemsToCopyToOutputDirectory->'%(FullPath)')"(
KeepDuplicates=" '$(_GCTODIKeepDuplicates)' != 'false' ",
KeepMetadata="$(_GCTODIKeepMetadata)")
if '%(_TransitiveItemsToCopyToOutputDirectory.CopyToOutputDirectory)'=='PreserveNewest':
_TransitiveItemsToCopyToOutputDirectoryPreserveNewest += "@(_TransitiveItemsToCopyToOutputDirectory->'%(FullPath)')"(
KeepDuplicates=" '$(_GCTODIKeepDuplicates)' != 'false' ",
KeepMetadata="$(_GCTODIKeepMetadata)")
if '%(_TransitiveItemsToCopyToOutputDirectory.CopyToOutputDirectory)'=='IfDifferent':
_TransitiveItemsToCopyToOutputDirectoryIfDifferent += "@(_TransitiveItemsToCopyToOutputDirectory->'%(FullPath)')"(
KeepDuplicates=" '$(_GCTODIKeepDuplicates)' != 'false' ",
KeepMetadata="$(_GCTODIKeepMetadata)")
if '%(_ThisProjectItemsToCopyToOutputDirectory.CopyToOutputDirectory)'=='Always':
_ThisProjectItemsToCopyToOutputDirectoryAlways += "@(_ThisProjectItemsToCopyToOutputDirectory->'%(FullPath)')"(
KeepDuplicates=" '$(_GCTODIKeepDuplicates)' != 'false' ",
KeepMetadata="$(_GCTODIKeepMetadata)")
if '%(_ThisProjectItemsToCopyToOutputDirectory.CopyToOutputDirectory)'=='PreserveNewest':
_ThisProjectItemsToCopyToOutputDirectoryPreserveNewest += "@(_ThisProjectItemsToCopyToOutputDirectory->'%(FullPath)')"(
KeepDuplicates=" '$(_GCTODIKeepDuplicates)' != 'false' ",
KeepMetadata="$(_GCTODIKeepMetadata)")
if '%(_ThisProjectItemsToCopyToOutputDirectory.CopyToOutputDirectory)'=='IfDifferent':
_ThisProjectItemsToCopyToOutputDirectoryIfDifferent += "@(_ThisProjectItemsToCopyToOutputDirectory->'%(FullPath)')"(
KeepDuplicates=" '$(_GCTODIKeepDuplicates)' != 'false' ",
KeepMetadata="$(_GCTODIKeepMetadata)")
_SourceItemsToCopyToOutputDirectoryAlways += "@(_TransitiveItemsToCopyToOutputDirectoryAlways);@(_ThisProjectItemsToCopyToOutputDirectoryAlways)"
_SourceItemsToCopyToOutputDirectory += "@(_TransitiveItemsToCopyToOutputDirectoryPreserveNewest);@(_ThisProjectItemsToCopyToOutputDirectoryPreserveNewest)"
_SourceItemsToCopyToOutputDirectoryIfDifferent += "@(_TransitiveItemsToCopyToOutputDirectoryIfDifferent);@(_ThisProjectItemsToCopyToOutputDirectoryIfDifferent)"
AllItemsFullPathWithTargetPath += "@(_SourceItemsToCopyToOutputDirectoryAlways->'%(FullPath)');@(_SourceItemsToCopyToOutputDirectory->'%(FullPath)');@(_SourceItemsToCopyToOutputDirectoryIfDifferent->'%(FullPath)')"
_TransitiveItemsToCopyToOutputDirectoryAlways -= "@(_TransitiveItemsToCopyToOutputDirectoryAlways)"
_TransitiveItemsToCopyToOutputDirectoryPreserveNewest -= "@(_TransitiveItemsToCopyToOutputDirectoryPreserveNewest)"
_TransitiveItemsToCopyToOutputDirectoryIfDifferent -= "@(_TransitiveItemsToCopyToOutputDirectoryIfDifferent)"
_ThisProjectItemsToCopyToOutputDirectoryAlways -= "@(_ThisProjectItemsToCopyToOutputDirectoryAlways)"
_ThisProjectItemsToCopyToOutputDirectoryPreserveNewest -= "@(_ThisProjectItemsToCopyToOutputDirectoryPreserveNewest)"
_ThisProjectItemsToCopyToOutputDirectory -= "@(_ThisProjectItemsToCopyToOutputDirectory)"
_ThisProjectItemsToCopyToOutputDirectoryIfDifferent -= "@(_ThisProjectItemsToCopyToOutputDirectoryIfDifferent)"
Target GetCopyToPublishDirectoryItems(
DependsOnTargets="GetCopyToOutputDirectoryItems",
Returns="@(AllPublishItemsFullPathWithTargetPath)")
ItemGroup
AllPublishItemsFullPathWithTargetPath += "@(AllItemsFullPathWithTargetPath)"
CopyToPublishDirectory = %(CopyToOutputDirectory)
if '@(_SourceItemsToCopyToOutputDirectory)' != '':
Target _CopyOutOfDateSourceItemsToOutputDirectory(
Inputs="@(_SourceItemsToCopyToOutputDirectory)",
Outputs="@(_SourceItemsToCopyToOutputDirectory->'$(OutDir)%(TargetPath)')")
Copy(
DestinationFiles="@(_SourceItemsToCopyToOutputDirectory->'$(OutDir)%(TargetPath)')",
OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)",
Retries="$(CopyRetryCount)",
RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)",
SourceFiles="@(_SourceItemsToCopyToOutputDirectory)",
UseHardlinksIfPossible="$(CreateHardLinksForAdditionalFilesIfPossible)",
UseSymboliclinksIfPossible="$(CreateSymbolicLinksForAdditionalFilesIfPossible)")
Output(ItemName="FileWrites", TaskParameter="DestinationFiles")
if '@(_SourceItemsToCopyToOutputDirectoryAlways)' != '':
Target _CopyOutOfDateSourceItemsToOutputDirectoryAlways
PropertyGroup
if '$(SkipUnchangedFilesOnCopyAlways)' == '':
SkipUnchangedFilesOnCopyAlways = false
Copy(
DestinationFiles="@(_SourceItemsToCopyToOutputDirectoryAlways->'$(OutDir)%(TargetPath)')",
OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)",
Retries="$(CopyRetryCount)",
RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)",
SkipUnchangedFiles="$(SkipUnchangedFilesOnCopyAlways)",
SourceFiles="@(_SourceItemsToCopyToOutputDirectoryAlways)",
UseHardlinksIfPossible="$(CreateHardLinksForAdditionalFilesIfPossible)",
UseSymboliclinksIfPossible="$(CreateSymbolicLinksForAdditionalFilesIfPossible)")
Output(ItemName="FileWrites", TaskParameter="DestinationFiles")
if '@(_SourceItemsToCopyToOutputDirectoryIfDifferent)' != '':
Target _CopyDifferingSourceItemsToOutputDirectory
Copy(
DestinationFiles="@(_SourceItemsToCopyToOutputDirectoryIfDifferent->'$(OutDir)%(TargetPath)')",
OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)",
Retries="$(CopyRetryCount)",
RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)",
SkipUnchangedFiles="true",
SourceFiles="@(_SourceItemsToCopyToOutputDirectoryIfDifferent)",
UseHardlinksIfPossible="$(CreateHardLinksForAdditionalFilesIfPossible)",
UseSymboliclinksIfPossible="$(CreateSymbolicLinksForAdditionalFilesIfPossible)")
Output(ItemName="FileWrites", TaskParameter="DestinationFiles")
if '@(AppConfigWithTargetPath)' != '':
Target _CopyAppConfigFile(
Inputs="@(AppConfigWithTargetPath)",
Outputs="@(AppConfigWithTargetPath->'$(OutDir)%(TargetPath)')")
Copy(
DestinationFiles="@(AppConfigWithTargetPath->'$(OutDir)%(TargetPath)')",
OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)",
Retries="$(CopyRetryCount)",
RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)",
SourceFiles="@(AppConfigWithTargetPath)",
UseHardlinksIfPossible="$(CreateHardLinksForAdditionalFilesIfPossible)",
UseSymboliclinksIfPossible="$(CreateSymbolicLinksForAdditionalFilesIfPossible)")
Output(ItemName="FileWrites", TaskParameter="DestinationFiles")
if '$(_DeploymentCopyApplicationManifest)'=='true' or '$(GenerateClickOnceManifests)'=='true':
Target _CopyManifestFiles(DependsOnTargets="PrepareForBuild")
if '$(GenerateClickOnceManifests)'=='true' or '$(_DeploymentCopyApplicationManifest)'=='true':
Copy(
DestinationFolder="$(OutDir)",
OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)",
Retries="$(CopyRetryCount)",
RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)",
SkipUnchangedFiles="$(SkipCopyUnchangedFiles)",
SourceFiles="@(ApplicationManifest)",
UseHardlinksIfPossible="$(CreateHardLinksForAdditionalFilesIfPossible)",
UseSymboliclinksIfPossible="$(CreateSymbolicLinksForAdditionalFilesIfPossible)")
Output(ItemName="_DeploymentMainApplicationManifest", TaskParameter="DestinationFiles")
Output(ItemName="FileWrites", TaskParameter="DestinationFiles")
if '$(_DeploymentCopyApplicationManifest)'=='true':
Message(
Importance="Normal",
Text="$(MSBuildProjectName) -> @(_DeploymentMainApplicationManifest->'%(FullPath)')")
if '$(GenerateClickOnceManifests)'=='true':
Copy(
DestinationFolder="$(OutDir)",
OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)",
Retries="$(CopyRetryCount)",
RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)",
SkipUnchangedFiles="$(SkipCopyUnchangedFiles)",
SourceFiles="@(DeployManifest)",
UseHardlinksIfPossible="$(CreateHardLinksForAdditionalFilesIfPossible)",
UseSymboliclinksIfPossible="$(CreateSymbolicLinksForAdditionalFilesIfPossible)")
Output(ItemName="_DeploymentMainDeployManifest", TaskParameter="DestinationFiles")
Output(ItemName="FileWrites", TaskParameter="DestinationFiles")
if '$(GenerateClickOnceManifests)'=='true':
Message(
Importance="Normal",
Text="$(MSBuildProjectName) -> @(_DeploymentMainDeployManifest->'%(FullPath)')")
Target _CheckForCompileOutputs
ItemGroup
if Exists('@(IntermediateAssembly)'):
FileWrites += "@(IntermediateAssembly)"
if '$(ProduceReferenceAssembly)' == 'true' and Exists('@(IntermediateRefAssembly)'):
FileWrites += "@(IntermediateRefAssembly)"
PropertyGroup
if !Exists('@(DocFileItem)'):
_DocumentationFileProduced = false
ItemGroup
if '$(_DocumentationFileProduced)'=='true':
FileWrites += "@(DocFileItem)"
PropertyGroup
if !Exists('@(_DebugSymbolsIntermediatePath)'):
_DebugSymbolsProduced = false
ItemGroup
if '$(_DebugSymbolsProduced)'=='true':
FileWrites += "@(_DebugSymbolsIntermediatePath)"
if '$(_SGenGenerateSerializationAssembliesConfig)' == 'On' or ('@(WebReferenceUrl)'!='' and '$(_SGenGenerateSerializationAssembliesConfig)' == 'Auto'):
Target _SGenCheckForOutputs
PropertyGroup
if Exists('$(IntermediateOutputPath)$(_SGenDllName)'):
_SGenDllCreated = true
ItemGroup
if Exists('$(IntermediateOutputPath)$(_SGenDllName)'):
FileWrites += "$(IntermediateOutputPath)$(_SGenDllName)"
PropertyGroup
UnmanagedRegistrationDependsOn
if '$(RegisterForComInterop)'=='true' and '$(OutputType)'=='library':
Target UnmanagedRegistration(DependsOnTargets="$(UnmanagedRegistrationDependsOn)")
PropertyGroup
if '$(RegisterAssemblyMSBuildArchitecture)' == '':
RegisterAssemblyMSBuildArchitecture = $(PlatformTargetAsMSBuildArchitecture)
if '$(TargetFrameworkAsMSBuildRuntime)' != '' and '$(RegisterAssemblyMSBuildArchitecture)' != '':
PropertyGroup
if '$(RegisterAssemblyMSBuildRuntime)' == '' and $([MSBuild]::DoesTaskHostExist(`$(TargetFrameworkAsMSBuildRuntime)`, `$(RegisterAssemblyMSBuildArchitecture)`)):
RegisterAssemblyMSBuildRuntime = $(TargetFrameworkAsMSBuildRuntime)
if '$(RegisterAssemblyMSBuildRuntime)' == '':
RegisterAssemblyMSBuildRuntime = CurrentRuntime
if !Exists('@(_UnmanagedRegistrationCache)'):
RegisterAssembly(
Assemblies="@(_OutputPathItem->'%(FullPath)$(TargetFileName)')",
AssemblyListFile="@(_UnmanagedRegistrationCache)",
CreateCodeBase="true",
MSBuildArchitecture="$(RegisterAssemblyMSBuildArchitecture)",
MSBuildRuntime="$(RegisterAssemblyMSBuildRuntime)",
TypeLibFiles="@(_OutputPathItem->'%(FullPath)$(TargetName).tlb')")
ItemGroup
FileWrites += "@(_OutputPathItem->'%(FullPath)$(TargetName).tlb')"
Target IncrementalClean(
DependsOnTargets=[
$(IncrementalCleanDependsOn)
_CleanGetCurrentAndPriorFileWrites
])
ItemGroup
_CleanOrphanFileWrites += "@(_CleanPriorFileWrites)"(Exclude="@(_CleanCurrentFileWrites)")
FindUnderPath(Files="@(_CleanOrphanFileWrites)", Path="$(OutDir)")
Output(ItemName="_CleanOrphanFileWritesInOutput", TaskParameter="InPath")
FindUnderPath(Files="@(_CleanOrphanFileWrites)", Path="$(IntermediateOutputPath)")
Output(ItemName="_CleanOrphanFileWritesInIntermediate", TaskParameter="InPath")
Delete(
Files="@(_CleanOrphanFileWritesInIntermediate);@(_CleanOrphanFileWritesInOutput)",
TreatErrorsAsWarnings="true")
Output(ItemName="_CleanOrphanFilesDeleted", TaskParameter="DeletedFiles")
ItemGroup
_CleanRemainingFileWritesAfterIncrementalClean += "@(_CleanPriorFileWrites);@(_CleanCurrentFileWrites)"(
Exclude="@(_CleanOrphanFilesDeleted)")
RemoveDuplicates(Inputs="@(_CleanRemainingFileWritesAfterIncrementalClean)")
Output(
ItemName="_CleanUniqueRemainingFileWritesAfterIncrementalClean",
TaskParameter="Filtered")
if '@(_CleanUnfilteredPriorFileWrites)'!='@(_CleanUniqueRemainingFileWritesAfterIncrementalClean)':
WriteLinesToFile(
File="$(IntermediateOutputPath)$(CleanFile)",
Lines="@(_CleanUniqueRemainingFileWritesAfterIncrementalClean)",
Overwrite="true")
Target _CleanGetCurrentAndPriorFileWrites(
DependsOnTargets=[
_CheckForCompileOutputs
_SGenCheckForOutputs
])
ReadLinesFromFile(File="$(IntermediateOutputPath)$(CleanFile)")
Output(ItemName="_CleanUnfilteredPriorFileWrites", TaskParameter="Lines")
ConvertToAbsolutePath(Paths="@(_ResolveAssemblyReferenceResolvedFiles)")
Output(
ItemName="_ResolveAssemblyReferenceResolvedFilesAbsolute",
TaskParameter="AbsolutePaths")
ItemGroup
_CleanPriorFileWrites += "@(_CleanUnfilteredPriorFileWrites)"(
Exclude="@(_ResolveAssemblyReferenceResolvedFilesAbsolute)")
PropertyGroup
if '$(TrackFileWritesShareableOutsideOfProjectDirectory)' == '':
TrackFileWritesShareableOutsideOfProjectDirectory = false
if !$(TrackFileWritesShareableOutsideOfProjectDirectory):
FindUnderPath(
Files="@(FileWritesShareable)",
Path="$(MSBuildProjectDirectory)",
UpdateToAbsolutePaths="true")
Output(ItemName="FileWrites", TaskParameter="InPath")
if !$(TrackFileWritesShareableOutsideOfProjectDirectory):
FindUnderPath(Files="@(FileWrites)", Path="$(OutDir)", UpdateToAbsolutePaths="true")
Output(ItemName="_CleanCurrentFileWritesInOutput", TaskParameter="InPath")
if $(TrackFileWritesShareableOutsideOfProjectDirectory):
FindUnderPath(
Files="@(FileWrites);@(FileWritesShareable)",
Path="$(OutDir)",
UpdateToAbsolutePaths="true")
Output(ItemName="_CleanCurrentFileWritesInOutput", TaskParameter="InPath")
if !$(TrackFileWritesShareableOutsideOfProjectDirectory):
FindUnderPath(
Files="@(FileWrites)",
Path="$(IntermediateOutputPath)",
UpdateToAbsolutePaths="true")
Output(ItemName="_CleanCurrentFileWritesInIntermediate", TaskParameter="InPath")
if $(TrackFileWritesShareableOutsideOfProjectDirectory):
FindUnderPath(
Files="@(FileWrites);@(FileWritesShareable)",
Path="$(IntermediateOutputPath)",
UpdateToAbsolutePaths="true")
Output(ItemName="_CleanCurrentFileWritesInIntermediate", TaskParameter="InPath")
ItemGroup
_CleanCurrentFileWritesWithNoReferences += "@(_CleanCurrentFileWritesInOutput);@(_CleanCurrentFileWritesInIntermediate)"(
Exclude="@(_ResolveAssemblyReferenceResolvedFilesAbsolute)")
RemoveDuplicates(Inputs="@(_CleanCurrentFileWritesWithNoReferences)")
Output(ItemName="_CleanCurrentFileWrites", TaskParameter="Filtered")
PropertyGroup
CleanDependsOn =
| BeforeClean;
| UnmanagedUnregistration;
| CoreClean;
| CleanReferencedProjects;
| CleanPublishFolder;
| AfterClean
if '$(_InvalidConfigurationWarning)' != 'true':
Target Clean(DependsOnTargets="$(CleanDependsOn)")
Target BeforeClean
Target AfterClean
Target CleanReferencedProjects(DependsOnTargets="PrepareProjectReferences")
if '$(BuildingInsideVisualStudio)' != 'true' and '$(BuildProjectReferences)' == 'true' and '@(_MSBuildProjectReferenceExistent)' != '':
MSBuild(
BuildInParallel="$(BuildInParallel)",
ContinueOnError="$(ContinueOnError)",
Projects="@(_MSBuildProjectReferenceExistent)",
Properties="%(_MSBuildProjectReferenceExistent.SetConfiguration); %(_MSBuildProjectReferenceExistent.SetPlatform); %(_MSBuildProjectReferenceExistent.SetTargetFramework)",
RemoveProperties="%(_MSBuildProjectReferenceExistent.GlobalPropertiesToRemove)$(_GlobalPropertiesToRemoveFromProjectReferences)",
Targets="Clean")
PropertyGroup
CoreCleanDependsOn
Target CoreClean(DependsOnTargets="$(CoreCleanDependsOn)")
Delete(Files="@(Clean)", TreatErrorsAsWarnings="true")
ReadLinesFromFile(File="$(IntermediateOutputPath)$(CleanFile)")
Output(ItemName="_CleanPriorFileWrites", TaskParameter="Lines")
FindUnderPath(Files="@(_CleanPriorFileWrites)", Path="$(OutDir)")
Output(ItemName="_CleanPriorFileWritesInOutput", TaskParameter="InPath")
FindUnderPath(Files="@(_CleanPriorFileWrites)", Path="$(IntermediateOutputPath)")
Output(ItemName="_CleanPriorFileWritesInIntermediate", TaskParameter="InPath")
Delete(
Files="@(_CleanPriorFileWritesInOutput);@(_CleanPriorFileWritesInIntermediate)",
TreatErrorsAsWarnings="true")
Output(ItemName="_CleanPriorFileWritesDeleted", TaskParameter="DeletedFiles")
ItemGroup
_CleanRemainingFileWritesAfterClean += "@(_CleanPriorFileWrites)"(
Exclude="@(_CleanPriorFileWritesDeleted)")
RemoveDuplicates(Inputs="@(_CleanRemainingFileWritesAfterClean)")
Output(ItemName="_CleanUniqueRemainingFileWrites", TaskParameter="Filtered")
MakeDir(Directories="$(IntermediateOutputPath)")
WriteLinesToFile(
File="$(IntermediateOutputPath)$(CleanFile)",
Lines="@(_CleanUniqueRemainingFileWrites)",
Overwrite="true",
WriteOnlyWhenDifferent="true")
Target _CleanRecordFileWrites(DependsOnTargets="_CleanGetCurrentAndPriorFileWrites")
RemoveDuplicates(Inputs="@(_CleanPriorFileWrites);@(_CleanCurrentFileWrites)")
Output(ItemName="_CleanUniqueFileWrites", TaskParameter="Filtered")
MakeDir(Directories="$(IntermediateOutputPath)")
WriteLinesToFile(
File="$(IntermediateOutputPath)$(CleanFile)",
Lines="@(_CleanUniqueFileWrites)",
Overwrite="true",
WriteOnlyWhenDifferent="true")
Target CleanPublishFolder
if '$(ClickOncePublishDir)'=='$(OutputPath)app.publish\' and Exists('$(ClickOncePublishDir)'):
RemoveDir(Directories="$(ClickOncePublishDir)")
PropertyGroup
PostBuildEventDependsOn
if '$(PostBuildEvent)' != '' and ('$(RunPostBuildEvent)' != 'OnOutputUpdated' or '$(_AssemblyTimestampBeforeCompile)' != '$(_AssemblyTimestampAfterCompile)'):
Target PostBuildEvent(DependsOnTargets="$(PostBuildEventDependsOn)")
Exec(Command="$(PostBuildEvent)", WorkingDirectory="$(OutDir)")
PropertyGroup
DeploymentComputeClickOnceManifestInfoDependsOn =
| CleanPublishFolder;
| $(_RecursiveTargetForContentCopying);
| _DeploymentGenerateTrustInfo;
| $(DeploymentComputeClickOnceManifestInfoDependsOn)
PropertyGroup
if '$(PublishableProject)'=='true':
PublishDependsOn =
| SetGenerateManifests;
| Build;
| PublishOnly
if '$(PublishableProject)'!='true':
PublishDependsOn = _DeploymentUnpublishable
Target Publish(DependsOnTargets="$(PublishDependsOn)")
Target _DeploymentUnpublishable
MSBuildInternalMessage(ResourceName="CommonSdk.DeploymentUnpublishable", Severity="Message")
Target SetGenerateManifests
if '$(OutputType)'!='winexe' and '$(OutputType)'!='exe' and '$(OutputType)'!='appcontainerexe':
MSBuildInternalMessage(ResourceName="CommonSdk.GenerateManifestsOnlyForExe", Severity="Error")
if '$(_DeploymentSignClickOnceManifests)'=='true' and '$(ManifestCertificateThumbprint)'=='' and '$(ManifestKeyFile)'=='':
MSBuildInternalMessage(ResourceName="CommonSdk.SigningKeyRequired", Severity="Error")
PropertyGroup
GenerateClickOnceManifests = true
PropertyGroup
PublishOnlyDependsOn =
| SetGenerateManifests;
| PublishBuild;
| BeforePublish;
| GenerateManifests;
| CopyFilesToOutputDirectory;
| _CopyFilesToPublishFolder;
| _DeploymentGenerateBootstrapper;
| ResolveKeySource;
| _DeploymentSignClickOnceDeployment;
| AfterPublish
Target PublishOnly(DependsOnTargets="$(PublishOnlyDependsOn)")
Target BeforePublish
Target AfterPublish
PropertyGroup
PublishBuildDependsOn =
| BuildOnlySettings;
| PrepareForBuild;
| ResolveReferences;
| PrepareResources;
| ResolveKeySource;
| GenerateSerializationAssemblies;
| CreateSatelliteAssemblies;
Target PublishBuild(DependsOnTargets="$(PublishBuildDependsOn)")
Target _CopyFilesToPublishFolder
FormatVersion(
FormatType="Path",
Revision="$(ApplicationRevision)",
Version="$(ApplicationVersion)")
Output(PropertyName="_DeploymentApplicationVersionFragment", TaskParameter="OutputVersion")
PropertyGroup
_DeploymentApplicationFolderName = Application Files\$(AssemblyName)_$(_DeploymentApplicationVersionFragment)
_DeploymentApplicationDir = $(ClickOncePublishDir)$(_DeploymentApplicationFolderName)\
PropertyGroup
if '$(BuildingInsideVisualStudio)' == 'true' or '$(CreateHardLinksForPublishFilesIfPossible)' == '':
CreateHardLinksForPublishFilesIfPossible = false
if '$(BuildingInsideVisualStudio)' == 'true' or '$(CreateSymbolicLinksForPublishFilesIfPossible)' == '':
CreateSymbolicLinksForPublishFilesIfPossible = false
if '$(PublishSingleFile)' != 'true':
Copy(
DestinationFiles="@(_ApplicationManifestFinal->'$(_DeploymentApplicationDir)%(TargetPath)');
@(_DeploymentManifestEntryPoint->'$(_DeploymentApplicationDir)%(TargetPath)$(_DeploymentFileMappingExtension)');
@(_DeploymentManifestFiles->'$(_DeploymentApplicationDir)%(TargetPath)$(_DeploymentFileMappingExtension)');
@(ReferenceComWrappersToCopyLocal->'$(_DeploymentApplicationDir)%(FileName)%(Extension)$(_DeploymentFileMappingExtension)');
@(ResolvedIsolatedComModules->'$(_DeploymentApplicationDir)%(FileName)%(Extension)$(_DeploymentFileMappingExtension)');
@(_DeploymentLooseManifestFile->'$(_DeploymentApplicationDir)%(FileName)%(Extension)$(_DeploymentFileMappingExtension)')",
OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)",
Retries="$(CopyRetryCount)",
RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)",
SkipUnchangedFiles="$(SkipCopyUnchangedFiles)",
SourceFiles="@(_ApplicationManifestFinal);
@(_DeploymentResolvedManifestEntryPoint);
@(_DeploymentManifestFiles);
@(ReferenceComWrappersToCopyLocal);
@(ResolvedIsolatedComModules);
@(_DeploymentLooseManifestFile)",
UseHardlinksIfPossible="$(CreateHardLinksForPublishFilesIfPossible)",
UseSymboliclinksIfPossible="$(CreateSymbolicLinksForPublishFilesIfPossible)")
if '$(PublishSingleFile)' != 'true' and '%(_DeploymentManifestDependencies.DependencyType)'=='Install':
Copy(
DestinationFiles="@(_DeploymentManifestDependencies->'$(_DeploymentApplicationDir)%(TargetPath)$(_DeploymentFileMappingExtension)')",
OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)",
Retries="$(CopyRetryCount)",
RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)",
SkipUnchangedFiles="$(SkipCopyUnchangedFiles)",
SourceFiles="@(_DeploymentManifestDependencies)",
UseHardlinksIfPossible="$(CreateHardLinksForPublishFilesIfPossible)",
UseSymboliclinksIfPossible="$(CreateSymbolicLinksForPublishFilesIfPossible)")
if '$(PublishSingleFile)' != 'true':
Copy(
DestinationFiles="@(_ReferenceScatterPaths->'$(_DeploymentApplicationDir)%(Filename)%(Extension)$(_DeploymentFileMappingExtension)')",
OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)",
Retries="$(CopyRetryCount)",
RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)",
SkipUnchangedFiles="$(SkipCopyUnchangedFiles)",
SourceFiles="@(_ReferenceScatterPaths)",
UseHardlinksIfPossible="$(CreateHardLinksForPublishFilesIfPossible)",
UseSymboliclinksIfPossible="$(CreateSymbolicLinksForPublishFilesIfPossible)")
if '$(PublishSingleFile)' == 'true':
ItemGroup
PublishedSingleFileToBeCopied += "@(_DeploymentManifestFiles)"
if '$(PublishSingleFile)' == 'true':
Copy(
DestinationFiles="@(_ApplicationManifestFinal->'$(_DeploymentApplicationDir)%(TargetPath)');
@(_DeploymentManifestEntryPoint->'$(_DeploymentApplicationDir)%(TargetPath)$(_DeploymentFileMappingExtension)');
@(PublishedSingleFileToBeCopied->'$(_DeploymentApplicationDir)%(TargetPath)$(_DeploymentFileMappingExtension)')",
OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)",
Retries="$(CopyRetryCount)",
RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)",
SkipUnchangedFiles="$(SkipCopyUnchangedFiles)",
SourceFiles="@(_ApplicationManifestFinal);
@(_DeploymentResolvedManifestEntryPoint);
@(PublishedSingleFileToBeCopied);",
UseHardlinksIfPossible="$(CreateHardLinksForPublishFilesIfPossible)",
UseSymboliclinksIfPossible="$(CreateSymbolicLinksForPublishFilesIfPossible)")
FormatUrl(InputUrl="$(_DeploymentApplicationUrl)")
Output(PropertyName="_DeploymentFormattedApplicationUrl", TaskParameter="OutputUrl")
FormatUrl(InputUrl="$(_DeploymentComponentsUrl)")
Output(PropertyName="_DeploymentFormattedComponentsUrl", TaskParameter="OutputUrl")
Target _DeploymentGenerateBootstrapper
if '$(BootstrapperEnabled)'=='true':
GenerateBootstrapper(
ApplicationFile="$(TargetDeployManifestFileName)",
ApplicationName="$(AssemblyName)",
ApplicationUrl="$(_DeploymentFormattedApplicationUrl)",
BootstrapperItems="@(BootstrapperPackage)",
ComponentsLocation="$(BootstrapperComponentsLocation)",
ComponentsUrl="$(_DeploymentFormattedComponentsUrl)",
Culture="$(TargetCulture)",
FallbackCulture="$(FallbackCulture)",
OutputPath="$(ClickOncePublishDir)",
Path="$(GenerateBootstrapperSdkPath)",
SupportUrl="$(_DeploymentFormattedSupportUrl)",
VisualStudioVersion="$(VisualStudioVersion)")
Target _DeploymentSignClickOnceDeployment
if '$(_DeploymentSignClickOnceManifests)'=='true':
SignFile(
CertificateThumbprint="$(_DeploymentResolvedManifestCertificateThumbprint)",
DisallowMansignTimestampFallback="$(DisallowMansignTimestampFallback)",
SigningTarget="$(_DeploymentApplicationDir)$(_DeploymentTargetApplicationManifestFileName)",
TargetFrameworkIdentifier="$(TargetFrameworkIdentifier)",
TargetFrameworkVersion="$(TargetFrameworkVersion)",
TimestampUrl="$(ManifestTimestampUrl)")
UpdateManifest(
ApplicationManifest="$(_DeploymentApplicationDir)$(_DeploymentTargetApplicationManifestFileName)",
ApplicationPath="$(_DeploymentApplicationFolderName)\$(_DeploymentTargetApplicationManifestFileName)",
InputManifest="$(OutDir)$(TargetDeployManifestFileName)",
OutputManifest="$(ClickOncePublishDir)$(TargetDeployManifestFileName)",
TargetFrameworkVersion="$(_DeploymentManifestTargetFrameworkVersion)")
Output(ItemName="PublishedDeployManifest", TaskParameter="OutputManifest")
if '$(_DeploymentSignClickOnceManifests)'=='true':
SignFile(
CertificateThumbprint="$(_DeploymentResolvedManifestCertificateThumbprint)",
DisallowMansignTimestampFallback="$(DisallowMansignTimestampFallback)",
SigningTarget="$(ClickOncePublishDir)$(TargetDeployManifestFileName)",
TargetFrameworkIdentifier="$(TargetFrameworkIdentifier)",
TargetFrameworkVersion="$(TargetFrameworkVersion)",
TimestampUrl="$(ManifestTimestampUrl)")
if '$(BootstrapperEnabled)'=='true' and '$(_DeploymentSignClickOnceManifests)'=='true':
SignFile(
CertificateThumbprint="$(_DeploymentResolvedManifestCertificateThumbprint)",
SigningTarget="$(ClickOncePublishDir)setup.exe",
TimestampUrl="$(ManifestTimestampUrl)")
Target AllProjectOutputGroups(
DependsOnTargets=[
BuiltProjectOutputGroup
DebugSymbolsProjectOutputGroup
DocumentationProjectOutputGroup
SatelliteDllsProjectOutputGroup
SourceFilesProjectOutputGroup
ContentFilesProjectOutputGroup
SGenFilesOutputGroup
])
if '$(OutputType)' != 'winmdobj':
ItemGroup
BuiltProjectOutputGroupKeyOutput += "@(IntermediateAssembly->'%(FullPath)')"
IsKeyOutput = true
FinalOutputPath = $(TargetPath)
TargetPath = $(TargetFileName)
if '$(RegisterForComInterop)'=='true' and '$(OutputType)'=='library':
COM2REG = true
if '$(OutputType)' == 'winmdobj':
ItemGroup
if '$(_IntermediateWindowsMetadataPath)' != '':
WinMDExpOutputWindowsMetadataFileItem += "$(_IntermediateWindowsMetadataPath)"
BuiltProjectOutputGroupKeyOutput += "@(WinMDExpOutputWindowsMetadataFileItem->'%(FullPath)')"
IsKeyOutput = true
FinalOutputPath = $(TargetPath)
TargetPath = $(TargetFileName)
PropertyGroup
BuiltProjectOutputGroupDependsOn = PrepareForBuild
if ('$(AddAppConfigToBuildOutputs)'=='') and ('$(OutputType)'!='library' and '$(OutputType)'!='winmdobj'):
AddAppConfigToBuildOutputs = true
Target BuiltProjectOutputGroup(
DependsOnTargets="$(BuiltProjectOutputGroupDependsOn)",
Returns="@(BuiltProjectOutputGroupOutput)")
ItemGroup
_BuiltProjectOutputGroupOutputIntermediate += "@(BuiltProjectOutputGroupKeyOutput)"
ItemGroup
if '$(AddAppConfigToBuildOutputs)'=='true':
_BuiltProjectOutputGroupOutputIntermediate += "$(AppConfig)"
FinalOutputPath = $(TargetDir)$(TargetFileName).config
TargetPath = $(TargetFileName).config
OriginalItemSpec = $(AppConfig)
ItemGroup
if '%(COMReference.Isolated)' == 'true':
_IsolatedComReference += "@(COMReference)"
if '%(COMFileReference.Isolated)' == 'true':
_IsolatedComReference += "@(COMFileReference)"
ItemGroup
if ('@(NativeReference)'!='' or '@(_IsolatedComReference)'!='') And Exists('$(OutDir)$(_DeploymentTargetApplicationManifestFileName)'):
_BuiltProjectOutputGroupOutputIntermediate += "$(OutDir)$(_DeploymentTargetApplicationManifestFileName)"
TargetPath = $(_DeploymentTargetApplicationManifestFileName)
OriginalItemSpec = $(OutDir)$(_DeploymentTargetApplicationManifestFileName)
ItemGroup
BuiltProjectOutputGroupOutput += "@(_BuiltProjectOutputGroupOutputIntermediate->'%(FullPath)')"
if '%(_BuiltProjectOutputGroupOutputIntermediate.OriginalItemSpec)' == '':
OriginalItemSpec = %(_BuiltProjectOutputGroupOutputIntermediate.FullPath)
PropertyGroup
DebugSymbolsProjectOutputGroupDependsOn
if '$(_DebugSymbolsProduced)' != 'false' and '$(OutputType)' != 'winmdobj':
ItemGroup
DebugSymbolsProjectOutputGroupOutput += "@(_DebugSymbolsIntermediatePath->'%(FullPath)')"
FinalOutputPath = @(_DebugSymbolsOutputPath->'%(FullPath)')
TargetPath = @(_DebugSymbolsIntermediatePath->'%(Filename)%(Extension)')
if '$(_DebugSymbolsProduced)' != 'false' and '$(OutputType)' == 'winmdobj':
ItemGroup
if '$(WinMDExpOutputPdb)' != '':
WinMDExpOutputPdbItem += "$(WinMDExpOutputPdb)"
if '$(_WinMDDebugSymbolsOutputPath)' != '':
WinMDExpFinalOutputPdbItem += "$(_WinMDDebugSymbolsOutputPath)"
DebugSymbolsProjectOutputGroupOutput += "@(WinMDExpOutputPdbItem->'%(FullPath)')"
FinalOutputPath = @(WinMDExpFinalOutputPdbItem->'%(FullPath)')
TargetPath = @(WinMDExpOutputPdbItem->'%(Filename)%(Extension)')
Target DebugSymbolsProjectOutputGroup(
DependsOnTargets="$(DebugSymbolsProjectOutputGroupDependsOn)",
Returns="@(DebugSymbolsProjectOutputGroupOutput)")
PropertyGroup
DocumentationProjectOutputGroupDependsOn
if '$(DocumentationFile)'!='' and '$(OutputType)' != 'winmdobj':
ItemGroup
DocumentationProjectOutputGroupOutput += "@(DocFileItem->'%(FullPath)')"
FinalOutputPath = @(FinalDocFile->'%(FullPath)')
IsKeyOutput = true
TargetPath = @(DocFileItem->'%(Filename)%(Extension)')
if '$(DocumentationFile)' != '' and '$(OutputType)' == 'winmdobj':
ItemGroup
if '$(WinMDOutputDocumentationFile)' != '':
WinMDOutputDocumentationFileItem += "$(WinMDOutputDocumentationFile)"
if '$(_WinMDDocFileOutputPath)' != '':
WinMDExpFinalOutputDocItem += "$(_WinMDDocFileOutputPath)"
DocumentationProjectOutputGroupOutput += "@(WinMDOutputDocumentationFileItem->'%(FullPath)')"
FinalOutputPath = @(WinMDExpFinalOutputDocItem->'%(FullPath)')
TargetPath = @(WinMDOutputDocumentationFileItem->'%(Filename)%(Extension)')
Target DocumentationProjectOutputGroup(
DependsOnTargets="$(DocumentationProjectOutputGroupDependsOn)",
Returns="@(DocumentationProjectOutputGroupOutput)")
PropertyGroup
SatelliteDllsProjectOutputGroupDependsOn = $(SatelliteDllsProjectOutputGroupDependsOn);PrepareForBuild;PrepareResourceNames
Target SatelliteDllsProjectOutputGroup(
DependsOnTargets="$(SatelliteDllsProjectOutputGroupDependsOn)",
Returns="@(SatelliteDllsProjectOutputGroupOutput)")
ItemGroup
if '%(EmbeddedResource.WithCulture)' == 'true':
SatelliteDllsProjectOutputGroupOutputIntermediate += "$(IntermediateOutputPath)%(EmbeddedResource.Culture)\$(TargetName).resources.dll"
TargetPath = %(EmbeddedResource.Culture)\$(TargetName).resources.dll
Culture = %(EmbeddedResource.Culture)
ItemGroup
SatelliteDllsProjectOutputGroupOutput += "@(SatelliteDllsProjectOutputGroupOutputIntermediate->'%(FullPath)')"
if '%(SatelliteDllsProjectOutputGroupOutputIntermediate.FinalOutputPath)' == '':
FinalOutputPath = $(TargetDir)%(SatelliteDllsProjectOutputGroupOutputIntermediate.TargetPath)
OriginalItemSpec = %(SatelliteDllsProjectOutputGroupOutputIntermediate.Identity)
PropertyGroup
SourceFilesProjectOutputGroupDependsOn = PrepareForBuild;AssignTargetPaths
Target SourceFilesProjectOutputGroup(
DependsOnTargets="$(SourceFilesProjectOutputGroupDependsOn)",
Returns="@(SourceFilesProjectOutputGroupOutput)")
AssignTargetPath(Files="@(Compile)", RootFolder="$(MSBuildProjectDirectory)")
Output(ItemName="_CompileWithTargetPath", TaskParameter="AssignedFiles")
ItemGroup
SourceFilesProjectOutputGroupOutput += "@(_CompileWithTargetPath->'%(FullPath)');@(EmbeddedResource->'%(FullPath)');@(_LicxFile->'%(FullPath)');@(AppConfigWithTargetPath->'%(FullPath)')"
SourceFilesProjectOutputGroupOutput += "$(MSBuildProjectFullPath)"
OriginalItemSpec = $(MSBuildProjectFullPath)
TargetPath = $(ProjectFileName)
Target GetCompile(Returns="@(Compile)")
PropertyGroup
ContentFilesProjectOutputGroupDependsOn = PrepareForBuild;AssignTargetPaths
Target ContentFilesProjectOutputGroup(
DependsOnTargets="$(ContentFilesProjectOutputGroupDependsOn)",
Returns="@(ContentFilesProjectOutputGroupOutput)")
ItemGroup
ContentFilesProjectOutputGroupOutput += "@(ContentWithTargetPath->'%(FullPath)')"
PropertyGroup
SGenFilesOutputGroupDependsOn
if '$(_SGenGenerateSerializationAssembliesConfig)' == 'On' or ('@(WebReferenceUrl)'!='' and '$(_SGenGenerateSerializationAssembliesConfig)' == 'Auto'):
ItemGroup
SGenFilesOutputGroupOutput += "@(_OutputPathItem->'%(FullPath)$(_SGenDllName)')"
FinalOutputPath = @(_OutputPathItem->'%(FullPath)$(_SGenDllName)')
TargetPath = $(_SGenDllName)
Target SGenFilesOutputGroup(
DependsOnTargets="$(SGenFilesOutputGroupDependsOn)",
Returns="@(SGenFilesOutputGroupOutput)")
Target GetResolvedSDKReferences(
DependsOnTargets="ResolveSDKReferences",
Returns="@(ResolvedSDKReference)")
Target CollectReferencedNuGetPackages(Returns="@(ReferencedNuGetPackages)")
Target GenerateSupportedTargetFrameworkAlias(Returns="@(SupportedTargetFrameworkAlias)")
if '@(_ReferenceRelatedPaths)' != '':
Target PriFilesOutputGroup(
DependsOnTargets=[
BuildOnlySettings
PrepareForBuild
AssignTargetPaths
ResolveReferences
],
Returns="@(PriFilesOutputGroupOutput)")
ItemGroup
if '%(Extension)' == '.pri':
PriFilesOutputGroupOutput += "@(_ReferenceRelatedPaths->'%(FullPath)')"
PropertyGroup
SDKRedistOutputGroupDependsOn = ResolveSDKReferences;ExpandSDKReferences
Target SDKRedistOutputGroup(
DependsOnTargets="$(SDKRedistOutputGroupDependsOn)",
Returns="@(SDKRedistOutputGroupOutput)")
ItemGroup
SDKRedistOutputGroupOutput += "@(ResolvedRedistFiles)"
PropertyGroup
CommonOutputGroupsDependsOn =
| $(CommonOutputGroupsDependsOn);
| BuildOnlySettings;
| PrepareForBuild;
| AssignTargetPaths;
| ResolveReferences
Target AllProjectOutputGroupsDependencies(
DependsOnTargets=[
BuiltProjectOutputGroupDependencies
DebugSymbolsProjectOutputGroupDependencies
SatelliteDllsProjectOutputGroupDependencies
DocumentationProjectOutputGroupDependencies
SGenFilesOutputGroupDependencies
])
PropertyGroup
BuiltProjectOutputGroupDependenciesDependsOn =
| $(BuiltProjectOutputGroupDependenciesDependsOn);
| $(CommonOutputGroupsDependsOn)
Target BuiltProjectOutputGroupDependencies(
DependsOnTargets="$(BuiltProjectOutputGroupDependenciesDependsOn)",
Returns="@(BuiltProjectOutputGroupDependency)")
ItemGroup
BuiltProjectOutputGroupDependency += "@(ReferencePath->'%(FullPath)');
@(ReferenceDependencyPaths->'%(FullPath)');
@(NativeReferenceFile->'%(FullPath)');
@(_DeploymentLooseManifestFile->'%(FullPath)');
@(ResolvedIsolatedComModules->'%(FullPath)')"
PropertyGroup
DebugSymbolsProjectOutputGroupDependenciesDependsOn =
| $(DebugSymbolsProjectOutputGroupDependenciesDependsOn);
| $(CommonOutputGroupsDependsOn)
if '$(DebugSymbols)'!='false':
Target DebugSymbolsProjectOutputGroupDependencies(
DependsOnTargets="$(DebugSymbolsProjectOutputGroupDependenciesDependsOn)",
Returns="@(DebugSymbolsProjectOutputGroupDependency)")
ItemGroup
if '%(Extension)' == '.pdb':
DebugSymbolsProjectOutputGroupDependency += "@(_ReferenceRelatedPaths->'%(FullPath)')"
PropertyGroup
SatelliteDllsProjectOutputGroupDependenciesDependsOn =
| $(SatelliteDllsProjectOutputGroupDependenciesDependsOn);
| $(CommonOutputGroupsDependsOn)
Target SatelliteDllsProjectOutputGroupDependencies(
DependsOnTargets="$(SatelliteDllsProjectOutputGroupDependenciesDependsOn)",
Returns="@(SatelliteDllsProjectOutputGroupDependency)")
ItemGroup
SatelliteDllsProjectOutputGroupDependency += "@(ReferenceSatellitePaths->'%(FullPath)')"
PropertyGroup
DocumentationProjectOutputGroupDependenciesDependsOn =
| $(DocumentationProjectOutputGroupDependenciesDependsOn);
| $(CommonOutputGroupsDependsOn)
if '$(DocumentationFile)'!='':
Target DocumentationProjectOutputGroupDependencies(
DependsOnTargets="$(DocumentationProjectOutputGroupDependenciesDependsOn)",
Returns="@(DocumentationProjectOutputGroupDependency)")
ItemGroup
if '%(Extension)' == '.xml':
DocumentationProjectOutputGroupDependency += "@(_ReferenceRelatedPaths->'%(FullPath)')"
PropertyGroup
SGenFilesOutputGroupDependenciesDependsOn =
| $(SGenFilesOutputGroupDependenciesDependsOn);
| $(CommonOutputGroupsDependsOn)
Target SGenFilesOutputGroupDependencies(
DependsOnTargets="$(SGenFilesOutputGroupDependenciesDependsOn)",
Returns="@(SGenFilesOutputGroupDependency)")
ItemGroup
if '%(Extension)' == '.dll':
SGenFilesOutputGroupDependency += "@(_ReferenceSerializationAssemblyPaths->'%(FullPath)')"
PropertyGroup
ReferenceCopyLocalPathsOutputGroupDependsOn =
| $(ReferenceCopyLocalPathsOutputGroupDependsOn);
| $(CommonOutputGroupsDependsOn)
Target ReferenceCopyLocalPathsOutputGroup(
DependsOnTargets="$(ReferenceCopyLocalPathsOutputGroupDependsOn)",
Returns="@(ReferenceCopyLocalPathsOutputGroupOutput)")
ItemGroup
ReferenceCopyLocalPathsOutputGroupOutput += "@(ReferenceCopyLocalPaths)"
TargetPath = %(ReferenceCopyLocalPaths.DestinationSubDirectory)%(ReferenceCopyLocalPaths.Filename)%(ReferenceCopyLocalPaths.Extension)
PropertyGroup
DesignerRuntimeImplementationProjectOutputGroupDependsOn =
| $(DesignerRuntimeImplementationProjectOutputGroupDependsOn);
| $(CommonOutputGroupsDependsOn)
Target DesignerRuntimeImplementationProjectOutputGroup(
DependsOnTargets="$(DesignerRuntimeImplementationProjectOutputGroupDependsOn)",
Returns="@(DesignerRuntimeImplementationProjectOutputGroupOutput)")
Target GetPotentialEditorConfigFiles(Returns="@(PotentialEditorConfigFiles)")
PropertyGroup
if '$(CodeAnalysisTargets)'=='':
CodeAnalysisTargets = $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CodeAnalysis\Microsoft.CodeAnalysis.targets
if Exists('$(CodeAnalysisTargets)'):
Import "$(CodeAnalysisTargets)"
if Exists('$(ReportingServicesTargets)'):
Import "$(ReportingServicesTargets)"
if ('$(TargetFrameworkIdentifier)' == '' or '$(TargetFrameworkIdentifier)' == '.NETFramework') and ('$(TargetRuntime)' == 'Managed'):
Import "$(MSBuildToolsPath)\Microsoft.NETFramework.targets"
PropertyGroup
if '$(ImportXamlTargets)'=='' and ('$(TargetFrameworkVersion)' != 'v2.0' and '$(TargetFrameworkVersion)' != 'v3.5') and Exists('$(MSBuildToolsPath)\Microsoft.Xaml.targets'):
ImportXamlTargets = true
if ('$(ImportXamlTargets)' == 'true'):
Import "$(MSBuildToolsPath)\Microsoft.Xaml.targets"
if ('$(TargetFrameworkVersion)' != 'v2.0' and '$(TargetFrameworkVersion)' != 'v3.5' and (!$([System.String]::IsNullOrEmpty('$(TargetFrameworkVersion)')) and !$(TargetFrameworkVersion.StartsWith('v4.0')))) and Exists('$(MSBuildToolsPath)\Microsoft.WorkflowBuildExtensions.targets'):
Import "$(MSBuildToolsPath)\Microsoft.WorkflowBuildExtensions.targets"
if '$(TargetFrameworkIdentifier)' == 'Silverlight' and Exists('$(MSBuildToolsPath)\Microsoft.WinFX.targets'):
Import "$(MSBuildToolsPath)\Microsoft.WinFX.targets"
PropertyGroup
if '$(MsTestToolsTargets)'=='':
MsTestToolsTargets = $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\TeamTest\Microsoft.TeamTest.targets
if Exists('$(MsTestToolsTargets)'):
Import "$(MsTestToolsTargets)"
PropertyGroup
if '$(UseMSBuildTestInfrastructure)' == '':
UseMSBuildTestInfrastructure = false
if '$(UseMSBuildTestInfrastructure)' == 'true':
Import "$(MSBuildToolsPath)\Microsoft.Common.Test.targets"
Target CleanAppxPackage
Target GetPackagingOutputs
PropertyGroup
if '$(MsAppxPackageTargets)'=='':
MsAppxPackageTargets = $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\AppxPackage\Microsoft.AppXPackage.Targets
if '$(EnableAppxPackageTargetsForUwpClassLibraries)' == '':
EnableAppxPackageTargetsForUwpClassLibraries = true
if ('$(WindowsAppContainer)' == 'true' or ('$(UseUwpTools)' == 'true' and '$(OutputType)' == 'Library' and '$(EnableAppxPackageTargetsForUwpClassLibraries)' != 'false')) and Exists('$(MsAppxPackageTargets)'):
Import "$(MsAppxPackageTargets)"
if '$(TargetFrameworkIdentifier)' == 'Silverlight' and Exists('$(MSBuildToolsPath)\Microsoft.Data.Entity.targets'):
Import "$(MSBuildToolsPath)\Microsoft.Data.Entity.targets"
PropertyGroup
if '$(MSBuildUseVisualStudioDirectoryLayout)'=='':
MSBuildUseVisualStudioDirectoryLayout = $([MSBuild]::IsRunningFromVisualStudio())
if '$(NuGetRestoreTargets)'=='' and '$(MSBuildUseVisualStudioDirectoryLayout)'=='true':
NuGetRestoreTargets = $([MSBuild]::GetToolsDirectory32())\..\..\..\Common7\IDE\CommonExtensions\Microsoft\NuGet\NuGet.targets
if '$(NuGetRestoreTargets)'=='':
NuGetRestoreTargets = $(MSBuildToolsPath)\NuGet.targets
if '$(IsRestoreTargetsFileLoaded)' != 'true' and Exists('$(NuGetRestoreTargets)'):
Import "$(NuGetRestoreTargets)"
if '$(CustomAfterMicrosoftCommonTargets)' != '' and Exists('$(CustomAfterMicrosoftCommonTargets)'):
Import "$(CustomAfterMicrosoftCommonTargets)"
if '$(ImportByWildcardAfterMicrosoftCommonTargets)' == 'true' and exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.targets\ImportAfter'):
Import "$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.targets\ImportAfter\*"
if '$(ImportUserLocationsByWildcardAfterMicrosoftCommonTargets)' == 'true' and exists('$(MSBuildUserExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.targets\ImportAfter'):
Import "$(MSBuildUserExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.targets\ImportAfter\*"