Skip to content

Instantly share code, notes, and snippets.

@SteveDunn
Created July 8, 2021 06:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SteveDunn/5fe32e8db9ccc35cb540ae2e451c6de6 to your computer and use it in GitHub Desktop.
Save SteveDunn/5fe32e8db9ccc35cb540ae2e451c6de6 to your computer and use it in GitHub Desktop.
The 'preprocess' output from msbuild for a vanilla C# console app
This file has been truncated, but you can view the full file.
<!--
============================================================================================================================================
C:\temp\consoleapp1\consoleapp1.csproj
============================================================================================================================================
-->
<Project DefaultTargets="Build">
<!--
============================================================================================================================================
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk">
This import was added implicitly because the Project element's Sdk attribute specified "Microsoft.NET.Sdk".
C:\Program Files\dotnet\sdk\6.0.100-preview.5.21302.13\Sdks\Microsoft.NET.Sdk\Sdk\Sdk.props
============================================================================================================================================
-->
<!--
***********************************************************************************************
Sdk.props
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
created a backup copy. Incorrect changes to this file will make it
impossible to load or build your projects from the command-line or the IDE.
Copyright (c) .NET Foundation. All rights reserved.
***********************************************************************************************
-->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!--
Indicate to other targets that Microsoft.NET.Sdk is being used.
This must be set here (as early as possible, before Microsoft.Common.props)
so that everything that follows can depend on it.
In particular, Directory.Build.props and nuget package props need to be able
to use this flag and they are imported by Microsoft.Common.props.
-->
<UsingMicrosoftNETSdk>true</UsingMicrosoftNETSdk>
<!--
Indicate whether the set of SDK defaults that makes SDK style project concise are being used.
For example: globbing, importing msbuild common targets.
Similar to the property above, it must be set here.
-->
<UsingNETSdkDefaults>true</UsingNETSdkDefaults>
</PropertyGroup>
<PropertyGroup Condition="'$(MSBuildProjectFullPath)' == '$(ProjectToOverrideProjectExtensionsPath)'" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<MSBuildProjectExtensionsPath>$(ProjectExtensionsPathForSpecifiedProject)</MSBuildProjectExtensionsPath>
</PropertyGroup>
<!--<Import Project="$(AlternateCommonProps)" Condition="'$(AlternateCommonProps)' != ''" />-->
<!--
============================================================================================================================================
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="'$(AlternateCommonProps)' == ''">
C:\Program Files\dotnet\sdk\6.0.100-preview.5.21302.13\Current\Microsoft.Common.props
============================================================================================================================================
-->
<!--
***********************************************************************************************
Microsoft.Common.props
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
created a backup copy. Incorrect changes to this file will make it
impossible to load or build your projects from the command-line or the IDE.
Copyright (C) Microsoft Corporation. All rights reserved.
***********************************************************************************************
-->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportByWildcardBeforeMicrosoftCommonProps Condition="'$(ImportByWildcardBeforeMicrosoftCommonProps)' == ''">true</ImportByWildcardBeforeMicrosoftCommonProps>
<ImportByWildcardAfterMicrosoftCommonProps Condition="'$(ImportByWildcardAfterMicrosoftCommonProps)' == ''">true</ImportByWildcardAfterMicrosoftCommonProps>
<ImportUserLocationsByWildcardBeforeMicrosoftCommonProps Condition="'$(ImportUserLocationsByWildcardBeforeMicrosoftCommonProps)' == ''">true</ImportUserLocationsByWildcardBeforeMicrosoftCommonProps>
<ImportUserLocationsByWildcardAfterMicrosoftCommonProps Condition="'$(ImportUserLocationsByWildcardAfterMicrosoftCommonProps)' == ''">true</ImportUserLocationsByWildcardAfterMicrosoftCommonProps>
<ImportDirectoryBuildProps Condition="'$(ImportDirectoryBuildProps)' == ''">true</ImportDirectoryBuildProps>
</PropertyGroup>
<!--
Determine the path to the directory build props file if the user did not disable $(ImportDirectoryBuildProps) and
they did not already specify an absolute path to use via $(DirectoryBuildPropsPath)
-->
<PropertyGroup Condition="'$(ImportDirectoryBuildProps)' == 'true' and '$(DirectoryBuildPropsPath)' == ''" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<_DirectoryBuildPropsFile Condition="'$(_DirectoryBuildPropsFile)' == ''">Directory.Build.props</_DirectoryBuildPropsFile>
<_DirectoryBuildPropsBasePath Condition="'$(_DirectoryBuildPropsBasePath)' == ''">$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), '$(_DirectoryBuildPropsFile)'))</_DirectoryBuildPropsBasePath>
<DirectoryBuildPropsPath Condition="'$(_DirectoryBuildPropsBasePath)' != '' and '$(_DirectoryBuildPropsFile)' != ''">$([System.IO.Path]::Combine('$(_DirectoryBuildPropsBasePath)', '$(_DirectoryBuildPropsFile)'))</DirectoryBuildPropsPath>
</PropertyGroup>
<!--<Import Project="$(DirectoryBuildPropsPath)" Condition="'$(ImportDirectoryBuildProps)' == 'true' and exists('$(DirectoryBuildPropsPath)')" />-->
<!--
Prepare to import project extensions which usually come from packages. Package management systems will create a file at:
$(MSBuildProjectExtensionsPath)\$(MSBuildProjectFile).<SomethingUnique>.props
Each package management system should use a unique moniker to avoid collisions. It is a wild-card import so the package
management system can write out multiple files but the order of the import is alphabetic because MSBuild sorts the list.
-->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!--
The declaration of $(BaseIntermediateOutputPath) had to be moved up from Microsoft.Common.CurrentVersion.targets
in order for the $(MSBuildProjectExtensionsPath) to use it as a default.
-->
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">obj\</BaseIntermediateOutputPath>
<BaseIntermediateOutputPath Condition="!HasTrailingSlash('$(BaseIntermediateOutputPath)')">$(BaseIntermediateOutputPath)\</BaseIntermediateOutputPath>
<_InitialBaseIntermediateOutputPath>$(BaseIntermediateOutputPath)</_InitialBaseIntermediateOutputPath>
<MSBuildProjectExtensionsPath Condition="'$(MSBuildProjectExtensionsPath)' == '' ">$(BaseIntermediateOutputPath)</MSBuildProjectExtensionsPath>
<!--
Import paths that are relative default to be relative to the importing file. However, since MSBuildExtensionsPath
defaults to BaseIntermediateOutputPath we expect it to be relative to the project directory. So if the path is relative
it needs to be made absolute based on the project directory.
-->
<MSBuildProjectExtensionsPath Condition="'$([System.IO.Path]::IsPathRooted($(MSBuildProjectExtensionsPath)))' == 'false'">$([System.IO.Path]::Combine('$(MSBuildProjectDirectory)', '$(MSBuildProjectExtensionsPath)'))</MSBuildProjectExtensionsPath>
<MSBuildProjectExtensionsPath Condition="!HasTrailingSlash('$(MSBuildProjectExtensionsPath)')">$(MSBuildProjectExtensionsPath)\</MSBuildProjectExtensionsPath>
<ImportProjectExtensionProps Condition="'$(ImportProjectExtensionProps)' == ''">true</ImportProjectExtensionProps>
<_InitialMSBuildProjectExtensionsPath Condition=" '$(ImportProjectExtensionProps)' == 'true' ">$(MSBuildProjectExtensionsPath)</_InitialMSBuildProjectExtensionsPath>
</PropertyGroup>
<!--
============================================================================================================================================
<Import Project="$(MSBuildProjectExtensionsPath)$(MSBuildProjectFile).*.props" Condition="'$(ImportProjectExtensionProps)' == 'true' and exists('$(MSBuildProjectExtensionsPath)')">
C:\temp\consoleapp1\obj\consoleapp1.csproj.nuget.g.props
============================================================================================================================================
-->
<PropertyGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' " xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<RestoreSuccess Condition=" '$(RestoreSuccess)' == '' ">True</RestoreSuccess>
<RestoreTool Condition=" '$(RestoreTool)' == '' ">NuGet</RestoreTool>
<ProjectAssetsFile Condition=" '$(ProjectAssetsFile)' == '' ">$(MSBuildThisFileDirectory)project.assets.json</ProjectAssetsFile>
<NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">$(UserProfile)\.nuget\packages\</NuGetPackageRoot>
<NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">C:\Users\steve\.nuget\packages\;C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages;C:\Program Files (x86)\Microsoft\Xamarin\NuGet\;C:\Program Files\dotnet\sdk\NuGetFallbackFolder</NuGetPackageFolders>
<NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle>
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">6.0.0</NuGetToolVersion>
</PropertyGroup>
<ItemGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' " xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<SourceRoot Include="C:\Users\steve\.nuget\packages\" />
<SourceRoot Include="C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages\" />
<SourceRoot Include="C:\Program Files (x86)\Microsoft\Xamarin\NuGet\" />
<SourceRoot Include="C:\Program Files\dotnet\sdk\NuGetFallbackFolder\" />
</ItemGroup>
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
</PropertyGroup>
<!--
============================================================================================================================================
</Import>
C:\Program Files\dotnet\sdk\6.0.100-preview.5.21302.13\Current\Microsoft.Common.props
============================================================================================================================================
-->
<!--
Import wildcard "ImportBefore" props files if we're actually in a 12.0+ project (rather than a project being
treated as 4.0)
-->
<!--<ImportGroup Condition="'$(MSBuildAssemblyVersion)' != ''">-->
<!--
Wildcard imports come from $(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props.d folder.
This is very similar to the same extension point used in Microsoft.Common.targets, which is located in
the $(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.targets\ directory. Unfortunately, there
is already a file named "Microsoft.Common.props" in this directory so we have to have a slightly different
directory name to hold extensions.
-->
<!--<Import Project="$(MSBuildUserExtensionsPath)\$(MSBuildToolsVersion)\Imports\Microsoft.Common.props\ImportBefore\*" Condition="'$(ImportUserLocationsByWildcardBeforeMicrosoftCommonProps)' == 'true' and exists('$(MSBuildUserExtensionsPath)\$(MSBuildToolsVersion)\Imports\Microsoft.Common.props\ImportBefore')" />-->
<!--<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Imports\Microsoft.Common.props\ImportBefore\*" Condition="'$(ImportByWildcardBeforeMicrosoftCommonProps)' == 'true' and exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Imports\Microsoft.Common.props\ImportBefore')" />-->
<!--</ImportGroup>-->
<!--
In VS 2010 SP1 and VS 2012, both supported for asset compatibility, the MSBuild installed
as part of them did not enforce using the local ToolsVersion (4.0) in all cases, but instead
just used whatever ToolsVersion was in the project file if it existed on the machine, and
only forced 4.0 if that ToolsVersion did not exist.
Moving forward, we do want to enforce a single acting ToolsVersion per version of Visual Studio,
but in order to approximate this behavior on VS 2010 SP1 and VS 2012 as well, we've redirected
the targets: If we're building using 4.X MSBuild (which doesn't define the new reserved
property, MSBuildAssemblyVersion), we'll point right back at the 4.0 targets, which still exist
as part of the .NET Framework. Only if we're using the new MSBuild will we point to the current
targets.
-->
<PropertyGroup Condition="'$(MSBuildAssemblyVersion)' == '' and ('$(VisualStudioVersion)' != '' and '$(VisualStudioVersion)' &gt;= '12.0')" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!--
Reset VisualStudioVersion if it's 12.0+: Should be 10.0 if VS 2010 is installed or 11.0 otherwise,
but since we don't have a good way of telling whether VS 2010 is installed, make it 11.0 if
VS 2012 is installed or 10.0 otherwise. The reset should be safe because if it was already
set to something (e.g. 11.0 in a VS 2012 command prompt) then MSBuild's internal
VisualStudioVersion-defaulting code should never come into the picture, so the only way it could
be 12.0+ when building a TV 12.0 project (because we're in this file) using MSBuild 4.5 (because
MSBuildAssemblyVersion hasn't been set) is if it's a TV 12.0 project on an empty command prompt.
-->
<VisualStudioVersion Condition="Exists('$(MSBuildExtensionsPath)\4.0\Microsoft.Common.props')">11.0</VisualStudioVersion>
<VisualStudioVersion Condition="!Exists('$(MSBuildExtensionsPath)\4.0\Microsoft.Common.props')">10.0</VisualStudioVersion>
</PropertyGroup>
<!-- If building using 4.X MSBuild, we want to act like this project is TV 4.0, so override
the custom extensibility target locations with the hard-coded 4.0 equivalent. -->
<PropertyGroup Condition="'$(MSBuildAssemblyVersion)' == ''" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<CustomBeforeMicrosoftCommonProps Condition="'$(CustomBeforeMicrosoftCommonProps)'==''">$(MSBuildExtensionsPath)\v4.0\Custom.Before.$(MSBuildThisFile)</CustomBeforeMicrosoftCommonProps>
<CustomAfterMicrosoftCommonProps Condition="'$(CustomAfterMicrosoftCommonProps)'==''">$(MSBuildExtensionsPath)\v4.0\Custom.After.$(MSBuildThisFile)</CustomAfterMicrosoftCommonProps>
</PropertyGroup>
<!-- If building using 4.X MSBuild, we want to act like this project is TV 4.0, so import
Microsoft.Common.props from the 4.0 location, and make sure everything else in here is
set up such that if it's defaulted to something there, it won't be overridden here. -->
<!--<Import Project="$(MSBuildExtensionsPath)\4.0\Microsoft.Common.props" Condition="'$(MSBuildAssemblyVersion)' == '' and Exists('$(MSBuildExtensionsPath)\4.0\Microsoft.Common.props')" />-->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<CustomBeforeMicrosoftCommonProps Condition="'$(CustomBeforeMicrosoftCommonProps)'==''">$(MSBuildExtensionsPath)\v$(MSBuildToolsVersion)\Custom.Before.$(MSBuildThisFile)</CustomBeforeMicrosoftCommonProps>
<CustomAfterMicrosoftCommonProps Condition="'$(CustomAfterMicrosoftCommonProps)'==''">$(MSBuildExtensionsPath)\v$(MSBuildToolsVersion)\Custom.After.$(MSBuildThisFile)</CustomAfterMicrosoftCommonProps>
</PropertyGroup>
<!--
Only import the extension targets if we're actually in a 12.0 project here (rather than one we're attempting
to treat as 4.0) OR if the Dev11 Microsoft.Common.props don't exist. If it's a 12.0 project we're redirecting
to 4.0 and the Dev11 Microsoft.Common.props do exist, the extension targets will have been imported already
so there's no need to import them twice.
-->
<!--<Import Project="$(CustomBeforeMicrosoftCommonProps)" Condition="'$(CustomBeforeMicrosoftCommonProps)' != '' and Exists('$(CustomBeforeMicrosoftCommonProps)') and ('$(MSBuildAssemblyVersion)' != '' or !Exists('$(MSBuildExtensionsPath)\4.0\Microsoft.Common.props'))" />-->
<!-- This is used to determine whether Microsoft.Common.targets needs to import
Microsoft.Common.props itself, or whether it has been imported previously,
e.g. by the project itself. -->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<MicrosoftCommonPropsHasBeenImported>true</MicrosoftCommonPropsHasBeenImported>
</PropertyGroup>
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Configuration Condition=" '$(Configuration)' == '' and '$(DefaultProjectConfiguration)' != '' ">$(DefaultProjectConfiguration)</Configuration>
<Platform Condition=" '$(Platform)' == '' and '$(DefaultProjectPlatform)' != '' ">$(DefaultProjectPlatform)</Platform>
</PropertyGroup>
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<WMSJSProject Condition="'$(WMSJSProject)' == ''">WJProject</WMSJSProject>
<WMSJSProjectDirectory Condition="'$(WMSJSProjectDirectory)' == ''">JavaScript</WMSJSProjectDirectory>
</PropertyGroup>
<!--<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.VisualStudioVersion.v*.Common.props" Condition="'$(VisualStudioVersion)' == ''" />-->
<!--
Only import the extension targets if we're actually in a 12.0 project here (rather than one we're attempting
to treat as 4.0) OR if the Dev11 Microsoft.Common.props don't exist. If it's a 12.0 project we're redirecting
to 4.0 and the Dev11 Microsoft.Common.props do exist, the extension targets will have been imported already
so there's no need to import them twice.
-->
<!--<Import Project="$(CustomAfterMicrosoftCommonProps)" Condition="'$(CustomAfterMicrosoftCommonProps)' != '' and Exists('$(CustomAfterMicrosoftCommonProps)') and ('$(MSBuildAssemblyVersion)' != '' or !Exists('$(MSBuildExtensionsPath)\4.0\Microsoft.Common.props'))" />-->
<!--
Import wildcard "ImportAfter" props files if we're actually in a 12.0+ project (rather than a project being
treated as 4.0)
-->
<!--<ImportGroup Condition="'$(MSBuildAssemblyVersion)' != ''">-->
<!--<Import Project="$(MSBuildUserExtensionsPath)\$(MSBuildToolsVersion)\Imports\Microsoft.Common.props\ImportAfter\*" Condition="'$(ImportUserLocationsByWildcardAfterMicrosoftCommonProps)' == 'true' and exists('$(MSBuildUserExtensionsPath)\$(MSBuildToolsVersion)\Imports\Microsoft.Common.props\ImportAfter')" />-->
<!--<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Imports\Microsoft.Common.props\ImportAfter\*" Condition="'$(ImportByWildcardAfterMicrosoftCommonProps)' == 'true' and exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Imports\Microsoft.Common.props\ImportAfter')" />-->
<!--</ImportGroup>-->
<!--
Import NuGet.props file.
-->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<MSBuildUseVisualStudioDirectoryLayout Condition="'$(MSBuildUseVisualStudioDirectoryLayout)'==''">$([MSBuild]::IsRunningFromVisualStudio())</MSBuildUseVisualStudioDirectoryLayout>
<NuGetPropsFile Condition="'$(NuGetPropsFile)'=='' and '$(MSBuildUseVisualStudioDirectoryLayout)'=='true'">$(MSBuildToolsPath32)\..\..\..\Common7\IDE\CommonExtensions\Microsoft\NuGet\NuGet.props</NuGetPropsFile>
<NuGetPropsFile Condition="'$(NuGetPropsFile)'==''">$(MSBuildToolsPath)\NuGet.props</NuGetPropsFile>
</PropertyGroup>
<!--
============================================================================================================================================
<Import Project="$(NuGetPropsFile)" Condition="Exists('$(NuGetPropsFile)')">
C:\Program Files\dotnet\sdk\6.0.100-preview.5.21302.13\NuGet.props
============================================================================================================================================
-->
<!--
***********************************************************************************************
NuGet.props
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
created a backup copy. Incorrect changes to this file will make it
impossible to load or build your projects from the command-line or the IDE.
Copyright (c) .NET Foundation. All rights reserved.
***********************************************************************************************
-->
<!--
Import 'Directory.Packages.props' which will contain centralized packages for all the projects and solutions under
the directory in which the file is present. This is similar to 'Directory.Build.props/targets' logic which is present
in the common props/targets which serve a similar purpose.
-->
<PropertyGroup>
<ImportDirectoryPackagesProps Condition="'$(ImportDirectoryPackagesProps)' == ''">true</ImportDirectoryPackagesProps>
</PropertyGroup>
<!--
Determine the path to the 'Directory.Packages.props' file, if the user did not disable $(ImportDirectoryPackagesProps) and
they did not already specify an absolute path to use via $(DirectoryPackagesPropsPath)
-->
<PropertyGroup Condition="'$(ImportDirectoryPackagesProps)' == 'true' and '$(DirectoryPackagesPropsPath)' == ''">
<_DirectoryPackagesPropsFile Condition="'$(_DirectoryPackagesPropsFile)' == ''">Directory.Packages.props</_DirectoryPackagesPropsFile>
<_DirectoryPackagesPropsBasePath Condition="'$(_DirectoryPackagesPropsBasePath)' == ''">$([MSBuild]::GetDirectoryNameOfFileAbove('$(MSBuildProjectDirectory)', '$(_DirectoryPackagesPropsFile)'))</_DirectoryPackagesPropsBasePath>
<DirectoryPackagesPropsPath Condition="'$(_DirectoryPackagesPropsBasePath)' != '' and '$(_DirectoryPackagesPropsFile)' != ''">$([MSBuild]::NormalizePath('$(_DirectoryPackagesPropsBasePath)', '$(_DirectoryPackagesPropsFile)'))</DirectoryPackagesPropsPath>
</PropertyGroup>
<!--<Import Project="$(DirectoryPackagesPropsPath)" Condition="'$(ImportDirectoryPackagesProps)' == 'true' and '$(DirectoryPackagesPropsPath)' != '' and Exists('$(DirectoryPackagesPropsPath)')" />-->
<PropertyGroup Condition="'$(ImportDirectoryPackagesProps)' == 'true' and '$(DirectoryPackagesPropsPath)' != '' and Exists('$(DirectoryPackagesPropsPath)')">
<CentralPackageVersionsFileImported>true</CentralPackageVersionsFileImported>
</PropertyGroup>
<!--
============================================================================================================================================
</Import>
C:\Program Files\dotnet\sdk\6.0.100-preview.5.21302.13\Current\Microsoft.Common.props
============================================================================================================================================
-->
<PropertyGroup Condition=" '$(MSBuildLogVerboseTaskParameters)' != 'true' " xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<DisableLogTaskParameter_ConvertToAbsolutePath_Path>true</DisableLogTaskParameter_ConvertToAbsolutePath_Path>
<DisableLogTaskParameter_FindUnderPath_OutOfPath>true</DisableLogTaskParameter_FindUnderPath_OutOfPath>
<DisableLogTaskParameter_RemoveDuplicates_Inputs>true</DisableLogTaskParameter_RemoveDuplicates_Inputs>
<DisableLogTaskParameterItemMetadata_ConvertToAbsolutePath_AbsolutePaths>true</DisableLogTaskParameterItemMetadata_ConvertToAbsolutePath_AbsolutePaths>
<DisableLogTaskParameterItemMetadata_Copy_CopiedFiles>true</DisableLogTaskParameterItemMetadata_Copy_CopiedFiles>
<DisableLogTaskParameterItemMetadata_Copy_DestinationFiles>true</DisableLogTaskParameterItemMetadata_Copy_DestinationFiles>
<DisableLogTaskParameterItemMetadata_Copy_SourceFiles>true</DisableLogTaskParameterItemMetadata_Copy_SourceFiles>
<DisableLogTaskParameterItemMetadata_FindUnderPath_Files>true</DisableLogTaskParameterItemMetadata_FindUnderPath_Files>
<DisableLogTaskParameterItemMetadata_FindUnderPath_InPath>true</DisableLogTaskParameterItemMetadata_FindUnderPath_InPath>
<DisableLogTaskParameterItemMetadata_GenerateResource_FilesWritten>true</DisableLogTaskParameterItemMetadata_GenerateResource_FilesWritten>
<DisableLogTaskParameterItemMetadata_Hash_ItemsToHash>true</DisableLogTaskParameterItemMetadata_Hash_ItemsToHash>
<DisableLogTaskParameterItemMetadata_RemoveDuplicates_Filtered>true</DisableLogTaskParameterItemMetadata_RemoveDuplicates_Filtered>
<DisableLogTaskParameterItemMetadata_WriteLinesToFile_Lines>true</DisableLogTaskParameterItemMetadata_WriteLinesToFile_Lines>
</PropertyGroup>
<!--
============================================================================================================================================
</Import>
C:\Program Files\dotnet\sdk\6.0.100-preview.5.21302.13\Sdks\Microsoft.NET.Sdk\Sdk\Sdk.props
============================================================================================================================================
-->
<!--
============================================================================================================================================
<Import Project="$(MSBuildThisFileDirectory)..\targets\Microsoft.NET.Sdk.props">
C:\Program Files\dotnet\sdk\6.0.100-preview.5.21302.13\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.props
============================================================================================================================================
-->
<!--
***********************************************************************************************
Microsoft.NET.Sdk.props
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
created a backup copy. Incorrect changes to this file will make it
impossible to load or build your projects from the command-line or the IDE.
Copyright (c) .NET Foundation. All rights reserved.
***********************************************************************************************
-->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- This property disables the conflict resolution logic from the Microsoft.Packaging.Tools package, which is superceded by the logic here in the SDK -->
<DisableHandlePackageFileConflicts>true</DisableHandlePackageFileConflicts>
</PropertyGroup>
<!-- Default configuration and platform to Debug|AnyCPU-->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Configurations Condition=" '$(Configurations)' == '' ">Debug;Release</Configurations>
<Platforms Condition=" '$(Platforms)' == '' ">AnyCPU</Platforms>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
</PropertyGroup>
<!-- User-facing configuration-agnostic defaults -->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<OutputType Condition=" '$(OutputType)' == '' ">Library</OutputType>
<FileAlignment Condition=" '$(FileAlignment)' == '' ">512</FileAlignment>
<ErrorReport Condition=" '$(ErrorReport)' == '' ">prompt</ErrorReport>
<AssemblyName Condition=" '$(AssemblyName)' == '' ">$(MSBuildProjectName)</AssemblyName>
<RootNamespace Condition=" '$(RootNamespace)' == '' ">$(MSBuildProjectName.Replace(" ", "_"))</RootNamespace>
<Deterministic Condition=" '$(Deterministic)' == '' ">true</Deterministic>
</PropertyGroup>
<!-- User-facing configuration-specific defaults -->
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' " xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<DebugSymbols Condition=" '$(DebugSymbols)' == '' ">true</DebugSymbols>
<Optimize Condition=" '$(Optimize)' == '' ">false</Optimize>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' " xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Optimize Condition=" '$(Optimize)' == '' ">true</Optimize>
</PropertyGroup>
<!-- User-facing platform-specific defaults -->
<!--
NOTE:
* We cannot compare against $(Platform) directly as that will give VS cause to instantiate extra
configurations, for each combination, which leads to performance problems and clutter in the sln
in the common AnyCPU-only case.
* We cannot just set $(PlatformTarget) to $(Platform) here because $(Platform) can be set to anything
at the solution level, but there are a fixed set valid $(PlatformTarget) values that can be passed
to the compiler. It is up to the user to explicitly set PlatformTarget to non-AnyCPU (if desired)
outside the 1:1 defaults below.
-->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<_PlatformWithoutConfigurationInference>$(Platform)</_PlatformWithoutConfigurationInference>
</PropertyGroup>
<PropertyGroup Condition=" '$(_PlatformWithoutConfigurationInference)' == 'x64' " xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PlatformTarget Condition=" '$(PlatformTarget)' == '' ">x64</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition=" '$(_PlatformWithoutConfigurationInference)' == 'x86' " xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PlatformTarget Condition=" '$(PlatformTarget)' == '' ">x86</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition=" '$(_PlatformWithoutConfigurationInference)' == 'ARM' " xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PlatformTarget Condition=" '$(PlatformTarget)' == '' ">ARM</PlatformTarget>
</PropertyGroup>
<!-- Default settings for all projects built with this Sdk package -->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<DebugType Condition=" '$(DebugType)' == '' ">portable</DebugType>
<!-- This will turn off the base UWP-specific 'ResolveNuGetPackages' target -->
<ResolveNuGetPackages>false</ResolveNuGetPackages>
<!-- Skip import of Microsoft.NuGet.props and Microsoft.NuGet.targets -->
<SkipImportNuGetProps>true</SkipImportNuGetProps>
<SkipImportNuGetBuildTargets>true</SkipImportNuGetBuildTargets>
<!-- NuGet should always restore .NET SDK projects with "PackageReference" style restore. Setting this property will
cause the right thing to happen even if there aren't any PackageReference items in the project, such as when
a project targets .NET Framework and doesn't have any direct package dependencies. -->
<RestoreProjectStyle>PackageReference</RestoreProjectStyle>
<!-- Exclude GAC, registry, output directory from search paths. -->
<AssemblySearchPaths Condition=" '$(AssemblySearchPaths)' == '' ">{CandidateAssemblyFiles};{HintPathFromItem};{TargetFrameworkDirectory};{RawFileName}</AssemblySearchPaths>
<DesignTimeAssemblySearchPaths Condition=" '$(DesignTimeAssemblySearchPaths)' == '' ">$(AssemblySearchPaths)</DesignTimeAssemblySearchPaths>
<AllowUnsafeBlocks Condition="'$(AllowUnsafeBlocks)'==''">false</AllowUnsafeBlocks>
<TreatWarningsAsErrors Condition="'$(TreatWarningsAsErrors)'==''">false</TreatWarningsAsErrors>
<Prefer32Bit Condition="'$(Prefer32Bit)'==''">false</Prefer32Bit>
<SignAssembly Condition="'$(SignAssembly)'==''">false</SignAssembly>
<DelaySign Condition="'$(DelaySign)'==''">false</DelaySign>
<GeneratePackageOnBuild Condition="'$(GeneratePackageOnBuild)'==''">false</GeneratePackageOnBuild>
<PackageRequireLicenseAcceptance Condition="'$(PackageRequireLicenseAcceptance)'==''">false</PackageRequireLicenseAcceptance>
<DebugSymbols Condition="'$(DebugSymbols)'==''">false</DebugSymbols>
<CheckForOverflowUnderflow Condition="'$(CheckForOverflowUnderflow)'==''">false</CheckForOverflowUnderflow>
<AutomaticallyUseReferenceAssemblyPackages Condition="'$(AutomaticallyUseReferenceAssemblyPackages)'==''">true</AutomaticallyUseReferenceAssemblyPackages>
<MicrosoftNETFrameworkReferenceAssembliesLatestPackageVersion>1.0.2</MicrosoftNETFrameworkReferenceAssembliesLatestPackageVersion>
<CopyConflictingTransitiveContent>false</CopyConflictingTransitiveContent>
<MSBuildCopyContentTransitively Condition="'$(MSBuildCopyContentTransitively)' == ''">true</MSBuildCopyContentTransitively>
<ResolveAssemblyReferenceOutputUnresolvedAssemblyConflicts Condition="'$(ResolveAssemblyReferenceOutputUnresolvedAssemblyConflicts)' == ''">true</ResolveAssemblyReferenceOutputUnresolvedAssemblyConflicts>
<!-- Uncomment this once https://github.com/Microsoft/visualfsharp/issues/3207 gets fixed -->
<!-- <WarningsAsErrors>$(WarningsAsErrors);NU1605</WarningsAsErrors> -->
</PropertyGroup>
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- Path to project that the .NET CLI will build in order to generate deps.json files for .NET CLI tools -->
<ToolDepsJsonGeneratorProject>$(MSBuildThisFileDirectory)GenerateDeps\GenerateDeps.proj</ToolDepsJsonGeneratorProject>
</PropertyGroup>
<!-- Default item includes (globs and implicit references) -->
<!--
============================================================================================================================================
<Import Project="Microsoft.NET.Sdk.DefaultItems.props">
C:\Program Files\dotnet\sdk\6.0.100-preview.5.21302.13\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.DefaultItems.props
============================================================================================================================================
-->
<!--
***********************************************************************************************
Microsoft.NET.Sdk.DefaultItems.props
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
created a backup copy. Incorrect changes to this file will make it
impossible to load or build your projects from the command-line or the IDE.
Copyright (c) .NET Foundation. All rights reserved.
***********************************************************************************************
-->
<PropertyGroup Condition="'$(NETCoreSdkBundledVersionsProps)' == ''" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<NETCoreSdkBundledVersionsProps>$(MSBuildThisFileDirectory)..\..\..\Microsoft.NETCoreSdk.BundledVersions.props</NETCoreSdkBundledVersionsProps>
</PropertyGroup>
<!--
============================================================================================================================================
<Import Project="$(NETCoreSdkBundledVersionsProps)" Condition="Exists('$(NETCoreSdkBundledVersionsProps)')">
C:\Program Files\dotnet\sdk\6.0.100-preview.5.21302.13\Microsoft.NETCoreSdk.BundledVersions.props
============================================================================================================================================
-->
<!--
***********************************************************************************************
Microsoft.NETCoreSdk.BundledVersions.props
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
created a backup copy. Incorrect changes to this file will make it
impossible to load or build your projects from the command-line or the IDE.
Copyright (c) .NET Foundation. All rights reserved.
***********************************************************************************************
-->
<PropertyGroup>
<NetCoreRoot Condition="'$(NetCoreRoot)' == ''">$([MSBuild]::NormalizePath('$(MSBuildThisFileDirectory)..\..\'))</NetCoreRoot>
<NetCoreTargetingPackRoot Condition="'$(NetCoreTargetingPackRoot)' == ''">$([MSBuild]::EnsureTrailingSlash('$(NetCoreRoot)'))packs</NetCoreTargetingPackRoot>
<NETCoreAppMaximumVersion>6.0</NETCoreAppMaximumVersion>
<BundledNETCoreAppTargetFrameworkVersion>6.0</BundledNETCoreAppTargetFrameworkVersion>
<BundledNETCoreAppPackageVersion>6.0.0-preview.5.21301.5</BundledNETCoreAppPackageVersion>
<BundledNETStandardTargetFrameworkVersion>2.1</BundledNETStandardTargetFrameworkVersion>
<BundledNETStandardPackageVersion>2.1.0</BundledNETStandardPackageVersion>
<BundledNETCorePlatformsPackageVersion>6.0.0-preview.5.21301.5</BundledNETCorePlatformsPackageVersion>
<BundledRuntimeIdentifierGraphFile>$(MSBuildThisFileDirectory)RuntimeIdentifierGraph.json</BundledRuntimeIdentifierGraphFile>
<NETCoreSdkVersion>6.0.100-preview.5.21302.13</NETCoreSdkVersion>
<NETCoreSdkRuntimeIdentifier>win-x64</NETCoreSdkRuntimeIdentifier>
<NETCoreSdkPortableRuntimeIdentifier>win-x64</NETCoreSdkPortableRuntimeIdentifier>
<_NETCoreSdkIsPreview>true</_NETCoreSdkIsPreview>
</PropertyGroup>
<ItemGroup>
<ImplicitPackageReferenceVersion Include="Microsoft.NETCore.App" TargetFrameworkVersion="1.0" DefaultVersion="1.0.5" LatestVersion="1.0.16" />
<ImplicitPackageReferenceVersion Include="Microsoft.NETCore.App" TargetFrameworkVersion="1.1" DefaultVersion="1.1.2" LatestVersion="1.1.13" />
<ImplicitPackageReferenceVersion Include="Microsoft.NETCore.App" TargetFrameworkVersion="2.0" DefaultVersion="2.0.0" LatestVersion="2.0.9" />
<ImplicitPackageReferenceVersion Include="Microsoft.NETCore.App" TargetFrameworkVersion="2.1" DefaultVersion="2.1.0" LatestVersion="2.1.28" />
<ImplicitPackageReferenceVersion Include="Microsoft.NETCore.App" TargetFrameworkVersion="2.2" DefaultVersion="2.2.0" LatestVersion="2.2.8" />
<ImplicitPackageReferenceVersion Include="Microsoft.AspNetCore.App" TargetFrameworkVersion="2.1" DefaultVersion="2.1.1" LatestVersion="2.1.28" />
<ImplicitPackageReferenceVersion Include="Microsoft.AspNetCore.All" TargetFrameworkVersion="2.1" DefaultVersion="2.1.1" LatestVersion="2.1.28" />
<ImplicitPackageReferenceVersion Include="Microsoft.AspNetCore.App" TargetFrameworkVersion="2.2" DefaultVersion="2.2.0" LatestVersion="2.2.8" />
<ImplicitPackageReferenceVersion Include="Microsoft.AspNetCore.All" TargetFrameworkVersion="2.2" DefaultVersion="2.2.0" LatestVersion="2.2.8" />
<!-- .NET 6.0 -->
<KnownFrameworkReference Include="Microsoft.NETCore.App" TargetFramework="net6.0" RuntimeFrameworkName="Microsoft.NETCore.App" DefaultRuntimeFrameworkVersion="6.0.0-preview.5.21301.5" LatestRuntimeFrameworkVersion="6.0.0-preview.5.21301.5" TargetingPackName="Microsoft.NETCore.App.Ref" TargetingPackVersion="6.0.0-preview.5.21301.5" RuntimePackNamePatterns="Microsoft.NETCore.App.Runtime.**RID**" RuntimePackRuntimeIdentifiers="linux-arm;linux-arm64;linux-musl-arm64;linux-musl-x64;linux-x64;osx-x64;rhel.6-x64;tizen.4.0.0-armel;tizen.5.0.0-armel;win-arm;win-arm64;win-x64;win-x86;linux-musl-arm;osx-arm64;maccatalyst-x64;maccatalyst-arm64" />
<KnownAppHostPack Include="Microsoft.NETCore.App" TargetFramework="net6.0" AppHostPackNamePattern="Microsoft.NETCore.App.Host.**RID**" AppHostPackVersion="6.0.0-preview.5.21301.5" AppHostRuntimeIdentifiers="linux-arm;linux-arm64;linux-musl-arm64;linux-musl-x64;linux-x64;osx-x64;rhel.6-x64;tizen.4.0.0-armel;tizen.5.0.0-armel;win-arm;win-arm64;win-x64;win-x86;linux-musl-arm;osx-arm64" />
<KnownCrossgen2Pack Include="Microsoft.NETCore.App.Crossgen2" TargetFramework="net6.0" Crossgen2PackNamePattern="Microsoft.NETCore.App.Crossgen2.**RID**" Crossgen2PackVersion="6.0.0-preview.5.21301.5" Crossgen2RuntimeIdentifiers="linux-musl-x64;linux-x64;win-x64;linux-arm;linux-arm64;linux-musl-arm;linux-musl-arm64;osx-arm64;osx-x64;win-arm;win-arm64;win-x86" />
<KnownRuntimePack Include="Microsoft.NETCore.App" TargetFramework="net6.0" RuntimeFrameworkName="Microsoft.NETCore.App" LatestRuntimeFrameworkVersion="6.0.0-preview.5.21301.5" RuntimePackNamePatterns="Microsoft.NETCore.App.Runtime.Mono.**RID**" RuntimePackRuntimeIdentifiers="linux-arm;linux-arm64;linux-musl-arm64;linux-musl-x64;linux-x64;osx-x64;rhel.6-x64;win-arm;win-arm64;win-x64;win-x86;linux-musl-arm;osx-arm64;maccatalyst-x64;maccatalyst-arm64;browser-wasm;ios-arm64;ios-arm;iossimulator-arm64;iossimulator-x64;iossimulator-x86;tvos-arm64;tvossimulator-arm64;tvossimulator-x64;android-arm64;android-arm;android-x64;android-x86" RuntimePackLabels="Mono" />
<KnownFrameworkReference Include="Microsoft.WindowsDesktop.App" TargetFramework="net6.0" RuntimeFrameworkName="Microsoft.WindowsDesktop.App" DefaultRuntimeFrameworkVersion="6.0.0-preview.5.21301.4" LatestRuntimeFrameworkVersion="6.0.0-preview.5.21301.4" TargetingPackName="Microsoft.WindowsDesktop.App.Ref" TargetingPackVersion="6.0.0-preview.5.21301.4" RuntimePackNamePatterns="Microsoft.WindowsDesktop.App.Runtime.**RID**" RuntimePackRuntimeIdentifiers="win-x64;win-x86;win-arm64" IsWindowsOnly="true" />
<KnownFrameworkReference Include="Microsoft.WindowsDesktop.App.WPF" TargetFramework="net6.0" RuntimeFrameworkName="Microsoft.WindowsDesktop.App" DefaultRuntimeFrameworkVersion="6.0.0-preview.5.21301.4" LatestRuntimeFrameworkVersion="6.0.0-preview.5.21301.4" TargetingPackName="Microsoft.WindowsDesktop.App.Ref" TargetingPackVersion="6.0.0-preview.5.21301.4" RuntimePackNamePatterns="Microsoft.WindowsDesktop.App.Runtime.**RID**" RuntimePackRuntimeIdentifiers="win-x64;win-x86;win-arm64" IsWindowsOnly="true" Profile="WPF" />
<KnownFrameworkReference Include="Microsoft.WindowsDesktop.App.WindowsForms" TargetFramework="net6.0" RuntimeFrameworkName="Microsoft.WindowsDesktop.App" DefaultRuntimeFrameworkVersion="6.0.0-preview.5.21301.4" LatestRuntimeFrameworkVersion="6.0.0-preview.5.21301.4" TargetingPackName="Microsoft.WindowsDesktop.App.Ref" TargetingPackVersion="6.0.0-preview.5.21301.4" RuntimePackNamePatterns="Microsoft.WindowsDesktop.App.Runtime.**RID**" RuntimePackRuntimeIdentifiers="win-x64;win-x86;win-arm64" IsWindowsOnly="true" Profile="WindowsForms" />
<KnownFrameworkReference Include="Microsoft.AspNetCore.App" TargetFramework="net6.0" RuntimeFrameworkName="Microsoft.AspNetCore.App" DefaultRuntimeFrameworkVersion="6.0.0-preview.5.21301.17" LatestRuntimeFrameworkVersion="6.0.0-preview.5.21301.17" TargetingPackName="Microsoft.AspNetCore.App.Ref" TargetingPackVersion="6.0.0-preview.5.21301.17" RuntimePackNamePatterns="Microsoft.AspNetCore.App.Runtime.**RID**" RuntimePackRuntimeIdentifiers="win-x64;win-x86;win-arm;osx-x64;linux-musl-x64;linux-musl-arm64;linux-x64;linux-arm;linux-arm64;linux-musl-arm;win-arm64;osx-arm64" />
<KnownFrameworkReference Include="Microsoft.Windows.SDK.NET.Ref" TargetFramework="net6.0-windows10.0.17763.0" RuntimeFrameworkName="Microsoft.Windows.SDK.NET.Ref" DefaultRuntimeFrameworkVersion="10.0.17763.16" LatestRuntimeFrameworkVersion="10.0.17763.16" TargetingPackName="Microsoft.Windows.SDK.NET.Ref" TargetingPackVersion="10.0.17763.16" RuntimePackAlwaysCopyLocal="true" RuntimePackNamePatterns="Microsoft.Windows.SDK.NET.Ref" RuntimePackRuntimeIdentifiers="any" IsWindowsOnly="true" />
<KnownFrameworkReference Include="Microsoft.Windows.SDK.NET.Ref" TargetFramework="net6.0-windows10.0.18362.0" RuntimeFrameworkName="Microsoft.Windows.SDK.NET.Ref" DefaultRuntimeFrameworkVersion="10.0.18362.16" LatestRuntimeFrameworkVersion="10.0.18362.16" TargetingPackName="Microsoft.Windows.SDK.NET.Ref" TargetingPackVersion="10.0.18362.16" RuntimePackAlwaysCopyLocal="true" RuntimePackNamePatterns="Microsoft.Windows.SDK.NET.Ref" RuntimePackRuntimeIdentifiers="any" IsWindowsOnly="true" />
<KnownFrameworkReference Include="Microsoft.Windows.SDK.NET.Ref" TargetFramework="net6.0-windows10.0.19041.0" RuntimeFrameworkName="Microsoft.Windows.SDK.NET.Ref" DefaultRuntimeFrameworkVersion="10.0.19041.16" LatestRuntimeFrameworkVersion="10.0.19041.16" TargetingPackName="Microsoft.Windows.SDK.NET.Ref" TargetingPackVersion="10.0.19041.16" RuntimePackAlwaysCopyLocal="true" RuntimePackNamePatterns="Microsoft.Windows.SDK.NET.Ref" RuntimePackRuntimeIdentifiers="any" IsWindowsOnly="true" />
<!-- .NET 5.0 -->
<KnownFrameworkReference Include="Microsoft.NETCore.App" TargetFramework="net5.0" RuntimeFrameworkName="Microsoft.NETCore.App" DefaultRuntimeFrameworkVersion="5.0.0" LatestRuntimeFrameworkVersion="5.0.5" TargetingPackName="Microsoft.NETCore.App.Ref" TargetingPackVersion="5.0.0" RuntimePackNamePatterns="Microsoft.NETCore.App.Runtime.**RID**" RuntimePackRuntimeIdentifiers="linux-arm;linux-arm64;linux-musl-arm64;linux-musl-x64;linux-x64;osx-x64;rhel.6-x64;tizen.4.0.0-armel;tizen.5.0.0-armel;win-arm;win-arm64;win-x64;win-x86;linux-musl-arm;browser-wasm" IsTrimmable="true" />
<KnownAppHostPack Include="Microsoft.NETCore.App" TargetFramework="net5.0" AppHostPackNamePattern="Microsoft.NETCore.App.Host.**RID**" AppHostPackVersion="5.0.5" AppHostRuntimeIdentifiers="linux-arm;linux-arm64;linux-musl-arm64;linux-musl-x64;linux-x64;osx-x64;rhel.6-x64;tizen.4.0.0-armel;tizen.5.0.0-armel;win-arm;win-arm64;win-x64;win-x86;linux-musl-arm" />
<KnownCrossgen2Pack Include="Microsoft.NETCore.App.Crossgen2" TargetFramework="net5.0" Crossgen2PackNamePattern="Microsoft.NETCore.App.Crossgen2.**RID**" Crossgen2PackVersion="5.0.5" Crossgen2RuntimeIdentifiers="linux-musl-x64;linux-x64;win-x64" />
<KnownFrameworkReference Include="Microsoft.WindowsDesktop.App" TargetFramework="net5.0" RuntimeFrameworkName="Microsoft.WindowsDesktop.App" DefaultRuntimeFrameworkVersion="5.0.0" LatestRuntimeFrameworkVersion="5.0.5" TargetingPackName="Microsoft.WindowsDesktop.App.Ref" TargetingPackVersion="5.0.0" RuntimePackNamePatterns="Microsoft.WindowsDesktop.App.Runtime.**RID**" RuntimePackRuntimeIdentifiers="win-x64;win-x86" IsWindowsOnly="true" />
<KnownFrameworkReference Include="Microsoft.WindowsDesktop.App.WPF" TargetFramework="net5.0" RuntimeFrameworkName="Microsoft.WindowsDesktop.App" DefaultRuntimeFrameworkVersion="5.0.0" LatestRuntimeFrameworkVersion="5.0.5" TargetingPackName="Microsoft.WindowsDesktop.App.Ref" TargetingPackVersion="5.0.0" RuntimePackNamePatterns="Microsoft.WindowsDesktop.App.Runtime.**RID**" RuntimePackRuntimeIdentifiers="win-x64;win-x86" IsWindowsOnly="true" Profile="WPF" />
<KnownFrameworkReference Include="Microsoft.WindowsDesktop.App.WindowsForms" TargetFramework="net5.0" RuntimeFrameworkName="Microsoft.WindowsDesktop.App" DefaultRuntimeFrameworkVersion="5.0.0" LatestRuntimeFrameworkVersion="5.0.5" TargetingPackName="Microsoft.WindowsDesktop.App.Ref" TargetingPackVersion="5.0.0" RuntimePackNamePatterns="Microsoft.WindowsDesktop.App.Runtime.**RID**" RuntimePackRuntimeIdentifiers="win-x64;win-x86" IsWindowsOnly="true" Profile="WindowsForms" />
<KnownFrameworkReference Include="Microsoft.AspNetCore.App" TargetFramework="net5.0" RuntimeFrameworkName="Microsoft.AspNetCore.App" DefaultRuntimeFrameworkVersion="5.0.0" LatestRuntimeFrameworkVersion="5.0.6" TargetingPackName="Microsoft.AspNetCore.App.Ref" TargetingPackVersion="5.0.0" RuntimePackNamePatterns="Microsoft.AspNetCore.App.Runtime.**RID**" RuntimePackRuntimeIdentifiers="win-x64;win-x86;win-arm;osx-x64;linux-musl-x64;linux-musl-arm64;linux-x64;linux-arm;linux-arm64;linux-musl-arm;win-arm64" />
<KnownFrameworkReference Include="Microsoft.Windows.SDK.NET.Ref" TargetFramework="net5.0-windows10.0.17763.0" RuntimeFrameworkName="Microsoft.Windows.SDK.NET.Ref" DefaultRuntimeFrameworkVersion="10.0.17763.16" LatestRuntimeFrameworkVersion="10.0.17763.16" TargetingPackName="Microsoft.Windows.SDK.NET.Ref" TargetingPackVersion="10.0.17763.16" RuntimePackAlwaysCopyLocal="true" RuntimePackNamePatterns="Microsoft.Windows.SDK.NET.Ref" RuntimePackRuntimeIdentifiers="any" IsWindowsOnly="true" />
<KnownFrameworkReference Include="Microsoft.Windows.SDK.NET.Ref" TargetFramework="net5.0-windows10.0.18362.0" RuntimeFrameworkName="Microsoft.Windows.SDK.NET.Ref" DefaultRuntimeFrameworkVersion="10.0.18362.16" LatestRuntimeFrameworkVersion="10.0.18362.16" TargetingPackName="Microsoft.Windows.SDK.NET.Ref" TargetingPackVersion="10.0.18362.16" RuntimePackAlwaysCopyLocal="true" RuntimePackNamePatterns="Microsoft.Windows.SDK.NET.Ref" RuntimePackRuntimeIdentifiers="any" IsWindowsOnly="true" />
<KnownFrameworkReference Include="Microsoft.Windows.SDK.NET.Ref" TargetFramework="net5.0-windows10.0.19041.0" RuntimeFrameworkName="Microsoft.Windows.SDK.NET.Ref" DefaultRuntimeFrameworkVersion="10.0.19041.16" LatestRuntimeFrameworkVersion="10.0.19041.16" TargetingPackName="Microsoft.Windows.SDK.NET.Ref" TargetingPackVersion="10.0.19041.16" RuntimePackAlwaysCopyLocal="true" RuntimePackNamePatterns="Microsoft.Windows.SDK.NET.Ref" RuntimePackRuntimeIdentifiers="any" IsWindowsOnly="true" />
<!-- .NET Core 3.1 -->
<KnownFrameworkReference Include="Microsoft.NETCore.App" TargetFramework="netcoreapp3.1" RuntimeFrameworkName="Microsoft.NETCore.App" DefaultRuntimeFrameworkVersion="3.1.0" LatestRuntimeFrameworkVersion="3.1.15" TargetingPackName="Microsoft.NETCore.App.Ref" TargetingPackVersion="3.1.0" RuntimePackNamePatterns="Microsoft.NETCore.App.Runtime.**RID**" RuntimePackRuntimeIdentifiers="linux-arm;linux-arm64;linux-musl-arm64;linux-musl-x64;linux-x64;osx-x64;rhel.6-x64;tizen.4.0.0-armel;tizen.5.0.0-armel;win-arm;win-arm64;win-x64;win-x86" IsTrimmable="true" />
<KnownAppHostPack Include="Microsoft.NETCore.App" TargetFramework="netcoreapp3.1" AppHostPackNamePattern="Microsoft.NETCore.App.Host.**RID**" AppHostPackVersion="3.1.15" AppHostRuntimeIdentifiers="linux-arm;linux-arm64;linux-musl-arm64;linux-musl-x64;linux-x64;osx-x64;rhel.6-x64;tizen.4.0.0-armel;tizen.5.0.0-armel;win-arm;win-arm64;win-x64;win-x86" />
<KnownFrameworkReference Include="Microsoft.WindowsDesktop.App" TargetFramework="netcoreapp3.1" RuntimeFrameworkName="Microsoft.WindowsDesktop.App" DefaultRuntimeFrameworkVersion="3.1.0" LatestRuntimeFrameworkVersion="3.1.15" TargetingPackName="Microsoft.WindowsDesktop.App.Ref" TargetingPackVersion="3.1.0" RuntimePackNamePatterns="Microsoft.WindowsDesktop.App.Runtime.**RID**" RuntimePackRuntimeIdentifiers="win-x64;win-x86" IsWindowsOnly="true" />
<KnownFrameworkReference Include="Microsoft.WindowsDesktop.App.WPF" TargetFramework="netcoreapp3.1" RuntimeFrameworkName="Microsoft.WindowsDesktop.App" DefaultRuntimeFrameworkVersion="3.1.0" LatestRuntimeFrameworkVersion="3.1.15" TargetingPackName="Microsoft.WindowsDesktop.App.Ref" TargetingPackVersion="3.1.0" RuntimePackNamePatterns="Microsoft.WindowsDesktop.App.Runtime.**RID**" RuntimePackRuntimeIdentifiers="win-x64;win-x86" IsWindowsOnly="true" Profile="WPF" />
<KnownFrameworkReference Include="Microsoft.WindowsDesktop.App.WindowsForms" TargetFramework="netcoreapp3.1" RuntimeFrameworkName="Microsoft.WindowsDesktop.App" DefaultRuntimeFrameworkVersion="3.1.0" LatestRuntimeFrameworkVersion="3.1.15" TargetingPackName="Microsoft.WindowsDesktop.App.Ref" TargetingPackVersion="3.1.0" RuntimePackNamePatterns="Microsoft.WindowsDesktop.App.Runtime.**RID**" RuntimePackRuntimeIdentifiers="win-x64;win-x86" IsWindowsOnly="true" Profile="WindowsForms" />
<KnownFrameworkReference Include="Microsoft.AspNetCore.App" TargetFramework="netcoreapp3.1" RuntimeFrameworkName="Microsoft.AspNetCore.App" DefaultRuntimeFrameworkVersion="3.1.0" LatestRuntimeFrameworkVersion="3.1.15" TargetingPackName="Microsoft.AspNetCore.App.Ref" TargetingPackVersion="3.1.10" RuntimePackNamePatterns="Microsoft.AspNetCore.App.Runtime.**RID**" RuntimePackRuntimeIdentifiers="win-x64;win-x86;win-arm;osx-x64;linux-musl-x64;linux-musl-arm64;linux-x64;linux-arm;linux-arm64" />
<!-- .NET Core 3.0 -->
<KnownFrameworkReference Include="Microsoft.NETCore.App" TargetFramework="netcoreapp3.0" RuntimeFrameworkName="Microsoft.NETCore.App" DefaultRuntimeFrameworkVersion="3.0.0" LatestRuntimeFrameworkVersion="3.0.3" TargetingPackName="Microsoft.NETCore.App.Ref" TargetingPackVersion="3.0.0" RuntimePackNamePatterns="Microsoft.NETCore.App.Runtime.**RID**" RuntimePackRuntimeIdentifiers="linux-arm;linux-arm64;linux-musl-arm64;linux-musl-x64;linux-x64;osx-x64;rhel.6-x64;tizen.4.0.0-armel;tizen.5.0.0-armel;win-arm;win-arm64;win-x64;win-x86" IsTrimmable="true" />
<KnownAppHostPack Include="Microsoft.NETCore.App" TargetFramework="netcoreapp3.0" AppHostPackNamePattern="Microsoft.NETCore.App.Host.**RID**" AppHostPackVersion="3.0.3" AppHostRuntimeIdentifiers="linux-arm;linux-arm64;linux-musl-arm64;linux-musl-x64;linux-x64;osx-x64;rhel.6-x64;tizen.4.0.0-armel;tizen.5.0.0-armel;win-arm;win-arm64;win-x64;win-x86" />
<KnownFrameworkReference Include="Microsoft.WindowsDesktop.App" TargetFramework="netcoreapp3.0" RuntimeFrameworkName="Microsoft.WindowsDesktop.App" DefaultRuntimeFrameworkVersion="3.0.0" LatestRuntimeFrameworkVersion="3.0.3" TargetingPackName="Microsoft.WindowsDesktop.App.Ref" TargetingPackVersion="3.0.0" RuntimePackNamePatterns="Microsoft.WindowsDesktop.App.Runtime.**RID**" RuntimePackRuntimeIdentifiers="win-x64;win-x86" IsWindowsOnly="true" />
<KnownFrameworkReference Include="Microsoft.WindowsDesktop.App.WPF" TargetFramework="netcoreapp3.0" RuntimeFrameworkName="Microsoft.WindowsDesktop.App" DefaultRuntimeFrameworkVersion="3.0.0" LatestRuntimeFrameworkVersion="3.0.3" TargetingPackName="Microsoft.WindowsDesktop.App.Ref" TargetingPackVersion="3.0.0" RuntimePackNamePatterns="Microsoft.WindowsDesktop.App.Runtime.**RID**" RuntimePackRuntimeIdentifiers="win-x64;win-x86" IsWindowsOnly="true" Profile="WPF" />
<KnownFrameworkReference Include="Microsoft.WindowsDesktop.App.WindowsForms" TargetFramework="netcoreapp3.0" RuntimeFrameworkName="Microsoft.WindowsDesktop.App" DefaultRuntimeFrameworkVersion="3.0.0" LatestRuntimeFrameworkVersion="3.0.3" TargetingPackName="Microsoft.WindowsDesktop.App.Ref" TargetingPackVersion="3.0.0" RuntimePackNamePatterns="Microsoft.WindowsDesktop.App.Runtime.**RID**" RuntimePackRuntimeIdentifiers="win-x64;win-x86" IsWindowsOnly="true" Profile="WindowsForms" />
<KnownFrameworkReference Include="Microsoft.AspNetCore.App" TargetFramework="netcoreapp3.0" RuntimeFrameworkName="Microsoft.AspNetCore.App" DefaultRuntimeFrameworkVersion="3.0.0" LatestRuntimeFrameworkVersion="3.0.3" TargetingPackName="Microsoft.AspNetCore.App.Ref" TargetingPackVersion="3.0.1" RuntimePackNamePatterns="Microsoft.AspNetCore.App.Runtime.**RID**" RuntimePackRuntimeIdentifiers="win-x64;win-x86;win-arm;osx-x64;linux-musl-x64;linux-musl-arm64;linux-x64;linux-arm;linux-arm64" />
<KnownFrameworkReference Include="NETStandard.Library" TargetFramework="netstandard2.1" TargetingPackName="NETStandard.Library.Ref" TargetingPackVersion="2.1.0" />
</ItemGroup>
<!--
============================================================================================================================================
</Import>
C:\Program Files\dotnet\sdk\6.0.100-preview.5.21302.13\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.DefaultItems.props
============================================================================================================================================
-->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- Set RuntimeIdentifier graph for NuGet (this needs to be after NETCoreSdkBundledVersionsProps is imported, as that's where
BundledRuntimeIdentifierGraphFile is set. -->
<RuntimeIdentifierGraphPath Condition="'$(RuntimeIdentifierGraphPath)' == ''">$(BundledRuntimeIdentifierGraphFile)</RuntimeIdentifierGraphPath>
</PropertyGroup>
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- Disable web SDK implicit package versions for ASP.NET packages, since the .NET SDK now handles that -->
<EnableWebSdkImplicitPackageVersions>false</EnableWebSdkImplicitPackageVersions>
</PropertyGroup>
<ItemGroup Condition=" '$(EnableDefaultItems)' == 'true' " xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Compile Include="**/*$(DefaultLanguageSourceExtension)" Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder)" Condition=" '$(EnableDefaultCompileItems)' == 'true' " />
<EmbeddedResource Include="**/*.resx" Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder)" Condition=" '$(EnableDefaultEmbeddedResourceItems)' == 'true' " />
</ItemGroup>
<ItemGroup Condition=" '$(EnableDefaultItems)' == 'true' And '$(EnableDefaultNoneItems)' == 'true' " xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<None Include="**/*" Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder)" />
<None Remove="**/*$(DefaultLanguageSourceExtension)" />
<None Remove="**/*.resx" />
</ItemGroup>
<!-- Automatically reference NETStandard.Library or Microsoft.NETCore.App package if targeting the corresponding target framework.
We can refer here in the .props file to properties set in the .targets files because items and their conditions are
evaluated in the second pass of evaluation, after all properties have been evaluated. -->
<ItemGroup Condition=" '$(DisableImplicitFrameworkReferences)' != 'true' and '$(TargetFrameworkIdentifier)' == '.NETStandard' And '$(_TargetFrameworkVersionWithoutV)' &lt; '2.1'" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PackageReference Include="NETStandard.Library" Version="$(NETStandardImplicitPackageVersion)" IsImplicitlyDefined="true" />
<!-- If targeting .NET Standard 2.0 or higher, then don't include a dependency on NETStandard.Library in the package produced by pack -->
<PackageReference Update="NETStandard.Library" Condition=" ('$(_TargetFrameworkVersionWithoutV)' != '') And ('$(_TargetFrameworkVersionWithoutV)' &gt;= '2.0') " PrivateAssets="All" Publish="true" />
</ItemGroup>
<ItemGroup Condition=" '$(DisableImplicitFrameworkReferences)' != 'true' and '$(TargetFrameworkIdentifier)' == '.NETStandard' And '$(_TargetFrameworkVersionWithoutV)' &gt;= '2.1'" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<FrameworkReference Include="NETStandard.Library" IsImplicitlyDefined="true" Pack="false" PrivateAssets="All" />
</ItemGroup>
<ItemGroup Condition=" '$(DisableImplicitFrameworkReferences)' != 'true' and '$(TargetFrameworkIdentifier)' == '.NETCoreApp'" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- Use implicit PackageReference for Microsoft.NETCore.App on versions prior to 3.0. For 3.0 or higher, use
an implicit FrameworkReference -->
<PackageReference Include="Microsoft.NETCore.App" IsImplicitlyDefined="true" Condition="('$(_TargetFrameworkVersionWithoutV)' != '') And ('$(_TargetFrameworkVersionWithoutV)' &lt; '3.0')" />
<!-- For targeting .NET Core 2.0 or higher, don't include a dependency on Microsoft.NETCore.App in the package produced by pack.
Packing an DotnetCliTool should include the Microsoft.NETCore.App package dependency. -->
<PackageReference Update="Microsoft.NETCore.App" Condition="('$(_TargetFrameworkVersionWithoutV)' != '') And ('$(_TargetFrameworkVersionWithoutV)' &gt;= '2.0') And ('$(PackageType)' != 'DotnetCliTool')" PrivateAssets="All" Publish="true" />
<FrameworkReference Include="Microsoft.NETCore.App" IsImplicitlyDefined="true" Pack="false" PrivateAssets="All" Condition="('$(_TargetFrameworkVersionWithoutV)' != '') And ('$(_TargetFrameworkVersionWithoutV)' &gt;= '3.0')" />
<!-- Allow opt-in to Mono runtime pack for .NET 6.0 or higher -->
<FrameworkReference Update="Microsoft.NETCore.App" RuntimePackLabels="Mono" Condition="'$(UseMonoRuntime)' == 'true' And ('$(_TargetFrameworkVersionWithoutV)' != '') And ('$(_TargetFrameworkVersionWithoutV)' &gt;= '6.0')" />
</ItemGroup>
<!--
============================================================================================================================================
</Import>
C:\Program Files\dotnet\sdk\6.0.100-preview.5.21302.13\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.props
============================================================================================================================================
-->
<!-- Put workload resolution behind a feature flag. It can be enabled either by setting the MSBuildEnableWorkloadResolver environment variable to true, or by
putting an EnableWorkloadResolver.sentinel file beside the MSBuild SDK resolver DLL -->
<PropertyGroup Condition="'$(MSBuildEnableWorkloadResolver)' == ''" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<__DisableWorkloadResolverSentinelPath Condition="'$(MSBuildRuntimeType)' == 'Core'">$(MSBuildBinPath)\DisableWorkloadResolver.sentinel</__DisableWorkloadResolverSentinelPath>
<__DisableWorkloadResolverSentinelPath Condition="'$(MSBuildRuntimeType)' != 'Core'">$(MSBuildBinPath)\SdkResolvers\Microsoft.DotNet.MSBuildSdkResolver\DisableWorkloadResolver.sentinel</__DisableWorkloadResolverSentinelPath>
<MSBuildEnableWorkloadResolver Condition="!Exists('$(__DisableWorkloadResolverSentinelPath)')">true</MSBuildEnableWorkloadResolver>
</PropertyGroup>
<!-- Import workload props -->
<!--
============================================================================================================================================
<Import Project="Microsoft.NET.Sdk.ImportWorkloads.props" Condition="'$(MSBuildEnableWorkloadResolver)' == 'true'">
C:\Program Files\dotnet\sdk\6.0.100-preview.5.21302.13\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.ImportWorkloads.props
============================================================================================================================================
-->
<!--
***********************************************************************************************
Microsoft.NET.Sdk.ImportWorkloads.props
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
created a backup copy. Incorrect changes to this file will make it
impossible to load or build your projects from the command-line or the IDE.
Copyright (c) .NET Foundation. All rights reserved.
***********************************************************************************************
-->
<!-- Import workload props -->
<!--<Import Project="AutoImport.props" Sdk="Microsoft.NET.SDK.WorkloadAutoImportPropsLocator" />-->
<!--
============================================================================================================================================
</Import>
C:\Program Files\dotnet\sdk\6.0.100-preview.5.21302.13\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.props
============================================================================================================================================
-->
<!-- List of supported .NET Core and .NET Standard TFMs -->
<!--
============================================================================================================================================
<Import Project="Microsoft.NET.SupportedTargetFrameworks.props">
C:\Program Files\dotnet\sdk\6.0.100-preview.5.21302.13\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.SupportedTargetFrameworks.props
============================================================================================================================================
-->
<!--
***********************************************************************************************
Microsoft.NET.SupportedTargetFrameworks.targets
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
created a backup copy. Incorrect changes to this file will make it
impossible to load or build your projects from the command-line or the IDE.
Copyright (c) .NET Foundation. All rights reserved.
***********************************************************************************************
-->
<!-- This file contains a list of the TFMs that are supported by this SDK for .NET Core, .NET Standard, and .NET Framework.
This is used by VS to show the list of frameworks to which projects can be retargeted. -->
<!-- .NET Core App -->
<ItemGroup>
<SupportedNETCoreAppTargetFramework Include=".NETCoreApp,Version=v1.0" DisplayName=".NET Core 1.0" />
<SupportedNETCoreAppTargetFramework Include=".NETCoreApp,Version=v1.1" DisplayName=".NET Core 1.1" />
<SupportedNETCoreAppTargetFramework Include=".NETCoreApp,Version=v2.0" DisplayName=".NET Core 2.0" />
<SupportedNETCoreAppTargetFramework Include=".NETCoreApp,Version=v2.1" DisplayName=".NET Core 2.1" />
<SupportedNETCoreAppTargetFramework Include=".NETCoreApp,Version=v2.2" DisplayName=".NET Core 2.2" />
<SupportedNETCoreAppTargetFramework Include=".NETCoreApp,Version=v3.0" DisplayName=".NET Core 3.0" />
<SupportedNETCoreAppTargetFramework Include=".NETCoreApp,Version=v3.1" DisplayName=".NET Core 3.1" />
<SupportedNETCoreAppTargetFramework Include=".NETCoreApp,Version=v5.0" DisplayName=".NET 5.0" />
<SupportedNETCoreAppTargetFramework Include=".NETCoreApp,Version=v6.0" DisplayName=".NET 6.0" />
</ItemGroup>
<!-- .NET Standard -->
<ItemGroup>
<SupportedNETStandardTargetFramework Include=".NETStandard,Version=v1.0" DisplayName=".NET Standard 1.0" />
<SupportedNETStandardTargetFramework Include=".NETStandard,Version=v1.1" DisplayName=".NET Standard 1.1" />
<SupportedNETStandardTargetFramework Include=".NETStandard,Version=v1.2" DisplayName=".NET Standard 1.2" />
<SupportedNETStandardTargetFramework Include=".NETStandard,Version=v1.3" DisplayName=".NET Standard 1.3" />
<SupportedNETStandardTargetFramework Include=".NETStandard,Version=v1.4" DisplayName=".NET Standard 1.4" />
<SupportedNETStandardTargetFramework Include=".NETStandard,Version=v1.5" DisplayName=".NET Standard 1.5" />
<SupportedNETStandardTargetFramework Include=".NETStandard,Version=v1.6" DisplayName=".NET Standard 1.6" />
<SupportedNETStandardTargetFramework Include=".NETStandard,Version=v2.0" DisplayName=".NET Standard 2.0" />
<SupportedNETStandardTargetFramework Include=".NETStandard,Version=v2.1" DisplayName=".NET Standard 2.1" />
</ItemGroup>
<!-- .NET Framework -->
<ItemGroup>
<SupportedNETFrameworkTargetFramework Include=".NETFramework,Version=v2.0" DisplayName=".NET Framework 2.0" />
<SupportedNETFrameworkTargetFramework Include=".NETFramework,Version=v3.0" DisplayName=".NET Framework 3.0" />
<SupportedNETFrameworkTargetFramework Include=".NETFramework,Version=v3.5" DisplayName=".NET Framework 3.5" />
<SupportedNETFrameworkTargetFramework Include=".NETFramework,Version=v4.0" DisplayName=".NET Framework 4.0" />
<SupportedNETFrameworkTargetFramework Include=".NETFramework,Version=v4.5" DisplayName=".NET Framework 4.5" />
<SupportedNETFrameworkTargetFramework Include=".NETFramework,Version=v4.5.1" DisplayName=".NET Framework 4.5.1" />
<SupportedNETFrameworkTargetFramework Include=".NETFramework,Version=v4.5.2" DisplayName=".NET Framework 4.5.2" />
<SupportedNETFrameworkTargetFramework Include=".NETFramework,Version=v4.6" DisplayName=".NET Framework 4.6" />
<SupportedNETFrameworkTargetFramework Include=".NETFramework,Version=v4.6.1" DisplayName=".NET Framework 4.6.1" />
<SupportedNETFrameworkTargetFramework Include=".NETFramework,Version=v4.6.2" DisplayName=".NET Framework 4.6.2" />
<SupportedNETFrameworkTargetFramework Include=".NETFramework,Version=v4.7" DisplayName=".NET Framework 4.7" />
<SupportedNETFrameworkTargetFramework Include=".NETFramework,Version=v4.7.1" DisplayName=".NET Framework 4.7.1" />
<SupportedNETFrameworkTargetFramework Include=".NETFramework,Version=v4.7.2" DisplayName=".NET Framework 4.7.2" />
<SupportedNETFrameworkTargetFramework Include=".NETFramework,Version=v4.8" DisplayName=".NET Framework 4.8" />
</ItemGroup>
<!-- All supported target frameworks -->
<ItemGroup>
<SupportedTargetFramework Include="@(SupportedNETCoreAppTargetFramework);@(SupportedNETStandardTargetFramework);@(SupportedNETFrameworkTargetFramework)" />
</ItemGroup>
<!--
============================================================================================================================================
</Import>
C:\Program Files\dotnet\sdk\6.0.100-preview.5.21302.13\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.props
============================================================================================================================================
-->
<!-- List of supported target platforms -->
<!--
============================================================================================================================================
<Import Project="Microsoft.NET.SupportedPlatforms.props">
C:\Program Files\dotnet\sdk\6.0.100-preview.5.21302.13\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.SupportedPlatforms.props
============================================================================================================================================
-->
<!--
***********************************************************************************************
Microsoft.NET.SupportedPlatforms.props
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
created a backup copy. Incorrect changes to this file will make it
impossible to load or build your projects from the command-line or the IDE.
Copyright (c) .NET Foundation. All rights reserved.
***********************************************************************************************
-->
<ItemGroup>
<!-- Platforms supported by this SDK for analyzer warnings. Spec: https://github.com/dotnet/designs/blob/main/accepted/2020/platform-exclusion/platform-exclusion.md -->
<SupportedPlatform Include="Linux" />
<SupportedPlatform Include="macOS" />
<SupportedPlatform Include="Windows" />
</ItemGroup>
<!--
============================================================================================================================================
</Import>
C:\Program Files\dotnet\sdk\6.0.100-preview.5.21302.13\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.props
============================================================================================================================================
-->
<!-- List of supported .NET windows target platform versions -->
<!--
============================================================================================================================================
<Import Project="Microsoft.NET.WindowsSdkSupportedTargetPlatforms.props">
C:\Program Files\dotnet\sdk\6.0.100-preview.5.21302.13\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.WindowsSdkSupportedTargetPlatforms.props
============================================================================================================================================
-->
<!--
***********************************************************************************************
Microsoft.NET.WindowsSdkSupportedTargetPlatforms.props
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
created a backup copy. Incorrect changes to this file will make it
impossible to load or build your projects from the command-line or the IDE.
Copyright (c) .NET Foundation. All rights reserved.
***********************************************************************************************
-->
<!-- This file contains a list of the windows target platform versions that are supported by this SDK for .NET. Supported versions are processed in _NormalizeTargetPlatformVersion -->
<ItemGroup>
<WindowsSdkSupportedTargetPlatformVersion Include="10.0.19041.0" />
<WindowsSdkSupportedTargetPlatformVersion Include="10.0.18362.0" />
<WindowsSdkSupportedTargetPlatformVersion Include="10.0.17763.0" />
<WindowsSdkSupportedTargetPlatformVersion Include="8.0" />
<WindowsSdkSupportedTargetPlatformVersion Include="7.0" />
</ItemGroup>
<ItemGroup>
<SdkSupportedTargetPlatformVersion Condition="'$(TargetPlatformIdentifier)' == 'Windows'" Include="@(WindowsSdkSupportedTargetPlatformVersion)" />
</ItemGroup>
<!--
============================================================================================================================================
</Import>
C:\Program Files\dotnet\sdk\6.0.100-preview.5.21302.13\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.props
============================================================================================================================================
-->
<!--
============================================================================================================================================
<Import Project="$(MSBuildThisFileDirectory)Microsoft.NET.Sdk.CSharp.props" Condition="'$(MSBuildProjectExtension)' == '.csproj'">
C:\Program Files\dotnet\sdk\6.0.100-preview.5.21302.13\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.CSharp.props
============================================================================================================================================
-->
<!--
***********************************************************************************************
Microsoft.NET.Sdk.CSharp.props
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
created a backup copy. Incorrect changes to this file will make it
impossible to load or build your projects from the command-line or the IDE.
Copyright (c) .NET Foundation. All rights reserved.
***********************************************************************************************
-->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<WarningLevel Condition=" '$(WarningLevel)' == '' ">4</WarningLevel>
<NoWarn Condition=" '$(NoWarn)' == '' ">1701;1702</NoWarn>
<!-- Remove the line below once https://github.com/Microsoft/visualfsharp/issues/3207 gets fixed -->
<WarningsAsErrors>$(WarningsAsErrors);NU1605</WarningsAsErrors>
</PropertyGroup>
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<DefineConstants Condition=" '$(DefineConstants)' != '' ">$(DefineConstants);</DefineConstants>
<DefineConstants>$(DefineConstants)TRACE</DefineConstants>
</PropertyGroup>
<!--
============================================================================================================================================
</Import>
C:\Program Files\dotnet\sdk\6.0.100-preview.5.21302.13\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.props
============================================================================================================================================
-->
<!--<Import Project="$(MSBuildThisFileDirectory)Microsoft.NET.Sdk.VisualBasic.props" Condition="'$(MSBuildProjectExtension)' == '.vbproj'" />-->
<!--<Import Project="$(MSBuildThisFileDirectory)Microsoft.NET.Sdk.FSharp.props" Condition="'$(MSBuildProjectExtension)' == '.fsproj'" />-->
<!--
============================================================================================================================================
<Import Project="$(MSBuildThisFileDirectory)Microsoft.NET.ILLink.props">
C:\Program Files\dotnet\sdk\6.0.100-preview.5.21302.13\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.ILLink.props
============================================================================================================================================
-->
<!--
***********************************************************************************************
Microsoft.NET.ILLink.props
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
created a backup copy. Incorrect changes to this file will make it
impossible to load or build your projects from the command-line or the IDE.
Copyright (c) .NET Foundation. All rights reserved.
***********************************************************************************************
-->
<!--
============================================================================================================================================
<Import Project="Sdk.props" Sdk="Microsoft.NET.ILLink.Tasks">
C:\Program Files\dotnet\sdk\6.0.100-preview.5.21302.13\Sdks\Microsoft.NET.ILLink.Tasks\Sdk\Sdk.props
============================================================================================================================================
-->
<!--
***********************************************************************************************
Sdk.props
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
created a backup copy. Incorrect changes to this file will make it
impossible to load or build your projects from the command-line or the IDE.
Copyright (c) .NET Foundation. All rights reserved.
***********************************************************************************************
-->
<!-- Only import the build props if the ILLink.Tasks package isn't referenced via NuGet. -->
<!--
============================================================================================================================================
<Import Project="$(MSBuildThisFileDirectory)..\build\Microsoft.NET.ILLink.Tasks.props" Condition="'$(UsingILLinkTasksSdk)' != 'true'">
C:\Program Files\dotnet\sdk\6.0.100-preview.5.21302.13\Sdks\Microsoft.NET.ILLink.Tasks\build\Microsoft.NET.ILLink.Tasks.props
============================================================================================================================================
-->
<!--
***********************************************************************************************
Microsoft.NET.ILLink.Tasks.props
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
created a backup copy. Incorrect changes to this file will make it
impossible to load or build your projects from the command-line or the IDE.
Copyright (c) .NET Foundation. All rights reserved.
***********************************************************************************************
-->
<PropertyGroup>
<UsingILLinkTasksSdk>true</UsingILLinkTasksSdk>
<ILLinkTasksAssembly Condition="'$(MSBuildRuntimeType)' == 'Core'">$(MSBuildThisFileDirectory)..\tools\net5.0\ILLink.Tasks.dll</ILLinkTasksAssembly>
<ILLinkTasksAssembly Condition="'$(MSBuildRuntimeType)' != 'Core'">$(MSBuildThisFileDirectory)..\tools\net472\ILLink.Tasks.dll</ILLinkTasksAssembly>
</PropertyGroup>
<!--
============================================================================================================================================
</Import>
C:\Program Files\dotnet\sdk\6.0.100-preview.5.21302.13\Sdks\Microsoft.NET.ILLink.Tasks\Sdk\Sdk.props
============================================================================================================================================
-->
<!--
============================================================================================================================================
</Import>
C:\Program Files\dotnet\sdk\6.0.100-preview.5.21302.13\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.ILLink.props
============================================================================================================================================
-->
<!--
============================================================================================================================================
</Import>
C:\Program Files\dotnet\sdk\6.0.100-preview.5.21302.13\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.props
============================================================================================================================================
-->
<!--
============================================================================================================================================
<Import Project="$(MSBuildThisFileDirectory)Microsoft.NET.PackTool.props">
C:\Program Files\dotnet\sdk\6.0.100-preview.5.21302.13\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.PackTool.props
============================================================================================================================================
-->
<!--
***********************************************************************************************
Microsoft.NET.PackTool.props
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
created a backup copy. Incorrect changes to this file will make it
impossible to load or build your projects from the command-line or the IDE.
Copyright (c) .NET Foundation. All rights reserved.
***********************************************************************************************
-->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<TargetsForTfmSpecificContentInPackage>$(TargetsForTfmSpecificContentInPackage);PackTool</TargetsForTfmSpecificContentInPackage>
</PropertyGroup>
<!--
============================================================================================================================================
</Import>
C:\Program Files\dotnet\sdk\6.0.100-preview.5.21302.13\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.props
============================================================================================================================================
-->
<!--
============================================================================================================================================
<Import Project="$(MSBuildThisFileDirectory)Microsoft.NET.PackProjectTool.props">
C:\Program Files\dotnet\sdk\6.0.100-preview.5.21302.13\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.PackProjectTool.props
============================================================================================================================================
-->
<!--
***********************************************************************************************
Microsoft.NET.PackProjectTool.props
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
created a backup copy. Incorrect changes to this file will make it
impossible to load or build your projects from the command-line or the IDE.
Copyright (c) .NET Foundation. All rights reserved.
***********************************************************************************************
-->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<TargetsForTfmSpecificContentInPackage>$(TargetsForTfmSpecificContentInPackage);_PackProjectToolValidation</TargetsForTfmSpecificContentInPackage>
</PropertyGroup>
<!--
============================================================================================================================================
</Import>
C:\Program Files\dotnet\sdk\6.0.100-preview.5.21302.13\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.props
============================================================================================================================================
-->
<!--
============================================================================================================================================
<Import Project="$(MSBuildThisFileDirectory)../../Microsoft.NET.Sdk.WindowsDesktop/targets/Microsoft.NET.Sdk.WindowsDesktop.props" Condition="Exists('$(MSBuildThisFileDirectory)../../Microsoft.NET.Sdk.WindowsDesktop/targets/Microsoft.NET.Sdk.WindowsDesktop.props')">
C:\Program Files\dotnet\sdk\6.0.100-preview.5.21302.13\Sdks\Microsoft.NET.Sdk.WindowsDesktop\targets\Microsoft.NET.Sdk.WindowsDesktop.props
============================================================================================================================================
-->
<ItemGroup Condition=" '$(_EnableWindowsDesktopGlobbing)' == 'true' ">
<ApplicationDefinition Include="App.xaml" Condition="'$(EnableDefaultApplicationDefinition)' != 'false' And Exists('$(MSBuildProjectDirectory)/App.xaml') And '$(MSBuildProjectExtension)' == '.csproj'">
<Generator>MSBuild:Compile</Generator>
<XamlRuntime>$(DefaultXamlRuntime)</XamlRuntime>
</ApplicationDefinition>
<ApplicationDefinition Include="Application.xaml" Condition="'$(EnableDefaultApplicationDefinition)' != 'false' And Exists('$(MSBuildProjectDirectory)/Application.xaml') And '$(MSBuildProjectExtension)' == '.vbproj'">
<Generator>MSBuild:Compile</Generator>
<XamlRuntime>$(DefaultXamlRuntime)</XamlRuntime>
</ApplicationDefinition>
<Page Include="**/*.xaml" Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder);@(ApplicationDefinition)" Condition="'$(EnableDefaultPageItems)' != 'false'">
<Generator>MSBuild:Compile</Generator>
<XamlRuntime>$(DefaultXamlRuntime)</XamlRuntime>
</Page>
<!--
See https://github.com/dotnet/wpf/issues/685
Visual Studio would prefer that we remove **/*.xaml instead of
being more precise.
<None Remove="@(Page)"
Condition="'$(EnableDefaultPageItems)' != 'false'" />
<None Remove="@(ApplicationDefinition)"
Condition="'$(EnableDefaultApplicationDefinition)' != 'false'" />
-->
<None Remove="**/*.xaml" Condition="'$(EnableDefaultApplicationDefinition)' != 'false' And '$(EnableDefaultPageItems)' != 'false'" />
</ItemGroup>
<ItemGroup Condition=" '$(_EnableWindowsDesktopNetCoreFrameworkReferences)' == 'true' ">
<FrameworkReference Include="Microsoft.WindowsDesktop.App" IsImplicitlyDefined="true" Condition="('$(UseWPF)' == 'true') And ('$(UseWindowsForms)' == 'true')" />
<FrameworkReference Include="Microsoft.WindowsDesktop.App.WPF" IsImplicitlyDefined="true" Condition="('$(UseWPF)' == 'true') And ('$(UseWindowsForms)' != 'true')" />
<FrameworkReference Include="Microsoft.WindowsDesktop.App.WindowsForms" IsImplicitlyDefined="true" Condition="('$(UseWPF)' != 'true') And ('$(UseWindowsForms)' == 'true')" />
</ItemGroup>
<!--
Traditionally, Visual Studio has supplied these references for .NET Framework based
WPF Projects:
.NET 3.x: PresentationCore, PresentationFramework, WindowsBase
.NET 4.x: PresentationCore, PresentationFramework, WindowsBase, System.Xaml
Microsoft.NET.WindowsDesktop.SDK will supply the following references to .NET Framework based
WPF Projects:
.NET 3.x: PresentationCore, PresentationFramework, WindowsBase
.NET 4.0: PresentationCore, PresentationFramework, WindowsBase, System.Xaml,
UIAutomationClient, UIAutomationClientSideProviders, UIAutomationProvider, UIAutomationTypes
.NET 4.5+: PresentationCore, PresentationFramework, WindowsBase, System.Xaml,
UIAutomationClient, UIAutomationClientSideProviders, UIAutomationProvider, UIAutomationTypes
System.Windows.Controls.Ribbon
-->
<ItemGroup Condition=" '$(_EnableWindowsDesktopNETFrameworkImplicitReference)' == 'true' ">
<!--
The following 3 _WpfCommonNetFxReference items normally require Condition="'$(_TargetFrameworkVersionValue)' >= '3.0'", since
they are supported on .NET Framework 3.0 and above.
This condition is implicitly satisfied by '$(_TargetFrameworkVersionValue)' >= '$(_WindowsDesktopSdkTargetFrameworkVersionFloor)'
in the outer ItemGroup
-->
<_WpfCommonNetFxReference Include="WindowsBase" />
<_WpfCommonNetFxReference Include="PresentationCore" />
<_WpfCommonNetFxReference Include="PresentationFramework" />
<_WpfCommonNetFxReference Include="System.Xaml" Condition="'$(_TargetFrameworkVersionValue)' != '' And '$(_TargetFrameworkVersionValue)' &gt;= '4.0'">
<RequiredTargetFramework>4.0</RequiredTargetFramework>
</_WpfCommonNetFxReference>
<_WpfCommonNetFxReference Include="UIAutomationClient" Condition="'$(_TargetFrameworkVersionValue)' != '' And '$(_TargetFrameworkVersionValue)' &gt;= '4.0'" />
<_WpfCommonNetFxReference Include="UIAutomationClientSideProviders" Condition="'$(_TargetFrameworkVersionValue)' != '' And '$(_TargetFrameworkVersionValue)' &gt;= '4.0'" />
<_WpfCommonNetFxReference Include="UIAutomationProvider" Condition="'$(_TargetFrameworkVersionValue)' != '' And '$(_TargetFrameworkVersionValue)' &gt;= '4.0'" />
<_WpfCommonNetFxReference Include="UIAutomationTypes" Condition="'$(_TargetFrameworkVersionValue)' != '' And '$(_TargetFrameworkVersionValue)' &gt;= '4.0'" />
<_WpfCommonNetFxReference Include="System.Windows.Controls.Ribbon" Condition="'$(_TargetFrameworkVersionValue)' != '' And '$(_TargetFrameworkVersionValue)' &gt;= '4.5'" />
</ItemGroup>
<ItemGroup Condition=" '$(_EnableWindowsDesktopNETFrameworkImplicitReference)' == 'true' ">
<_SDKImplicitReference Include="@(_WpfCommonNetFxReference)" Condition="'$(UseWPF)' == 'true'" />
<_SDKImplicitReference Include="System.Windows.Forms" Condition="('$(UseWindowsForms)' == 'true') " />
<_SDKImplicitReference Include="WindowsFormsIntegration" Condition=" ('$(UseWindowsForms)' == 'true') And ('$(UseWPF)' == 'true') " />
</ItemGroup>
<!--
Supported (and unsupported) TargetFrameworks
Visual Studio Project System determines the list of valid TargetFrameworks to show
in the Project properties by querying SupportedTargetFramework values.
The Project System does not refer to this list at this time for .NET Framework TFM's.
-->
<!--
When WindowsDesktop SDK is used without setting UseWPF or UseWindowsForms, it shows a (suppressible) warning and functions much
like Microsoft.NET.Sdk
Likewise, when WindowsDesktop SDK is used with a netcore TFM that is less than 3.0, it will simply act as if it were an
Microsoft.NET.Sdk project (and show a suppressible build-time warning).
Detect these situations and skip updates to @(SupportedTargetFramework) etc.
-->
<ItemGroup Condition=" '$(_RemoveUnsupportedTargetFrameworksForWindowsDesktop)' == 'true' ">
<!--
Windows Forms and WPF are supported only on .NET Core 3.0+
-->
<_UnsupportedNETCoreAppTargetFramework Include=".NETCoreApp,Version=v1.0" />
<_UnsupportedNETCoreAppTargetFramework Include=".NETCoreApp,Version=v1.1" />
<_UnsupportedNETCoreAppTargetFramework Include=".NETCoreApp,Version=v2.0" />
<_UnsupportedNETCoreAppTargetFramework Include=".NETCoreApp,Version=v2.1" />
<_UnsupportedNETCoreAppTargetFramework Include=".NETCoreApp,Version=v2.2" />
<!--
Windows Forms and WPF are not supported an any .NET Standard targets
-->
<_UnsupportedNETStandardTargetFramework Include="@(SupportedNETStandardTargetFramework)" />
<!--
Windows Forms was supported since .NET Framework 1.0, and is currently supported on
.NET Framework 2.0+.
WPF is supported on .NET Framework and WPF are supported on .NET Framework 3.0+
In practice, the WindowsDesktop SDK is only supported on .NET Framework 3.0+ - this is controlled
by $(_WindowsDesktopSdkTargetFrameworkVersionFloor), defined as 3.0, which applies to both .NETFramework
and .NETCore.
Here, we will encode .NET Framework 3.0 as the lowest supported version for both Windows Forms and WPF.
The SDK does not define versions < 2.0 in @(SupportedNETFrameworkTargetFramework) list, so none of those
need to be excluded here - removing 2.0 would suffice.
-->
<_UnsupportedNETFrameworkTargetFramework Include=".NETFramework,Version=v2.0" />
<SupportedNETCoreAppTargetFramework Remove="@(_UnsupportedNETCoreAppTargetFramework)" />
<SupportedNETStandardTargetFramework Remove="@(_UnsupportedNETStandardTargetFramework)" />
<SupportedNETFrameworkTargetFramework Remove="@(_UnsupportedNETFrameworkTargetFramework)" />
<SupportedTargetFramework Remove="@(_UnsupportedNETCoreAppTargetFramework);@(_UnsupportedNETStandardTargetFramework);@(_UnsupportedNETFrameworkTargetFramework)" />
</ItemGroup>
<!--
Workaround: https://github.com/microsoft/msbuild/issues/4948
Disable .NET Framework's inbox WinFX targets when using the SDK, since, we really don't use it's build logic
and is superseded by 'WindowsDesktop' SDK that provides it's own WinFX for both NETFX and CoreCLR targets.
Make it opt-out, just in case, if something fails or we don't want to use 'WindowsDesktop' SDK's version.
-->
<PropertyGroup>
<ImportFrameworkWinFXTargets Condition="'$(ImportFrameworkWinFXTargets)' == ''">false</ImportFrameworkWinFXTargets>
</PropertyGroup>
<!--
============================================================================================================================================
</Import>
C:\Program Files\dotnet\sdk\6.0.100-preview.5.21302.13\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.props
============================================================================================================================================
-->
<!--
============================================================================================================================================
<Import Project="$(MSBuildThisFileDirectory)Microsoft.NET.Windows.props">
C:\Program Files\dotnet\sdk\6.0.100-preview.5.21302.13\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Windows.props
============================================================================================================================================
-->
<!--
***********************************************************************************************
Microsoft.NET.Windows.props
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
created a backup copy. Incorrect changes to this file will make it
impossible to load or build your projects from the command-line or the IDE.
Copyright (c) .NET Foundation. All rights reserved.
***********************************************************************************************
-->
<ItemGroup Condition=" '$(IncludeWindowsSDKRefFrameworkReferences)' == 'true' " xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<FrameworkReference Include="Microsoft.Windows.SDK.NET.Ref" IsImplicitlyDefined="true" Pack="false" PrivateAssets="All" />
</ItemGroup>
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<MicrosoftNETWindowsWorkloadInstalled>true</MicrosoftNETWindowsWorkloadInstalled>
<!--https://github.com/dotnet/sdk/issues/12403-->
<_TargetFrameworkVersionValue>0.0</_TargetFrameworkVersionValue>
<_WindowsDesktopSdkTargetFrameworkVersionFloor>3.0</_WindowsDesktopSdkTargetFrameworkVersionFloor>
</PropertyGroup>
<!--
============================================================================================================================================
</Import>
C:\Program Files\dotnet\sdk\6.0.100-preview.5.21302.13\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.props
============================================================================================================================================
-->
<!--
============================================================================================================================================
</Import>
C:\Program Files\dotnet\sdk\6.0.100-preview.5.21302.13\Sdks\Microsoft.NET.Sdk\Sdk\Sdk.props
============================================================================================================================================
-->
<!--
============================================================================================================================================
</Import>
C:\temp\consoleapp1\consoleapp1.csproj
============================================================================================================================================
-->
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>
<!--
============================================================================================================================================
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk">
This import was added implicitly because the Project element's Sdk attribute specified "Microsoft.NET.Sdk".
C:\Program Files\dotnet\sdk\6.0.100-preview.5.21302.13\Sdks\Microsoft.NET.Sdk\Sdk\Sdk.targets
============================================================================================================================================
-->
<!--
***********************************************************************************************
Sdk.targets
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
created a backup copy. Incorrect changes to this file will make it
impossible to load or build your projects from the command-line or the IDE.
Copyright (c) .NET Foundation. All rights reserved.
***********************************************************************************************
-->
<!-- Using the same property as Microsoft.CSharp.targets and presumably Microsoft.VisualBasic.targets here -->
<PropertyGroup Condition="'$(TargetFrameworks)' != '' and '$(TargetFramework)' == ''" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<IsCrossTargetingBuild>true</IsCrossTargetingBuild>
</PropertyGroup>
<!--<Import Project="$(MSBuildThisFileDirectory)..\targets\Microsoft.NET.Sdk.BeforeCommonCrossTargeting.targets" Condition="'$(IsCrossTargetingBuild)' == 'true'" />-->
<!--
============================================================================================================================================
<Import Project="$(MSBuildThisFileDirectory)..\targets\Microsoft.NET.Sdk.BeforeCommon.targets" Condition="'$(IsCrossTargetingBuild)' != 'true'">
C:\Program Files\dotnet\sdk\6.0.100-preview.5.21302.13\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.BeforeCommon.targets
============================================================================================================================================
-->
<!--
***********************************************************************************************
Microsoft.NET.Sdk.BeforeCommon.targets
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
created a backup copy. Incorrect changes to this file will make it
impossible to load or build your projects from the command-line or the IDE.
Copyright (c) .NET Foundation. All rights reserved.
***********************************************************************************************
-->
<!-- For projects that aren't using Microsoft.NET.Sdk, these props files won't have been imported yet.
So import them here. -->
<!--<ImportGroup Condition="'$(UsingNETSdkDefaults)' != 'true'">-->
<!--<Import Project="Microsoft.NET.Sdk.DefaultItems.props" />-->
<!--<Import Project="Microsoft.NET.SupportedTargetFrameworks.props" />-->
<!--<Import Project="Microsoft.NET.SupportedPlatforms.props" />-->
<!--<Import Project="Microsoft.NET.WindowsSdkSupportedTargetPlatforms.props" />-->
<!--</ImportGroup>-->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<_IsExecutable Condition="'$(OutputType)' == 'Exe' or '$(OutputType)'=='WinExe'">true</_IsExecutable>
</PropertyGroup>
<PropertyGroup Condition="'$(HasRuntimeOutput)' == ''" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<HasRuntimeOutput>$(_IsExecutable)</HasRuntimeOutput>
<_UsingDefaultForHasRuntimeOutput>true</_UsingDefaultForHasRuntimeOutput>
</PropertyGroup>
<!--
============================================================================================================================================
<Import Project="$(MSBuildThisFileDirectory)Microsoft.NET.DefaultAssemblyInfo.targets" Condition="'$(UsingNETSdkDefaults)' == 'true'">
C:\Program Files\dotnet\sdk\6.0.100-preview.5.21302.13\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.DefaultAssemblyInfo.targets
============================================================================================================================================
-->
<!--
***********************************************************************************************
Microsoft.NET.DefaultAssemblyInfo.targets
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
created a backup copy. Incorrect changes to this file will make it
impossible to load or build your projects from the command-line or the IDE.
Copyright (c) .NET Foundation. All rights reserved.
***********************************************************************************************
-->
<PropertyGroup Condition=" '$(Version)' == '' " xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<VersionPrefix Condition=" '$(VersionPrefix)' == '' ">1.0.0</VersionPrefix>
<Version Condition=" '$(VersionSuffix)' != '' ">$(VersionPrefix)-$(VersionSuffix)</Version>
<Version Condition=" '$(Version)' == '' ">$(VersionPrefix)</Version>
</PropertyGroup>
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Authors Condition=" '$(Authors)'=='' ">$(AssemblyName)</Authors>
<Company Condition=" '$(Company)'=='' ">$(Authors)</Company>
<AssemblyTitle Condition=" '$(AssemblyTitle)' == '' ">$(AssemblyName)</AssemblyTitle>
<Product Condition=" '$(Product)' == ''">$(AssemblyName)</Product>
</PropertyGroup>
<!--
============================================================================================================================================
</Import>
C:\Program Files\dotnet\sdk\6.0.100-preview.5.21302.13\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.BeforeCommon.targets
============================================================================================================================================
-->
<!-- Set default intermediate and output paths -->
<!--
============================================================================================================================================
<Import Project="$(MSBuildThisFileDirectory)Microsoft.NET.DefaultOutputPaths.targets" Condition="'$(UsingNETSdkDefaults)' == 'true'">
C:\Program Files\dotnet\sdk\6.0.100-preview.5.21302.13\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.DefaultOutputPaths.targets
============================================================================================================================================
-->
<!--
***********************************************************************************************
Microsoft.NET.DefaultOutputPaths.targets
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
created a backup copy. Incorrect changes to this file will make it
impossible to load or build your projects from the command-line or the IDE.
Copyright (c) .NET Foundation. All rights reserved.
***********************************************************************************************
-->
<!--
Apply the same default output paths as Microsoft.Common.targets now since we're running before them,
but need to adjust them and/or make decisions in terms of them.
Also note that common targets only set a default OutputPath if neither configuration nor
platform were set by the user. This was used to validate that a valid configuration is passed,
assuming the convention maintained by VS that every Configuration|Platform combination had
an explicit OutputPath. Since we now want to support leaner project files with less
duplication and more automatic defaults, we always set a default OutputPath and can no
longer depend on that convention for validation. Getting validation re-enabled with a
different mechanism is tracked by https://github.com/dotnet/sdk/issues/350
-->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Configuration Condition="'$(Configuration)'==''">Debug</Configuration>
<Platform Condition="'$(Platform)'==''">AnyCPU</Platform>
<PlatformName Condition="'$(PlatformName)' == ''">$(Platform)</PlatformName>
<BaseOutputPath Condition="'$(BaseOutputPath)' == ''">bin\</BaseOutputPath>
<BaseOutputPath Condition="!HasTrailingSlash('$(BaseOutputPath)')">$(BaseOutputPath)\</BaseOutputPath>
<OutputPath Condition="'$(OutputPath)' == '' and '$(PlatformName)' == 'AnyCPU'">$(BaseOutputPath)$(Configuration)\</OutputPath>
<OutputPath Condition="'$(OutputPath)' == '' and '$(PlatformName)' != 'AnyCPU'">$(BaseOutputPath)$(PlatformName)\$(Configuration)\</OutputPath>
<OutputPath Condition="!HasTrailingSlash('$(OutputPath)')">$(OutputPath)\</OutputPath>
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)' == ''">obj\</BaseIntermediateOutputPath>
<BaseIntermediateOutputPath Condition="!HasTrailingSlash('$(BaseIntermediateOutputPath)')">$(BaseIntermediateOutputPath)\</BaseIntermediateOutputPath>
<IntermediateOutputPath Condition=" $(IntermediateOutputPath) == '' and '$(PlatformName)' == 'AnyCPU' ">$(BaseIntermediateOutputPath)$(Configuration)\</IntermediateOutputPath>
<IntermediateOutputPath Condition=" $(IntermediateOutputPath) == '' and '$(PlatformName)' != 'AnyCPU' ">$(BaseIntermediateOutputPath)$(PlatformName)\$(Configuration)\</IntermediateOutputPath>
<IntermediateOutputPath Condition="!HasTrailingSlash('$(IntermediateOutputPath)')">$(IntermediateOutputPath)\</IntermediateOutputPath>
</PropertyGroup>
<!-- Set the package output path (for nuget pack target) now, before the TargetFramework is appended -->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PackageOutputPath Condition="'$(PackageOutputPath)' == ''">$(OutputPath)</PackageOutputPath>
</PropertyGroup>
<!--
============================================================================================================================================
</Import>
C:\Program Files\dotnet\sdk\6.0.100-preview.5.21302.13\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.BeforeCommon.targets
============================================================================================================================================
-->
<!-- Before any additional SDK targets are imported, import the publish profile.
This allows the publish profile to set properties like RuntimeIdentifier and them be
respected by the SDK. -->
<!--
============================================================================================================================================
<Import Project="$(MSBuildThisFileDirectory)Microsoft.NET.Sdk.ImportPublishProfile.targets" Condition="'$(PublishProfileImported)' != 'true'">
C:\Program Files\dotnet\sdk\6.0.100-preview.5.21302.13\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.ImportPublishProfile.targets
============================================================================================================================================
-->
<!--
***********************************************************************************************
Microsoft.NET.Sdk.ImportPublishProfile.targets
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
created a backup copy. Incorrect changes to this file will make it
impossible to load or build your projects from the command-line or the IDE.
Copyright (c) .NET Foundation. All rights reserved.
***********************************************************************************************
-->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- Default to having imported the publish profile so the Web SDK doesn't also attempt to do so. -->
<PublishProfileImported>true</PublishProfileImported>
<_PublishProfileDesignerFolder Condition="'$(AppDesignerFolder)' != ''">$(AppDesignerFolder)</_PublishProfileDesignerFolder>
<_PublishProfileDesignerFolder Condition="'$(_PublishProfileDesignerFolder)' == ''">Properties</_PublishProfileDesignerFolder>
<_PublishProfileRootFolder Condition="'$(_PublishProfileRootFolder)' == ''">$(MSBuildProjectDirectory)\$(_PublishProfileDesignerFolder)\PublishProfiles\</_PublishProfileRootFolder>
<PublishProfileName Condition="'$(PublishProfileName)' == '' and '$(PublishProfile)' != ''">$([System.IO.Path]::GetFileNameWithoutExtension($(PublishProfile)))</PublishProfileName>
<PublishProfileFullPath Condition="'$(PublishProfileFullPath)' == '' and '$(PublishProfileName)' != ''">$(_PublishProfileRootFolder)$(PublishProfileName).pubxml</PublishProfileFullPath>
<WebPublishProfileFile Condition="'$(WebPublishProfileFile)' == '' and Exists('$(PublishProfileFullPath)')">$(PublishProfileFullPath)</WebPublishProfileFile>
<!-- If the publish profile doesn't exist, mark as not imported.
This allows the Web SDK to import some default profiles that come with the Web SDK.
Publishing in Visual Studio sets `WebPublishProfileFile` as a global property.
Therefore, check that `ProjectToOverrideProjectExtensionsPath` is equal to `MSBuildProjectFullPath`
to limit the import to the project being published. -->
<PublishProfileImported Condition="('$(ProjectToOverrideProjectExtensionsPath)' != '' and&#xD;&#xA; '$(ProjectToOverrideProjectExtensionsPath)' != '$(MSBuildProjectFullPath)') or&#xD;&#xA; '$(WebPublishProfileFile)' == '' or&#xD;&#xA; !Exists('$(WebPublishProfileFile)')">false</PublishProfileImported>
</PropertyGroup>
<!--<Import Project="$(WebPublishProfileFile)" Condition="'$(PublishProfileImported)' == 'true'" />-->
<!--<Import Project="$(WebPublishProfileFile).user" Condition="'$(PublishProfileImported)' == 'true' and Exists('$(WebPublishProfileFile).user')" />-->
<!--
============================================================================================================================================
</Import>
C:\Program Files\dotnet\sdk\6.0.100-preview.5.21302.13\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.BeforeCommon.targets
============================================================================================================================================
-->
<!--
Expand TargetFramework to TargetFrameworkIdentifier and TargetFrameworkVersion,
and adjust intermediate and output paths to include it.
-->
<!--
============================================================================================================================================
<Import Project="$(MSBuildThisFileDirectory)Microsoft.NET.TargetFrameworkInference.targets">
C:\Program Files\dotnet\sdk\6.0.100-preview.5.21302.13\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.TargetFrameworkInference.targets
============================================================================================================================================
-->
<!--
***********************************************************************************************
Microsoft.NET.TargetFrameworkInference.targets
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
created a backup copy. Incorrect changes to this file will make it
impossible to load or build your projects from the command-line or the IDE.
Copyright (c) .NET Foundation. All rights reserved.
***********************************************************************************************
-->
<!--
Note that this file is only included when $(TargetFramework) is set and so we do not need to check that here.
Common targets require that $(TargetFrameworkIdentifier) and $(TargetFrameworkVersion) are set by static evaluation
before they are imported. In common cases (currently netstandard, netcoreapp, or net), we infer them from the short
names given via TargetFramework to allow for terseness and lack of duplication in project files.
For other cases, the user must supply them manually.
For cases where inference is supported, the user need only specify the targets in TargetFrameworks, e.g:
<PropertyGroup>
<TargetFrameworks>net45;netstandard1.0</TargetFrameworks>
</PropertyGroup>
For cases where inference is not supported, identifier, version and profile can be specified explicitly as follows:
<PropertyGroup>
<TargetFrameworks>portable-net451+win81;xyz1.0</TargetFrameworks>
<PropertyGroup>
<PropertyGroup Condition="'$(TargetFramework)' == 'portable-net451+win81'">
<TargetFrameworkIdentifier>.NETPortable</TargetFrameworkIdentifier>
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
<TargetFrameworkProfile>Profile44</TargetFrameworkProfile>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFramework)' == 'xyz1.0'">
<TargetFrameworkIdentifier>Xyz</TargetFrameworkVersion>
<PropertyGroup>
Note in the xyz1.0 case, which is meant to demonstrate a framework we don't yet recognize, we can still
infer the version of 1.0. The user can also override it as always we honor a TargetFrameworkIdentifier
or TargetFrameworkVersion that is already set.
-->
<!-- Hook for importing custom target framework parsing -->
<!--<Import Project="$(BeforeTargetFrameworkInferenceTargets)" Condition="$(BeforeTargetFrameworkInferenceTargets) != ''" />-->
<!--
Parse TargetFramework properties.
-->
<PropertyGroup Condition="'$(TargetFramework)' != '' and ('$(TargetFrameworkIdentifier)' == '' or '$(TargetFrameworkVersion)' == '')" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<TargetFrameworkIdentifier>$([MSBuild]::GetTargetFrameworkIdentifier('$(TargetFramework)'))</TargetFrameworkIdentifier>
<TargetFrameworkVersion>v$([MSBuild]::GetTargetFrameworkVersion('$(TargetFramework)', 2))</TargetFrameworkVersion>
</PropertyGroup>
<!--
Parse TargetPlatform properties.
-->
<PropertyGroup Condition="'$(TargetFramework)' != '' and ('$(TargetPlatformIdentifier)' == '' or '$(TargetPlatformVersion)' == '')" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<TargetPlatformIdentifier Condition="'$(TargetPlatformIdentifier)' == ''">$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)'))</TargetPlatformIdentifier>
<TargetPlatformVersion Condition="'$(TargetPlatformIdentifier)' == 'Windows'">$([MSBuild]::GetTargetPlatformVersion('$(TargetFramework)', 4))</TargetPlatformVersion>
<TargetPlatformVersion Condition="'$(TargetPlatformVersion)' == '' or ('$(TargetPlatformIdentifier)' == 'Windows' and !$([MSBuild]::VersionGreaterThanOrEquals($(TargetPlatformVersion), 10.0)))">$([MSBuild]::GetTargetPlatformVersion('$(TargetFramework)', 2))</TargetPlatformVersion>
<TargetPlatformVersion Condition="$([MSBuild]::VersionEquals($(TargetPlatformVersion), 0.0))" />
<!-- Normalize casing of windows to Windows -->
<TargetPlatformIdentifier Condition="'$(TargetPlatformIdentifier)' == 'Windows'">Windows</TargetPlatformIdentifier>
</PropertyGroup>
<!--
Trigger an error if we're unable to infer the framework identifier and version.
We have to evaluate this here and not in the target because by the time the target runs,
Microsoft.Common.targets will have defaulted to .NETFramework,Version=v4.0
-->
<PropertyGroup Condition="'$(TargetFrameworkIdentifier)' == '' or '$(TargetFrameworkIdentifier)' == 'Unsupported' or '$(TargetFrameworkVersion)' == ''" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<_UnsupportedTargetFrameworkError>true</_UnsupportedTargetFrameworkError>
</PropertyGroup>
<!--
NOTE: We must not validate the TFM before restore target runs as it prevents adding additional TFM
support from being provided by a nuget package such as MSBuild.Sdk.Extras.
We run before RunResolvePackageDependencies and GetReferenceAssemblyPaths so that design-time builds
which do not currently invoke _CheckForInvalidConfigurationAndPlatform, will not trigger spurious
errors that are only consequences of the root cause identified here.
-->
<Target Name="_CheckForUnsupportedTargetFramework" BeforeTargets="_CheckForInvalidConfigurationAndPlatform;RunResolvePackageDependencies;GetFrameworkPaths;GetReferenceAssemblyPaths;Restore" Condition="'$(_UnsupportedTargetFrameworkError)' == 'true'" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<NETSdkError Condition="!$(TargetFramework.Contains(';'))" ResourceName="CannotInferTargetFrameworkIdentifierAndVersion" FormatArguments="$([MSBuild]::Escape('$(TargetFramework)'))" />
<NETSdkError Condition="$(TargetFramework.Contains(';'))" ResourceName="TargetFrameworkWithSemicolon" FormatArguments="$([MSBuild]::Escape('$(TargetFramework)'))" />
</Target>
<Target Name="_CheckForUnsupportedTargetPlatformIdentifier" BeforeTargets="_CheckForInvalidConfigurationAndPlatform;RunResolvePackageDependencies;GetFrameworkPaths;GetReferenceAssemblyPaths;CollectPackageReferences" Condition="'$(TargetPlatformIdentifier)' != '' and '$(TargetFrameworkIdentifier)' == '.NETCoreApp' and $([MSBuild]::VersionGreaterThanOrEquals($(TargetFrameworkVersion), 5.0))" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<TargetPlatformSupported Condition="'$(TargetPlatformIdentifier)' == 'Windows'">true</TargetPlatformSupported>
</PropertyGroup>
<NETSdkError Condition="'$(TargetPlatformSupported)' != 'true'" ResourceName="UnsupportedTargetPlatformIdentifier" FormatArguments="$(TargetPlatformIdentifier)" />
</Target>
<UsingTask TaskName="AllowEmptyTelemetry" AssemblyFile="$(MicrosoftNETBuildTasksAssembly)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<Target Name="_CollectTargetFrameworkForTelemetry" AfterTargets="_CheckForUnsupportedTargetFramework" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<AllowEmptyTelemetry EventName="targetframeworkeval" EventData="TargetFrameworkVersion=$([MSBuild]::Escape('$(TargetFrameworkMoniker)'));RuntimeIdentifier=$(RuntimeIdentifier);SelfContained=$(SelfContained);UseApphost=$(UseApphost);OutputType=$(OutputType)" />
</Target>
<!--
Don't leave TargetFrameworkVersion empty if it still hasn't been determined. We will trigger the error above,
but we need this to be a valid version so that our error message does not get pre-empted by failure to interpret
version comparison expressions, which is currently unrecoverable in VS.
Also don't leave TargetFrameworkIdentifier unset as it will be defaulted to .NETFramework by common targets, which
can cause restore (which we cannot block, see above) to silently succeed for empty TargetFramework.
-->
<PropertyGroup Condition="'$(TargetFrameworkVersion)' == ''" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<TargetFrameworkVersion>v0.0</TargetFrameworkVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFrameworkIdentifier)' == ''" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<TargetFrameworkIdentifier>_</TargetFrameworkIdentifier>
</PropertyGroup>
<!--
Trigger an error if targeting a higher version of .NET Core or .NET Standard than is supported by the current SDK.
-->
<Target Name="_CheckForUnsupportedNETCoreVersion" BeforeTargets="_CheckForInvalidConfigurationAndPlatform;Restore;CollectPackageReferences" Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp' And '$(NETCoreAppMaximumVersion)' != ''" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<NETSdkError Condition="'$(_TargetFrameworkVersionWithoutV)' &gt; '$(NETCoreAppMaximumVersion)'" ResourceName="UnsupportedTargetFrameworkVersion" FormatArguments=".NET;$(_TargetFrameworkVersionWithoutV);$(NETCoreAppMaximumVersion)" />
</Target>
<!--
Trigger an error if C++ project targeting a lower version of .NET Core than 3.1.
-->
<Target Name="_CheckForUnsupportedCppNETCoreVersion" BeforeTargets="_CheckForInvalidConfigurationAndPlatform;Restore;CollectPackageReferences" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<NETSdkError Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp' and '$(_TargetFrameworkVersionWithoutV)' &lt; '3.1' and ('$(Language)' == 'C++' and '$(_EnablePackageReferencesInVCProjects)' != 'true')" ResourceName="CppRequiresTFMVersion31" />
</Target>
<!--C++/CLI has its own logic of determine TargetPlatformIdentifier and TargetPlatformVersion-->
<PropertyGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp' and $([MSBuild]::VersionGreaterThanOrEquals($(TargetFrameworkVersion), 5.0)) and ('$(Language)' != 'C++' or '$(_EnablePackageReferencesInVCProjects)' == 'true')" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<_EnableDefaultWindowsPlatform>false</_EnableDefaultWindowsPlatform>
<UseOSWinMdReferences>false</UseOSWinMdReferences>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETStandard' And '$(NETStandardMaximumVersion)' == ''" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<NETStandardMaximumVersion>2.1</NETStandardMaximumVersion>
</PropertyGroup>
<Target Name="_CheckForUnsupportedNETStandardVersion" BeforeTargets="_CheckForInvalidConfigurationAndPlatform;Restore;CollectPackageReferences" Condition="'$(TargetFrameworkIdentifier)' == '.NETStandard' And '$(NETStandardMaximumVersion)' != ''" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<NETSdkError Condition="'$(_TargetFrameworkVersionWithoutV)' &gt; '$(NETStandardMaximumVersion)'" ResourceName="UnsupportedTargetFrameworkVersion" FormatArguments=".NET Standard;$(_TargetFrameworkVersionWithoutV);$(NETStandardMaximumVersion)" />
</Target>
<Target Name="_CheckForUnsupportedTargetFrameworkAndFeatureCombination" BeforeTargets="_CheckForInvalidConfigurationAndPlatform;Restore;CollectPackageReferences" Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<NETSdkError Condition="'$(UsingNETSdkDefaults)' != 'true'" ResourceName="NETFrameworkWithoutUsingNETSdkDefaults" />
</Target>
<Target Name="_CheckForSupportedOSPlatformVersionHigherThanTargetPlatformVersion" BeforeTargets="_CheckForInvalidConfigurationAndPlatform" Condition="'$(TargetPlatformVersion)' != '' and '$(TargetFrameworkIdentifier)' == '.NETCoreApp' and $([MSBuild]::VersionGreaterThanOrEquals($(TargetFrameworkVersion), 5.0))" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<NETSdkError Condition="'$(SupportedOSPlatformVersion)' != '' and $(TargetPlatformVersion) != '' and $([MSBuild]::VersionGreaterThan($(SupportedOSPlatformVersion), $(TargetPlatformVersion)))" ResourceName="CannotHaveSupportedOSPlatformVersionHigherThanTargetPlatformVersion" FormatArguments="$(SupportedOSPlatformVersion);$(TargetPlatformVersion)" />
</Target>
<!--C++/CLI targets rely on the patch version of the Windows SDK version as TargetPlatformVersion. Skip the normalization.-->
<Target Name="_NormalizeTargetPlatformVersion" BeforeTargets="ProcessFrameworkReferences" Condition="'$(TargetPlatformVersion)' != '' and '$(TargetFrameworkIdentifier)' == '.NETCoreApp' and $([MSBuild]::VersionGreaterThanOrEquals($(TargetFrameworkVersion), 5.0)) and ('$(Language)' != 'C++' or '$(_EnablePackageReferencesInVCProjects)' == 'true')" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<_ValidTargetPlatformVersion Include="@(SdkSupportedTargetPlatformVersion)" Condition="'@(SdkSupportedTargetPlatformVersion)' != '' and $([MSBuild]::VersionEquals(%(Identity), $(TargetPlatformVersion)))" />
</ItemGroup>
<PropertyGroup>
<TargetPlatformVersion Condition="'@(_ValidTargetPlatformVersion)' != '' and '@(_ValidTargetPlatformVersion-&gt;Count())' == '1' and '@(_ValidTargetPlatformVersion)' != '$(TargetPlatformVersion)'">@(_ValidTargetPlatformVersion)</TargetPlatformVersion>
</PropertyGroup>
</Target>
<Target Name="_CheckForInvalidTargetPlatformVersion" BeforeTargets="_CheckForInvalidConfigurationAndPlatform" DependsOnTargets="_NormalizeTargetPlatformVersion" Condition="'$(TargetPlatformVersion)' != '' and '$(TargetFrameworkIdentifier)' == '.NETCoreApp' and $([MSBuild]::VersionGreaterThanOrEquals($(TargetFrameworkVersion), 5.0)) and ('$(Language)' != 'C++' or '$(_EnablePackageReferencesInVCProjects)' == 'true')" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<TargetPlatformVersionSupported Condition="'$(TargetPlatformVersionSupported)' == '' and '@(_ValidTargetPlatformVersion)' != ''">true</TargetPlatformVersionSupported>
<_ValidTargetPlatformVersions Condition="'@(SdkSupportedTargetPlatformVersion)' != ''">@(SdkSupportedTargetPlatformVersion, '%0a')</_ValidTargetPlatformVersions>
<_ValidTargetPlatformVersions Condition="'@(SdkSupportedTargetPlatformVersion)' == ''">None</_ValidTargetPlatformVersions>
</PropertyGroup>
<NetSdkError Condition="'$(TargetPlatformVersionSupported)' != 'true'" ResourceName="InvalidTargetPlatformVersion" FormatArguments="$(TargetPlatformVersion);$(TargetPlatformIdentifier);$(_ValidTargetPlatformVersions)" />
</Target>
<!-- Exclude files from OutputPath and IntermediateOutputPath from default item globs. Use the value
of these properties before the TargetFramework is appended, so that if these values are specified
in the project file, the specified value will be used for the exclude. -->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<DefaultItemExcludes>$(DefaultItemExcludes);$(OutputPath)/**</DefaultItemExcludes>
<DefaultItemExcludes>$(DefaultItemExcludes);$(IntermediateOutputPath)/**</DefaultItemExcludes>
</PropertyGroup>
<!-- Projects which don't use Microsoft.NET.Sdk will typically define the OutputPath directly (usually in a
Configuration-specific PropertyGroup), so in that case we won't append to it by default. -->
<PropertyGroup Condition="'$(UsingNETSdkDefaults)' == 'true'" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<AppendTargetFrameworkToOutputPath Condition="'$(AppendTargetFrameworkToOutputPath)' == ''">true</AppendTargetFrameworkToOutputPath>
</PropertyGroup>
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ProduceReferenceAssembly Condition="'$(ProduceReferenceAssembly)' == '' and '$(TargetFrameworkIdentifier)' == '.NETCoreApp' and $([MSBuild]::VersionGreaterThanOrEquals($(TargetFrameworkVersion), 5.0))">true</ProduceReferenceAssembly>
</PropertyGroup>
<!--
Append $(TargetFramework) directory to output and intermediate paths to prevent bin clashes between
targets.
-->
<PropertyGroup Condition="'$(AppendTargetFrameworkToOutputPath)' == 'true' and '$(TargetFramework)' != '' and '$(_UnsupportedTargetFrameworkError)' != 'true'" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<IntermediateOutputPath>$(IntermediateOutputPath)$(TargetFramework.ToLowerInvariant())\</IntermediateOutputPath>
<OutputPath>$(OutputPath)$(TargetFramework.ToLowerInvariant())\</OutputPath>
</PropertyGroup>
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<DisableWinExeOutputInference Condition="'$(DisableWinExeOutputInference)' == '' and ('$(TargetFrameworkIdentifier)' != '.NETCoreApp' or $([MSBuild]::VersionLessThan('$(TargetFrameworkVersion)', '5.0')))">true</DisableWinExeOutputInference>
<OutputType Condition="'$(DisableWinExeOutputInference)' != 'true' and '$(OutputType)' == 'Exe' and ('$(UseWindowsForms)' == 'true' or '$(UseWPF)' == 'true')">WinExe</OutputType>
</PropertyGroup>
<!--
============================================================================================================================================
</Import>
C:\Program Files\dotnet\sdk\6.0.100-preview.5.21302.13\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.BeforeCommon.targets
============================================================================================================================================
-->
<!-- Related issue: https://github.com/dotnet/sdk/issues/12324-->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- Import winfx targets when we're targeting .NETFramework and not importing the newer WindowsDesktop targets via `UseWPF`. -->
<ImportFrameworkWinFXTargets Condition="'$(ImportFrameworkWinFXTargets)' == '' and '$(UseWPF)' != 'true' and '$(TargetFrameworkIdentifier)' == '.NETFramework'">true</ImportFrameworkWinFXTargets>
<!-- Otherwise, don't import. -->
<ImportFrameworkWinFXTargets Condition="'$(ImportFrameworkWinFXTargets)' == ''">false</ImportFrameworkWinFXTargets>
</PropertyGroup>
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<_TargetFrameworkVersionWithoutV>$(TargetFrameworkVersion.TrimStart('vV'))</_TargetFrameworkVersionWithoutV>
</PropertyGroup>
<!--
Use RuntimeIdentifier to determine PlatformTarget.
Also, enforce that RuntimeIdentifier is always specified for .NETFramework executables.
-->
<!--
============================================================================================================================================
<Import Project="$(MSBuildThisFileDirectory)Microsoft.NET.RuntimeIdentifierInference.targets">
C:\Program Files\dotnet\sdk\6.0.100-preview.5.21302.13\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInference.targets
============================================================================================================================================
-->
<!--
***********************************************************************************************
Microsoft.NET.RuntimeIdentifierInference.targets
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
created a backup copy. Incorrect changes to this file will make it
impossible to load or build your projects from the command-line or the IDE.
Copyright (c) .NET Foundation. All rights reserved.
***********************************************************************************************
-->
<!--
.NET Framework cannot load native package dependencies dynamically
based on the current architecture. We must have a RID to resolve
and copy native dependencies to the output directory.
When building a .NET Framework exe on Windows and not given a RID,
we'll pick either win7-x64 or win7-x86 (based on PlatformTarget)
if we're not given an explicit RID. However, if after resolving
NuGet assets we find no copy-local native dependencies, we will
emit the binary as AnyCPU.
Note that we must set the RID here early (to be seen during NuGet
restore) in order for the project.assets.json to include the
native dependencies that will let us make the final call on
AnyCPU or platform-specific.
This allows these common cases to work without requiring mention
of RuntimeIdentifier in the user project PlatformTarget:
1. Building an AnyCPU .NET Framework application on any host OS
with no native NuGet dependencies.
2. Building an x86 or x64 .NET Framework application on and for
Windows with native NuGet dependencies that do not require
greater than win7.
However, any other combination of host operating system, CPU
architecture, and minimum Windows version will require some
manual intervention in the project file to set up the right
RID. (**)
(*) Building NET4x from non-Windows is still not fully supported:
https://github.com/dotnet/sdk/issues/335) The point above is
that this code would not have to change to make the first
scenario work on non-Windows hosts.
(**) https://github.com/dotnet/sdk/issues/840 tracks improving
the default RID selection here to make more non-AnyCPU scenarios
work without user intervention. The current static evaluation
requirement limits us.
-->
<PropertyGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework' and&#xD;&#xA; '$(HasRuntimeOutput)' == 'true' and&#xD;&#xA; $([MSBuild]::IsOSPlatform(`Windows`))and&#xD;&#xA; '$(RuntimeIdentifier)' == ''" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<_UsingDefaultRuntimeIdentifier>true</_UsingDefaultRuntimeIdentifier>
<RuntimeIdentifier Condition="'$(PlatformTarget)' == 'x64'">win7-x64</RuntimeIdentifier>
<RuntimeIdentifier Condition="'$(PlatformTarget)' == 'x86' or '$(PlatformTarget)' == ''">win7-x86</RuntimeIdentifier>
</PropertyGroup>
<PropertyGroup Condition="'$(UseCurrentRuntimeIdentifier)' == 'true'" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<RuntimeIdentifier>$(NETCoreSdkRuntimeIdentifier)</RuntimeIdentifier>
</PropertyGroup>
<PropertyGroup Condition="'$(PlatformTarget)' == ''" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<_UsingDefaultPlatformTarget>true</_UsingDefaultPlatformTarget>
</PropertyGroup>
<!-- Determine PlatformTarget (if not already set) from runtime identifier. -->
<Choose xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<When Condition="'$(PlatformTarget)' != '' or '$(RuntimeIdentifier)' == ''" />
<When Condition="$(RuntimeIdentifier.EndsWith('-x86')) or $(RuntimeIdentifier.Contains('-x86-'))">
<PropertyGroup>
<PlatformTarget>x86</PlatformTarget>
</PropertyGroup>
</When>
<When Condition="$(RuntimeIdentifier.EndsWith('-x64')) or $(RuntimeIdentifier.Contains('-x64-'))">
<PropertyGroup>
<PlatformTarget>x64</PlatformTarget>
</PropertyGroup>
</When>
<When Condition="$(RuntimeIdentifier.EndsWith('-arm')) or $(RuntimeIdentifier.Contains('-arm-'))">
<PropertyGroup>
<PlatformTarget>arm</PlatformTarget>
</PropertyGroup>
</When>
<When Condition="$(RuntimeIdentifier.EndsWith('-arm64')) or $(RuntimeIdentifier.Contains('-arm64-'))">
<PropertyGroup>
<PlatformTarget>arm64</PlatformTarget>
</PropertyGroup>
</When>
<Otherwise>
<PropertyGroup>
<PlatformTarget>AnyCPU</PlatformTarget>
</PropertyGroup>
</Otherwise>
</Choose>
<!--
SelfContained was not an option in .NET Core SDK 1.0.
Default SelfContained based on the RuntimeIdentifier, so projects don't have to explicitly set SelfContained.
This avoids a breaking change from 1.0 behavior.
Due to https://github.com/dotnet/sdk/issues/4012 we decided to disable UseAppHost to be the default on mac
-->
<PropertyGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp' and '$(HasRuntimeOutput)' == 'true'" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<SelfContained Condition="'$(SelfContained)' == '' and '$(RuntimeIdentifier)' != ''">true</SelfContained>
<SelfContained Condition="'$(SelfContained)' == ''">false</SelfContained>
<_OnOsx>$(NETCoreSdkRuntimeIdentifier.StartsWith('osx'))</_OnOsx>
<_RuntimeIdentifierUsesAppHost Condition="$(RuntimeIdentifier.StartsWith('ios')) or $(RuntimeIdentifier.StartsWith('tvos')) or $(RuntimeIdentifier.StartsWith('maccatalyst')) or $(RuntimeIdentifier.StartsWith('android')) or $(RuntimeIdentifier.StartsWith('browser'))">false</_RuntimeIdentifierUsesAppHost>
<_RuntimeIdentifierUsesAppHost Condition="'$(_RuntimeIdentifierUsesAppHost)' == ''">true</_RuntimeIdentifierUsesAppHost>
<UseAppHost Condition="'$(UseAppHost)' == '' and&#xD;&#xA; '$(_RuntimeIdentifierUsesAppHost)' == 'true' and&#xD;&#xA; ('$(SelfContained)' == 'true' or&#xD;&#xA; ('$(RuntimeIdentifier)' != '' and '$(_TargetFrameworkVersionWithoutV)' &gt;= '2.1') or&#xD;&#xA; ('$(_TargetFrameworkVersionWithoutV)' &gt;= '3.0' and $(_OnOsx) != 'true'))">true</UseAppHost>
<UseAppHost Condition="'$(UseAppHost)' == ''">false</UseAppHost>
</PropertyGroup>
<!-- Only use the default apphost if building without a RID and without a deps file path (used by GenerateDeps.proj for CLI tools). -->
<PropertyGroup Condition="'$(DefaultAppHostRuntimeIdentifier)' == '' and&#xD;&#xA; '$(RuntimeIdentifier)' == '' and&#xD;&#xA; (('$(UseAppHost)' == 'true' and '$(ProjectDepsFilePath)' == '') or&#xD;&#xA; ('$(EnableComHosting)' == 'true' and '$(_IsExecutable)' != 'true') or&#xD;&#xA; '$(UseIJWHost)' == 'true')" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<DefaultAppHostRuntimeIdentifier>$(NETCoreSdkRuntimeIdentifier)</DefaultAppHostRuntimeIdentifier>
<DefaultAppHostRuntimeIdentifier Condition="$(DefaultAppHostRuntimeIdentifier.StartsWith('win')) and '$(PlatformTarget)' == 'x64'">win-x64</DefaultAppHostRuntimeIdentifier>
<DefaultAppHostRuntimeIdentifier Condition="$(DefaultAppHostRuntimeIdentifier.StartsWith('win')) and '$(PlatformTarget)' == 'x86'">win-x86</DefaultAppHostRuntimeIdentifier>
<DefaultAppHostRuntimeIdentifier Condition="$(DefaultAppHostRuntimeIdentifier.StartsWith('win')) and '$(PlatformTarget)' == 'ARM'">win-arm</DefaultAppHostRuntimeIdentifier>
<DefaultAppHostRuntimeIdentifier Condition="$(DefaultAppHostRuntimeIdentifier.StartsWith('win')) and '$(PlatformTarget)' == 'ARM64'">win-arm64</DefaultAppHostRuntimeIdentifier>
</PropertyGroup>
<Target Name="_CheckForUnsupportedAppHostUsage" BeforeTargets="_CheckForInvalidConfigurationAndPlatform" Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp' and '$(HasRuntimeOutput)' == 'true'" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<NETSdkError Condition="'$(SelfContained)' == 'true' and '$(RuntimeIdentifier)' == ''" ResourceName="CannotHaveSelfContainedWithoutRuntimeIdentifier" />
<NETSdkError Condition="'$(SelfContained)' == 'true' and '$(UseAppHost)' != 'true' and '$(_RuntimeIdentifierUsesAppHost)' == 'true'" ResourceName="CannotUseSelfContainedWithoutAppHost" />
<NETSdkError Condition="'$(SelfContained)' != 'true' and '$(UseAppHost)' == 'true' and '$(_TargetFrameworkVersionWithoutV)' &lt; '2.1'" ResourceName="FrameworkDependentAppHostRequiresVersion21" />
<NETSdkError Condition="'$(PublishSingleFile)' == 'true' and '$(_TargetFrameworkVersionWithoutV)' &lt; '3.0'" ResourceName="PublishSingleFileRequiresVersion30" />
<!-- The TFM version checks for PublishReadyToRun PublishTrimmed only generate warnings in .Net core 3.1
because we do not want the behavior to be a breaking change compared to version 3.0 -->
<NETSdkWarning Condition="'$(PublishReadyToRun)' == 'true' and '$(_TargetFrameworkVersionWithoutV)' &lt; '3.0'" ResourceName="PublishReadyToRunRequiresVersion30" />
<NETSdkWarning Condition="'$(PublishTrimmed)' == 'true' and '$(_TargetFrameworkVersionWithoutV)' &lt; '3.0'" ResourceName="PublishTrimmedRequiresVersion30" />
</Target>
<Target Name="_CheckForUnsupportedHostingUsage" BeforeTargets="_CheckForInvalidConfigurationAndPlatform" Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp'" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<NETSdkWarning Condition="'$(SelfContained)' == 'true' and '$(EnableComHosting)' == 'true'" ResourceName="NoSupportComSelfContained" />
</Target>
<Target Name="_CheckForMismatchingPlatform" BeforeTargets="_CheckForInvalidConfigurationAndPlatform" Condition="'$(RuntimeIdentifier)' != '' and '$(PlatformTarget)' != ''" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<NETSdkError Condition="'$(PlatformTarget)' != 'AnyCPU' and !$(RuntimeIdentifier.ToUpperInvariant().Contains($(PlatformTarget.ToUpperInvariant())))" ResourceName="CannotHaveRuntimeIdentifierPlatformMismatchPlatformTarget" FormatArguments="$(RuntimeIdentifier);$(PlatformTarget)" />
</Target>
<Target Name="_CheckForLanguageAndFeatureCombinationSupport" BeforeTargets="_CheckForInvalidConfigurationAndPlatform;ProcessFrameworkReferences" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<NETSdkError Condition="('$(Language)' == 'C++' and '$(_EnablePackageReferencesInVCProjects)' != 'true') and $(OutputType) != 'library' and '$(TargetFrameworkIdentifier)' == '.NETCoreApp'" ResourceName="NoSupportCppNonDynamicLibraryDotnetCore" />
<NETSdkError Condition="('$(Language)' == 'C++' and '$(_EnablePackageReferencesInVCProjects)' != 'true') and $(EnableComHosting) == 'true'" ResourceName="NoSupportCppEnableComHosting" />
<NETSdkError Condition="('$(Language)' == 'C++' and '$(_EnablePackageReferencesInVCProjects)' != 'true') and $(SelfContained) == 'true'" ResourceName="NoSupportCppSelfContained" />
</Target>
<Target Name="_CheckForNETCoreSdkIsPreview" BeforeTargets="_CheckForInvalidConfigurationAndPlatform" Condition=" '$(_NETCoreSdkIsPreview)' == 'true' AND '$(SuppressNETCoreSdkPreviewMessage)' != 'true' " xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ShowPreviewMessage />
</Target>
<!-- Projects which don't use Microsoft.NET.Sdk will typically define the OutputPath directly (usually in a
Configuration-specific PropertyGroup), so in that case we won't append to it by default. -->
<PropertyGroup Condition="'$(UsingNETSdkDefaults)' == 'true'" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- Projects can opt out of having the RID appended to the output path by setting this to false. -->
<AppendRuntimeIdentifierToOutputPath Condition="'$(AppendRuntimeIdentifierToOutputPath)' == ''">true</AppendRuntimeIdentifierToOutputPath>
</PropertyGroup>
<!--
Append $(RuntimeIdentifier) directory to output and intermediate paths to prevent bin clashes between
targets.
But do not append the implicit default runtime identifier for .NET Framework apps as that would
append a RID the user never mentioned in the path and do so even in the AnyCPU case.
-->
<PropertyGroup Condition="'$(AppendRuntimeIdentifierToOutputPath)' == 'true' and '$(RuntimeIdentifier)' != '' and '$(_UsingDefaultRuntimeIdentifier)' != 'true'" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<IntermediateOutputPath>$(IntermediateOutputPath)$(RuntimeIdentifier)\</IntermediateOutputPath>
<OutputPath>$(OutputPath)$(RuntimeIdentifier)\</OutputPath>
</PropertyGroup>
<UsingTask TaskName="Microsoft.NET.Build.Tasks.GetDefaultPlatformTargetForNetFramework" AssemblyFile="$(MicrosoftNETBuildTasksAssembly)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<!--
Switch our default .NETFramework CPU architecture choice back to AnyCPU before
compiling the exe if no copy-local native dependencies were resolved from NuGet
-->
<Target Name="AdjustDefaultPlatformTargetForNetFrameworkExeWithNoNativeCopyLocalItems" AfterTargets="ResolvePackageAssets" BeforeTargets="CoreCompile" Condition="'$(_UsingDefaultPlatformTarget)' == 'true' and&#xD;&#xA; '$(_UsingDefaultRuntimeIdentifier)' == 'true'" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<GetDefaultPlatformTargetForNetFramework PackageDependencies="@(PackageDependencies)" NativeCopyLocalItems="@(NativeCopyLocalItems)">
<Output TaskParameter="DefaultPlatformTarget" PropertyName="PlatformTarget" />
</GetDefaultPlatformTargetForNetFramework>
</Target>
<!--
============================================================================================================================================
</Import>
C:\Program Files\dotnet\sdk\6.0.100-preview.5.21302.13\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.BeforeCommon.targets
============================================================================================================================================
-->
<!--
Import targets from RazorSDK if referenced
Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.BeforeCommon.targets
Sdks\Microsoft.NET.Sdk.Razor\build\netstandard2.0\Microsoft.NET.Sdk.Razor.BeforeCommon.targets
-->
<!--<Import Project="$(MSBuildThisFileDirectory)..\..\Microsoft.NET.Sdk.Razor\build\netstandard2.0\Microsoft.NET.Sdk.Razor.BeforeCommon.targets" Condition="'$(UsingMicrosoftNETSdkRazor)' == 'true'" />-->
<!-- Import workload targets -->
<!--
============================================================================================================================================
<Import Project="Microsoft.NET.Sdk.ImportWorkloads.targets" Condition="'$(MSBuildEnableWorkloadResolver)' == 'true'">
C:\Program Files\dotnet\sdk\6.0.100-preview.5.21302.13\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.ImportWorkloads.targets
============================================================================================================================================
-->
<!--
***********************************************************************************************
Microsoft.NET.Sdk.ImportWorkloads.targets
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
created a backup copy. Incorrect changes to this file will make it
impossible to load or build your projects from the command-line or the IDE.
Copyright (c) .NET Foundation. All rights reserved.
***********************************************************************************************
-->
<!-- Workload support -->
<!-- Import workload manifests -->
<!--
============================================================================================================================================
<Import Project="WorkloadManifest.targets" Sdk="Microsoft.NET.SDK.WorkloadManifestTargetsLocator">
C:\Program Files\dotnet\sdk-manifests\6.0.100\Microsoft.NET.Workload.Android\WorkloadManifest.targets
============================================================================================================================================
-->
<!--<Import Project="Sdk.targets" Sdk="Microsoft.Android.Sdk" Condition=" '$(TargetPlatformIdentifier)' == 'android' " />-->
<!--<Import Project="Sdk.targets" Sdk="Microsoft.Android.Sdk.BundleTool" Condition=" '$(AndroidPackageFormat)' == 'aab' " />-->
<!--
============================================================================================================================================
</Import>
============================================================================================================================================
-->
<!--
============================================================================================================================================
<Import Project="WorkloadManifest.targets" Sdk="Microsoft.NET.SDK.WorkloadManifestTargetsLocator">
C:\Program Files\dotnet\sdk-manifests\6.0.100\Microsoft.NET.Workload.BlazorWebAssembly\WorkloadManifest.targets
============================================================================================================================================
-->
<PropertyGroup Condition="'$(RuntimeIdentifier)' == 'browser-wasm'">
<UsingBrowserRuntimeWorkload Condition="'$(RunAOTCompilation)' == 'true' or '$(UsingMicrosoftNETSdkBlazorWebAssembly)' != 'true'">true</UsingBrowserRuntimeWorkload>
<UsingBrowserRuntimeWorkload Condition="'$(UsingBrowserRuntimeWorkload)' == ''">$(WasmNativeWorkload)</UsingBrowserRuntimeWorkload>
</PropertyGroup>
<PropertyGroup Condition="'$(UsingMicrosoftNETSdkBlazorWebAssembly)' == 'true' and '$(UsingBrowserRuntimeWorkload)' == 'true'">
<WasmGenerateAppBundle>false</WasmGenerateAppBundle>
<UsingBlazorAOTWorkloadManifest>true</UsingBlazorAOTWorkloadManifest>
</PropertyGroup>
<!--<ImportGroup Condition="'$(UsingBrowserRuntimeWorkload)' == 'true'">-->
<!--<Import Project="Sdk.props" Sdk="Microsoft.NET.Runtime.MonoAOTCompiler.Task" Condition="'$(RunAOTCompilation)' == 'true'" />-->
<!--<Import Project="Sdk.targets" Sdk="Microsoft.NET.Runtime.WebAssembly.Sdk" />-->
<!--<Import Project="Sdk.props" Sdk="Microsoft.Netcore.App.Runtime.Aot.Cross.browser-wasm" />-->
<!--<Import Project="Sdk.props" Sdk="Microsoft.NET.Runtime.Emscripten.Python" Condition="!$([MSBuild]::IsOSPlatform('linux'))" />-->
<!--<Import Project="Sdk.props" Sdk="Microsoft.NET.Runtime.Emscripten.Node" />-->
<!--<Import Project="Sdk.props" Sdk="Microsoft.NET.Runtime.Emscripten.Sdk" />-->
<!--</ImportGroup>-->
<!--
============================================================================================================================================
</Import>
============================================================================================================================================
-->
<!--
============================================================================================================================================
<Import Project="WorkloadManifest.targets" Sdk="Microsoft.NET.SDK.WorkloadManifestTargetsLocator">
C:\Program Files\dotnet\sdk-manifests\6.0.100\Microsoft.NET.Workload.iOS\WorkloadManifest.targets
============================================================================================================================================
-->
<!--<Import Project="Sdk.props" Sdk="Microsoft.iOS.Sdk" Condition="'$(TargetPlatformIdentifier)' == 'iOS'" />-->
<!--
============================================================================================================================================
</Import>
============================================================================================================================================
-->
<!--
============================================================================================================================================
<Import Project="WorkloadManifest.targets" Sdk="Microsoft.NET.SDK.WorkloadManifestTargetsLocator">
C:\Program Files\dotnet\sdk-manifests\6.0.100\Microsoft.NET.Workload.MacCatalyst\WorkloadManifest.targets
============================================================================================================================================
-->
<!--<Import Project="Sdk.props" Sdk="Microsoft.MacCatalyst.Sdk" Condition="'$(TargetPlatformIdentifier)' == 'MacCatalyst'" />-->
<!--
============================================================================================================================================
</Import>
============================================================================================================================================
-->
<!--
============================================================================================================================================
<Import Project="WorkloadManifest.targets" Sdk="Microsoft.NET.SDK.WorkloadManifestTargetsLocator">
C:\Program Files\dotnet\sdk-manifests\6.0.100\Microsoft.NET.Workload.macOS\WorkloadManifest.targets
============================================================================================================================================
-->
<!--<Import Project="Sdk.props" Sdk="Microsoft.macOS.Sdk" Condition="'$(TargetPlatformIdentifier)' == 'macOS'" />-->
<!--
============================================================================================================================================
</Import>
============================================================================================================================================
-->
<!--
============================================================================================================================================
<Import Project="WorkloadManifest.targets" Sdk="Microsoft.NET.SDK.WorkloadManifestTargetsLocator">
C:\Program Files\dotnet\sdk-manifests\6.0.100\Microsoft.NET.Workload.tvOS\WorkloadManifest.targets
============================================================================================================================================
-->
<!--<Import Project="Sdk.props" Sdk="Microsoft.tvOS.Sdk" Condition="'$(TargetPlatformIdentifier)' == 'tvOS'" />-->
<!--
============================================================================================================================================
</Import>
C:\Program Files\dotnet\sdk\6.0.100-preview.5.21302.13\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.ImportWorkloads.targets
============================================================================================================================================
-->
<UsingTask TaskName="ShowMissingWorkloads" AssemblyFile="$(MicrosoftNETBuildTasksAssembly)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<Target Name="GetSuggestedWorkloads" Returns="@(SuggestedWorkload)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ShowMissingWorkloads MissingWorkloadPacks="@(MissingWorkloadPack)" NetCoreRoot="$(NetCoreRoot)" NETCoreSdkVersion="$(NETCoreSdkVersion)" GenerateErrorsForMissingWorkloads="false">
<Output TaskParameter="SuggestedWorkloads" ItemName="SuggestedWorkload" />
</ShowMissingWorkloads>
</Target>
<Target Name="_CheckForMissingWorkload" BeforeTargets="_CheckForInvalidConfigurationAndPlatform;_CheckForUnsupportedTargetPlatformIdentifier" Condition="'@(MissingWorkloadPack)' != ''" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ShowMissingWorkloads MissingWorkloadPacks="@(MissingWorkloadPack)" NetCoreRoot="$(NetCoreRoot)" NETCoreSdkVersion="$(NETCoreSdkVersion)" GenerateErrorsForMissingWorkloads="true" />
</Target>
<!--
============================================================================================================================================
</Import>
C:\Program Files\dotnet\sdk\6.0.100-preview.5.21302.13\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.BeforeCommon.targets
============================================================================================================================================
-->
<!-- Checks for EOL frameworks -->
<!--
============================================================================================================================================
<Import Project="$(MSBuildThisFileDirectory)Microsoft.NET.EolTargetFrameworks.targets">
C:\Program Files\dotnet\sdk\6.0.100-preview.5.21302.13\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.EolTargetFrameworks.targets
============================================================================================================================================
-->
<!--
***********************************************************************************************
Microsoft.NET.EolTargetFrameworks.targets
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
created a backup copy. Incorrect changes to this file will make it
impossible to load or build your projects from the command-line or the IDE.
Copyright (c) .NET Foundation. All rights reserved.
***********************************************************************************************
-->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- Default the check to true, but allow developers to turn the warning off. -->
<CheckEolTargetFramework Condition="'$(CheckEolTargetFramework)' == ''">true</CheckEolTargetFramework>
</PropertyGroup>
<!--
.NET Core framework versions that are currently considered to be end-of-life (EOL). These versions will not be targeted to
receive servicing updates and security fixes.
-->
<ItemGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<_EolNetCoreTargetFrameworkVersions Include="1.0;1.1;2.0;2.2;3.0" />
</ItemGroup>
<Target Name="_CheckForEolTargetFrameworks" AfterTargets="_CheckForUnsupportedNETCoreVersion" Condition="'@(_EolNetCoreTargetFrameworkVersions-&gt;AnyHaveMetadataValue('Identity', '$(_TargetFrameworkVersionWithoutV)'))' and '$(TargetFrameworkIdentifier)' == '.NETCoreApp' and '$(CheckEolTargetFramework)' == 'true'" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<NETSdkWarning ResourceName="TargetFrameworkIsEol" FormatArguments="$(TargetFramework.ToLowerInvariant());https://aka.ms/dotnet-core-support" />
</Target>
<!--
============================================================================================================================================
</Import>
C:\Program Files\dotnet\sdk\6.0.100-preview.5.21302.13\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.BeforeCommon.targets
============================================================================================================================================
-->
<!-- Check if the Target Framework is coreclr based -->
<PropertyGroup Condition="'$(_IsNETCoreOrNETStandard)' == ''" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<_IsNETCoreOrNETStandard Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp'">true</_IsNETCoreOrNETStandard>
<_IsNETCoreOrNETStandard Condition="'$(TargetFrameworkIdentifier)' == '.NETStandard'">true</_IsNETCoreOrNETStandard>
</PropertyGroup>
<!-- Unification / automatic binding redirect logic -->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<DesignTimeAutoUnify Condition="'$(DesignTimeAutoUnify)' == ''">true</DesignTimeAutoUnify>
<AutoUnifyAssemblyReferences Condition="'$(AutoUnifyAssemblyReferences)' == '' and $(OutputType) == 'Library'">true</AutoUnifyAssemblyReferences>
<AutoUnifyAssemblyReferences Condition="'$(AutoUnifyAssemblyReferences)' == '' and '$(_IsNETCoreOrNETStandard)' == 'true'">true</AutoUnifyAssemblyReferences>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework' and '$(HasRuntimeOutput)' == 'true'" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<AutoGenerateBindingRedirects Condition="'$(AutoGenerateBindingRedirects)' == ''">true</AutoGenerateBindingRedirects>
</PropertyGroup>
<!-- Default settings for .NET Core and .NET Standard build logic -->
<PropertyGroup Condition="'$(_IsNETCoreOrNETStandard)' == 'true'" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<GenerateDependencyFile Condition=" '$(GenerateDependencyFile)' == '' ">true</GenerateDependencyFile>
<!-- Assembly and file versions of runtime assets should be written to the deps.json by default, to support
runtime minor version roll-forward: https://github.com/dotnet/core-setup/issues/3546 -->
<IncludeFileVersionsInDependencyFile Condition="'$(IncludeFileVersionsInDependencyFile)' == ''">true</IncludeFileVersionsInDependencyFile>
<!-- Force .dll extension for .NETCoreApp and .NETStandard projects even if output type is exe. -->
<TargetExt Condition="'$(TargetExt)' == ''">.dll</TargetExt>
<!-- Disable the use of FrameworkPathOverride in Microsoft.Common.CurrentVersion.targets which can slow down evaluation. FrameworkPathOverride
is not needed for NETStandard or NETCore since references come from NuGet packages-->
<EnableFrameworkPathOverride Condition="'$(EnableFrameworkPathOverride)' == ''">false</EnableFrameworkPathOverride>
</PropertyGroup>
<!-- Regardless of platform, enable dependency file generation if PreserveCompilationContext is set. -->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<GenerateDependencyFile Condition="'$(GenerateDependencyFile)' == ''">$(PreserveCompilationContext)</GenerateDependencyFile>
</PropertyGroup>
<!-- Set PublishDir here, before Microsoft.Common.targets, to avoid a competing default there. -->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PublishDirName Condition="'$(PublishDirName)' == ''">publish</PublishDirName>
<!-- ensure the PublishDir is RID specific-->
<PublishDir Condition="'$(PublishDir)' == '' and&#xD;&#xA; '$(AppendRuntimeIdentifierToOutputPath)' != 'true' and&#xD;&#xA; '$(RuntimeIdentifier)' != '' and&#xD;&#xA; '$(_UsingDefaultRuntimeIdentifier)' != 'true'">$(OutputPath)$(RuntimeIdentifier)\$(PublishDirName)\</PublishDir>
<PublishDir Condition="'$(PublishDir)' == ''">$(OutputPath)$(PublishDirName)\</PublishDir>
</PropertyGroup>
<!--
Sets RestoreAdditionalProjectSources or RestoreAdditionalProjectFallbackFolders to the SDK Offline Cache based
on the TargetFramework.
-->
<!--
============================================================================================================================================
<Import Project="$(MSBuildThisFileDirectory)Microsoft.NET.NuGetOfflineCache.targets">
C:\Program Files\dotnet\sdk\6.0.100-preview.5.21302.13\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.NuGetOfflineCache.targets
============================================================================================================================================
-->
<!--
***********************************************************************************************
Microsoft.NET.NuGetOfflineCache.targets
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
created a backup copy. Incorrect changes to this file will make it
impossible to load or build your projects from the command-line or the IDE.
Copyright (c) .NET Foundation. All rights reserved.
***********************************************************************************************
-->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<_NugetFallbackFolder>$(MSBuildThisFileDirectory)..\..\..\..\NuGetFallbackFolder</_NugetFallbackFolder>
<_IsNETCore1x Condition=" '$(TargetFrameworkIdentifier)' == '.NETCoreApp' and '$(_TargetFrameworkVersionWithoutV)' &lt; '2.0' ">true</_IsNETCore1x>
<_WorkloadLibraryPacksFolder Condition="'$(_WorkloadLibraryPacksFolder)' == ''">$([MSBuild]::EnsureTrailingSlash('$(NetCoreRoot)'))library-packs</_WorkloadLibraryPacksFolder>
</PropertyGroup>
<PropertyGroup Condition=" '$(DisableImplicitNuGetFallbackFolder)' != 'true' and Exists($(_NugetFallbackFolder)) " xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<RestoreAdditionalProjectSources Condition=" '$(_IsNETCore1x)' == 'true' and '$(DisableImplicit1xNuGetFallbackFolder)' != 'true' ">$(RestoreAdditionalProjectSources);$(_NugetFallbackFolder)</RestoreAdditionalProjectSources>
<RestoreAdditionalProjectFallbackFoldersExcludes Condition=" '$(_IsNETCore1x)' == 'true' ">$(RestoreAdditionalProjectFallbackFoldersExcludes);$(_NugetFallbackFolder)</RestoreAdditionalProjectFallbackFoldersExcludes>
<RestoreAdditionalProjectFallbackFolders Condition=" '$(_IsNETCore1x)' != 'true' ">$(RestoreAdditionalProjectFallbackFolders);$(_NugetFallbackFolder)</RestoreAdditionalProjectFallbackFolders>
</PropertyGroup>
<PropertyGroup Condition=" '$(DisableImplicitLibraryPacksFolder)' != 'true' " xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<RestoreAdditionalProjectSources Condition="Exists('$(_WorkloadLibraryPacksFolder)')">$(RestoreAdditionalProjectSources);$(_WorkloadLibraryPacksFolder)</RestoreAdditionalProjectSources>
</PropertyGroup>
<!--
============================================================================================================================================
</Import>
C:\Program Files\dotnet\sdk\6.0.100-preview.5.21302.13\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.BeforeCommon.targets
============================================================================================================================================
-->
<ItemGroup Condition=" '$(DisableImplicitFrameworkReferences)' != 'true' and '$(TargetFrameworkIdentifier)' == '.NETFramework'" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<_SDKImplicitReference Include="System" />
<_SDKImplicitReference Include="System.Data" />
<_SDKImplicitReference Include="System.Drawing" />
<_SDKImplicitReference Include="System.Xml" />
<!-- When doing greater than/less than comparisons between strings, MSBuild will try to parse the strings as Version objects and compare them as
such if the parse succeeds. -->
<!-- Framework assemblies introduced in .NET 3.5 -->
<_SDKImplicitReference Include="System.Core" Condition=" '$(_TargetFrameworkVersionWithoutV)' &gt;= '3.5' " />
<_SDKImplicitReference Include="System.Runtime.Serialization" Condition=" '$(_TargetFrameworkVersionWithoutV)' &gt;= '3.5' " />
<_SDKImplicitReference Include="System.Xml.Linq" Condition=" '$(_TargetFrameworkVersionWithoutV)' &gt;= '3.5' " />
<!-- Framework assemblies introduced in .NET 4.0 -->
<_SDKImplicitReference Include="System.Numerics" Condition=" '$(_TargetFrameworkVersionWithoutV)' &gt;= '4.0' " />
<!-- Framework assemblies introduced in .NET 4.5 -->
<_SDKImplicitReference Include="System.IO.Compression.FileSystem" Condition=" '$(_TargetFrameworkVersionWithoutV)' &gt;= '4.5' " />
<!-- Don't automatically reference System.IO.Compression or System.Net.Http to help avoid hitting https://github.com/Microsoft/msbuild/issues/1329. -->
<!--<Reference Include="System.IO.Compression" Condition=" '$(_TargetFrameworkVersionWithoutV)' >= '4.5' "/>
<_SDKImplicitReference Include="System.Net.Http" Condition=" '$(_TargetFrameworkVersionWithoutV)' >= '4.5' "/>-->
<_SDKImplicitReference Update="@(_SDKImplicitReference)" Pack="false" IsImplicitlyDefined="true" />
<!-- Don't duplicate any references that are explicit in the project file. This means that if you do want to include a framework assembly in your
NuGet package, you can just add the Reference to your project file. -->
<_SDKImplicitReference Remove="@(Reference)" />
<!-- Add the implicit references to @(Reference) -->
<Reference Include="@(_SDKImplicitReference)" />
</ItemGroup>
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- Prevent System.Core reference from being added separately (see Microsoft.NETFramework.CurrentVersion.props) -->
<AddAdditionalExplicitAssemblyReferences>false</AddAdditionalExplicitAssemblyReferences>
</PropertyGroup>
<PropertyGroup Condition="'$(DisableImplicitAssetTargetFallback)' != 'true' and '$(_IsNETCoreOrNETStandard)' == 'true' and '$(_TargetFrameworkVersionWithoutV)' &gt;= '2.0'" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<AssetTargetFallback>$(AssetTargetFallback);net461;net462;net47;net471;net472;net48</AssetTargetFallback>
</PropertyGroup>
<!-- Add conditional compilation symbols for the target framework (for example NET461, NETSTANDARD2_0, NETCOREAPP1_0) -->
<PropertyGroup Condition=" '$(DisableImplicitFrameworkDefines)' != 'true' and '$(TargetFrameworkIdentifier)' != '.NETPortable' and '$(TargetFrameworkIdentifier)' != ''" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<_FrameworkIdentifierForImplicitDefine>$(TargetFrameworkIdentifier.Replace('.', '').ToUpperInvariant())</_FrameworkIdentifierForImplicitDefine>
<_FrameworkIdentifierForImplicitDefine Condition=" '$(TargetFrameworkIdentifier)' == '.NETCoreApp' and $([MSBuild]::VersionGreaterThanOrEquals($(TargetFrameworkVersion), 5.0)) ">NET</_FrameworkIdentifierForImplicitDefine>
<VersionlessImplicitFrameworkDefine>$(_FrameworkIdentifierForImplicitDefine)</VersionlessImplicitFrameworkDefine>
<_FrameworkIdentifierForImplicitDefine Condition=" '$(TargetFrameworkIdentifier)' == '.NETFramework'">NET</_FrameworkIdentifierForImplicitDefine>
<_FrameworkVersionForImplicitDefine>$(TargetFrameworkVersion.TrimStart('vV'))</_FrameworkVersionForImplicitDefine>
<_FrameworkVersionForImplicitDefine>$(_FrameworkVersionForImplicitDefine.Replace('.', '_'))</_FrameworkVersionForImplicitDefine>
<_FrameworkVersionForImplicitDefine Condition=" '$(TargetFrameworkIdentifier)' == '.NETFramework'">$(_FrameworkVersionForImplicitDefine.Replace('_', ''))</_FrameworkVersionForImplicitDefine>
<ImplicitFrameworkDefine>$(_FrameworkIdentifierForImplicitDefine)$(_FrameworkVersionForImplicitDefine)</ImplicitFrameworkDefine>
<BackwardsCompatFrameworkDefine Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp' and $([MSBuild]::VersionGreaterThanOrEquals($(TargetFrameworkVersion), 5.0))">$(TargetFrameworkIdentifier.Replace('.', '').ToUpperInvariant())</BackwardsCompatFrameworkDefine>
</PropertyGroup>
<!-- Add conditional compilation symbols for the target platform (for example ANDROID, IOS, WINDOWS) -->
<Target Name="GenerateTargetPlatformDefineConstants" Condition=" '$(DisableImplicitFrameworkDefines)' != 'true' and '$(TargetPlatformIdentifier)' != '' and '$(TargetFrameworkIdentifier)' == '.NETCoreApp' and $([MSBuild]::VersionGreaterThanOrEquals($(TargetFrameworkVersion), 5.0)) " xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<_PlatformIdentifierForImplicitDefine>$(TargetPlatformIdentifier.ToUpperInvariant())</_PlatformIdentifierForImplicitDefine>
<_PlatformVersionForImplicitDefine>$(TargetPlatformVersion.Replace('.', '_'))</_PlatformVersionForImplicitDefine>
</PropertyGroup>
<ItemGroup>
<_ImplicitDefineConstant Include="$(_PlatformIdentifierForImplicitDefine)" />
<_ImplicitDefineConstant Include="$(_PlatformIdentifierForImplicitDefine)$(_PlatformVersionForImplicitDefine)" />
</ItemGroup>
</Target>
<!-- Add OR_GREATER compilation symbols for target frameworks with .NET Framework, .NET Standard, .NET Core, and .NET -->
<Target Name="GenerateNETCompatibleDefineConstants" Condition=" '$(DisableImplicitFrameworkDefines)' != 'true' and ('$(TargetFrameworkIdentifier)' == '.NETCoreApp' or '$(TargetFrameworkIdentifier)' == '.NETFramework' or '$(TargetFrameworkIdentifier)' == '.NETStandard')" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<_SupportedFrameworkVersions Include="@(SupportedNETCoreAppTargetFramework-&gt;'%(Identity)'-&gt;TrimStart('.NETCoreApp,Version=v'))" Condition=" '$(TargetFrameworkIdentifier)' == '.NETCoreApp' " />
<_SupportedFrameworkVersions Include="@(SupportedNETFrameworkTargetFramework-&gt;'%(Identity)'-&gt;TrimStart('.NETFramework,Version=v'))" Condition=" '$(TargetFrameworkIdentifier)' == '.NETFramework' " />
<_SupportedFrameworkVersions Include="@(SupportedNETStandardTargetFramework-&gt;'%(Identity)'-&gt;TrimStart('.NETStandard,Version=v'))" Condition=" '$(TargetFrameworkIdentifier)' == '.NETStandard' " />
<_CompatibleFrameworkVersions Include="@(_SupportedFrameworkVersions)" Condition=" $([MSBuild]::VersionLessThanOrEquals(%(Identity), $(TargetFrameworkVersion))) " />
<_FormattedCompatibleFrameworkVersions Include="@(_CompatibleFrameworkVersions)" Condition=" '$(TargetFrameworkIdentifier)' == '.NETCoreApp' or '$(TargetFrameworkIdentifier)' == '.NETStandard' " />
<_FormattedCompatibleFrameworkVersions Include="@(_CompatibleFrameworkVersions-&gt;'%(Identity)'-&gt;Replace('.', ''))" Condition=" '$(TargetFrameworkIdentifier)' == '.NETFramework' " />
<_ImplicitDefineConstant Include="@(_FormattedCompatibleFrameworkVersions-&gt;'$(_FrameworkIdentifierForImplicitDefine)%(Identity)_OR_GREATER'-&gt;Replace('.', '_'))" Condition=" '$(TargetFrameworkIdentifier)' != '.NETCoreApp' or $([MSBuild]::VersionGreaterThanOrEquals(%(_FormattedCompatibleFrameworkVersions.Identity), 5.0)) " />
<_ImplicitDefineConstant Include="@(_FormattedCompatibleFrameworkVersions-&gt;'NETCOREAPP%(Identity)_OR_GREATER'-&gt;Replace('.', '_'))" Condition=" '$(TargetFrameworkIdentifier)' == '.NETCoreApp' and $([MSBuild]::VersionLessThan(%(_FormattedCompatibleFrameworkVersions.Identity), 5.0)) " />
</ItemGroup>
</Target>
<!-- Add OR_GREATER compilation symbols for target platforms. -->
<Target Name="GeneratePlatformCompatibleDefineConstants" Condition=" '$(DisableImplicitFrameworkDefines)' != 'true' and '$(TargetPlatformIdentifier)' != '' and '$(TargetFrameworkIdentifier)' == '.NETCoreApp' and $([MSBuild]::VersionGreaterThanOrEquals($(TargetFrameworkVersion), 5.0)) " xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<_SupportedPlatformCompatibleVersions Include="@(SdkSupportedTargetPlatformVersion)" Condition=" %(Identity) != '' and $([MSBuild]::VersionLessThanOrEquals(%(Identity), $(TargetPlatformVersion))) " />
<_ImplicitDefineConstant Include="@(_SupportedPlatformCompatibleVersions-&gt;'$(TargetPlatformIdentifier.ToUpper())%(Identity)_OR_GREATER'-&gt;Replace('.', '_'))" />
</ItemGroup>
</Target>
<!-- Add implicitly defined preprocessor symbols to DefineConstants -->
<Target Name="AddImplicitDefineConstants" Condition=" '$(DisableImplicitFrameworkDefines)' != 'true' " DependsOnTargets="GenerateTargetPlatformDefineConstants;GenerateNETCompatibleDefineConstants;GeneratePlatformCompatibleDefineConstants" BeforeTargets="CoreCompile" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<DefineConstants Condition=" '@(_ImplicitDefineConstant)' != '' ">$(DefineConstants);@(_ImplicitDefineConstant)</DefineConstants>
<FinalDefineConstants Condition=" '@(_ImplicitDefineConstant)' != '' and '$(Language)' == 'VB' ">$(FinalDefineConstants),@(_ImplicitDefineConstant->'%(Identity)=-1', ',')</FinalDefineConstants>
</PropertyGroup>
</Target>
<!-- Handle XML documentation file settings -->
<PropertyGroup Condition="'$(GenerateDocumentationFile)' == ''" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<GenerateDocumentationFile Condition="'$(DocumentationFile)' == ''">false</GenerateDocumentationFile>
<GenerateDocumentationFile Condition="'$(DocumentationFile)' != ''">true</GenerateDocumentationFile>
</PropertyGroup>
<PropertyGroup Condition="'$(GenerateDocumentationFile)' == 'true' and '$(DocumentationFile)' == ''" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<DocumentationFile Condition="'$(MSBuildProjectExtension)' == '.vbproj'">$(AssemblyName).xml</DocumentationFile>
<DocumentationFile Condition="'$(MSBuildProjectExtension)' != '.vbproj'">$(IntermediateOutputPath)$(AssemblyName).xml</DocumentationFile>
</PropertyGroup>
<PropertyGroup Condition="'$(GenerateDocumentationFile)' != 'true'" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<DocumentationFile />
</PropertyGroup>
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PublishDocumentationFiles Condition="'$(PublishDocumentationFiles)' == ''">true</PublishDocumentationFiles>
<PublishDocumentationFile Condition="'$(PublishDocumentationFile)' == '' and '$(PublishDocumentationFiles)' == 'true'">true</PublishDocumentationFile>
<PublishReferencesDocumentationFiles Condition="'$(PublishReferencesDocumentationFiles)' == '' and '$(PublishDocumentationFiles)' == 'true'">true</PublishReferencesDocumentationFiles>
</PropertyGroup>
<!-- Add a project capability so that the project properties in the IDE can show the option to generate an XML documentation file without specifying the filename -->
<ItemGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ProjectCapability Include="GenerateDocumentationFile" />
</ItemGroup>
<!--
============================================================================================================================================
</Import>
C:\Program Files\dotnet\sdk\6.0.100-preview.5.21302.13\Sdks\Microsoft.NET.Sdk\Sdk\Sdk.targets
============================================================================================================================================
-->
<PropertyGroup Condition="'$(LanguageTargets)' == ''" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<LanguageTargets Condition="'$(MSBuildProjectExtension)' == '.csproj'">$(MSBuildToolsPath)\Microsoft.CSharp.targets</LanguageTargets>
<LanguageTargets Condition="'$(MSBuildProjectExtension)' == '.vbproj'">$(MSBuildToolsPath)\Microsoft.VisualBasic.targets</LanguageTargets>
<LanguageTargets Condition="'$(MSBuildProjectExtension)' == '.fsproj'">$(MSBuildThisFileDirectory)..\targets\Microsoft.NET.Sdk.FSharpTargetsShim.targets</LanguageTargets>
<!-- If LanguageTargets isn't otherwise set, then just import the common targets. This should allow the restore target to run,
which could bring in NuGet packages that set the LanguageTargets to something else. This means support for different
languages could either be supplied via an SDK or via a NuGet package. -->
<LanguageTargets Condition="'$(LanguageTargets)' == ''">$(MSBuildToolsPath)\Microsoft.Common.targets</LanguageTargets>
</PropertyGroup>
<!-- REMARK: Dont remove/rename, the LanguageTargets property is used by F# to hook inside the project's sdk
using Sdk attribute (from .NET Core Sdk 1.0.0-preview4) -->
<!--
============================================================================================================================================
<Import Project="$(LanguageTargets)">
C:\Program Files\dotnet\sdk\6.0.100-preview.5.21302.13\Microsoft.CSharp.targets
============================================================================================================================================
-->
<!--
***********************************************************************************************
Microsoft.CSharp.targets
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
created a backup copy. Incorrect changes to this file will make it
impossible to load or build your projects from the command-line or the IDE.
This file defines the steps in the standard build process specific for C# .NET projects.
For example, it contains the step that actually calls the C# compiler. The remainder
of the build process is defined in Microsoft.Common.targets, which is imported by
this file.
Copyright (C) Microsoft Corporation. All rights reserved.
***********************************************************************************************
-->
<!--
In VS 2010 SP1 and VS 2012, both supported for asset compatibility, the MSBuild installed
as part of them did not enforce using the local ToolsVersion (4.0) in all cases, but instead
just used whatever ToolsVersion was in the project file if it existed on the machine, and
only forced 4.0 if that ToolsVersion did not exist.
Moving forward, we do want to enforce a single acting ToolsVersion per version of Visual Studio,
but in order to approximate this behavior on VS 2010 SP1 and VS 2012 as well, we've redirected
the targets: If we're building using 4.X MSBuild (which doesn't define the new reserved
property, MSBuildAssemblyVersion), we'll point right back at the 4.0 targets, which still exist
as part of the .NET Framework. Only if we're using the new MSBuild will we point to the current
targets.
-->
<Choose xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<When Condition="'$(MSBuildAssemblyVersion)' == ''">
<PropertyGroup>
<CSharpTargetsPath>$(MSBuildFrameworkToolsPath)\Microsoft.CSharp.targets</CSharpTargetsPath>
<!-- Same condition as in .NET 4.5 C# targets so that we can override the behavior where it defaults to
MSBuildToolsPath, which would be incorrect in this case -->
<CscToolPath Condition="'$(CscToolPath)' == '' and '$(BuildingInsideVisualStudio)' != 'true'">$(MsBuildFrameworkToolsPath)</CscToolPath>
</PropertyGroup>
</When>
<When Condition="'$(IsCrossTargetingBuild)' == 'true'">
<PropertyGroup>
<CSharpTargetsPath>$(MSBuildToolsPath)\Microsoft.CSharp.CrossTargeting.targets</CSharpTargetsPath>
</PropertyGroup>
</When>
<Otherwise>
<PropertyGroup>
<CSharpTargetsPath>$(MSBuildToolsPath)\Microsoft.CSharp.CurrentVersion.targets</CSharpTargetsPath>
</PropertyGroup>
</Otherwise>
</Choose>
<PropertyGroup Condition="'$(MSBuildAssemblyVersion)' == ''" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!--
Overrides for the Microsoft.Common.targets extension targets. Used to make sure that only the imports we specify
(hard-coded to 4.0 locations) are used, not the 12.0 locations that would be used by default. Defined here because
Microsoft.CSharp.targets imports Microsoft.Common.targets from the current directory rather than using MSBuildToolsPath,
so defining these in Microsoft.Common.targets alone would not suffice for C# projects.
NOTE: This logic is duplicated in Microsoft.VisualBasic.targets (VB has the same problem) and in Microsoft.Common.targets
(for anyone who DOES import it directly), so for any changes to this logic in this file, please also edit the other two.
-->
<ImportByWildcardBefore40MicrosoftCommonTargets Condition="'$(ImportByWildcardBefore40MicrosoftCommonTargets)' == ''">$(ImportByWildcardBeforeMicrosoftCommonTargets)</ImportByWildcardBefore40MicrosoftCommonTargets>
<ImportByWildcardBefore40MicrosoftCommonTargets Condition="'$(ImportByWildcardBefore40MicrosoftCommonTargets)' == ''">true</ImportByWildcardBefore40MicrosoftCommonTargets>
<ImportByWildcardAfter40MicrosoftCommonTargets Condition="'$(ImportByWildcardAfter40MicrosoftCommonTargets)' == ''">$(ImportByWildcardAfterMicrosoftCommonTargets)</ImportByWildcardAfter40MicrosoftCommonTargets>
<ImportByWildcardAfter40MicrosoftCommonTargets Condition="'$(ImportByWildcardAfter40MicrosoftCommonTargets)' == ''">true</ImportByWildcardAfter40MicrosoftCommonTargets>
<ImportUserLocationsByWildcardBefore40MicrosoftCommonTargets Condition="'$(ImportUserLocationsByWildcardBefore40MicrosoftCommonTargets)' == ''">$(ImportUserLocationsByWildcardBeforeMicrosoftCommonTargets)</ImportUserLocationsByWildcardBefore40MicrosoftCommonTargets>
<ImportUserLocationsByWildcardBefore40MicrosoftCommonTargets Condition="'$(ImportUserLocationsByWildcardBefore40MicrosoftCommonTargets)' == ''">true</ImportUserLocationsByWildcardBefore40MicrosoftCommonTargets>
<ImportUserLocationsByWildcardAfter40MicrosoftCommonTargets Condition="'$(ImportUserLocationsByWildcardAfter40MicrosoftCommonTargets)' == ''">$(ImportUserLocationsByWildcardAfterMicrosoftCommonTargets)</ImportUserLocationsByWildcardAfter40MicrosoftCommonTargets>
<ImportUserLocationsByWildcardAfter40MicrosoftCommonTargets Condition="'$(ImportUserLocationsByWildcardAfter40MicrosoftCommonTargets)' == ''">true</ImportUserLocationsByWildcardAfter40MicrosoftCommonTargets>
<ImportByWildcardBeforeMicrosoftCommonTargets>false</ImportByWildcardBeforeMicrosoftCommonTargets>
<ImportByWildcardAfterMicrosoftCommonTargets>false</ImportByWildcardAfterMicrosoftCommonTargets>
<ImportUserLocationsByWildcardBeforeMicrosoftCommonTargets>false</ImportUserLocationsByWildcardBeforeMicrosoftCommonTargets>
<ImportUserLocationsByWildcardAfterMicrosoftCommonTargets>false</ImportUserLocationsByWildcardAfterMicrosoftCommonTargets>
<CustomBeforeMicrosoftCommonTargets Condition="'$(CustomBeforeMicrosoftCommonTargets)' == ''">$(MSBuildExtensionsPath)\v4.0\Custom.Before.Microsoft.Common.targets</CustomBeforeMicrosoftCommonTargets>
<CustomAfterMicrosoftCommonTargets Condition="'$(CustomAfterMicrosoftCommonTargets)' == ''">$(MSBuildExtensionsPath)\v4.0\Custom.After.Microsoft.Common.targets</CustomAfterMicrosoftCommonTargets>
<!-- Overrides for the Microsoft.CSharp.targets extension targets -->
<ImportByWildcardBefore40MicrosoftCSharpTargets Condition="'$(ImportByWildcardBefore40MicrosoftCSharpTargets)' == ''">$(ImportByWildcardBeforeMicrosoftCSharpTargets)</ImportByWildcardBefore40MicrosoftCSharpTargets>
<ImportByWildcardBefore40MicrosoftCSharpTargets Condition="'$(ImportByWildcardBefore40MicrosoftCSharpTargets)' == ''">true</ImportByWildcardBefore40MicrosoftCSharpTargets>
<ImportByWildcardAfter40MicrosoftCSharpTargets Condition="'$(ImportByWildcardAfter40MicrosoftCSharpTargets)' == ''">$(ImportByWildcardAfterMicrosoftCSharpTargets)</ImportByWildcardAfter40MicrosoftCSharpTargets>
<ImportByWildcardAfter40MicrosoftCSharpTargets Condition="'$(ImportByWildcardAfter40MicrosoftCSharpTargets)' == ''">true</ImportByWildcardAfter40MicrosoftCSharpTargets>
<ImportUserLocationsByWildcardBefore40MicrosoftCSharpTargets Condition="'$(ImportUserLocationsByWildcardBefore40MicrosoftCSharpTargets)' == ''">$(ImportUserLocationsByWildcardBeforeMicrosoftCSharpTargets)</ImportUserLocationsByWildcardBefore40MicrosoftCSharpTargets>
<ImportUserLocationsByWildcardBefore40MicrosoftCSharpTargets Condition="'$(ImportUserLocationsByWildcardBefore40MicrosoftCSharpTargets)' == ''">true</ImportUserLocationsByWildcardBefore40MicrosoftCSharpTargets>
<ImportUserLocationsByWildcardAfter40MicrosoftCSharpTargets Condition="'$(ImportUserLocationsByWildcardAfter40MicrosoftCSharpTargets)' == ''">$(ImportUserLocationsByWildcardAfterMicrosoftCSharpTargets)</ImportUserLocationsByWildcardAfter40MicrosoftCSharpTargets>
<ImportUserLocationsByWildcardAfter40MicrosoftCSharpTargets Condition="'$(ImportUserLocationsByWildcardAfter40MicrosoftCSharpTargets)' == ''">true</ImportUserLocationsByWildcardAfter40MicrosoftCSharpTargets>
<ImportByWildcardBeforeMicrosoftCSharpTargets>false</ImportByWildcardBeforeMicrosoftCSharpTargets>
<ImportByWildcardAfterMicrosoftCSharpTargets>false</ImportByWildcardAfterMicrosoftCSharpTargets>
<ImportUserLocationsByWildcardBeforeMicrosoftCSharpTargets>false</ImportUserLocationsByWildcardBeforeMicrosoftCSharpTargets>
<ImportUserLocationsByWildcardAfterMicrosoftCSharpTargets>false</ImportUserLocationsByWildcardAfterMicrosoftCSharpTargets>
<CustomBeforeMicrosoftCSharpTargets Condition="'$(CustomBeforeMicrosoftCSharpTargets)' == ''">$(MSBuildExtensionsPath)\v4.0\Custom.Before.Microsoft.CSharp.targets</CustomBeforeMicrosoftCSharpTargets>
<CustomAfterMicrosoftCSharpTargets Condition="'$(CustomAfterMicrosoftCSharpTargets)' == ''">$(MSBuildExtensionsPath)\v4.0\Custom.After.Microsoft.CSharp.targets</CustomAfterMicrosoftCSharpTargets>
</PropertyGroup>
<PropertyGroup Condition="'$(MSBuildAssemblyVersion)' == '' and ('$(TargetFrameworkIdentifier)' == '.NETFramework' or '$(TargetFrameworkIdentifier)' == 'Silverlight' or ('$(TargetFrameworkIdentifier)' == '' and ('$(TargetRuntime)' == 'Managed' or '$(TargetRuntime)' == '')))" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!--
Overrides for the Microsoft.NETFramework.props extension targets. Used to make sure that only the imports we specify
(hard-coded to 4.0 locations) are used, not the 12.0 locations that would be used by default. Required because
Microsoft.Common.targets imports it from the current directory, so we don't get a chance to redirect these in its
own redirection targets.
NOTE: This logic is duplicated in Microsoft.VisualBasic.targets and in Microsoft.Common.targets because VB and C#
import Microsoft.Common.targets from the current directory and thus don't get the benefit of these redirections either,
so for any changes to this logic in this file, please also edit the other two.
-->
<ImportByWildcardBefore40MicrosoftNetFrameworkProps Condition="'$(ImportByWildcardBefore40MicrosoftNetFrameworkProps)' == ''">$(ImportByWildcardBeforeMicrosoftNetFrameworkProps)</ImportByWildcardBefore40MicrosoftNetFrameworkProps>
<ImportByWildcardBefore40MicrosoftNetFrameworkProps Condition="'$(ImportByWildcardBefore40MicrosoftNetFrameworkProps)' == ''">true</ImportByWildcardBefore40MicrosoftNetFrameworkProps>
<ImportByWildcardAfter40MicrosoftNetFrameworkProps Condition="'$(ImportByWildcardAfter40MicrosoftNetFrameworkProps)' == ''">$(ImportByWildcardAfterMicrosoftNetFrameworkProps)</ImportByWildcardAfter40MicrosoftNetFrameworkProps>
<ImportByWildcardAfter40MicrosoftNetFrameworkProps Condition="'$(ImportByWildcardAfter40MicrosoftNetFrameworkProps)' == ''">true</ImportByWildcardAfter40MicrosoftNetFrameworkProps>
<ImportUserLocationsByWildcardBefore40MicrosoftNetFrameworkProps Condition="'$(ImportUserLocationsByWildcardBefore40MicrosoftNetFrameworkProps)' == ''">$(ImportUserLocationsByWildcardBeforeMicrosoftNetFrameworkProps)</ImportUserLocationsByWildcardBefore40MicrosoftNetFrameworkProps>
<ImportUserLocationsByWildcardBefore40MicrosoftNetFrameworkProps Condition="'$(ImportUserLocationsByWildcardBefore40MicrosoftNetFrameworkProps)' == ''">true</ImportUserLocationsByWildcardBefore40MicrosoftNetFrameworkProps>
<ImportUserLocationsByWildcardAfter40MicrosoftNetFrameworkProps Condition="'$(ImportUserLocationsByWildcardAfter40MicrosoftNetFrameworkProps)' == ''">$(ImportUserLocationsByWildcardAfterMicrosoftNetFrameworkProps)</ImportUserLocationsByWildcardAfter40MicrosoftNetFrameworkProps>
<ImportUserLocationsByWildcardAfter40MicrosoftNetFrameworkProps Condition="'$(ImportUserLocationsByWildcardAfter40MicrosoftNetFrameworkProps)' == ''">true</ImportUserLocationsByWildcardAfter40MicrosoftNetFrameworkProps>
<ImportByWildcardBeforeMicrosoftNetFrameworkProps>false</ImportByWildcardBeforeMicrosoftNetFrameworkProps>
<ImportByWildcardAfterMicrosoftNetFrameworkProps>false</ImportByWildcardAfterMicrosoftNetFrameworkProps>
<ImportUserLocationsByWildcardBeforeMicrosoftNetFrameworkProps>false</ImportUserLocationsByWildcardBeforeMicrosoftNetFrameworkProps>
<ImportUserLocationsByWildcardAfterMicrosoftNetFrameworkProps>false</ImportUserLocationsByWildcardAfterMicrosoftNetFrameworkProps>
</PropertyGroup>
<!--<ImportGroup Condition="'$(MSBuildAssemblyVersion)' == ''">-->
<!--<Import Project="$(MSBuildUserExtensionsPath)\4.0\Microsoft.CSharp.targets\ImportBefore\*" Condition="'$(ImportUserLocationsByWildcardBefore40MicrosoftCSharpTargets)' == 'true' and exists('$(MSBuildUserExtensionsPath)\4.0\Microsoft.CSharp.targets\ImportBefore')" />-->
<!--<Import Project="$(MSBuildExtensionsPath)\4.0\Microsoft.CSharp.targets\ImportBefore\*" Condition="'$(ImportByWildcardBefore40MicrosoftCSharpTargets)' == 'true' and exists('$(MSBuildExtensionsPath)\4.0\Microsoft.CSharp.targets\ImportBefore')" />-->
<!--</ImportGroup>-->
<!-- Really should be imported right before Microsoft.Common.targets, but because Microsoft.CSharp.targets imports
Microsoft.Common.targets from the current directory rather than using MSBuildToolsPath (which would redirect to our
targets), we're stuck doing it this way instead. -->
<!--<ImportGroup Condition="'$(MSBuildAssemblyVersion)' == ''">-->
<!--<Import Project="$(MSBuildUserExtensionsPath)\4.0\Microsoft.Common.targets\ImportBefore\*" Condition="'$(ImportUserLocationsByWildcardBefore40MicrosoftCommonTargets)' == 'true' and exists('$(MSBuildUserExtensionsPath)\4.0\Microsoft.Common.targets\ImportBefore')" />-->
<!--<Import Project="$(MSBuildExtensionsPath)\4.0\Microsoft.Common.targets\ImportBefore\*" Condition="'$(ImportByWildcardBefore40MicrosoftCommonTargets)' == 'true' and exists('$(MSBuildExtensionsPath)\4.0\Microsoft.Common.targets\ImportBefore')" />-->
<!--</ImportGroup>-->
<!-- Really should be imported right before Microsoft.NETFramework.props, but because Microsoft.CSharp.targets imports
Microsoft.Common.targets from the current directory rather than using MSBuildToolsPath (which would redirect to our
targets), and Microsoft.Common.targets does likewise with Microsoft.NETFramework.props, we're stuck doing it this
way instead. -->
<!--<ImportGroup Condition="'$(MSBuildAssemblyVersion)' == ''">-->
<!--<Import Project="$(MSBuildUserExtensionsPath)\4.0\Microsoft.NETFramework.props\ImportBefore\*" Condition="'$(ImportUserLocationsByWildcardBefore40MicrosoftNetFrameworkProps)' == 'true' and exists('$(MSBuildUserExtensionsPath)\4.0\Microsoft.NETFramework.props\ImportBefore')" />-->
<!--<Import Project="$(MSBuildExtensionsPath)\4.0\Microsoft.NETFramework.props\ImportBefore\*" Condition="'$(ImportByWildcardBefore40MicrosoftNetFrameworkProps)' == 'true' and exists('$(MSBuildExtensionsPath)\4.0\Microsoft.NETFramework.props\ImportBefore')" />-->
<!--</ImportGroup>-->
<!--
============================================================================================================================================
<Import Project="$(MSBuildToolsPath)\Microsoft.Managed.Before.targets">
C:\Program Files\dotnet\sdk\6.0.100-preview.5.21302.13\Microsoft.Managed.Before.targets
============================================================================================================================================
-->
<!--
***********************************************************************************************
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
created a backup copy. Incorrect changes to this file will make it
impossible to load or build your projects from the command-line or the IDE.
This file defines common build logic for all managed languaged: C#, VisualBasic, F#
It is imported before the common targets have been imported.
Copyright (C) Microsoft Corporation. All rights reserved.
***********************************************************************************************
-->
<!--
We are doing a cross-targeting build if there is a non-empty list of target frameworks specified
and there is no current target framework being built individually. In that case, a multitargeting
project file like Microsoft.<language>.CrossTargeting.targets gets imported.
-->
<PropertyGroup Condition="'$(TargetFrameworks)' != '' and '$(TargetFramework)' == ''">
<IsCrossTargetingBuild>true</IsCrossTargetingBuild>
</PropertyGroup>
<!--
============================================================================================================================================
</Import>
C:\Program Files\dotnet\sdk\6.0.100-preview.5.21302.13\Microsoft.CSharp.targets
============================================================================================================================================
-->
<!--
============================================================================================================================================
<Import Project="$(CSharpTargetsPath)">
C:\Program Files\dotnet\sdk\6.0.100-preview.5.21302.13\Microsoft.CSharp.CurrentVersion.targets
============================================================================================================================================
-->
<!--
***********************************************************************************************
Microsoft.CSharp.CurrentVersion.targets
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
created a backup copy. Incorrect changes to this file will make it
impossible to load or build your projects from the command-line or the IDE.
This file defines the steps in the standard build process specific for C# .NET projects.
For example, it contains the step that actually calls the C# compiler. The remainder
of the build process is defined in Microsoft.Common.targets, which is imported by
this file.
Copyright (C) Microsoft Corporation. All rights reserved.
***********************************************************************************************
-->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportByWildcardBeforeMicrosoftCSharpTargets Condition="'$(ImportByWildcardBeforeMicrosoftCSharpTargets)' == ''">true</ImportByWildcardBeforeMicrosoftCSharpTargets>
<ImportByWildcardAfterMicrosoftCSharpTargets Condition="'$(ImportByWildcardAfterMicrosoftCSharpTargets)' == ''">true</ImportByWildcardAfterMicrosoftCSharpTargets>
<ImportUserLocationsByWildcardBeforeMicrosoftCSharpTargets Condition="'$(ImportUserLocationsByWildcardBeforeMicrosoftCSharpTargets)' == ''">true</ImportUserLocationsByWildcardBeforeMicrosoftCSharpTargets>
<ImportUserLocationsByWildcardAfterMicrosoftCSharpTargets Condition="'$(ImportUserLocationsByWildcardAfterMicrosoftCSharpTargets)' == ''">true</ImportUserLocationsByWildcardAfterMicrosoftCSharpTargets>
</PropertyGroup>
<!--<Import Project="$(MSBuildUserExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.CSharp.targets\ImportBefore\*" Condition="'$(ImportUserLocationsByWildcardBeforeMicrosoftCSharpTargets)' == 'true' and exists('$(MSBuildUserExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.CSharp.targets\ImportBefore')" />-->
<!--<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.CSharp.targets\ImportBefore\*" Condition="'$(ImportByWildcardBeforeMicrosoftCSharpTargets)' == 'true' and exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.CSharp.targets\ImportBefore')" />-->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<CustomBeforeMicrosoftCSharpTargets Condition="'$(CustomBeforeMicrosoftCSharpTargets)'==''">$(MSBuildExtensionsPath)\v$(MSBuildToolsVersion)\Custom.Before.Microsoft.CSharp.targets</CustomBeforeMicrosoftCSharpTargets>
<CustomAfterMicrosoftCSharpTargets Condition="'$(CustomAfterMicrosoftCSharpTargets)'==''">$(MSBuildExtensionsPath)\v$(MSBuildToolsVersion)\Custom.After.Microsoft.CSharp.targets</CustomAfterMicrosoftCSharpTargets>
</PropertyGroup>
<!--<Import Project="$(CustomBeforeMicrosoftCSharpTargets)" Condition="'$(CustomBeforeMicrosoftCSharpTargets)' != '' and Exists('$(CustomBeforeMicrosoftCSharpTargets)')" />-->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<DefaultLanguageSourceExtension>.cs</DefaultLanguageSourceExtension>
<Language>C#</Language>
<TargetRuntime>Managed</TargetRuntime>
<AlwaysUseNumericalSuffixInItemNames>true</AlwaysUseNumericalSuffixInItemNames>
<DefineCommonItemSchemas Condition=" '$(DefineCommonItemSchemas)' == '' ">true</DefineCommonItemSchemas>
<DefineCommonReferenceSchemas Condition=" '$(DefineCommonReferenceSchemas)' == '' ">true</DefineCommonReferenceSchemas>
<DefineCommonCapabilities Condition=" '$(DefineCommonCapabilities)' == '' ">true</DefineCommonCapabilities>
<SynthesizeLinkMetadata Condition=" '$(SynthesizeLinkMetadata)' == '' and '$(HasSharedItems)' == 'true' ">true</SynthesizeLinkMetadata>
<DefaultProjectTypeGuid Condition=" '$(DefaultProjectTypeGuid)' == '' ">{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</DefaultProjectTypeGuid>
<AppDesignerFolder Condition="'$(AppDesignerFolder)' == ''">Properties</AppDesignerFolder>
</PropertyGroup>
<ItemGroup Condition=" '$(DefineCSharpItemSchemas)' != 'false' " xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyPageSchema Include="$(CommonXamlResourcesDirectory)CSharp.ProjectItemsSchema.xaml;" />
<PropertyPageSchema Include="$(CommonXamlResourcesDirectory)CSharp.xaml;">
<Context>File</Context>
</PropertyPageSchema>
<PropertyPageSchema Include="$(CommonXamlResourcesDirectory)CSharp.BrowseObject.xaml;">
<Context>BrowseObject</Context>
</PropertyPageSchema>
<ProjectCapability Include="CSharp;Managed" />
</ItemGroup>
<ItemGroup Condition=" '$(DefineCommonCapabilities)' == 'true' " xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ProjectCapability Include="ReferencesFolder;LanguageService" />
</ItemGroup>
<!--
The CreateManifestResourceNames target create the manifest resource names from the .RESX
files.
[IN]
@(EmbeddedResource) - The list of EmbeddedResource items that have been pre-processed to add metadata about resource type
Expected Metadata "Type" can either be "Resx" or "Non-Resx"
[OUT]
@(EmbeddedResource) - EmbeddedResource items with metadata
For C# applications the transformation is like:
Resources1.resx => RootNamespace.Resources1 => Build into main assembly
SubFolder\Resources1.resx => RootNamespace.SubFolder.Resources1 => Build into main assembly
Resources1.fr.resx => RootNamespace.Resources1.fr => Build into satellite assembly
Resources1.notaculture.resx => RootNamespace.Resources1.notaculture => Build into main assembly
For other project systems, this transformation may be different.
-->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<CreateManifestResourceNamesDependsOn />
</PropertyGroup>
<Target Name="CreateManifestResourceNames" Condition="'@(EmbeddedResource)' != ''" DependsOnTargets="$(CreateManifestResourceNamesDependsOn)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<_Temporary Remove="@(_Temporary)" />
</ItemGroup>
<!-- Create manifest names for culture and non-culture Resx files, and for non-culture Non-Resx resources -->
<CreateCSharpManifestResourceName ResourceFiles="@(EmbeddedResource)" RootNamespace="$(RootNamespace)" UseDependentUponConvention="$(EmbeddedResourceUseDependentUponConvention)" Condition="'%(EmbeddedResource.ManifestResourceName)' == '' and ('%(EmbeddedResource.WithCulture)' == 'false' or '%(EmbeddedResource.Type)' == 'Resx')">
<Output TaskParameter="ResourceFilesWithManifestResourceNames" ItemName="_Temporary" />
</CreateCSharpManifestResourceName>
<!-- Create manifest names for all culture non-resx resources -->
<CreateCSharpManifestResourceName ResourceFiles="@(EmbeddedResource)" RootNamespace="$(RootNamespace)" PrependCultureAsDirectory="false" UseDependentUponConvention="$(EmbeddedResourceUseDependentUponConvention)" Condition="'%(EmbeddedResource.ManifestResourceName)' == '' and '%(EmbeddedResource.WithCulture)' == 'true' and '%(EmbeddedResource.Type)' == 'Non-Resx'">
<Output TaskParameter="ResourceFilesWithManifestResourceNames" ItemName="_Temporary" />
</CreateCSharpManifestResourceName>
<ItemGroup>
<EmbeddedResource Remove="@(EmbeddedResource)" Condition="'%(EmbeddedResource.ManifestResourceName)' == ''" />
<EmbeddedResource Include="@(_Temporary)" />
<_Temporary Remove="@(_Temporary)" />
</ItemGroup>
</Target>
<Target Name="ResolveCodeAnalysisRuleSet" Condition="'$(CodeAnalysisRuleSet)' != ''" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ResolveCodeAnalysisRuleSet CodeAnalysisRuleSet="$(CodeAnalysisRuleSet)" CodeAnalysisRuleSetDirectories="$(CodeAnalysisRuleSetDirectories)" MSBuildProjectDirectory="$(MSBuildProjectDirectory)">
<Output TaskParameter="ResolvedCodeAnalysisRuleSet" PropertyName="ResolvedCodeAnalysisRuleSet" />
</ResolveCodeAnalysisRuleSet>
</Target>
<ItemGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- Activate CPS projects to track folder names in namespace. -->
<ProjectCapability Include="RelativePathDerivedDefaultNamespace" />
</ItemGroup>
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- Provide a facility to override UseHostCompilerIfAvailable-->
<UseHostCompilerIfAvailable Condition=" '$(UseHostCompilerIfAvailable)' == ''">true</UseHostCompilerIfAvailable>
</PropertyGroup>
<ItemGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<DocFileItem Include="$(DocumentationFile)" Condition="'$(DocumentationFile)'!=''" />
</ItemGroup>
<ItemGroup Condition="'$(_DebugSymbolsProduced)' == 'true' and '$(PdbFile)' != ''" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<_DebugSymbolsIntermediatePathTemporary Include="$(PdbFile)" />
<!-- Add any missing .pdb extension, as the compiler does -->
<_DebugSymbolsIntermediatePath Include="@(_DebugSymbolsIntermediatePathTemporary->'%(RootDir)%(Directory)%(Filename).pdb')" />
</ItemGroup>
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<CoreCompileDependsOn>$(CoreCompileDependsOn);_ComputeNonExistentFileProperty;ResolveCodeAnalysisRuleSet</CoreCompileDependsOn>
<ExportWinMDFile Condition="'$(ExportWinMDFile)' == '' and '$(OutputType)' == 'WinMDObj'">true</ExportWinMDFile>
</PropertyGroup>
<!--
The XamlPreCompile target must remain identical to
the CoreCompile target in Microsoft.CSharp.Core.targets.
Any updates to one must be made to the other.
-->
<Target Name="XamlPreCompile" Inputs="$(MSBuildAllProjects);&#xD;&#xA; @(Compile);&#xD;&#xA; @(_CoreCompileResourceInputs);&#xD;&#xA; $(ApplicationIcon);&#xD;&#xA; $(AssemblyOriginatorKeyFile);&#xD;&#xA; @(ReferencePath);&#xD;&#xA; @(CompiledLicenseFile);&#xD;&#xA; @(LinkResource);&#xD;&#xA; @(EmbeddedDocumentation);&#xD;&#xA; $(Win32Resource);&#xD;&#xA; $(Win32Manifest);&#xD;&#xA; @(CustomAdditionalCompileInputs);&#xD;&#xA; @(Page);&#xD;&#xA; @(ApplicationDefinition);&#xD;&#xA; $(ResolvedCodeAnalysisRuleSet)" Outputs="@(DocFileItem);&#xD;&#xA; @(XamlIntermediateAssembly);&#xD;&#xA; @(_DebugSymbolsIntermediatePath);&#xD;&#xA; $(NonExistentFile);&#xD;&#xA; @(CustomAdditionalCompileOutputs)" Condition="'@(Page)' != '' Or '@(ApplicationDefinition)' != ''" Returns="" DependsOnTargets="$(CoreCompileDependsOn);GenerateMSBuildEditorConfigFile" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- These two compiler warnings are raised when a reference is bound to a different version
than specified in the assembly reference version number. MSBuild raises the same warning in this case,
so the compiler warning would be redundant. -->
<PropertyGroup Condition="('$(TargetFrameworkVersion)' != 'v1.0') and ('$(TargetFrameworkVersion)' != 'v1.1')">
<NoWarn>$(NoWarn);1701;1702</NoWarn>
</PropertyGroup>
<PropertyGroup>
<!-- To match historical behavior, when inside VS11+ disable the warning from csc.exe indicating that no sources were passed in-->
<NoWarn Condition=" '$(BuildingInsideVisualStudio)' == 'true' and '$(VisualStudioVersion)' != '' and '$(VisualStudioVersion)' &gt; '10.0' ">$(NoWarn);2008</NoWarn>
</PropertyGroup>
<ItemGroup Condition="'$(TargetingClr2Framework)'=='true'">
<ReferencePath>
<EmbedInteropTypes />
</ReferencePath>
</ItemGroup>
<PropertyGroup>
<!-- If the user has specified AppConfigForCompiler, we'll use it. If they have not, but they set UseAppConfigForCompiler,
then we'll use AppConfig -->
<AppConfigForCompiler Condition="'$(AppConfigForCompiler)' == '' and '$(UseAppConfigForCompiler)' == 'true'">$(AppConfig)</AppConfigForCompiler>
<!-- If we are targeting winmdobj we want to specifically the pdbFile property since we do not want it to collide with the output of winmdexp-->
<PdbFile Condition="'$(PdbFile)' == '' and '$(OutputType)' == 'winmdobj' and '$(_DebugSymbolsProduced)' == 'true'">$(IntermediateOutputPath)$(TargetName).compile.pdb</PdbFile>
</PropertyGroup>
<!-- Prefer32Bit was introduced in .NET 4.5. Set it to false if we are targeting 4.0 -->
<PropertyGroup Condition="('$(TargetFrameworkVersion)' == 'v4.0')">
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup Condition="('$(AdditionalFileItemNames)' != '')">
<AdditionalFileItems Include="$(AdditionalFileItemNames)" />
<AdditionalFiles Include="@(%(AdditionalFileItems.Identity))" />
</ItemGroup>
<PropertyGroup Condition="'$(UseSharedCompilation)' == ''">
<UseSharedCompilation>true</UseSharedCompilation>
</PropertyGroup>
<!-- Condition is to filter out the _CoreCompileResourceInputs so that it doesn't pass in culture resources to the compiler -->
<Csc Condition=" '%(_CoreCompileResourceInputs.WithCulture)' != 'true' " AdditionalLibPaths="$(AdditionalLibPaths)" AddModules="@(AddModules)" AdditionalFiles="@(AdditionalFiles)" AllowUnsafeBlocks="$(AllowUnsafeBlocks)" AnalyzerConfigFiles="@(EditorConfigFiles)" Analyzers="@(Analyzer)" ApplicationConfiguration="$(AppConfigForCompiler)" BaseAddress="$(BaseAddress)" CheckForOverflowUnderflow="$(CheckForOverflowUnderflow)" CodeAnalysisRuleSet="$(ResolvedCodeAnalysisRuleSet)" CodePage="$(CodePage)" DebugType="$(DebugType)" DefineConstants="$(DefineConstants)" DelaySign="$(DelaySign)" DisabledWarnings="$(NoWarn)" DocumentationFile="@(DocFileItem)" EmitDebugInformation="$(DebugSymbols)" EnvironmentVariables="$(CscEnvironment)" ErrorEndLocation="$(ErrorEndLocation)" ErrorLog="$(ErrorLog)" ErrorReport="$(ErrorReport)" FileAlignment="$(FileAlignment)" GenerateFullPaths="$(GenerateFullPaths)" HighEntropyVA="$(HighEntropyVA)" KeyContainer="$(KeyContainerName)" KeyFile="$(KeyOriginatorFile)" LangVersion="$(LangVersion)" LinkResources="@(LinkResource)" MainEntryPoint="$(StartupObject)" ModuleAssemblyName="$(ModuleAssemblyName)" NoConfig="true" NoLogo="$(NoLogo)" NoStandardLib="$(NoCompilerStandardLib)" NoWin32Manifest="$(NoWin32Manifest)" Nullable="$(Nullable)" Optimize="$(Optimize)" OutputAssembly="@(XamlIntermediateAssembly)" PdbFile="$(PdbFile)" Platform="$(PlatformTarget)" Prefer32Bit="$(Prefer32Bit)" PreferredUILang="$(PreferredUILang)" References="@(ReferencePath)" ReportAnalyzer="$(ReportAnalyzer)" Resources="@(_CoreCompileResourceInputs);@(CompiledLicenseFile)" ResponseFiles="$(CompilerResponseFile)" SkipAnalyzers="$(_SkipAnalyzers)" Sources="@(Compile)" SubsystemVersion="$(SubsystemVersion)" TargetType="$(OutputType)" ToolExe="$(CscToolExe)" ToolPath="$(CscToolPath)" TreatWarningsAsErrors="$(TreatWarningsAsErrors)" UseHostCompilerIfAvailable="$(UseHostCompilerIfAvailable)" UseSharedCompilation="$(UseSharedCompilation)" Utf8Output="$(Utf8Output)" VsSessionGuid="$(VsSessionGuid)" WarningLevel="$(WarningLevel)" WarningsAsErrors="$(WarningsAsErrors)" WarningsNotAsErrors="$(WarningsNotAsErrors)" Win32Icon="$(ApplicationIcon)" Win32Manifest="$(Win32Manifest)" Win32Resource="$(Win32Resource)" />
<!-- Only Applicable to the regular CoreCompile:
<ItemGroup>
<_CoreCompileResourceInputs Remove="@(_CoreCompileResourceInputs)" />
</ItemGroup>
<CallTarget Targets="$(TargetsTriggeredByCompilation)" Condition="'$(TargetsTriggeredByCompilation)' != ''"/>
-->
<OnError Condition="'$(OnXamlPreCompileErrorTarget)' != ''" ExecuteTargets="$(OnXamlPreCompileErrorTarget)" />
</Target>
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- Design-time builds require a newer version than 1.0 to succeed, so override back to inbox in that case -->
<CSharpCoreTargetsPath Condition="'$(CSharpCoreTargetsPath)' == '' or ('$(DesignTimeBuild)' == 'true' and $(CSharpCoreTargetsPath.Contains('Microsoft.Net.Compilers.1.0.0')))">$(RoslynTargetsPath)\Microsoft.CSharp.Core.targets</CSharpCoreTargetsPath>
</PropertyGroup>
<!--
============================================================================================================================================
<Import Project="$(CSharpCoreTargetsPath)">
C:\Program Files\dotnet\sdk\6.0.100-preview.5.21302.13\Roslyn\Microsoft.CSharp.Core.targets
============================================================================================================================================
-->
<!-- Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. See the LICENSE file in the project root for more information. -->
<!--
============================================================================================================================================
<Import Project="Microsoft.Managed.Core.targets">
C:\Program Files\dotnet\sdk\6.0.100-preview.5.21302.13\Roslyn\Microsoft.Managed.Core.targets
============================================================================================================================================
-->
<!-- Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. See the LICENSE file in the project root for more information. -->
<!--
Common targets for managed compilers.
-->
<UsingTask TaskName="Microsoft.CodeAnalysis.BuildTasks.MapSourceRoots" AssemblyFile="$(MSBuildThisFileDirectory)Microsoft.Build.Tasks.CodeAnalysis.dll" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<Target Name="ShimReferencePathsWhenCommonTargetsDoesNotUnderstandReferenceAssemblies" BeforeTargets="CoreCompile" Condition="'@(ReferencePathWithRefAssemblies)' == ''" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!--
FindReferenceAssembliesForReferences target in Common targets populate this item
since dev15.3. The compiler targets may be used (via NuGet package) on earlier MSBuilds.
If the ReferencePathWithRefAssemblies item is not populated, just use ReferencePaths
(implementation assemblies) as they are.
Since XAML inner build runs CoreCompile directly (instead of Compile target),
it also doesn't invoke FindReferenceAssembliesForReferences listed in CompileDependsOn.
In that case we also populate ReferencePathWithRefAssemblies with implementation assemblies.
-->
<ItemGroup>
<ReferencePathWithRefAssemblies Include="@(ReferencePath)" />
</ItemGroup>
</Target>
<Target Name="_BeforeVBCSCoreCompile" DependsOnTargets="ShimReferencePathsWhenCommonTargetsDoesNotUnderstandReferenceAssemblies" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Condition="'$(TargetingClr2Framework)' == 'true'">
<ReferencePathWithRefAssemblies>
<EmbedInteropTypes />
</ReferencePathWithRefAssemblies>
</ItemGroup>
<!-- Prefer32Bit was introduced in .NET 4.5. Set it to false if we are targeting 4.0 -->
<PropertyGroup Condition="('$(TargetFrameworkVersion)' == 'v4.0')">
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<!-- TODO: Remove this ItemGroup once it has been moved to "_GenerateCompileInputs" target in Microsoft.Common.CurrentVersion.targets.
https://github.com/dotnet/roslyn/issues/12223 -->
<ItemGroup Condition="('$(AdditionalFileItemNames)' != '')">
<AdditionalFileItems Include="$(AdditionalFileItemNames)" />
<AdditionalFiles Include="@(%(AdditionalFileItems.Identity))" />
</ItemGroup>
<PropertyGroup Condition="'$(UseSharedCompilation)' == ''">
<UseSharedCompilation>true</UseSharedCompilation>
</PropertyGroup>
</Target>
<Target Name="_ComputeSkipAnalyzers" BeforeTargets="CoreCompile" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- First, force clear non-user facing property '_SkipAnalyzers'. -->
<PropertyGroup>
<_SkipAnalyzers />
</PropertyGroup>
<!--
Then, determine if '_SkipAnalyzers' needs to be 'true' based on user facing property 'RunAnalyzers'.
If 'RunAnalyzers' is not set, then fallback to user facing property 'RunAnalyzersDuringBuild'.
Latter property allows users to disable analyzers only for non-design time builds.
Design time builds are background builds inside Visual Studio,
see details here: https://github.com/dotnet/project-system/blob/main/docs/design-time-builds.md.
Setting 'RunAnalyzersDuringBuild' to false, without setting 'RunAnalyzers', allows users to
continue running analyzers in the background in Visual Studio while typing (i.e. intellisense),
while disabling analyzer execution on explicitly invoked non-design time builds.
-->
<PropertyGroup Condition="'$(RunAnalyzers)' == 'false' or&#xD;&#xA; ('$(RunAnalyzers)' == '' and '$(RunAnalyzersDuringBuild)' == 'false')">
<_SkipAnalyzers>true</_SkipAnalyzers>
</PropertyGroup>
</Target>
<!--
========================
.editorconfig Support
========================
-->
<ItemGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<_AllDirectoriesAbove Include="@(Compile-&gt;GetPathsOfAllDirectoriesAbove())" Condition="'$(DiscoverEditorConfigFiles)' != 'false' or '$(DiscoverGlobalAnalyzerConfigFiles)' != 'false'" />
<!-- Work around a GetPathsOfAllDirectoriesAbove() bug where it can return multiple equivalent paths when the
compilation includes linked files with relative paths - https://github.com/microsoft/msbuild/issues/4392 -->
<PotentialEditorConfigFiles Include="@(_AllDirectoriesAbove-&gt;'%(FullPath)'-&gt;Distinct()-&gt;Combine('.editorconfig'))" Condition="'$(DiscoverEditorConfigFiles)' != 'false'" />
<EditorConfigFiles Include="@(PotentialEditorConfigFiles-&gt;Exists())" Condition="'$(DiscoverEditorConfigFiles)' != 'false'" />
<GlobalAnalyzerConfigFiles Include="@(_AllDirectoriesAbove-&gt;'%(FullPath)'-&gt;Distinct()-&gt;Combine('.globalconfig'))" Condition="'$(DiscoverGlobalAnalyzerConfigFiles)' != 'false'" />
<EditorConfigFiles Include="@(GlobalAnalyzerConfigFiles-&gt;Exists())" Condition="'$(DiscoverGlobalAnalyzerConfigFiles)' != 'false'" />
</ItemGroup>
<!--
========================
Property/metadata global .editorconfig Support
========================
Generates a global editor config that contains the evaluation of requested MSBuild properties and item metadata
Requested properties/items are requested via item groups like:
<CompilerVisibleProperty Include="PropertyNameToEval" />
<CompilerVisibleItemMetadata Include="ItemType" MetadataName="MetadataToRetrieve" />
-->
<UsingTask TaskName="Microsoft.CodeAnalysis.BuildTasks.GenerateMSBuildEditorConfig" AssemblyFile="$(MSBuildThisFileDirectory)Microsoft.Build.Tasks.CodeAnalysis.dll" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<Target Name="GenerateMSBuildEditorConfigFile" BeforeTargets="BeforeCompile;CoreCompile" DependsOnTargets="PrepareForBuild;GenerateMSBuildEditorConfigFileShouldRun;GenerateMSBuildEditorConfigFileCore" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<Target Name="GenerateMSBuildEditorConfigFileShouldRun" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<GeneratedMSBuildEditorConfigFile Condition="'$(GeneratedMSBuildEditorConfigFile)' == ''">$(IntermediateOutputPath)$(MSBuildProjectName).GeneratedMSBuildEditorConfig.editorconfig</GeneratedMSBuildEditorConfigFile>
<GenerateMSBuildEditorConfigFile Condition="'$(GenerateMSBuildEditorConfigFile)' == ''">true</GenerateMSBuildEditorConfigFile>
<_GeneratedEditorConfigHasItems Condition="'@(CompilerVisibleItemMetadata-&gt;Count())' != '0'">true</_GeneratedEditorConfigHasItems>
<_GeneratedEditorConfigShouldRun Condition="'$(GenerateMSBuildEditorConfigFile)' == 'true' and ('$(_GeneratedEditorConfigHasItems)' == 'true' or '@(CompilerVisibleProperty-&gt;Count())' != '0')">true</_GeneratedEditorConfigShouldRun>
</PropertyGroup>
</Target>
<Target Name="GenerateMSBuildEditorConfigFileCore" Condition="'$(_GeneratedEditorConfigShouldRun)' == 'true'" Outputs="$(GeneratedMSBuildEditorConfigFile)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<!-- Collect requested properties, and eval their value -->
<_GeneratedEditorConfigProperty Include="@(CompilerVisibleProperty)">
<Value>$(%(CompilerVisibleProperty.Identity))</Value>
</_GeneratedEditorConfigProperty>
<!-- Collect the requested items and remember which metadata is wanted -->
<_GeneratedEditorConfigMetadata Include="@(%(CompilerVisibleItemMetadata.Identity))" Condition="'$(_GeneratedEditorConfigHasItems)' == 'true'">
<ItemType>%(Identity)</ItemType>
<MetadataName>%(CompilerVisibleItemMetadata.MetadataName)</MetadataName>
</_GeneratedEditorConfigMetadata>
<!-- Record that we'll write a file, and add it to the analyzerconfig inputs -->
<FileWrites Include="$(GeneratedMSBuildEditorConfigFile)" />
<EditorConfigFiles Include="$(GeneratedMSBuildEditorConfigFile)" />
</ItemGroup>
<!-- Transform the collected properties and items into an editor config file -->
<GenerateMSBuildEditorConfig PropertyItems="@(_GeneratedEditorConfigProperty)" MetadataItems="@(_GeneratedEditorConfigMetadata)">
<Output TaskParameter="ConfigFileContents" PropertyName="_GeneratedEditorConfigFileContent" />
</GenerateMSBuildEditorConfig>
<!-- Write the output to the generated file, if it's changed -->
<WriteLinesToFile Lines="$(_GeneratedEditorConfigFileContent)" File="$(GeneratedMSBuildEditorConfigFile)" Overwrite="True" WriteOnlyWhenDifferent="True" />
</Target>
<!--
========================
DeterministicSourcePaths
========================
Unless specified otherwise enable deterministic source root (PathMap) when building deterministically on CI server, but not for local builds.
In order for the debugger to find source files when debugging a locally built binary the PDB must contain original, unmapped local paths.
-->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<DeterministicSourcePaths Condition="'$(DeterministicSourcePaths)' == '' and '$(Deterministic)' == 'true' and '$(ContinuousIntegrationBuild)' == 'true'">true</DeterministicSourcePaths>
</PropertyGroup>
<!--
==========
SourceRoot
==========
All source files of the project are expected to be located under one of the directories specified by SourceRoot item group.
This target collects all SourceRoots from various sources.
This target calculates final local path for each SourceRoot and sets SourceRoot.MappedPath metadata accordingly.
The final path is a path with deterministic prefix when DeterministicSourcePaths is true, and the original path otherwise.
In addition, the target validates and deduplicates the SourceRoot items.
InitializeSourceControlInformation is an msbuild target that ensures the SourceRoot items are populated from source control.
The target is available only if SourceControlInformationFeatureSupported is true.
A consumer of SourceRoot.MappedPath metadata, such as Source Link generator, shall depend on this target.
-->
<Target Name="InitializeSourceRootMappedPaths" DependsOnTargets="_InitializeSourceRootMappedPathsFromSourceControl" Returns="@(SourceRoot)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Condition="'@(_MappedSourceRoot)' != ''">
<_MappedSourceRoot Remove="@(_MappedSourceRoot)" />
</ItemGroup>
<Microsoft.CodeAnalysis.BuildTasks.MapSourceRoots SourceRoots="@(SourceRoot)" Deterministic="$(DeterministicSourcePaths)">
<Output TaskParameter="MappedSourceRoots" ItemName="_MappedSourceRoot" />
</Microsoft.CodeAnalysis.BuildTasks.MapSourceRoots>
<ItemGroup>
<SourceRoot Remove="@(SourceRoot)" />
<SourceRoot Include="@(_MappedSourceRoot)" />
</ItemGroup>
</Target>
<!--
Declare that target InitializeSourceRootMappedPaths that populates MappedPaths metadata on SourceRoot items is available.
-->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<SourceRootMappedPathsFeatureSupported>true</SourceRootMappedPathsFeatureSupported>
</PropertyGroup>
<!--
If InitializeSourceControlInformation target isn't supported, we just continue without invoking that synchronization target.
We'll proceed with SourceRoot (and other source control properties) provided by the user (or blank).
-->
<Target Name="_InitializeSourceRootMappedPathsFromSourceControl" DependsOnTargets="InitializeSourceControlInformation" Condition="'$(SourceControlInformationFeatureSupported)' == 'true'" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<!--
=======
PathMap
=======
If DeterministicSourcePaths is true sets PathMap based on SourceRoot.MappedPaths.
This target requires SourceRoot to be initialized in order to calculate the PathMap.
If SourceRoot doesn't contain any top-level roots an error is reported.
-->
<Target Name="_SetPathMapFromSourceRoots" DependsOnTargets="InitializeSourceRootMappedPaths" BeforeTargets="CoreCompile" Condition="'$(DeterministicSourcePaths)' == 'true'" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<_TopLevelSourceRoot Include="@(SourceRoot)" Condition="'%(SourceRoot.NestedRoot)' == ''">
<EscapedKey>$([MSBuild]::ValueOrDefault('%(Identity)', '').Replace(',', ',,').Replace('=', '=='))</EscapedKey>
<EscapedValue>$([MSBuild]::ValueOrDefault('%(MappedPath)', '').Replace(',', ',,').Replace('=', '=='))</EscapedValue>
</_TopLevelSourceRoot>
</ItemGroup>
<PropertyGroup Condition="'@(_TopLevelSourceRoot)' != ''">
<!--
Prepend the SourceRoot.MappedPath values to PathMap, if it already has a value.
For each emitted source path the compiler applies the first mapping that matches the path.
PathMap values set previously will thus only be applied if the mapping provided by
SourceRoot.MappedPath doesn't match. Since SourceRoot.MappedPath is also used by SourceLink
preferring it over manually set PathMap ensures that PathMap is consistent with SourceLink.
-->
<PathMap>@(_TopLevelSourceRoot->'%(EscapedKey)=%(EscapedValue)', ','),$(PathMap)</PathMap>
</PropertyGroup>
</Target>
<!--
=======
CopyAdditionalFiles
=======
If a user requests that any @(AdditionalFiles) items are copied to the output directory
we add them to the @(None) group to ensure they will be copied.
-->
<Target Name="CopyAdditionalFiles" BeforeTargets="AssignTargetPaths" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<None Include="@(AdditionalFiles)" Condition="'%(AdditionalFiles.CopyToOutputDirectory)' != ''" />
</ItemGroup>
</Target>
<!--
========================
CompilerGeneratedFilesOutputPath
========================
Controls output of generated files.
CompilerGeneratedFilesOutputPath controls the location the files will be output to.
The compiler will not emit any generated files when the path is empty, and defaults to a /generated directory in $(IntermediateOutputPath) if $(IntermediateOutputPath) has a value.
EmitCompilerGeneratedFiles allows the user to control if anything is emitted by clearing the property when not true.
When EmitCompilerGeneratedFiles is true, we ensure that CompilerGeneatedFilesOutputPath has a value and issue a warning if not.
We will create CompilerGeneratedFilesOutputPath if it does not exist.
-->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<EmitCompilerGeneratedFiles Condition="'$(EmitCompilerGeneratedFiles)' == ''">false</EmitCompilerGeneratedFiles>
<CompilerGeneratedFilesOutputPath Condition="'$(EmitCompilerGeneratedFiles)' != 'true'" />
<CompilerGeneratedFilesOutputPath Condition="'$(EmitCompilerGeneratedFiles)' == 'true' and '$(CompilerGeneratedFilesOutputPath)' == '' and '$(IntermediateOutputPath)' != ''">$(IntermediateOutputPath)/generated</CompilerGeneratedFilesOutputPath>
</PropertyGroup>
<Target Name="CreateCompilerGeneratedFilesOutputPath" BeforeTargets="CoreCompile" Condition="'$(EmitCompilerGeneratedFiles)' == 'true' and !('$(DesignTimeBuild)' == 'true' OR '$(BuildingProject)' != 'true')" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Warning Condition="'$(CompilerGeneratedFilesOutputPath)' == ''" Text="EmitCompilerGeneratedFiles was true, but no CompilerGeneratedFilesOutputPath was provided. CompilerGeneratedFilesOutputPath must be set in order to emit generated files." />
<MakeDir Condition="'$(CompilerGeneratedFilesOutputPath)' != ''" Directories="$(CompilerGeneratedFilesOutputPath)" />
</Target>
<!--
========================
Component Debugger Support
========================
Add the specified VS capability if a user indicates this project supports component debugging
-->
<ItemGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ProjectCapability Include="RoslynComponent" Condition="'$(IsRoslynComponent)' == 'true'" />
</ItemGroup>
<!--
============================================================================================================================================
</Import>
C:\Program Files\dotnet\sdk\6.0.100-preview.5.21302.13\Roslyn\Microsoft.CSharp.Core.targets
============================================================================================================================================
-->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- .NETCoreApp < 3.0, .NETStandard < 2.1, or any other target framework -->
<_MaxSupportedLangVersion Condition="('$(TargetFrameworkIdentifier)' != '.NETCoreApp' OR '$(_TargetFrameworkVersionWithoutV)' &lt; '3.0') AND&#xD;&#xA; ('$(TargetFrameworkIdentifier)' != '.NETStandard' OR '$(_TargetFrameworkVersionWithoutV)' &lt; '2.1')">7.3</_MaxSupportedLangVersion>
<!-- .NETCoreApp < 5.0, .NETStandard == 2.1 -->
<_MaxSupportedLangVersion Condition="(('$(TargetFrameworkIdentifier)' == '.NETCoreApp' AND '$(_TargetFrameworkVersionWithoutV)' &lt; '5.0') OR&#xD;&#xA; ('$(TargetFrameworkIdentifier)' == '.NETStandard' AND '$(_TargetFrameworkVersionWithoutV)' == '2.1')) AND&#xD;&#xA; '$(_MaxSupportedLangVersion)' == ''">8.0</_MaxSupportedLangVersion>
<!-- .NETCoreApp == 5.0 -->
<_MaxSupportedLangVersion Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp' AND '$(_TargetFrameworkVersionWithoutV)' == '5.0' AND&#xD;&#xA; '$(_MaxSupportedLangVersion)' == ''">9.0</_MaxSupportedLangVersion>
<MaxSupportedLangVersion>$(_MaxSupportedLangVersion)</MaxSupportedLangVersion>
<LangVersion Condition="'$(LangVersion)' == '' AND '$(_MaxSupportedLangVersion)' != ''">$(_MaxSupportedLangVersion)</LangVersion>
</PropertyGroup>
<Target Name="CoreCompile" Inputs="$(MSBuildAllProjects);&#xD;&#xA; @(Compile);&#xD;&#xA; @(_CoreCompileResourceInputs);&#xD;&#xA; $(ApplicationIcon);&#xD;&#xA; $(AssemblyOriginatorKeyFile);&#xD;&#xA; @(ReferencePathWithRefAssemblies);&#xD;&#xA; @(CompiledLicenseFile);&#xD;&#xA; @(LinkResource);&#xD;&#xA; @(EmbeddedDocumentation);&#xD;&#xA; $(Win32Resource);&#xD;&#xA; $(Win32Manifest);&#xD;&#xA; @(CustomAdditionalCompileInputs);&#xD;&#xA; $(ResolvedCodeAnalysisRuleSet);&#xD;&#xA; @(AdditionalFiles);&#xD;&#xA; @(EmbeddedFiles);&#xD;&#xA; @(EditorConfigFiles)" Outputs="@(DocFileItem);&#xD;&#xA; @(IntermediateAssembly);&#xD;&#xA; @(IntermediateRefAssembly);&#xD;&#xA; @(_DebugSymbolsIntermediatePath);&#xD;&#xA; $(NonExistentFile);&#xD;&#xA; @(CustomAdditionalCompileOutputs)" Returns="@(CscCommandLineArgs)" DependsOnTargets="$(CoreCompileDependsOn);_BeforeVBCSCoreCompile" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- These two compiler warnings are raised when a reference is bound to a different version
than specified in the assembly reference version number. MSBuild raises the same warning in this case,
so the compiler warning would be redundant. -->
<PropertyGroup Condition="('$(TargetFrameworkVersion)' != 'v1.0') and ('$(TargetFrameworkVersion)' != 'v1.1')">
<NoWarn>$(NoWarn);1701;1702</NoWarn>
</PropertyGroup>
<PropertyGroup>
<!-- To match historical behavior, when inside VS11+ disable the warning from csc.exe indicating that no sources were passed in-->
<NoWarn Condition="'$(BuildingInsideVisualStudio)' == 'true' AND '$(VisualStudioVersion)' != '' AND '$(VisualStudioVersion)' &gt; '10.0'">$(NoWarn);2008</NoWarn>
</PropertyGroup>
<PropertyGroup>
<!-- If the user has specified AppConfigForCompiler, we'll use it. If they have not, but they set UseAppConfigForCompiler,
then we'll use AppConfig -->
<AppConfigForCompiler Condition="'$(AppConfigForCompiler)' == '' AND '$(UseAppConfigForCompiler)' == 'true'">$(AppConfig)</AppConfigForCompiler>
<!-- If we are targeting winmdobj we want to specifically the pdbFile property since we do not want it to collide with the output of winmdexp-->
<PdbFile Condition="'$(PdbFile)' == '' AND '$(OutputType)' == 'winmdobj' AND '$(_DebugSymbolsProduced)' == 'true'">$(IntermediateOutputPath)$(TargetName).compile.pdb</PdbFile>
</PropertyGroup>
<!-- Condition is to filter out the _CoreCompileResourceInputs so that it doesn't pass in culture resources to the compiler -->
<Csc Condition="'%(_CoreCompileResourceInputs.WithCulture)' != 'true'" AdditionalLibPaths="$(AdditionalLibPaths)" AddModules="@(AddModules)" AdditionalFiles="@(AdditionalFiles)" AllowUnsafeBlocks="$(AllowUnsafeBlocks)" AnalyzerConfigFiles="@(EditorConfigFiles)" Analyzers="@(Analyzer)" ApplicationConfiguration="$(AppConfigForCompiler)" BaseAddress="$(BaseAddress)" CheckForOverflowUnderflow="$(CheckForOverflowUnderflow)" ChecksumAlgorithm="$(ChecksumAlgorithm)" CodeAnalysisRuleSet="$(ResolvedCodeAnalysisRuleSet)" CodePage="$(CodePage)" DebugType="$(DebugType)" DefineConstants="$(DefineConstants)" DelaySign="$(DelaySign)" DisabledWarnings="$(NoWarn)" DisableSdkPath="$(DisableSdkPath)" DocumentationFile="@(DocFileItem)" EmbedAllSources="$(EmbedAllSources)" EmbeddedFiles="@(EmbeddedFiles)" EmitDebugInformation="$(DebugSymbols)" EnvironmentVariables="$(CscEnvironment)" ErrorEndLocation="$(ErrorEndLocation)" ErrorLog="$(ErrorLog)" ErrorReport="$(ErrorReport)" Features="$(Features)" FileAlignment="$(FileAlignment)" GeneratedFilesOutputPath="$(CompilerGeneratedFilesOutputPath)" GenerateFullPaths="$(GenerateFullPaths)" HighEntropyVA="$(HighEntropyVA)" Instrument="$(Instrument)" KeyContainer="$(KeyContainerName)" KeyFile="$(KeyOriginatorFile)" LangVersion="$(LangVersion)" LinkResources="@(LinkResource)" MainEntryPoint="$(StartupObject)" ModuleAssemblyName="$(ModuleAssemblyName)" NoConfig="true" NoLogo="$(NoLogo)" NoStandardLib="$(NoCompilerStandardLib)" NoWin32Manifest="$(NoWin32Manifest)" Nullable="$(Nullable)" Optimize="$(Optimize)" Deterministic="$(Deterministic)" PublicSign="$(PublicSign)" OutputAssembly="@(IntermediateAssembly)" OutputRefAssembly="@(IntermediateRefAssembly)" PdbFile="$(PdbFile)" Platform="$(PlatformTarget)" Prefer32Bit="$(Prefer32Bit)" PreferredUILang="$(PreferredUILang)" ProvideCommandLineArgs="$(ProvideCommandLineArgs)" References="@(ReferencePathWithRefAssemblies)" RefOnly="$(ProduceOnlyReferenceAssembly)" ReportAnalyzer="$(ReportAnalyzer)" Resources="@(_CoreCompileResourceInputs);@(CompiledLicenseFile)" ResponseFiles="$(CompilerResponseFile)" RuntimeMetadataVersion="$(RuntimeMetadataVersion)" SharedCompilationId="$(SharedCompilationId)" SkipAnalyzers="$(_SkipAnalyzers)" SkipCompilerExecution="$(SkipCompilerExecution)" Sources="@(Compile)" SubsystemVersion="$(SubsystemVersion)" TargetType="$(OutputType)" ToolExe="$(CscToolExe)" ToolPath="$(CscToolPath)" TreatWarningsAsErrors="$(TreatWarningsAsErrors)" UseHostCompilerIfAvailable="$(UseHostCompilerIfAvailable)" UseSharedCompilation="$(UseSharedCompilation)" Utf8Output="$(Utf8Output)" VsSessionGuid="$(VsSessionGuid)" WarningLevel="$(WarningLevel)" WarningsAsErrors="$(WarningsAsErrors)" WarningsNotAsErrors="$(WarningsNotAsErrors)" Win32Icon="$(ApplicationIcon)" Win32Manifest="$(Win32Manifest)" Win32Resource="$(Win32Resource)" PathMap="$(PathMap)" SourceLink="$(SourceLink)">
<Output TaskParameter="CommandLineArgs" ItemName="CscCommandLineArgs" />
</Csc>
<ItemGroup>
<_CoreCompileResourceInputs Remove="@(_CoreCompileResourceInputs)" />
</ItemGroup>
<CallTarget Targets="$(TargetsTriggeredByCompilation)" Condition="'$(TargetsTriggeredByCompilation)' != ''" />
</Target>
<!--
============================================================================================================================================
</Import>
C:\Program Files\dotnet\sdk\6.0.100-preview.5.21302.13\Microsoft.CSharp.CurrentVersion.targets
============================================================================================================================================
-->
<!-- Import design time targets for Roslyn Project System. These are only available if Visual Studio is installed. -->
<!-- Import design time targets before the common targets, which import targets from Nuget. -->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<CSharpDesignTimeTargetsPath Condition="'$(CSharpDesignTimeTargetsPath)'==''">$(MSBuildExtensionsPath)\Microsoft\VisualStudio\Managed\Microsoft.CSharp.DesignTime.targets</CSharpDesignTimeTargetsPath>
</PropertyGroup>
<!--<Import Project="$(CSharpDesignTimeTargetsPath)" Condition="'$(CSharpDesignTimeTargetsPath)' != '' and Exists('$(CSharpDesignTimeTargetsPath)')" />-->
<!--
============================================================================================================================================
<Import Project="Microsoft.Common.targets">
C:\Program Files\dotnet\sdk\6.0.100-preview.5.21302.13\Microsoft.Common.targets
============================================================================================================================================
-->
<!--
***********************************************************************************************
Microsoft.Common.targets
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
created a backup copy. Incorrect changes to this file will make it
impossible to load or build your projects from the command-line or the IDE.
This file defines the steps in the standard build process for .NET projects. It
contains all the steps that are common among the different .NET languages, such as
Visual Basic, and Visual C#.
Copyright (C) Microsoft Corporation. All rights reserved.
***********************************************************************************************
-->
<!--
In VS 2010 SP1 and VS 2012, both supported for asset compatibility, the MSBuild installed
as part of them did not enforce using the local ToolsVersion (4.0) in all cases, but instead
just used whatever ToolsVersion was in the project file if it existed on the machine, and
only forced 4.0 if that ToolsVersion did not exist.
Moving forward, we do want to enforce a single acting ToolsVersion per version of Visual Studio,
but in order to approximate this behavior on VS 2010 SP1 and VS 2012 as well, we've redirected
the targets: If we're building using 4.X MSBuild (which doesn't define the new reserved
property, MSBuildAssemblyVersion), we'll point right back at the 4.0 targets, which still exist
as part of the .NET Framework. Only if we're using the new MSBuild will we point to the current
targets.
-->
<Choose xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<When Condition="'$(MSBuildAssemblyVersion)' == ''">
<PropertyGroup>
<CommonTargetsPath>$(MSBuildFrameworkToolsPath)\Microsoft.Common.targets</CommonTargetsPath>
</PropertyGroup>
</When>
<Otherwise>
<PropertyGroup>
<CommonTargetsPath>$(MSBuildToolsPath)\Microsoft.Common.CurrentVersion.targets</CommonTargetsPath>
</PropertyGroup>
</Otherwise>
</Choose>
<PropertyGroup Condition="'$(MSBuildAssemblyVersion)' == ''" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!--
Overrides for the Microsoft.Common.targets extension targets. Used to make sure that only the imports we specify
(hard-coded to 4.0 locations) are used, not the 12.0 locations that would be used by default.
NOTE: This logic is duplicated in Microsoft.VisualBasic.targets and in Microsoft.CSharp.targets because those two files
import Microsoft.Common.targets from the current directory and thus don't get the benefit of the redirections, so for
any changes to this logic in this file, please also edit the other two.
-->
<ImportByWildcardBefore40MicrosoftCommonTargets Condition="'$(ImportByWildcardBefore40MicrosoftCommonTargets)' == ''">$(ImportByWildcardBeforeMicrosoftCommonTargets)</ImportByWildcardBefore40MicrosoftCommonTargets>
<ImportByWildcardBefore40MicrosoftCommonTargets Condition="'$(ImportByWildcardBefore40MicrosoftCommonTargets)' == ''">true</ImportByWildcardBefore40MicrosoftCommonTargets>
<ImportByWildcardAfter40MicrosoftCommonTargets Condition="'$(ImportByWildcardAfter40MicrosoftCommonTargets)' == ''">$(ImportByWildcardAfterMicrosoftCommonTargets)</ImportByWildcardAfter40MicrosoftCommonTargets>
<ImportByWildcardAfter40MicrosoftCommonTargets Condition="'$(ImportByWildcardAfter40MicrosoftCommonTargets)' == ''">true</ImportByWildcardAfter40MicrosoftCommonTargets>
<ImportUserLocationsByWildcardBefore40MicrosoftCommonTargets Condition="'$(ImportUserLocationsByWildcardBefore40MicrosoftCommonTargets)' == ''">$(ImportUserLocationsByWildcardBeforeMicrosoftCommonTargets)</ImportUserLocationsByWildcardBefore40MicrosoftCommonTargets>
<ImportUserLocationsByWildcardBefore40MicrosoftCommonTargets Condition="'$(ImportUserLocationsByWildcardBefore40MicrosoftCommonTargets)' == ''">true</ImportUserLocationsByWildcardBefore40MicrosoftCommonTargets>
<ImportUserLocationsByWildcardAfter40MicrosoftCommonTargets Condition="'$(ImportUserLocationsByWildcardAfter40MicrosoftCommonTargets)' == ''">$(ImportUserLocationsByWildcardAfterMicrosoftCommonTargets)</ImportUserLocationsByWildcardAfter40MicrosoftCommonTargets>
<ImportUserLocationsByWildcardAfter40MicrosoftCommonTargets Condition="'$(ImportUserLocationsByWildcardAfter40MicrosoftCommonTargets)' == ''">true</ImportUserLocationsByWildcardAfter40MicrosoftCommonTargets>
<ImportByWildcardBeforeMicrosoftCommonTargets>false</ImportByWildcardBeforeMicrosoftCommonTargets>
<ImportByWildcardAfterMicrosoftCommonTargets>false</ImportByWildcardAfterMicrosoftCommonTargets>
<ImportUserLocationsByWildcardBeforeMicrosoftCommonTargets>false</ImportUserLocationsByWildcardBeforeMicrosoftCommonTargets>
<ImportUserLocationsByWildcardAfterMicrosoftCommonTargets>false</ImportUserLocationsByWildcardAfterMicrosoftCommonTargets>
<CustomBeforeMicrosoftCommonTargets Condition="'$(CustomBeforeMicrosoftCommonTargets)' == ''">$(MSBuildExtensionsPath)\v4.0\Custom.Before.Microsoft.Common.targets</CustomBeforeMicrosoftCommonTargets>
<CustomAfterMicrosoftCommonTargets Condition="'$(CustomAfterMicrosoftCommonTargets)' == ''">$(MSBuildExtensionsPath)\v4.0\Custom.After.Microsoft.Common.targets</CustomAfterMicrosoftCommonTargets>
</PropertyGroup>
<PropertyGroup Condition="'$(MSBuildAssemblyVersion)' == '' and ('$(TargetFrameworkIdentifier)' == '.NETFramework' or '$(TargetFrameworkIdentifier)' == 'Silverlight' or ('$(TargetFrameworkIdentifier)' == '' and ('$(TargetRuntime)' == 'Managed' or '$(TargetRuntime)' == '')))" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!--
Overrides for the Microsoft.NETFramework.props extension targets. Used to make sure that only the imports we specify
(hard-coded to 4.0 locations) are used, not the 12.0 locations that would be used by default. Required because
Microsoft.Common.targets imports it from the current directory, so we don't get a chance to redirect these in its
own redirection targets.
NOTE: This logic is duplicated in Microsoft.VisualBasic.targets and in Microsoft.CSharp.targets because those two files
import Microsoft.Common.targets from the current directory and thus don't get the benefit of these redirections either,
so for any changes to this logic in this file, please also edit the other two.
-->
<ImportByWildcardBefore40MicrosoftNetFrameworkProps Condition="'$(ImportByWildcardBefore40MicrosoftNetFrameworkProps)' == ''">$(ImportByWildcardBeforeMicrosoftNetFrameworkProps)</ImportByWildcardBefore40MicrosoftNetFrameworkProps>
<ImportByWildcardBefore40MicrosoftNetFrameworkProps Condition="'$(ImportByWildcardBefore40MicrosoftNetFrameworkProps)' == ''">true</ImportByWildcardBefore40MicrosoftNetFrameworkProps>
<ImportByWildcardAfter40MicrosoftNetFrameworkProps Condition="'$(ImportByWildcardAfter40MicrosoftNetFrameworkProps)' == ''">$(ImportByWildcardAfterMicrosoftNetFrameworkProps)</ImportByWildcardAfter40MicrosoftNetFrameworkProps>
<ImportByWildcardAfter40MicrosoftNetFrameworkProps Condition="'$(ImportByWildcardAfter40MicrosoftNetFrameworkProps)' == ''">true</ImportByWildcardAfter40MicrosoftNetFrameworkProps>
<ImportUserLocationsByWildcardBefore40MicrosoftNetFrameworkProps Condition="'$(ImportUserLocationsByWildcardBefore40MicrosoftNetFrameworkProps)' == ''">$(ImportUserLocationsByWildcardBeforeMicrosoftNetFrameworkProps)</ImportUserLocationsByWildcardBefore40MicrosoftNetFrameworkProps>
<ImportUserLocationsByWildcardBefore40MicrosoftNetFrameworkProps Condition="'$(ImportUserLocationsByWildcardBefore40MicrosoftNetFrameworkProps)' == ''">true</ImportUserLocationsByWildcardBefore40MicrosoftNetFrameworkProps>
<ImportUserLocationsByWildcardAfter40MicrosoftNetFrameworkProps Condition="'$(ImportUserLocationsByWildcardAfter40MicrosoftNetFrameworkProps)' == ''">$(ImportUserLocationsByWildcardAfterMicrosoftNetFrameworkProps)</ImportUserLocationsByWildcardAfter40MicrosoftNetFrameworkProps>
<ImportUserLocationsByWildcardAfter40MicrosoftNetFrameworkProps Condition="'$(ImportUserLocationsByWildcardAfter40MicrosoftNetFrameworkProps)' == ''">true</ImportUserLocationsByWildcardAfter40MicrosoftNetFrameworkProps>
<ImportByWildcardBeforeMicrosoftNetFrameworkProps>false</ImportByWildcardBeforeMicrosoftNetFrameworkProps>
<ImportByWildcardAfterMicrosoftNetFrameworkProps>false</ImportByWildcardAfterMicrosoftNetFrameworkProps>
<ImportUserLocationsByWildcardBeforeMicrosoftNetFrameworkProps>false</ImportUserLocationsByWildcardBeforeMicrosoftNetFrameworkProps>
<ImportUserLocationsByWildcardAfterMicrosoftNetFrameworkProps>false</ImportUserLocationsByWildcardAfterMicrosoftNetFrameworkProps>
</PropertyGroup>
<!--<ImportGroup Condition="'$(MSBuildAssemblyVersion)' == ''">-->
<!--<Import Project="$(MSBuildUserExtensionsPath)\4.0\Microsoft.Common.targets\ImportBefore\*" Condition="'$(ImportUserLocationsByWildcardBefore40MicrosoftCommonTargets)' == 'true' and exists('$(MSBuildUserExtensionsPath)\4.0\Microsoft.Common.targets\ImportBefore')" />-->
<!--<Import Project="$(MSBuildExtensionsPath)\4.0\Microsoft.Common.targets\ImportBefore\*" Condition="'$(ImportByWildcardBefore40MicrosoftCommonTargets)' == 'true' and exists('$(MSBuildExtensionsPath)\4.0\Microsoft.Common.targets\ImportBefore')" />-->
<!--</ImportGroup>-->
<!--<ImportGroup Condition="'$(MSBuildAssemblyVersion)' == ''">-->
<!--<Import Project="$(MSBuildUserExtensionsPath)\4.0\Microsoft.NETFramework.props\ImportBefore\*" Condition="'$(ImportUserLocationsByWildcardBefore40MicrosoftNetFrameworkProps)' == 'true' and exists('$(MSBuildUserExtensionsPath)\4.0\Microsoft.NETFramework.props\ImportBefore')" />-->
<!--<Import Project="$(MSBuildExtensionsPath)\4.0\Microsoft.NETFramework.props\ImportBefore\*" Condition="'$(ImportByWildcardBefore40MicrosoftNetFrameworkProps)' == 'true' and exists('$(MSBuildExtensionsPath)\4.0\Microsoft.NETFramework.props\ImportBefore')" />-->
<!--</ImportGroup>-->
<!--
============================================================================================================================================
<Import Project="$(CommonTargetsPath)">
C:\Program Files\dotnet\sdk\6.0.100-preview.5.21302.13\Microsoft.Common.CurrentVersion.targets
============================================================================================================================================
-->
<!--
***********************************************************************************************
Microsoft.Common.CurrentVersion.targets
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
created a backup copy. Incorrect changes to this file will make it
impossible to load or build your projects from the command-line or the IDE.
This file defines the steps in the standard build process for .NET projects. It
contains all the steps that are common among the different .NET languages, such as
Visual Basic, and Visual C#.
Copyright (C) Microsoft Corporation. All rights reserved.
***********************************************************************************************
-->
<!--<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="'$(MicrosoftCommonPropsHasBeenImported)' != 'true' and Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />-->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportByWildcardBeforeMicrosoftCommonTargets Condition="'$(ImportByWildcardBeforeMicrosoftCommonTargets)' == ''">true</ImportByWildcardBeforeMicrosoftCommonTargets>
<ImportByWildcardAfterMicrosoftCommonTargets Condition="'$(ImportByWildcardAfterMicrosoftCommonTargets)' == ''">true</ImportByWildcardAfterMicrosoftCommonTargets>
<ImportUserLocationsByWildcardBeforeMicrosoftCommonTargets Condition="'$(ImportUserLocationsByWildcardBeforeMicrosoftCommonTargets)' == ''">true</ImportUserLocationsByWildcardBeforeMicrosoftCommonTargets>
<ImportUserLocationsByWildcardAfterMicrosoftCommonTargets Condition="'$(ImportUserLocationsByWildcardAfterMicrosoftCommonTargets)' == ''">true</ImportUserLocationsByWildcardAfterMicrosoftCommonTargets>
</PropertyGroup>
<!--<Import Project="$(MSBuildUserExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.targets\ImportBefore\*" Condition="'$(ImportUserLocationsByWildcardBeforeMicrosoftCommonTargets)' == 'true' and exists('$(MSBuildUserExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.targets\ImportBefore')" />-->
<!--<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.targets\ImportBefore\*" Condition="'$(ImportByWildcardBeforeMicrosoftCommonTargets)' == 'true' and exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.targets\ImportBefore')" />-->
<!--<Import Project="$(MSBuildProjectFullPath).user" Condition="Exists('$(MSBuildProjectFullPath).user')" />-->
<!-- VS10 without SP1 and without VS11 will not have VisualStudioVersion set, so do that here -->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
</PropertyGroup>
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<CustomBeforeMicrosoftCommonTargets Condition="'$(CustomBeforeMicrosoftCommonTargets)'==''">$(MSBuildExtensionsPath)\v$(MSBuildToolsVersion)\Custom.Before.Microsoft.Common.targets</CustomBeforeMicrosoftCommonTargets>
<CustomAfterMicrosoftCommonTargets Condition="'$(CustomAfterMicrosoftCommonTargets)'==''">$(MSBuildExtensionsPath)\v$(MSBuildToolsVersion)\Custom.After.Microsoft.Common.targets</CustomAfterMicrosoftCommonTargets>
<ReportingServicesTargets Condition="'$(ReportingServicesTargets)'==''">$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v$(VisualStudioVersion)\ReportingServices\Microsoft.ReportingServices.targets</ReportingServicesTargets>
</PropertyGroup>
<!--<Import Project="$(CustomBeforeMicrosoftCommonTargets)" Condition="'$(CustomBeforeMicrosoftCommonTargets)' != '' and Exists('$(CustomBeforeMicrosoftCommonTargets)')" />-->
<!-- By default, we are creating a managed app because .NET 2.0 projects did not have this property. -->
<PropertyGroup Condition="'$(TargetRuntime)' == ''" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<TargetRuntime>Managed</TargetRuntime>
</PropertyGroup>
<!-- Because .NET 2.0 apps did not set TargetFrameworkIdentifier, we need to set it for them here by default. If
the runtime is set to Managed, we also need to set these. Otherwise they should be blank (for instance Javascript or
Native apps) because they do not target a .NET Framework. -->
<PropertyGroup Condition="'$(TargetRuntime)' == 'Managed'" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<TargetFrameworkIdentifier Condition="'$(TargetFrameworkIdentifier)' == ''">.NETFramework</TargetFrameworkIdentifier>
<TargetFrameworkVersion Condition=" '$(TargetFrameworkVersion)' == '' ">v4.0</TargetFrameworkVersion>
</PropertyGroup>
<!-- AvailablePlatforms is the list of platform targets available. -->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<AvailablePlatforms Condition="'$(VisualStudioVersion)' == '10.0' or '$(VisualStudioVersion)' == ''">Any CPU,x86,x64,Itanium</AvailablePlatforms>
<AvailablePlatforms Condition="'$(VisualStudioVersion)' != '' and '$(VisualStudioVersion)' &gt; '10.0'">Any CPU,x86,x64</AvailablePlatforms>
</PropertyGroup>
<!-- Import depends on if it is .NETCore. Imports for .NETFramework is a superset of that for .NETCore-->
<!--<Import Project="Microsoft.NETFramework.props" Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework' or '$(TargetFrameworkIdentifier)' == 'Silverlight'" />-->
<!--
============================================================================================================================================
<Import Project="Microsoft.NET.props" Condition="'$(TargetFrameworkIdentifier)' == '.NETStandard' or '$(TargetFrameworkIdentifier)' == '.NETCoreApp'">
C:\Program Files\dotnet\sdk\6.0.100-preview.5.21302.13\Microsoft.NET.props
============================================================================================================================================
-->
<!--
***********************************************************************************************
Microsoft.NET.props
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
created a backup copy. Incorrect changes to this file will make it
impossible to load or build your projects from the command-line or the IDE.
This file contains .NET-specific properties, and items. This file is imported for .NET Core, .NET Standard, and .NET Framework projects.
these two files are used to encapsulate the multi-targeting and framework specific build process.
Copyright (C) Microsoft Corporation. All rights reserved.
***********************************************************************************************
-->
<!--
============================================================
GetToolPaths
Get the paths for the .NET Framework and .NET Core tools and sdk tools directories.
This does not need to be a target since all of the values are availiable at project evaluation time.
============================================================
-->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<TargetFrameworkSDKToolsDirectory Condition=" '$(TargetFrameworkSDKToolsDirectory)' == '' ">$(SDK40ToolsPath)</TargetFrameworkSDKToolsDirectory>
</PropertyGroup>
<!--
============================================================
SetHighEntropyVA
Set HighEntropyVA according to the TargetFramework
============================================================
-->
<PropertyGroup Condition="('$(TargetFrameworkIdentifier)' == '.NETFramework' and '$(TargetingClr2Framework)' != 'true' and '$(TargetFrameworkVersion)' != 'v4.0') or '$(TargetFrameworkIdentifier)' == '.NETCoreApp' or '$(TargetFrameworkIdentifier)' == '.NETStandard'" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<HighEntropyVA Condition="'$(HighEntropyVA)' == ''">true</HighEntropyVA>
</PropertyGroup>
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<HighEntropyVA Condition="'$(HighEntropyVA)' == ''">false</HighEntropyVA>
</PropertyGroup>
<!--
============================================================================================================================================
</Import>
C:\Program Files\dotnet\sdk\6.0.100-preview.5.21302.13\Microsoft.Common.CurrentVersion.targets
============================================================================================================================================
-->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- Generates full paths for the 'File' property in errors, warnings and messages in many targets -->
<GenerateFullPaths Condition="'$(GenerateFullPaths)' == ''">true</GenerateFullPaths>
<!-- Yield optimization properties -->
<YieldDuringToolExecution Condition="'$(YieldDuringToolExecution)' == ''">true</YieldDuringToolExecution>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFrameworkIdentifier)' != '' and '$(TargetFrameworkVersion)' != ''" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<TargetFrameworkMoniker Condition="'$(TargetFrameworkMoniker)' == '' and '$([System.String]::IsNullOrWhitespace($(TargetFrameworkProfile)))' != 'true'">$(TargetFrameworkIdentifier),Version=$(TargetFrameworkVersion),Profile=$(TargetFrameworkProfile)</TargetFrameworkMoniker>
<TargetFrameworkMoniker Condition="'$(TargetFrameworkMoniker)' == ''">$(TargetFrameworkIdentifier),Version=$(TargetFrameworkVersion)</TargetFrameworkMoniker>
<!-- When working off a packaged reference assemblies, do not go to machine-global locations. This property is target-framework-specific, so it cannot be overridden in msbuild.exe.config once and for all. -->
<FrameworkPathOverride Condition="'$(EnableFrameworkPathOverride)' != 'false' And '$(FrameworkPathOverride)' == '' And Exists('$(TargetFrameworkRootPath)$(TargetFrameworkIdentifier)\$(TargetFrameworkVersion)')">$(TargetFrameworkRootPath)$(TargetFrameworkIdentifier)\$(TargetFrameworkVersion)</FrameworkPathOverride>
<!-- The FrameworkPathOverride is required for the inproc visual basic compiler to initialize when targeting target frameworks less than 4.0. If .net 2.0 is not installed then the property value above will not provide the location
of mscorlib. This is also true if the build author overrides this property to some other directory which does not contain mscorlib.dll. In the case we cannot find mscorlib.dll at the correct location
we need to find a directory which does contain mscorlib to allow the inproc compiler to initialize and give us the chance to show certain dialogs in the IDE (which only happen after initialization).-->
<FrameworkPathOverride Condition="'$(EnableFrameworkPathOverride)' != 'false' And '$(FrameworkPathOverride)' == ''">$([Microsoft.Build.Utilities.ToolLocationHelper]::GetPathToStandardLibraries($(TargetFrameworkIdentifier), $(TargetFrameworkVersion), $(TargetFrameworkProfile), $(PlatformTarget), $(TargetFrameworkRootPath), $(TargetFrameworkFallbackSearchPaths)))</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(EnableFrameworkPathOverride)' != 'false' And !Exists('$(FrameworkPathOverride)\mscorlib.dll')">$(MSBuildFrameworkToolsPath)</FrameworkPathOverride>
</PropertyGroup>
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<TargetPlatformIdentifier Condition="'$(TargetPlatformIdentifier)' == '' and '$(_EnableDefaultWindowsPlatform)' != 'false'">Windows</TargetPlatformIdentifier>
<TargetPlatformVersion Condition="'$(TargetPlatformVersion)' == '' and '$(_EnableDefaultWindowsPlatform)' != 'false'">7.0</TargetPlatformVersion>
<TargetPlatformSdkPath Condition="'$(TargetPlatformSdkPath)' == '' and '$(TargetPlatformSdkRootOverride)' != ''">$(TargetPlatformSdkRootOverride)\</TargetPlatformSdkPath>
<TargetPlatformSdkPath Condition="'$(TargetPlatformSdkPath)' == '' and '$(TargetPlatformIdentifier)' == 'Windows' and $([MSBuild]::IsOSPlatform('Windows')) and '$(MSBuildRuntimeType)' != 'Core'">$([MSBuild]::GetRegistryValueFromView('HKEY_LOCAL_MACHINE\Software\Microsoft\Microsoft SDKs\Windows\v$(TargetPlatformVersion)', InstallationFolder, null, RegistryView.Registry32, RegistryView.Default))</TargetPlatformSdkPath>
<TargetPlatformSdkPath Condition="'$(TargetPlatformSdkPath)' == ''">$([Microsoft.Build.Utilities.ToolLocationHelper]::GetPlatformSDKLocation($(TargetPlatformIdentifier), $(TargetPlatformVersion)))</TargetPlatformSdkPath>
<TargetPlatformSdkMetadataLocation Condition="'$(TargetPlatformSdkMetadataLocation)' == '' and Exists('$(TargetPlatformSdkPath)')">$(TargetPlatformSdkPath)Windows Metadata</TargetPlatformSdkMetadataLocation>
<TargetPlatformSdkMetadataLocation Condition="Exists('$(TargetPlatformSdkPath)') and ('$(TargetPlatformSdkMetadataLocation)' == '' or !Exists('$(TargetPlatformSdkMetadataLocation)'))">$(TargetPlatformSdkPath)References\CommonConfiguration\Neutral</TargetPlatformSdkMetadataLocation>
<TargetPlatformWinMDLocation Condition="'$(TargetPlatformWinMDLocation)' == '' and Exists('$(TargetPlatformSdkMetadataLocation)')">$(TargetPlatformSdkMetadataLocation)</TargetPlatformWinMDLocation>
<UseOSWinMdReferences Condition="'$(UseOSWinMdReferences)' == '' and ('$(TargetPlatformWinMDLocation)' == '' and '$(TargetPlatformIdentifier)' == 'Windows' and '$(TargetPlatformVersion)' &gt; '7.0')">true</UseOSWinMdReferences>
<TargetPlatformWinMDLocation Condition="'$(UseOsWinMdReferences)' == 'true'">$(WinDir)\System32\WinMetadata</TargetPlatformWinMDLocation>
<TargetPlatformMoniker Condition="'$(TargetPlatformMoniker)' == '' and '$(TargetPlatformIdentifier)' != '' and '$(TargetPlatformVersion)' != ''">$(TargetPlatformIdentifier),Version=$(TargetPlatformVersion)</TargetPlatformMoniker>
<TargetPlatformDisplayName Condition="'$(TargetPlatformDisplayName)' == ''">$([Microsoft.Build.Utilities.ToolLocationHelper]::GetPlatformSDKDisplayName($(TargetPlatformIdentifier), $(TargetPlatformVersion)))</TargetPlatformDisplayName>
</PropertyGroup>
<!--
Several properties must be set in the main project file, before using this .TARGETS file.
However, if the properties are not set, we pick some defaults.
OutDir:
Indicates the final output location for the project or solution. When building a solution,
OutDir can be used to gather multiple project outputs in one location. In addition,
OutDir is included in AssemblySearchPaths used for resolving references.
BaseOutputPath:
This is the top level folder where all configuration specific output folders will be created.
Default value is bin\
OutputPath:
This is the full Output Path, and is derived from BaseOutputPath, if none specified
(eg. bin\Debug). If this property is overridden, then setting BaseOutputPath has no effect.
For Legacy projects using only Common targets, this property is usually specified in the project file
and is used to initialize OutDir. Some SDKs including the .NET SDK derive this automatically.
OutDir and OutputPath are distinguished for legacy reasons, and OutDir should be used if at all possible.
BaseIntermediateOutputPath:
This is the top level folder where all configuration specific intermediate output folders will be created.
Default value is obj\
IntermediateOutputPath:
This is the full intermediate Output Path, and is derived from BaseIntermediateOutputPath, if none specified
(eg. obj\Debug). If this property is overridden, then setting BaseIntermediateOutputPath has no effect.
Ensure any and all path property has a trailing slash, so it can be concatenated.
-->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- Example, AnyCPU -->
<_OriginalPlatform>$(Platform)</_OriginalPlatform>
<!-- Example, Debug -->
<_OriginalConfiguration>$(Configuration)</_OriginalConfiguration>
<!-- Check whether OutputPath was specified for valid Configuration/Platform combination -->
<_OutputPathWasMissing Condition="'$(_OriginalPlatform)' != '' and '$(_OriginalConfiguration)' != '' and '$(OutputPath)' == ''">true</_OutputPathWasMissing>
<!-- Check whether BaseOutputPath was specified -->
<BaseOutputPathWasSpecified Condition="'$(BaseOutputPath)' != ''">true</BaseOutputPathWasSpecified>
</PropertyGroup>
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Platform Condition="'$(Platform)' == ''">AnyCPU</Platform>
<PlatformName Condition="'$(PlatformName)' == ''">$(Platform)</PlatformName>
<Configuration Condition="'$(Configuration)' == ''">Debug</Configuration>
<ConfigurationName Condition="'$(ConfigurationName)' == ''">$(Configuration)</ConfigurationName>
<BaseOutputPath Condition="'$(BaseOutputPath)' == ''">bin\</BaseOutputPath>
<BaseOutputPath Condition="!HasTrailingSlash('$(BaseOutputPath)')">$(BaseOutputPath)\</BaseOutputPath>
<OutputPath Condition="'$(OutputPath)' == '' and '$(PlatformName)' == 'AnyCPU'">$(BaseOutputPath)$(Configuration)\</OutputPath>
<OutputPath Condition="'$(OutputPath)' == '' and '$(PlatformName)' != 'AnyCPU'">$(BaseOutputPath)$(PlatformName)\$(Configuration)\</OutputPath>
<OutputPath Condition="!HasTrailingSlash('$(OutputPath)')">$(OutputPath)\</OutputPath>
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)' == ''">obj\</BaseIntermediateOutputPath>
<BaseIntermediateOutputPath Condition="!HasTrailingSlash('$(BaseIntermediateOutputPath)')">$(BaseIntermediateOutputPath)\</BaseIntermediateOutputPath>
<IntermediateOutputPath Condition="'$(IntermediateOutputPath)' == '' and '$(PlatformName)' == 'AnyCPU'">$(BaseIntermediateOutputPath)$(Configuration)\</IntermediateOutputPath>
<IntermediateOutputPath Condition="'$(IntermediateOutputPath)' == '' and '$(PlatformName)' != 'AnyCPU'">$(BaseIntermediateOutputPath)$(PlatformName)\$(Configuration)\</IntermediateOutputPath>
<IntermediateOutputPath Condition="!HasTrailingSlash('$(IntermediateOutputPath)')">$(IntermediateOutputPath)\</IntermediateOutputPath>
</PropertyGroup>
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- Determine OutputType property from the legacy TargetType property -->
<OutputType Condition=" '$(TargetType)' != ''">$(TargetType)</OutputType>
<OutputType Condition=" '$(TargetType)' == 'Container' or '$(TargetType)' == 'DocumentContainer' ">library</OutputType>
<OutputType Condition=" '$(OutputType)' == '' ">exe</OutputType>
<DebugSymbols Condition=" '$(ConfigurationName)' == 'Debug' and '$(DebugSymbols)' == '' and '$(DebugType)'==''">true</DebugSymbols>
<!-- Whether or not a .pdb file is produced. -->
<_DebugSymbolsProduced>false</_DebugSymbolsProduced>
<_DebugSymbolsProduced Condition="'$(DebugSymbols)'=='true'">true</_DebugSymbolsProduced>
<_DebugSymbolsProduced Condition="'$(DebugType)'=='none'">false</_DebugSymbolsProduced>
<_DebugSymbolsProduced Condition="'$(DebugType)'=='pdbonly'">true</_DebugSymbolsProduced>
<_DebugSymbolsProduced Condition="'$(DebugType)'=='full'">true</_DebugSymbolsProduced>
<_DebugSymbolsProduced Condition="'$(DebugType)'=='portable'">true</_DebugSymbolsProduced>
<_DebugSymbolsProduced Condition="'$(DebugType)'=='embedded'">false</_DebugSymbolsProduced>
<!-- Whether or not a .xml file is produced. -->
<_DocumentationFileProduced>true</_DocumentationFileProduced>
<_DocumentationFileProduced Condition="'$(DocumentationFile)'==''">false</_DocumentationFileProduced>
<!-- Whether or not a reference assembly is produced. -->
<ProduceReferenceAssembly Condition="'$(ProduceReferenceAssembly)' == ''">false</ProduceReferenceAssembly>
</PropertyGroup>
<!--
For Legacy projects that define properties per Configuration/Platform combination, the validity of an
invalid combination is determined by the non-empty value of the 'OutputPath' property specified under
the IDE generated Configuration/Platform specific 'PropertyGroup' section.
If 'BaseOutputPath' is specified, we can skip the validation, since, we assume the 'OutputPath' property
will be derived (e.g.: from the 'BaseOutputPath' property).
-->
<PropertyGroup Condition="'$(BaseOutputPathWasSpecified)' != 'true' and '$(_OutputPathWasMissing)' == 'true'" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!--
When 'OutputPath' is missing or empty (along with non-existent 'BaseOutputPath') at this point means,
we're in legacy mode and we shall assume the current Configuration/Platform combination as invalid.
Whether this is considered an error or a warning depends on the value of $(SkipInvalidConfigurations).
-->
<_InvalidConfigurationError Condition=" '$(SkipInvalidConfigurations)' != 'true' ">true</_InvalidConfigurationError>
<_InvalidConfigurationWarning Condition=" '$(SkipInvalidConfigurations)' == 'true' ">true</_InvalidConfigurationWarning>
</PropertyGroup>
<!--
IDE Macros available from both integrated builds and from command line builds.
The following properties are 'macros' that are available via IDE for
pre and post build steps.
-->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<TargetExt Condition="'$(TargetExt)' == '' and '$(OutputType)'=='exe'">.exe</TargetExt>
<TargetExt Condition="'$(TargetExt)' == '' and '$(OutputType)'=='winexe'">.exe</TargetExt>
<TargetExt Condition="'$(TargetExt)' == '' and '$(OutputType)'=='appcontainerexe'">.exe</TargetExt>
<TargetExt Condition="'$(TargetExt)' == '' and '$(OutputType)'=='library'">.dll</TargetExt>
<TargetExt Condition="'$(TargetExt)' == '' and '$(OutputType)'=='module'">.netmodule</TargetExt>
<TargetExt Condition="'$(TargetExt)' == '' and '$(OutputType)'=='winmdobj'">.winmdobj</TargetExt>
</PropertyGroup>
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- Required for enabling Team Build for packaging app package-generating projects -->
<OutDirWasSpecified Condition=" '$(OutDir)'!='' and '$(OutDirWasSpecified)'=='' ">true</OutDirWasSpecified>
<OutDir Condition=" '$(OutDir)' == '' ">$(OutputPath)</OutDir>
<!-- Example, bin\Debug\ -->
<!-- Ensure OutDir has a trailing slash, so it can be concatenated -->
<OutDir Condition="'$(OutDir)' != '' and !HasTrailingSlash('$(OutDir)')">$(OutDir)\</OutDir>
<ProjectName Condition=" '$(ProjectName)' == '' ">$(MSBuildProjectName)</ProjectName>
<!-- Example, MyProject -->
<!-- For projects that generate app packages or ones that want a per-project output directory, update OutDir to include the project name -->
<OutDir Condition="'$(OutDir)' != '' and '$(OutDirWasSpecified)' == 'true' and (('$(WindowsAppContainer)' == 'true' and '$(GenerateProjectSpecificOutputFolder)' != 'false') or '$(GenerateProjectSpecificOutputFolder)' == 'true')">$(OutDir)$(ProjectName)\</OutDir>
<AssemblyName Condition=" '$(AssemblyName)'=='' ">$(MSBuildProjectName)</AssemblyName>
<TargetName Condition="'$(TargetName)' == '' and '$(OutputType)' == 'winmdobj' and '$(RootNamespace)' != ''">$(RootNamespace)</TargetName>
<TargetName Condition=" '$(TargetName)' == '' ">$(AssemblyName)</TargetName>
<!-- Example, MyAssembly -->
<ProjectFileName Condition=" '$(ProjectFileName)' == '' ">$(MSBuildProjectFile)</ProjectFileName>
<!-- Example, MyProject.csproj -->
<ProjectExt Condition=" '$(ProjectExt)' == '' ">$(MSBuildProjectExtension)</ProjectExt>
<!-- Example, .csproj -->
<WinMDExpOutputWindowsMetadataFilename Condition="'$(WinMDExpOutputWindowsMetadataFilename)' == '' and '$(OutputType)' == 'winmdobj'">$(TargetName).winmd</WinMDExpOutputWindowsMetadataFilename>
<TargetFileName Condition=" '$(TargetFileName)' == '' and '$(OutputType)' == 'winmdobj'">$(WinMDExpOutputWindowsMetadataFilename)</TargetFileName>
<TargetFileName Condition=" '$(TargetFileName)' == '' ">$(TargetName)$(TargetExt)</TargetFileName>
<!-- Example, MyAssembly.dll -->
</PropertyGroup>
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!--
The PublishableProject property is used when invoking the publish target on a solution that
contains multiple projects. The property determines which projects should be published, and
which projects should be skipped in the publish target. By default any "Windows Application"
or "Console Application" project type is publishable. However, a project that would otherwise
be published can be skipped by defining the PublishableProject property in the project itself.
-->
<_DeploymentPublishableProjectDefault Condition="'$(OutputType)'=='winexe' or '$(OutputType)'=='exe' or '$(OutputType)'=='appcontainerexe'">true</_DeploymentPublishableProjectDefault>
<PublishableProject Condition="'$(PublishableProject)'==''">$(_DeploymentPublishableProjectDefault)</PublishableProject>
<_DeploymentTargetApplicationManifestFileName Condition="'$(OutputType)'=='library'">Native.$(AssemblyName).manifest</_DeploymentTargetApplicationManifestFileName>
<!-- Example, Native.MyAssembly.manifest -->
<_DeploymentTargetApplicationManifestFileName Condition="'$(OutputType)'=='winexe'">$(TargetFileName).manifest</_DeploymentTargetApplicationManifestFileName>
<!-- Example, MyAssembly.exe.manifest -->
<_DeploymentTargetApplicationManifestFileName Condition="'$(OutputType)'=='exe'">$(TargetFileName).manifest</_DeploymentTargetApplicationManifestFileName>
<!-- Example, MyAssembly.exe.manifest -->
<_DeploymentTargetApplicationManifestFileName Condition="'$(OutputType)'=='appcontainerexe'">$(TargetFileName).manifest</_DeploymentTargetApplicationManifestFileName>
<!-- Example, MyAssembly.exe.manifest -->
<TargetDeployManifestFileName Condition="'$(TargetDeployManifestFileName)' == '' and '$(HostInBrowser)' != 'true'">$(AssemblyName).application</TargetDeployManifestFileName>
<!-- Example, MyAssembly.application -->
<TargetDeployManifestFileName Condition="'$(TargetDeployManifestFileName)' == '' and '$(HostInBrowser)' == 'true'">$(AssemblyName).xbap</TargetDeployManifestFileName>
<!-- Example, MyAssembly.xbap -->
<GenerateClickOnceManifests Condition="'$(OutputType)'=='winexe' or '$(OutputType)'=='exe' or '$(OutputType)'=='appcontainerexe'">$(GenerateManifests)</GenerateClickOnceManifests>
<_DeploymentApplicationManifestIdentity Condition="'$(OutputType)'=='library'">Native.$(AssemblyName)</_DeploymentApplicationManifestIdentity>
<_DeploymentApplicationManifestIdentity Condition="'$(OutputType)'=='winexe'">$(AssemblyName).exe</_DeploymentApplicationManifestIdentity>
<_DeploymentApplicationManifestIdentity Condition="'$(OutputType)'=='exe'">$(AssemblyName).exe</_DeploymentApplicationManifestIdentity>
<_DeploymentApplicationManifestIdentity Condition="'$(OutputType)'=='appcontainerexe'">$(AssemblyName).exe</_DeploymentApplicationManifestIdentity>
<_DeploymentDeployManifestIdentity Condition="'$(HostInBrowser)' != 'true'">$(AssemblyName).application</_DeploymentDeployManifestIdentity>
<_DeploymentDeployManifestIdentity Condition="'$(HostInBrowser)' == 'true'">$(AssemblyName).xbap</_DeploymentDeployManifestIdentity>
<_DeploymentFileMappingExtension Condition="'$(MapFileExtensions)'=='true'">.deploy</_DeploymentFileMappingExtension>
<_DeploymentFileMappingExtension Condition="'$(MapFileExtensions)'!='true'" />
<_DeploymentBuiltUpdateInterval Condition="'$(UpdatePeriodically)'=='true'">$(UpdateInterval)</_DeploymentBuiltUpdateInterval>
<_DeploymentBuiltUpdateIntervalUnits Condition="'$(UpdatePeriodically)'=='true'">$(UpdateIntervalUnits)</_DeploymentBuiltUpdateIntervalUnits>
<_DeploymentBuiltUpdateInterval Condition="'$(UpdatePeriodically)'!='true'">0</_DeploymentBuiltUpdateInterval>
<_DeploymentBuiltUpdateIntervalUnits Condition="'$(UpdatePeriodically)'!='true'">Days</_DeploymentBuiltUpdateIntervalUnits>
<_DeploymentBuiltMinimumRequiredVersion Condition="'$(UpdateRequired)'=='true' and '$(Install)'=='true'">$(MinimumRequiredVersion)</_DeploymentBuiltMinimumRequiredVersion>
<_DeploymentLauncherBased Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp'">true</_DeploymentLauncherBased>
<MaxTargetPath Condition="'$(MaxTargetPath)'==''">100</MaxTargetPath>
</PropertyGroup>
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!--
By default, GenerateApplicationManifest puts all satellite assemblies to the manifest
record by default by setting TargetCulture to *.
-->
<TargetCulture Condition="'$(TargetCulture)'==''">*</TargetCulture>
<FallbackCulture Condition="'$(UICulture)'!='' and '$(FallbackCulture)'==''">$(UICulture)</FallbackCulture>
</PropertyGroup>
<ItemGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- Not used any more-->
<_OutputPathItem Include="$(OutDir)" />
<_UnmanagedRegistrationCache Include="$(BaseIntermediateOutputPath)$(MSBuildProjectFile).UnmanagedRegistration.cache" />
<_ResolveComReferenceCache Include="$(IntermediateOutputPath)$(MSBuildProjectFile).ResolveComReference.cache" />
</ItemGroup>
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- Example, C:\MyProjects\MyProject\bin\Debug\ -->
<!--
Condition intentionally omitted on this one, because it causes problems
when we pick up the value of an environment variable named TargetDir
-->
<TargetDir Condition="'$(OutDir)' != ''">$([MSBuild]::Escape($([System.IO.Path]::GetFullPath(`$([System.IO.Path]::Combine(`$(MSBuildProjectDirectory)`, `$(OutDir)`))`))))</TargetDir>
<!-- Example, C:\MyProjects\MyProject\bin\Debug\MyAssembly.dll -->
<TargetPath Condition=" '$(TargetPath)' == '' ">$(TargetDir)$(TargetFileName)</TargetPath>
<TargetRefPath Condition=" '$(TargetRefPath)' == '' and '$(ProduceReferenceAssembly)' == 'true' ">$([MSBuild]::NormalizePath($(TargetDir), 'ref', $(TargetFileName)))</TargetRefPath>
<!-- Example, C:\MyProjects\MyProject\ -->
<ProjectDir Condition=" '$(ProjectDir)' == '' ">$([MSBuild]::EnsureTrailingSlash($(MSBuildProjectDirectory)))</ProjectDir>
<!-- Example, C:\MyProjects\MyProject\MyProject.csproj -->
<ProjectPath Condition=" '$(ProjectPath)' == '' ">$(ProjectDir)$(ProjectFileName)</ProjectPath>
</PropertyGroup>
<ItemGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- This is not used here but remains for backwards compatibility -->
<AppConfigFileDestination Include="$(OutDir)$(TargetFileName).config" />
</ItemGroup>
<!--
IDE Macros available only from integrated builds.
The following properties are 'macros' that are available via IDE for
pre and post build steps. However, they are not defined when directly building
a project from the command line, only when building a solution.
-->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<DevEnvDir Condition="'$(DevEnvDir)'==''">*Undefined*</DevEnvDir>
<SolutionName Condition="'$(SolutionName)'==''">*Undefined*</SolutionName>
<!-- Example, MySolution -->
<SolutionFileName Condition="'$(SolutionFileName)'==''">*Undefined*</SolutionFileName>
<!-- Example, MySolution.sln -->
<SolutionPath Condition="'$(SolutionPath)'==''">*Undefined*</SolutionPath>
<!-- Example, f:\MySolutions\MySolution\MySolution.sln -->
<SolutionDir Condition="'$(SolutionDir)'==''">*Undefined*</SolutionDir>
<!-- Example, f:\MySolutions\MySolution\ -->
<SolutionExt Condition="'$(SolutionExt)'==''">*Undefined*</SolutionExt>
<!-- Example, .sln -->
</PropertyGroup>
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<GenerateBindingRedirectsOutputType Condition="'$(OutputType)'=='exe' or '$(OutputType)'=='winexe'">true</GenerateBindingRedirectsOutputType>
<!-- It would be a breaking change to automatically turn on binding redirects for existing projects, so turn them on only when opting into a new framework. -->
<AutoGenerateBindingRedirects Condition="'$(AutoGenerateBindingRedirects)' == '' and '$(TargetFrameworkIdentifier)' == '.NETFramework' and '$(TargetFrameworkVersion.TrimStart(vV))' &gt;= '4.7.2'">true</AutoGenerateBindingRedirects>
</PropertyGroup>
<PropertyGroup Condition="'$(AutoUnifyAssemblyReferences)' == ''" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<AutoUnifyAssemblyReferences>true</AutoUnifyAssemblyReferences>
<AutoUnifyAssemblyReferences Condition="'$(GenerateBindingRedirectsOutputType)' == 'true' and '$(AutoGenerateBindingRedirects)' != 'true'">false</AutoUnifyAssemblyReferences>
</PropertyGroup>
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<CleanFile Condition="'$(CleanFile)'==''">$(MSBuildProjectFile).FileListAbsolute.txt</CleanFile>
<!-- During DesignTime Builds, skip project reference build as Design time is only queueing information.-->
<BuildProjectReferences Condition="'$(BuildProjectReferences)' == '' and '$(DesignTimeBuild)' == 'true'">false</BuildProjectReferences>
<!-- By default we will build (and if applicable, clean) all project references. But this can be used to disable that-->
<BuildProjectReferences Condition="'$(BuildProjectReferences)' == ''">true</BuildProjectReferences>
<BuildInParallel Condition="'$(BuildInParallel)' == ''">true</BuildInParallel>
<_ResolveReferenceDependencies Condition="'$(_ResolveReferenceDependencies)' == ''">false</_ResolveReferenceDependencies>
<_GetChildProjectCopyToOutputDirectoryItems Condition="'$(_GetChildProjectCopyToOutputDirectoryItems)' == ''">true</_GetChildProjectCopyToOutputDirectoryItems>
<OverwriteReadOnlyFiles Condition="'$(OverwriteReadOnlyFiles)' == ''">false</OverwriteReadOnlyFiles>
<ComReferenceNoClassMembers Condition="'$(ComReferenceNoClassMembers)' == ''">false</ComReferenceNoClassMembers>
</PropertyGroup>
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<_GenerateBindingRedirectsIntermediateAppConfig>$(IntermediateOutputPath)$(TargetFileName).config</_GenerateBindingRedirectsIntermediateAppConfig>
</PropertyGroup>
<ItemGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<IntermediateAssembly Include="$(IntermediateOutputPath)$(TargetName)$(TargetExt)" />
<FinalDocFile Include="@(DocFileItem->'$(OutDir)%(Filename)%(Extension)')" />
<CopyUpToDateMarker Include="$([MSBuild]::NormalizePath('$(MSBuildProjectDirectory)', '$(IntermediateOutputPath)', '$(MSBuildProjectFile).CopyComplete'))" />
</ItemGroup>
<ItemGroup Condition="'$(ProduceReferenceAssembly)' == 'true'" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<IntermediateRefAssembly Include="$(IntermediateOutputPath)ref\$(TargetName)$(TargetExt)" Condition="'@(IntermediateRefAssembly)' == ''" />
<CreateDirectory Include="@(IntermediateRefAssembly->'%(RootDir)%(Directory)')" />
<CreateDirectory Include="$(OutDir)ref" />
</ItemGroup>
<ItemGroup Condition="'$(_DebugSymbolsProduced)' == 'true'" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<_DebugSymbolsIntermediatePath Include="$(IntermediateOutputPath)$(TargetName).compile.pdb" Condition="'$(OutputType)' == 'winmdobj' and '@(_DebugSymbolsIntermediatePath)' == ''" />
<_DebugSymbolsIntermediatePath Include="$(IntermediateOutputPath)$(TargetName).pdb" Condition="'$(OutputType)' != 'winmdobj' and '@(_DebugSymbolsIntermediatePath)' == ''" />
<_DebugSymbolsOutputPath Include="@(_DebugSymbolsIntermediatePath->'$(OutDir)%(Filename)%(Extension)')" />
</ItemGroup>
<PropertyGroup Condition="'$(_DebugSymbolsProduced)' == 'true' and '$(OutputType)' == 'winmdobj'" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<WinMDExpOutputPdb Condition="'$(WinMDExpOutputPdb)' == ''">$(IntermediateOutputPath)$(TargetName).pdb</WinMDExpOutputPdb>
<_WinMDDebugSymbolsOutputPath>$([System.IO.Path]::Combine('$(OutDir)', $([System.IO.Path]::GetFileName('$(WinMDExpOutputPdb)'))))</_WinMDDebugSymbolsOutputPath>
</PropertyGroup>
<PropertyGroup Condition="'$(OutputType)' == 'winmdobj' and '$(DocumentationFile)'!=''" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<WinMDOutputDocumentationFile Condition="'$(WinMDOutputDocumentationFile)' == ''">$(IntermediateOutputPath)$(TargetName).xml</WinMDOutputDocumentationFile>
<_WinMDDocFileOutputPath>$([System.IO.Path]::Combine('$(OutDir)', $([System.IO.Path]::GetFileName('$(WinMDOutputDocumentationFile)'))))</_WinMDDocFileOutputPath>
</PropertyGroup>
<PropertyGroup Condition="'$(WinMDExpOutputWindowsMetadataFilename)' != ''" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<_IntermediateWindowsMetadataPath>$(IntermediateOutputPath)$(WinMDExpOutputWindowsMetadataFilename)</_IntermediateWindowsMetadataPath>
<_WindowsMetadataOutputPath>$(OutDir)$(WinMDExpOutputWindowsMetadataFilename)</_WindowsMetadataOutputPath>
</PropertyGroup>
<ItemGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- Create an item for entry point of the ClickOnce application (Example: WindowsApplication1.exe) -->
<_DeploymentManifestEntryPoint Include="@(IntermediateAssembly)">
<TargetPath>$(TargetFileName)</TargetPath>
</_DeploymentManifestEntryPoint>
<!-- Create an item for the application icon if one exists in the project (Example: app.ico) -->
<!-- NOTE: The item Include and the Exists function are operating relative to the PROJECT (.csproj, .vbproj etc.) directory in this case -->
<_DeploymentManifestIconFile Include="$(ApplicationIcon)" Condition="Exists('$(ApplicationIcon)')">
<TargetPath>$(ApplicationIcon)</TargetPath>
</_DeploymentManifestIconFile>
<!-- Create an item for the output application manifest (Example: WindowsApplication1.exe.manifeset) -->
<ApplicationManifest Include="$(IntermediateOutputPath)$(_DeploymentTargetApplicationManifestFileName)">
<TargetPath>$(_DeploymentTargetApplicationManifestFileName)</TargetPath>
</ApplicationManifest>
<!-- Create an item for the final application manifest (Example: WindowsApplication1.exe.manifeset)
This item represents the final output application manifest used for project-to-project
references and for copying to the publish output location. -->
<_ApplicationManifestFinal Include="$(OutDir)$(_DeploymentTargetApplicationManifestFileName)">
<TargetPath>$(_DeploymentTargetApplicationManifestFileName)</TargetPath>
</_ApplicationManifestFinal>
<!-- Create an item for the output deploy manifest (Example: WindowsApplication1.application) -->
<DeployManifest Include="$(IntermediateOutputPath)$(TargetDeployManifestFileName)">
<TargetPath>$(TargetDeployManifestFileName)</TargetPath>
</DeployManifest>
<!-- Create an item for the intermediate trust info file -->
<_DeploymentIntermediateTrustInfoFile Include="$(IntermediateOutputPath)$(TargetName).TrustInfo.xml" Condition="'$(TargetZone)'!=''" />
</ItemGroup>
<!--
Determine the <deploymentProvider> (_DeploymentUrl) for the ClickOnce deployment manifest.
Prefer the UpdateUrl, falling back to InstallUrl or PublishUrl if not specified.
If the UpdateUrl is specified then _DeploymentUrl is always set to the UpdateUrl.
Otherwise, only set the _DeploymentUrl if it's an installed app and updates are enabled.
-->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<_DeploymentUrl Condition="'$(_DeploymentUrl)'==''">$(UpdateUrl)</_DeploymentUrl>
<_DeploymentUrl Condition="'$(_DeploymentUrl)'==''">$(InstallUrl)</_DeploymentUrl>
<_DeploymentUrl Condition="'$(_DeploymentUrl)'==''">$(PublishUrl)</_DeploymentUrl>
<_DeploymentUrl Condition="!('$(UpdateUrl)'=='') and '$(Install)'=='false'" />
<_DeploymentUrl Condition="'$(_DeploymentUrl)'!=''">$(_DeploymentUrl)$(TargetDeployManifestFileName)</_DeploymentUrl>
<!--
Need to explicitly blank out the _DeploymentUrl when it's not used. Otherwise an
inappropriate value may be used. For example a local path from the PublishUrl
is something we never want to see in the manifest because it means you could
only install the app from that machine.
-->
<_DeploymentUrl Condition="'$(UpdateUrl)'=='' and !('$(Install)'=='true' and '$(UpdateEnabled)'=='true')" />
<_DeploymentUrl Condition="'$(ExcludeDeploymentUrl)'=='true'" />
</PropertyGroup>
<!-- Determine the URLs for the bootstrapper. -->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<_DeploymentApplicationUrl Condition="'$(IsWebBootstrapper)'=='true'">$(InstallUrl)</_DeploymentApplicationUrl>
<_DeploymentApplicationUrl Condition="'$(IsWebBootstrapper)'=='true' and '$(InstallUrl)'==''">$(PublishUrl)</_DeploymentApplicationUrl>
<_DeploymentComponentsUrl Condition="'$(BootstrapperComponentsLocation)'=='Absolute'">$(BootstrapperComponentsUrl)</_DeploymentComponentsUrl>
</PropertyGroup>
<!-- Output location for publish target. -->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PublishDir Condition="'$(PublishDir)' != '' and !HasTrailingSlash('$(PublishDir)')">$(PublishDir)\</PublishDir>
<PublishDir Condition="'$(PublishDir)'==''">$(OutputPath)app.publish\</PublishDir>
</PropertyGroup>
<!--
ProcessorArchitecture is the target processor architecture.
-->
<PropertyGroup Condition="'$(ProcessorArchitecture)'==''" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!--
If ProcessorArchitecture is not set, set it to PlatformTarget
Note: if $(PlatformTarget) is also blank resolve assembly reference defaults to msil which is the
desired behavior in this case
-->
<ProcessorArchitecture>$(PlatformTarget)</ProcessorArchitecture>
<!--
If Processor architecture is not set and PlatformTarget is a known target translate the
PlatformTarget into something ResolveAssemblyReference knows about
-->
<ProcessorArchitecture Condition=" '$(PlatformTarget)' == 'AnyCpu' ">msil</ProcessorArchitecture>
<ProcessorArchitecture Condition=" '$(PlatformTarget)' == 'x64' ">amd64</ProcessorArchitecture>
<ProcessorArchitecture Condition=" '$(PlatformTarget)' == 'Itanium' ">ia64</ProcessorArchitecture>
<ProcessorArchitecture Condition=" '$(PlatformTarget)' == 'x86' ">x86</ProcessorArchitecture>
<ProcessorArchitecture Condition=" '$(PlatformTarget)' == 'ARM' ">arm</ProcessorArchitecture>
</PropertyGroup>
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ConsiderPlatformAsProcessorArchitecture Condition="'$(ConsiderPlatformAsProcessorArchitecture)' == ''">true</ConsiderPlatformAsProcessorArchitecture>
</PropertyGroup>
<PropertyGroup Condition="'$(ProcessorArchitecture)' == '' and '$(ConsiderPlatformAsProcessorArchitecture)' == 'true'" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- We need to do this here because if we were to just compare against platform visual would parse them out as available platforms which may not be the case -->
<ProcessorArchitectureAsPlatform>$(Platform)</ProcessorArchitectureAsPlatform>
<ProcessorArchitecture Condition=" '$(ProcessorArchitectureAsPlatform)' == 'AnyCpu' or '$(ProcessorArchitectureAsPlatform)' == 'Any Cpu'">msil</ProcessorArchitecture>
<ProcessorArchitecture Condition=" '$(ProcessorArchitectureAsPlatform)' == 'x64' or '$(ProcessorArchitectureAsPlatform)' == 'amd64'">amd64</ProcessorArchitecture>
<ProcessorArchitecture Condition=" '$(ProcessorArchitectureAsPlatform)' == 'Itanium' ">ia64</ProcessorArchitecture>
<ProcessorArchitecture Condition=" '$(ProcessorArchitectureAsPlatform)' == 'x86' or '$(ProcessorArchitectureAsPlatform)' == 'win32'">x86</ProcessorArchitecture>
<ProcessorArchitecture Condition=" '$(ProcessorArchitectureAsPlatform)' == 'ARM' ">arm</ProcessorArchitecture>
<!--For compatibility with the 4.0 behavior, if not set above, default to the environment. To override this, set ProcessorArchitecture explicitly. We also need to disable the warning since we do not know if what the environment is set to is correct-->
<ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch Condition="'$(ProcessorArchitecture)'==''">None</ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
<ProcessorArchitecture Condition="'$(ProcessorArchitecture)'==''">$(PROCESSOR_ARCHITECTURE)</ProcessorArchitecture>
</PropertyGroup>
<!-- Sensible defaults for the most-commonly-desired MSBuildRuntime and MSBuildArchitecture values. The Core and Mono runtimes do not currently support specifying task architecture or runtime.
If support for out-of-proc task execution is added on other runtimes, make sure each task's logic is checked against the current state of support. -->
<PropertyGroup Condition="'$(DisableOutOfProcTaskHost)' == '' and '$(MSBuildRuntimeType)' == 'Full'" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<TargetFrameworkAsMSBuildRuntime Condition="'$(TargetFrameworkVersion)' == 'v2.0' or '$(TargetFrameworkVersion)' == 'v3.0' or '$(TargetFrameworkVersion)' == 'v3.5'">CLR2</TargetFrameworkAsMSBuildRuntime>
<TargetFrameworkAsMSBuildRuntime Condition="'$(TargetFrameworkVersion)' == 'v4.0' or '$(TargetFrameworkVersion)' == 'v4.5'">CLR4</TargetFrameworkAsMSBuildRuntime>
<TargetFrameworkAsMSBuildRuntime Condition="'$(TargetFrameworkAsMSBuildRuntime)' == ''">CurrentRuntime</TargetFrameworkAsMSBuildRuntime>
<PlatformTargetAsMSBuildArchitectureExplicitlySet Condition="'$(PlatformTargetAsMSBuildArchitecture)' != ''">true</PlatformTargetAsMSBuildArchitectureExplicitlySet>
<PlatformTargetAsMSBuildArchitectureExplicitlySet Condition="'$(PlatformTargetAsMSBuildArchitecture)' == ''">false</PlatformTargetAsMSBuildArchitectureExplicitlySet>
<PlatformTargetAsMSBuildArchitecture Condition="'$(PlatformTarget)' == 'x86' or ('$(PlatformTarget)' == 'x64' and '$(MSBuildExtensionsPath64)' != '')">$(PlatformTarget)</PlatformTargetAsMSBuildArchitecture>
<PlatformTargetAsMSBuildArchitecture Condition="'$(PlatformTarget)' == 'arm'">x86</PlatformTargetAsMSBuildArchitecture>
<PlatformTargetAsMSBuildArchitecture Condition="('$(PlatformTarget)' == 'ia64' and '$(MSBuildExtensionsPath64)' != '')">x64</PlatformTargetAsMSBuildArchitecture>
<PlatformTargetAsMSBuildArchitecture Condition="'$(PlatformTargetAsMSBuildArchitecture)' == ''">CurrentArchitecture</PlatformTargetAsMSBuildArchitecture>
</PropertyGroup>
<!-- Flavor is the project flavor. For example, Client, Smart Devices, SQL Server, etc. -->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ProjectFlavor Condition="'$(ProjectFlavor)'==''">Client</ProjectFlavor>
</PropertyGroup>
<!--
The default for compilers is to not delay-sign. If $(DelaySign) is false, let the compiler
use its default rather than forcing a no-delay-sign flag to be passed in. This is so that
attributes in the source code can override this decision.
-->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<DelaySign Condition="'$(SignAssembly)' != 'true'">false</DelaySign>
<DelaySign Condition="'$(DelaySign)'!='true'" />
</PropertyGroup>
<!-- These properties control web reference proxy generation. -->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<WebReference_EnableProperties Condition=" '$(WebReference_EnableProperties)' == '' ">true</WebReference_EnableProperties>
<WebReference_EnableSQLTypes Condition=" '$(WebReference_EnableSQLTypes)' == '' ">true</WebReference_EnableSQLTypes>
<WebReference_EnableLegacyEventingModel Condition=" '$(WebReference_EnableLegacyEventingModel)' == '' ">false</WebReference_EnableLegacyEventingModel>
</PropertyGroup>
<!--
These parameters control where to look in the registry for directories to search for
assemblies in the assembly resolution tasks.
-->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<AssemblyFoldersSuffix Condition=" '$(AssemblyFoldersSuffix)' == '' ">AssemblyFoldersEx</AssemblyFoldersSuffix>
<FrameworkRegistryBase Condition=" '$(FrameworkRegistryBase)' == '' ">Software\Microsoft\$(TargetFrameworkIdentifier)</FrameworkRegistryBase>
<TargetPlatformRegistryBase Condition="'$(TargetPlatformRegistryBase)' == ''">Software\Microsoft\Microsoft SDKs\$(TargetPlatformIdentifier)</TargetPlatformRegistryBase>
<AssemblyFoldersConfigFile Condition="'$(AssemblyFoldersConfigFile)' == ''">$(MSBuildToolsPath32)\AssemblyFolders.config</AssemblyFoldersConfigFile>
<AssemblyFoldersConfigFileSearchPath Condition="Exists('$(AssemblyFoldersConfigFile)')">{AssemblyFoldersFromConfig:$(AssemblyFoldersConfigFile),$(TargetFrameworkVersion)};</AssemblyFoldersConfigFileSearchPath>
<!--
The SearchPaths property is set to find assemblies in the following order:
(1) Files from current project - indicated by {CandidateAssemblyFiles}
(2) $(ReferencePath) - the reference path property, which comes from the .USER file.
(3) The hintpath from the referenced item itself, indicated by {HintPathFromItem}.
(4) The directory of MSBuild's "target" runtime from GetFrameworkPath.
The "target" runtime folder is the folder of the runtime that MSBuild is a part of.
(5) Registered assembly folders, indicated by {Registry:*,*,*}
(6) Assembly folders from AssemblyFolders.config file (provided by Visual Studio Dev15+).
(7) Legacy registered assembly folders, indicated by {AssemblyFolders}
(8) Resolve to the GAC.
(9) Treat the reference's Include as if it were a real file name.
(10) Look in the application's output folder (like bin\debug)
-->
<AssemblySearchPaths Condition=" '$(AssemblySearchPaths)' == ''">
{CandidateAssemblyFiles};
$(ReferencePath);
{HintPathFromItem};
{TargetFrameworkDirectory};
$(AssemblyFoldersConfigFileSearchPath)
{Registry:$(FrameworkRegistryBase),$(TargetFrameworkVersion),$(AssemblyFoldersSuffix)$(AssemblyFoldersExConditions)};
{AssemblyFolders};
{GAC};
{RawFileName};
$(OutDir)
</AssemblySearchPaths>
<!--
These are the extensions that assembly reference resolution will consider for resolution.
Add new extensions here if you want to add new file types to consider (for example, .metadata_dll).
Put the most likely extensions first for reference resolution speed.
-->
<AllowedReferenceAssemblyFileExtensions Condition=" '$(AllowedReferenceAssemblyFileExtensions)' == '' ">
.winmd;
.dll;
.exe
</AllowedReferenceAssemblyFileExtensions>
<!--
These are the extensions that reference resolution will consider when looking for files related
to resolved references. Add new extensions here if you want to add new file types to consider.
-->
<AllowedReferenceRelatedFileExtensions Condition=" '$(AllowedReferenceRelatedFileExtensions)' == '' ">
.pdb;
.xml;
.pri;
.dll.config;
.exe.config
</AllowedReferenceRelatedFileExtensions>
<!--
These names are used when determining which TargetFramework subset to use. If the any of the FullReferenceAssemblyNames
are seen in the list of client subsets, RAR will assume that no client subset is being used. The list is semicolon seperated
For example : Full;Complete;AllThere
-->
<FullReferenceAssemblyNames Condition="'$(FullReferenceAssemblyNames)' == ''">Full</FullReferenceAssemblyNames>
</PropertyGroup>
<!-- ContinueOnError takes 3 values: WarnAndContinue (true), ErrorAndStop (false), and ErrorAndContinue.
Default to ErrorAndStop, since that matches the behaviour in previous versions, and what users
typically expect -->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ContinueOnError Condition="'$(ContinueOnError)' == ''">false</ContinueOnError>
</PropertyGroup>
<!-- Users familiar with how some other repos work try to use NoWarn with MSBuild in place of MSBuildWarningsAsMessages. -->
<PropertyGroup Condition="$([MSBuild]::AreFeaturesEnabled('16.8'))" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<MSBuildWarningsAsMessages Condition="'$(MSBuildWarningsAsMessages)'==''">$(NoWarn)</MSBuildWarningsAsMessages>
<MSBuildWarningsAsErrors Condition="'$(MSBuildWarningsAsErrors)'==''">$(WarningsAsErrors)</MSBuildWarningsAsErrors>
</PropertyGroup>
<!-- Common Project System support -->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<CommonXamlResourcesDirectory Condition=" '$(CommonXamlResourcesDirectory)' == '' ">$(MSBuildThisFileDirectory)$(LangName)\</CommonXamlResourcesDirectory>
</PropertyGroup>
<!-- We need to fallback to en-US in case the xaml rules are not localized (possibly happen on community languages). -->
<PropertyGroup Condition="!Exists('$(CommonXamlResourcesDirectory)')" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<CommonXamlResourcesDirectory>$(MSBuildThisFileDirectory)en-US\</CommonXamlResourcesDirectory>
</PropertyGroup>
<ItemGroup Condition=" '$(DefineCommonItemSchemas)' == 'true' " xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyPageSchema Include="$(CommonXamlResourcesDirectory)ProjectItemsSchema.xaml" />
<PropertyPageSchema Include="&#xD;&#xA; $(CommonXamlResourcesDirectory)General.xaml;&#xD;&#xA; $(CommonXamlResourcesDirectory)Debugger_General.xaml">
<Context>Project</Context>
</PropertyPageSchema>
<PropertyPageSchema Include="$(CommonXamlResourcesDirectory)General.BrowseObject.xaml">
<Context>BrowseObject</Context>
</PropertyPageSchema>
<PropertyPageSchema Include="$(CommonXamlResourcesDirectory)General_File.xaml">
<Context>File</Context>
</PropertyPageSchema>
<PropertyPageSchema Include="$(CommonXamlResourcesDirectory)SCC.xaml">
<Context>Invisible</Context>
</PropertyPageSchema>
<PropertyPageSchema Include="&#xD;&#xA; $(CommonXamlResourcesDirectory)Folder.xaml;&#xD;&#xA; $(CommonXamlResourcesDirectory)None.xaml;&#xD;&#xA; $(CommonXamlResourcesDirectory)Content.xaml;&#xD;&#xA; $(CommonXamlResourcesDirectory)EmbeddedResource.xaml;&#xD;&#xA; ">
<Context>File;BrowseObject</Context>
</PropertyPageSchema>
<PropertyPageSchema Include="$(CommonXamlResourcesDirectory)SpecialFolder.xaml;">
<Context>File;ProjectSubscriptionService</Context>
</PropertyPageSchema>
</ItemGroup>
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<DefineCommonReferenceSchemas Condition=" '$(DefineCommonReferenceSchemas)' == '' ">$(DefineCommonItemSchemas)</DefineCommonReferenceSchemas>
</PropertyGroup>
<ItemGroup Condition=" '$(DefineCommonReferenceSchemas)' == 'true' " xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- Assembly references -->
<PropertyPageSchema Include="$(CommonXamlResourcesDirectory)assemblyreference.xaml">
<Context>;BrowseObject</Context>
</PropertyPageSchema>
<PropertyPageSchema Include="$(CommonXamlResourcesDirectory)ResolvedAssemblyReference.xaml">
<Context>ProjectSubscriptionService;BrowseObject</Context>
</PropertyPageSchema>
<!-- COM references -->
<PropertyPageSchema Include="$(CommonXamlResourcesDirectory)COMReference.xaml">
<Context>;BrowseObject</Context>
</PropertyPageSchema>
<PropertyPageSchema Include="$(CommonXamlResourcesDirectory)ResolvedCOMReference.xaml">
<Context>ProjectSubscriptionService;BrowseObject</Context>
</PropertyPageSchema>
<!-- Project references -->
<PropertyPageSchema Include="$(CommonXamlResourcesDirectory)ProjectReference.xaml">
<Context>;BrowseObject</Context>
</PropertyPageSchema>
<PropertyPageSchema Include="$(CommonXamlResourcesDirectory)ResolvedProjectReference.xaml">
<Context>ProjectSubscriptionService;BrowseObject</Context>
</PropertyPageSchema>
</ItemGroup>
<ItemGroup Condition=" '$(DefineCommonCapabilities)' == 'true' " xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ProjectCapability Include="&#xD;&#xA; AssemblyReferences;&#xD;&#xA; COMReferences;&#xD;&#xA; ProjectReferences;&#xD;&#xA; SharedProjectReferences;&#xD;&#xA; OutputGroups;&#xD;&#xA; AllTargetOutputGroups;&#xD;&#xA; VisualStudioWellKnownOutputGroups;&#xD;&#xA; SingleFileGenerators;&#xD;&#xA; DeclaredSourceItems;&#xD;&#xA; UserSourceItems;&#xD;&#xA; " />
<ProjectCapability Condition=" '$(TargetPlatformIdentifier)' == 'Windows' and '$(TargetPlatformVersion)' &lt; 8.0 " Include="BuildWindowsDesktopTarget" />
</ItemGroup>
<ItemDefinitionGroup Condition=" '$(DefineExplicitDefaults)' == 'true' " xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<None>
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
</None>
<Content>
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
</Content>
<Compile>
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
</Compile>
<EmbeddedResource>
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
</EmbeddedResource>
</ItemDefinitionGroup>
<!--
Target that allows targets consuming source control confirmation to establish a dependency on targets producing this information.
Any target that reads SourceRevisionId, PrivateRepositoryUrl, SourceRoot, and other source control properties and items
should depend on this target and be conditioned on '$(SourceControlInformationFeatureSupported)' == 'true'.
SourceRevisionId property uniquely identifies the source control revision of the repository the project belongs to.
For Git repositories this id is a commit hash, for TFVC repositories it's the changeset number, etc.
PrivateRepositoryUrl property stores the URL of the repository supplied by the CI server or retrieved from source control manager.
Targets consuming this property shall not publish its value implicitly as it might inadvertently reveal an internal URL.
Instead, they shall only do so if the project sets PublishRepositoryUrl property to true. For example, the NuGet Pack target
may include the repository URL in the nuspec file generated for NuGet package produced by the project if PublishRepositoryUrl is true.
SourceRoot item group lists all source roots that the project source files reside under and their mapping to source control server URLs,
if available. This includes both source files under source control as well as source files in source packages. SourceRoot items are
used by compilers to determine path map in deterministic build and by SourceLink provider, which maps local paths to URLs of source files
stored on the source control server.
Source control information provider that sets these properties and items shall execute before this target (by including
InitializeSourceControlInformation in its BeforeTargets) and set source control properties and items that haven't been initialized yet.
-->
<Target Name="InitializeSourceControlInformation" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<SourceControlInformationFeatureSupported>true</SourceControlInformationFeatureSupported>
</PropertyGroup>
<!--
***********************************************************************************************
***********************************************************************************************
Build Section
***********************************************************************************************
***********************************************************************************************
-->
<Target Name="_AddOutputPathToGlobalPropertiesToRemove" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<_GlobalPropertiesToRemoveFromProjectReferences Condition="'$(PassOutputPathToReferencedProjects)'=='false'">$(_GlobalPropertiesToRemoveFromProjectReferences);OutputPath</_GlobalPropertiesToRemoveFromProjectReferences>
</PropertyGroup>
</Target>
<!--
============================================================
_CheckForInvalidConfigurationAndPlatform
This target checks for errors in statically defined properties. By setting BeforeTargets, we try
to ensure that the target runs before any build related targets.
If your target requires this check and is running as a BeforeTargets of one of the first targets
of $(BuildDependsOn), $(RebuildDependsOn), or $(CleanDependsOn) you will need to set your DependsOn
to this target.
============================================================
-->
<Target Name="_CheckForInvalidConfigurationAndPlatform" BeforeTargets="$(BuildDependsOn);Build;$(RebuildDependsOn);Rebuild;$(CleanDependsOn);Clean" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<_InvalidConfigurationMessageText>The BaseOutputPath/OutputPath property is not set for project '$(MSBuildProjectFile)'. Please check to make sure that you have specified a valid combination of Configuration and Platform for this project. Configuration='$(_OriginalConfiguration)' Platform='$(_OriginalPlatform)'.</_InvalidConfigurationMessageText>
<_InvalidConfigurationMessageText Condition="'$(BuildingInsideVisualStudio)' == 'true'">$(_InvalidConfigurationMessageText) This error may also appear if some other project is trying to follow a project-to-project reference to this project, this project has been unloaded or is not included in the solution, and the referencing project does not build using the same or an equivalent Configuration or Platform.</_InvalidConfigurationMessageText>
<_InvalidConfigurationMessageText Condition="'$(BuildingInsideVisualStudio)' != 'true'">$(_InvalidConfigurationMessageText) You may be seeing this message because you are trying to build a project without a solution file, and have specified a non-default Configuration or Platform that doesn't exist for this project.</_InvalidConfigurationMessageText>
</PropertyGroup>
<Error Condition=" '$(_InvalidConfigurationError)' == 'true' " Text="$(_InvalidConfigurationMessageText)" />
<Warning Condition=" '$(_InvalidConfigurationWarning)' == 'true' " Text="$(_InvalidConfigurationMessageText)" />
<Message Condition="'$(DesignTimeBuild)' != 'true'" Text="Configuration=$(Configuration)" Importance="Low" />
<Message Condition="'$(DesignTimeBuild)' != 'true'" Text="Platform=$(Platform)" Importance="Low" />
<!-- Although we try to ensure a trailing slash, it's possible to circumvent this if the property is set on the command line -->
<Error Condition="'$(OutDir)' != '' and !HasTrailingSlash('$(OutDir)')" Text="The OutDir property must end with a trailing slash." />
<Error Condition="'$(IntermediateOutputPath)' != '' and !HasTrailingSlash('$(IntermediateOutputPath)')" Text="The IntermediateOutputPath must end with a trailing slash." />
<Error Condition="'$(BaseIntermediateOutputPath)' != '' and !HasTrailingSlash('$(BaseIntermediateOutputPath)')" Text="The BaseIntermediateOutputPath must end with a trailing slash." />
<!-- Also update the value of PlatformTargetAsMSBuildArchitecture per the value of Prefer32Bit. We are doing
this here because Prefer32Bit may be set anywhere in the targets, so we can't depend on it having the
correct value when we're trying to figure out PlatformTargetAsMSBuildArchitecture -->
<PropertyGroup Condition="'$(Prefer32Bit)' == 'true' and ('$(PlatformTarget)' == 'AnyCPU' or '$(PlatformTarget)' == '') and '$(PlatformTargetAsMSBuildArchitectureExplicitlySet)' != 'true'">
<PlatformTargetAsMSBuildArchitecture>x86</PlatformTargetAsMSBuildArchitecture>
</PropertyGroup>
<!--
Log an error if the user set MSBuildProjectExtensionsPath in the body of a project. In an SDK style project
if you set a value in the body, the value is not used by the top implicit import but is used by the bottom.
This can lead to confusing behavior and builds can fail for obscure reasons.
-->
<Error Condition=" '$(_InitialMSBuildProjectExtensionsPath)' != '' And '$(MSBuildProjectExtensionsPath)' != '$(_InitialMSBuildProjectExtensionsPath)' " Code="MSB3540" Text="The value of the property &quot;MSBuildProjectExtensionsPath&quot; was modified after it was used by MSBuild which can lead to unexpected build results. To set this property, you must do so before Microsoft.Common.props is imported, for example by using Directory.Build.props. For more information, please visit https://go.microsoft.com/fwlink/?linkid=869650" />
<!--
Log a warning if:
1. $(EnableBaseIntermediateOutputPathMismatchWarning) is 'true'
2. $(BaseIntermediateOutputPath) was set in the body of a project after its default value was set in Microsoft.Common.props
3. $(BaseIntermediateOutputPath) is not the same as $(MSBuildProjectExtensionsPath)
Similar to the error above, there are cases when users set $(BaseIntermediateOutputPath) in the body of their project and things build but only by coincidence.
MSBuild does not know if $(BaseIntermediateOutputPath) changing would cause problems so tools like NuGet must set $(EnableBaseIntermediateOutputPathMismatchWarning)
to 'true'.
-->
<Warning Condition=" '$(EnableBaseIntermediateOutputPathMismatchWarning)' == 'true' And '$(_InitialBaseIntermediateOutputPath)' != '$(BaseIntermediateOutputPath)' And '$(BaseIntermediateOutputPath)' != '$(MSBuildProjectExtensionsPath)' " Code="MSB3539" Text="The value of the property &quot;BaseIntermediateOutputPath&quot; was modified after it was used by MSBuild which can lead to unexpected build results. Tools such as NuGet will write outputs to the path specified by the &quot;MSBuildProjectExtensionsPath&quot; instead. To set this property, you must do so before Microsoft.Common.props is imported, for example by using Directory.Build.props. For more information, please visit https://go.microsoft.com/fwlink/?linkid=869650" />
</Target>
<!--
============================================================
Build
The main build entry point.
============================================================
-->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<BuildDependsOn>
BeforeBuild;
CoreBuild;
AfterBuild
</BuildDependsOn>
</PropertyGroup>
<Target Name="Build" Condition=" '$(_InvalidConfigurationWarning)' != 'true' " DependsOnTargets="$(BuildDependsOn)" Returns="@(TargetPathWithTargetPlatformMoniker)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<!--
============================================================
BeforeBuild
Redefine this target in your project in order to run tasks just before Build
============================================================
-->
<Target Name="BeforeBuild" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<!--
============================================================
AfterBuild
Redefine this target in your project in order to run tasks just after Build
============================================================
-->
<Target Name="AfterBuild" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<!--
============================================================
CoreBuild
The core build step calls each of the build targets.
============================================================
-->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<CoreBuildDependsOn>
BuildOnlySettings;
PrepareForBuild;
PreBuildEvent;
ResolveReferences;
PrepareResources;
ResolveKeySource;
Compile;
ExportWindowsMDFile;
UnmanagedUnregistration;
GenerateSerializationAssemblies;
CreateSatelliteAssemblies;
GenerateManifests;
GetTargetPath;
PrepareForRun;
UnmanagedRegistration;
IncrementalClean;
PostBuildEvent
</CoreBuildDependsOn>
</PropertyGroup>
<Target Name="CoreBuild" DependsOnTargets="$(CoreBuildDependsOn)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<OnError ExecuteTargets="_TimeStampAfterCompile;PostBuildEvent" Condition="'$(RunPostBuildEvent)'=='Always' or '$(RunPostBuildEvent)'=='OnOutputUpdated'" />
<OnError ExecuteTargets="_CleanRecordFileWrites" />
</Target>
<!--
============================================================
Rebuild
Delete all intermediate and final build outputs, and then build the project from scratch.
============================================================
-->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<_ProjectDefaultTargets Condition="'$(MSBuildProjectDefaultTargets)' != ''">$(MSBuildProjectDefaultTargets)</_ProjectDefaultTargets>
<_ProjectDefaultTargets Condition="'$(MSBuildProjectDefaultTargets)' == ''">Build</_ProjectDefaultTargets>
<RebuildDependsOn>
BeforeRebuild;
Clean;
$(_ProjectDefaultTargets);
AfterRebuild;
</RebuildDependsOn>
<RebuildDependsOn Condition=" '$(MSBuildProjectDefaultTargets)' == 'Rebuild' ">
BeforeRebuild;
Clean;
Build;
AfterRebuild;
</RebuildDependsOn>
</PropertyGroup>
<Target Name="Rebuild" Condition=" '$(_InvalidConfigurationWarning)' != 'true' " DependsOnTargets="$(RebuildDependsOn)" Returns="$(TargetPath)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<!--
============================================================
BeforeRebuild
Redefine this target in your project in order to run tasks just before Rebuild
============================================================
-->
<Target Name="BeforeRebuild" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<!--
============================================================
AfterRebuild
Redefine this target in your project in order to run tasks just after Rebuild
============================================================
-->
<Target Name="AfterRebuild" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<!--
============================================================
BuildGenerateSources
Redefine this target in your project in order to run tasks for BuildGenerateSources
Set BuildPassReferences to enable P2P builds
============================================================
-->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<BuildGenerateSourcesAction>Build</BuildGenerateSourcesAction>
</PropertyGroup>
<Target Name="BuildGenerateSources" DependsOnTargets="BuildGenerateSourcesTraverse;$(BuildGenerateSourcesAction)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<Target Name="BuildGenerateSourcesTraverse" DependsOnTargets="PrepareProjectReferences" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<MSBuild Projects="@(_MSBuildProjectReferenceExistent)" Targets="BuildGenerateSources" BuildInParallel="$(BuildInParallel)" Properties="%(_MSBuildProjectReferenceExistent.SetConfiguration); %(_MSBuildProjectReferenceExistent.SetPlatform); %(_MSBuildProjectReferenceExistent.SetTargetFramework);" Condition="'$(BuildPassReferences)' == 'true' and '@(ProjectReferenceWithConfiguration)' != '' and '@(_MSBuildProjectReferenceExistent)' != '' and '%(_MSBuildProjectReferenceExistent.BuildReference)' == 'true'" ContinueOnError="!$(BuildingProject)" RemoveProperties="%(_MSBuildProjectReferenceExistent.GlobalPropertiesToRemove)$(_GlobalPropertiesToRemoveFromProjectReferences)" />
</Target>
<!--
============================================================
BuildCompile
Redefine this target in your project in order to run tasks for BuildCompile
============================================================
-->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<BuildCompileAction>Build</BuildCompileAction>
</PropertyGroup>
<Target Name="BuildCompile" DependsOnTargets="BuildCompileTraverse;$(BuildCompileAction)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<Target Name="BuildCompileTraverse" DependsOnTargets="PrepareProjectReferences" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<MSBuild Projects="@(_MSBuildProjectReferenceExistent)" Targets="BuildCompile" BuildInParallel="$(BuildInParallel)" Properties="%(_MSBuildProjectReferenceExistent.SetConfiguration); %(_MSBuildProjectReferenceExistent.SetPlatform); %(_MSBuildProjectReferenceExistent.SetTargetFramework)" Condition="'$(BuildPassReferences)' == 'true' and '@(ProjectReferenceWithConfiguration)' != '' and '@(_MSBuildProjectReferenceExistent)' != '' and '%(_MSBuildProjectReferenceExistent.BuildReference)' == 'true'" ContinueOnError="!$(BuildingProject)" RemoveProperties="%(_MSBuildProjectReferenceExistent.GlobalPropertiesToRemove)$(_GlobalPropertiesToRemoveFromProjectReferences)" />
</Target>
<!--
============================================================
BuildLink
Redefine this target in your project in order to run tasks for BuildLink
============================================================
-->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<BuildLinkAction>Build</BuildLinkAction>
</PropertyGroup>
<Target Name="BuildLink" DependsOnTargets="BuildLinkTraverse;$(BuildLinkAction)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<Target Name="BuildLinkTraverse" DependsOnTargets="PrepareProjectReferences" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<MSBuild Projects="@(_MSBuildProjectReferenceExistent)" Targets="BuildLink" BuildInParallel="$(BuildInParallel)" Properties="%(_MSBuildProjectReferenceExistent.SetConfiguration); %(_MSBuildProjectReferenceExistent.SetPlatform); %(_MSBuildProjectReferenceExistent.SetTargetFramework)" Condition="'$(BuildPassReferences)' == 'true' and '@(ProjectReferenceWithConfiguration)' != '' and '@(_MSBuildProjectReferenceExistent)' != '' and '%(_MSBuildProjectReferenceExistent.BuildReference)' == 'true'" ContinueOnError="!$(BuildingProject)" RemoveProperties="%(_MSBuildProjectReferenceExistent.GlobalPropertiesToRemove)$(_GlobalPropertiesToRemoveFromProjectReferences)" />
</Target>
<!--
============================================================
CopyRunEnvironmentFiles
Copy environment files necessary to run the user's app to the final directory.
This is a public target that can be invoked by an IDE.
This may be used by an IDE to make the app.config file available for running
the target app.
============================================================
-->
<Target Name="CopyRunEnvironmentFiles" DependsOnTargets="PrepareForBuild;SetWin32ManifestProperties;_CopyAppConfigFile;_CleanRecordFileWrites" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<!--
============================================================
Run
Run the final build output if it is a .EXE
============================================================
-->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<RunDependsOn />
</PropertyGroup>
<Target Name="Run" DependsOnTargets="$(RunDependsOn)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Error Text="Cannot run '$(TargetPath)' because project output type is not '.exe'" Condition="'$(TargetExt)'!='.exe'" />
<Exec Command="$(TargetPath) $(StartArguments)" WorkingDirectory="$(OutDir)" Condition=" '$(StartWorkingDirectory)' == '' " />
<Exec Command="$(TargetPath) $(StartArguments)" WorkingDirectory="$(StartWorkingDirectory)" Condition=" '$(StartWorkingDirectory)' != '' " />
</Target>
<!--
***********************************************************************************************
***********************************************************************************************
BuildOnlySettings Section
***********************************************************************************************
***********************************************************************************************
-->
<!--
============================================================
BuildOnlySettings
This target is called only when doing a real build. It is specifically not called during project load.
============================================================
-->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<BuildingProject>false</BuildingProject>
</PropertyGroup>
<Target Name="BuildOnlySettings" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<BuildingProject>true</BuildingProject>
</PropertyGroup>
</Target>
<!--
***********************************************************************************************
***********************************************************************************************
PrepareForBuild Section
***********************************************************************************************
***********************************************************************************************
-->
<!--
============================================================
PrepareForBuild
Prepare the prerequisites for building.
============================================================
-->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PrepareForBuildDependsOn>$(PrepareForBuildDependsOn);GetFrameworkPaths;GetReferenceAssemblyPaths;AssignLinkMetadata</PrepareForBuildDependsOn>
</PropertyGroup>
<Target Name="PrepareForBuild" DependsOnTargets="$(PrepareForBuildDependsOn)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<AppConfigWithTargetPath Include="$(AppConfig)" Condition="'$(AppConfig)'!=''">
<TargetPath>$(TargetFileName).config</TargetPath>
</AppConfigWithTargetPath>
</ItemGroup>
<FindAppConfigFile PrimaryList="@(None)" SecondaryList="@(Content)" TargetPath="$(TargetFileName).config" Condition="'$(AppConfig)'==''">
<Output TaskParameter="AppConfigFile" ItemName="AppConfigWithTargetPath" />
<Output TaskParameter="AppConfigFile" PropertyName="AppConfig" />
</FindAppConfigFile>
<!-- Create the directories for intermediate and final build products, and any other arbitrary directories. -->
<!-- We are going to continue on error here so that if the tree is read only we will still get intellisense -->
<MakeDir Directories="$(OutDir);$(IntermediateOutputPath);@(DocFileItem->'%(RelativeDir)');@(CreateDirectory)" ContinueOnError="True" />
</Target>
<!--
============================================================
GetFrameworkPaths
Get the paths for the .NET Framework installation directory
These paths are not used directly by this .targets file but are available for pre and
post build steps.
============================================================
-->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Framework40Dir>@(_TargetFramework40DirectoryItem)</Framework40Dir>
<Framework35Dir>@(_TargetFramework35DirectoryItem)</Framework35Dir>
<Framework30Dir>@(_TargetFramework30DirectoryItem)</Framework30Dir>
<Framework20Dir>@(_TargetFramework20DirectoryItem)</Framework20Dir>
<!-- Note we need to make the 4.0 FrameworkDir point to the 2.0 location by default since we shipped msbuild 4.0 that way and to change it would be a breaking change.-->
<FrameworkDir Condition="'$(FrameworkDir)' == '' and ('$(TargetFrameworkVersion)' == 'v2.0' or '$(TargetFrameworkVersion)' == 'v3.5' or '$(TargetFrameworkVersion)' == 'v4.0')">@(_TargetFramework20DirectoryItem)</FrameworkDir>
<FrameworkDir Condition="'$(FrameworkDir)' == ''">@(_TargetFramework40DirectoryItem)</FrameworkDir>
<TargetedFrameworkDir Condition="'$(TargetedFrameworkDir)' == ''">@(_TargetedFrameworkDirectoryItem)</TargetedFrameworkDir>
<FrameworkSDKDir Condition="'$(FrameworkSDKDir)' == ''">@(_TargetFrameworkSDKDirectoryItem)</FrameworkSDKDir>
<GetFrameworkPathsDependsOn />
</PropertyGroup>
<!-- This is a generally overriden target, for example it is overriden in the Microsoft.NETFramework.targets file -->
<Target Name="GetFrameworkPaths" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<!--
============================================================
GetReferenceAssemblyPaths
Get the paths for the Reference Assemblies for the known versions of the
.NET Framework.
These paths are used by the build process in order to resolve the correct
assemblies from the various directories, and to support multi-targeting
============================================================
-->
<Target Name="GetReferenceAssemblyPaths" DependsOnTargets="$(GetReferenceAssemblyPathsDependsOn);GetFrameworkPaths" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- if TargetFrameworkDirectory doesn't have a custom value, clear it out; that way we can get reference paths and target framework directories all in the right order -->
<PropertyGroup>
<TargetFrameworkDirectory Condition="'@(_CombinedTargetFrameworkDirectoriesItem)' == '$(TargetFrameworkDirectory)'" />
</PropertyGroup>
<!-- By default if there is no root path set then the task will assume it is Program Files\Reference Assemblies\Microsoft\Framework-->
<GetReferenceAssemblyPaths Condition="'$(TargetFrameworkMoniker)' != '' and ('$(_TargetFrameworkDirectories)' == '' or '$(_FullFrameworkReferenceAssemblyPaths)' == '')" TargetFrameworkMoniker="$(TargetFrameworkMoniker)" RootPath="$(TargetFrameworkRootPath)" TargetFrameworkFallbackSearchPaths="$(TargetFrameworkFallbackSearchPaths)" BypassFrameworkInstallChecks="$(BypassFrameworkInstallChecks)">
<Output TaskParameter="ReferenceAssemblyPaths" PropertyName="_TargetFrameworkDirectories" />
<Output TaskParameter="FullFrameworkReferenceAssemblyPaths" PropertyName="_FullFrameworkReferenceAssemblyPaths" />
<Output TaskParameter="TargetFrameworkMonikerDisplayName" PropertyName="TargetFrameworkMonikerDisplayName" Condition="'$(TargetFrameworkMonikerDisplayName)' == ''" />
</GetReferenceAssemblyPaths>
<PropertyGroup>
<TargetFrameworkDirectory>$(_TargetFrameworkDirectories);$(TargetFrameworkDirectory);$(WinFXAssemblyDirectory)</TargetFrameworkDirectory>
<TargetFrameworkDirectory Condition="'$(TargetPlatformWinMDLocation)' != '' and Exists('$(TargetPlatformWinMDLocation)')">$(TargetFrameworkDirectory);$(TargetPlatformWinMDLocation)</TargetFrameworkDirectory>
</PropertyGroup>
<!-- Remove the AssemblyFolders if no target framework directories could be found. This is to prevent us from
resolving from the assemblyfolders global location if we are not acutally targeting a framework-->
<PropertyGroup>
<RemoveAssemblyFoldersIfNoTargetFramework Condition="'$(RemoveAssemblyFoldersIfNoTargetFramework)' == ''">true</RemoveAssemblyFoldersIfNoTargetFramework>
</PropertyGroup>
<PropertyGroup Condition="'$(_TargetFrameworkDirectories)' == '' and '$(AssemblySearchPaths)' != '' and '$(RemoveAssemblyFoldersIfNoTargetFramework)' == 'true'">
<AssemblySearchPaths>$(AssemblySearchPaths.Replace('{AssemblyFolders}', '').Split(';'))</AssemblySearchPaths>
</PropertyGroup>
<ItemGroup Condition="'$(ImplicitlyExpandDesignTimeFacades)' == 'true'">
<DesignTimeFacadeDirectoryRoots Include="$(TargetFrameworkDirectory)" />
<DesignTimeFacadeDirectories Include="%(DesignTimeFacadeDirectoryRoots.Identity)Facades\" Condition="Exists('%(DesignTimeFacadeDirectoryRoots.Identity)Facades\')" />
</ItemGroup>
<PropertyGroup Condition="'@(DesignTimeFacadeDirectories)' != ''">
<TargetFrameworkDirectory>$(TargetFrameworkDirectory);@(DesignTimeFacadeDirectories)</TargetFrameworkDirectory>
</PropertyGroup>
<PropertyGroup Condition="'$(_TargetFrameworkDirectories)' == ''">
<TargetFrameworkProfile />
</PropertyGroup>
</Target>
<!-- Returns target framework moniker. E.g. ".NETFramework,Version=v4.0.1" -->
<Target Name="GetTargetFrameworkMoniker" Returns="$(TargetFrameworkMoniker)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<!-- Returns target framework moniker display name. E.g. ".NET Framework 4 Platform Update 1 (KB2478063)" -->
<Target Name="GetTargetFrameworkMonikerDisplayName" DependsOnTargets="GetFrameworkPaths;GetReferenceAssemblyPaths" Returns="$(TargetFrameworkMonikerDisplayName)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<!-- Returns semicolon separated list of target framework directories.
E.g "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0.1\;C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\" -->
<Target Name="GetTargetFrameworkDirectories" DependsOnTargets="GetFrameworkPaths;GetReferenceAssemblyPaths" Returns="$(TargetFrameworkDirectory)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<!--
============================================================
AssignLinkMetadata
For items of a certain set of whitelisted types, make sure that
if they are defined in a file other than the project file, that
they have "Link" metadata set to an appropriate default.
============================================================
-->
<Target Name="AssignLinkMetadata" Condition=" '$(SynthesizeLinkMetadata)' == 'true' " xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- NONE ITEMS -->
<AssignLinkMetadata Items="@(None)" Condition="'@(None)' != '' and '%(None.DefiningProjectFullPath)' != '$(MSBuildProjectFullPath)'">
<Output TaskParameter="OutputItems" ItemName="_Temp" />
</AssignLinkMetadata>
<ItemGroup>
<None Remove="@(_Temp)" />
<None Include="@(_Temp)" />
<_Temp Remove="@(_Temp)" />
</ItemGroup>
<!-- CONTENT ITEMS -->
<AssignLinkMetadata Items="@(Content)" Condition="'@(Content)' != '' and '%(Content.DefiningProjectFullPath)' != '$(MSBuildProjectFullPath)'">
<Output TaskParameter="OutputItems" ItemName="_Temp" />
</AssignLinkMetadata>
<ItemGroup>
<Content Remove="@(_Temp)" />
<Content Include="@(_Temp)" />
<_Temp Remove="@(_Temp)" />
</ItemGroup>
<!-- PAGE ITEMS -->
<AssignLinkMetadata Items="@(Page)" Condition="'@(Page)' != '' and '%(Page.DefiningProjectFullPath)' != '$(MSBuildProjectFullPath)'">
<Output TaskParameter="OutputItems" ItemName="_Temp" />
</AssignLinkMetadata>
<ItemGroup>
<Page Remove="@(_Temp)" />
<Page Include="@(_Temp)" />
<_Temp Remove="@(_Temp)" />
</ItemGroup>
<!-- APPLICATIONDEFINITION ITEMS -->
<AssignLinkMetadata Items="@(ApplicationDefinition)" Condition="'@(ApplicationDefinition)' != '' and '%(ApplicationDefinition.DefiningProjectFullPath)' != '$(MSBuildProjectFullPath)'">
<Output TaskParameter="OutputItems" ItemName="_Temp" />
</AssignLinkMetadata>
<ItemGroup>
<ApplicationDefinition Remove="@(_Temp)" />
<ApplicationDefinition Include="@(_Temp)" />
<_Temp Remove="@(_Temp)" />
</ItemGroup>
<!-- EMBEDDEDRESOURCE ITEMS -->
<AssignLinkMetadata Items="@(EmbeddedResource)" Condition="'@(EmbeddedResource)' != '' and '%(EmbeddedResource.DefiningProjectFullPath)' != '$(MSBuildProjectFullPath)'">
<Output TaskParameter="OutputItems" ItemName="_Temp" />
</AssignLinkMetadata>
<ItemGroup>
<EmbeddedResource Remove="@(_Temp)" />
<EmbeddedResource Include="@(_Temp)" />
<_Temp Remove="@(_Temp)" />
</ItemGroup>
</Target>
<!--
***********************************************************************************************
***********************************************************************************************
PreBuildEvent Section
***********************************************************************************************
***********************************************************************************************
-->
<!--
============================================================
PreBuildEvent
Run the pre-build event if there is one.
============================================================
-->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PreBuildEventDependsOn />
</PropertyGroup>
<Target Name="PreBuildEvent" Condition="'$(PreBuildEvent)'!=''" DependsOnTargets="$(PreBuildEventDependsOn)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Exec WorkingDirectory="$(OutDir)" Command="$(PreBuildEvent)" />
</Target>
<!--
***********************************************************************************************
***********************************************************************************************
UnmanagedUnregistration Section
***********************************************************************************************
***********************************************************************************************
-->
<!--
============================================================
UnmanagedUnregistration
If the main assembly had previously been registered for COM interop, unregister it now.
We will re-register the new version after it has been built.
============================================================
-->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<UnmanagedUnregistrationDependsOn />
</PropertyGroup>
<Target Name="UnmanagedUnregistration" Condition="(('$(_AssemblyTimestampBeforeCompile)' != '$(_AssemblyTimestampAfterCompile)' or '$(RegisterForComInterop)' != 'true' or '$(OutputType)' != 'library') or&#xD;&#xA; ('$(_AssemblyTimestampBeforeCompile)' == '')) and&#xD;&#xA; Exists('@(_UnmanagedRegistrationCache)')" DependsOnTargets="$(UnmanagedUnregistrationDependsOn)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<UnregisterAssemblyMSBuildArchitecture Condition="'$(UnregisterAssemblyMSBuildArchitecture)' == ''">$(PlatformTargetAsMSBuildArchitecture)</UnregisterAssemblyMSBuildArchitecture>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFrameworkAsMSBuildRuntime)' != '' and '$(UnregisterAssemblyMSBuildArchitecture)' != ''">
<!-- Falling back to the current runtime if we are targeting CLR2 and the task host doesn't exist will lead to
incorrect behavior in some cases, but it's the same incorrect behavior as Visual Studio 2010, and thus better
than causing build breaks on upgrade to Win8 the way not doing so would. For more details, see the
corresponding comment in GenerateResource. -->
<UnregisterAssemblyMSBuildRuntime Condition="'$(UnregisterAssemblyMSBuildRuntime)' == '' and&#xD;&#xA; $([MSBuild]::DoesTaskHostExist(`$(TargetFrameworkAsMSBuildRuntime)`, `$(UnregisterAssemblyMSBuildArchitecture)`))">$(TargetFrameworkAsMSBuildRuntime)</UnregisterAssemblyMSBuildRuntime>
<!-- If the targeted runtime doesn't exist, fall back to current -->
<UnregisterAssemblyMSBuildRuntime Condition="'$(UnregisterAssemblyMSBuildRuntime)' == ''">CurrentRuntime</UnregisterAssemblyMSBuildRuntime>
</PropertyGroup>
<UnregisterAssembly AssemblyListFile="@(_UnmanagedRegistrationCache)" MSBuildArchitecture="$(UnregisterAssemblyMSBuildArchitecture)" MSBuildRuntime="$(UnregisterAssemblyMSBuildRuntime)" />
</Target>
<!--
***********************************************************************************************
***********************************************************************************************
ResolveReferences Section
***********************************************************************************************
***********************************************************************************************
-->
<!--
============================================================
GetTargetFrameworkVersion
This stand-alone target returns the target framework version (i.e. v3.5, v4.0, etc.)
that would be used if we built this project.
============================================================
-->
<Target Name="GetTargetFrameworkVersion" Returns="$(TargetFrameworkVersion)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<!--
============================================================
ResolveReferences
============================================================
-->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ResolveReferencesDependsOn>
BeforeResolveReferences;
AssignProjectConfiguration;
ResolveProjectReferences;
FindInvalidProjectReferences;
ResolveNativeReferences;
ResolveAssemblyReferences;
GenerateBindingRedirects;
ResolveComReferences;
AfterResolveReferences
</ResolveReferencesDependsOn>
</PropertyGroup>
<Target Name="ResolveReferences" Returns="@(ReferencePath)" DependsOnTargets="$(ResolveReferencesDependsOn)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<!--
============================================================
BeforeResolveReferences
Redefine this target in your project in order to run tasks just before ResolveReferences
============================================================
-->
<Target Name="BeforeResolveReferences" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<!--
============================================================
AfterResolveReferences
Redefine this target in your project in order to run tasks just after ResolveReferences
============================================================
-->
<Target Name="AfterResolveReferences" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<!--
============================================================
AssignProjectConfiguration
Assigns the appropriate configuration to each project in the list of project references passed in.
Adds to the project references passed in any project references implied by dependencies expressed in the solution file, if any.
[IN]
@(ProjectReference) - the list of all project references
[OUT]
@(ProjectReferenceWithConfiguration) - the list of project references (MSBuild and potentially VSIP projects)
with metadata values FullConfiguration, Configuration, Platform,
SetConfiguration, and SetPlatform
============================================================
-->
<Target Name="AssignProjectConfiguration" Condition="'$(CurrentSolutionConfigurationContents)' != '' or '@(ProjectReference)'!=''" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<OnlyReferenceAndBuildProjectsEnabledInSolutionConfiguration Condition="'$(OnlyReferenceAndBuildProjectsEnabledInSolutionConfiguration)' == ''">true</OnlyReferenceAndBuildProjectsEnabledInSolutionConfiguration>
<ShouldUnsetParentConfigurationAndPlatform Condition="'$(ShouldUnsetParentConfigurationAndPlatform)' == '' and ('$(BuildingInsideVisualStudio)' == 'true' or '$(BuildingSolutionFile)' == 'true')">true</ShouldUnsetParentConfigurationAndPlatform>
<ShouldUnsetParentConfigurationAndPlatform Condition="'$(ShouldUnsetParentConfigurationAndPlatform)' == ''">false</ShouldUnsetParentConfigurationAndPlatform>
<!-- Web Application projects can "secretly" reference Silverlight projects, which can take project dependencies on that same Web Application. If the project
dependencies are promoted to project references, this ends up creating a situation where we have a circular reference between the two projects. We don't
want this to happen, so just turn off synthetic project reference generation for Silverlight projects. -->
<AddSyntheticProjectReferencesForSolutionDependencies Condition="'$(AddSyntheticProjectReferencesForSolutionDependencies)' == '' and '$(TargetFrameworkIdentifier)' == 'Silverlight'">false</AddSyntheticProjectReferencesForSolutionDependencies>
<!-- Inside VS, we do not need to add synthetic references, as VS already organizes the build per any solution-level dependencies; we only do this on the command line-->
<AddSyntheticProjectReferencesForSolutionDependencies Condition="'$(AddSyntheticProjectReferencesForSolutionDependencies)' == '' and '$(BuildingInsideVisualStudio)' != 'true'">true</AddSyntheticProjectReferencesForSolutionDependencies>
</PropertyGroup>
<!-- Assign a project configuration to each project reference if we're building a solution file. -->
<AssignProjectConfiguration ProjectReferences="@(ProjectReference)" CurrentProject="$(MSBuildProjectFullPath)" CurrentProjectConfiguration="$(Configuration)" CurrentProjectPlatform="$(Platform)" DefaultToVcxPlatformMapping="$(DefaultToVcxPlatformMapping)" VcxToDefaultPlatformMapping="$(VcxToDefaultPlatformMapping)" OutputType="$(OutputType)" ResolveConfigurationPlatformUsingMappings="false" SolutionConfigurationContents="$(CurrentSolutionConfigurationContents)" AddSyntheticProjectReferencesForSolutionDependencies="$(AddSyntheticProjectReferencesForSolutionDependencies)" OnlyReferenceAndBuildProjectsEnabledInSolutionConfiguration="$(OnlyReferenceAndBuildProjectsEnabledInSolutionConfiguration)" ShouldUnsetParentConfigurationAndPlatform="$(ShouldUnsetParentConfigurationAndPlatform)">
<!-- EMITTED FOR COMPATIBILITY REASONS ONLY. CONSUME PROJECTREFERENCEWITHCONFIGURATION INSTEAD -->
<Output TaskParameter="AssignedProjects" ItemName="_ProjectReferenceWithConfiguration" />
<Output TaskParameter="UnassignedProjects" ItemName="_ProjectReferenceWithConfiguration" />
<Output TaskParameter="AssignedProjects" ItemName="ProjectReferenceWithConfiguration" />
<Output TaskParameter="UnassignedProjects" ItemName="ProjectReferenceWithConfiguration" />
</AssignProjectConfiguration>
<ItemGroup>
<_ProjectReferenceWithConfiguration>
<BuildReference Condition="'%(_ProjectReferenceWithConfiguration.BuildReference)' == ''">true</BuildReference>
<ReferenceOutputAssembly Condition="'%(_ProjectReferenceWithConfiguration.ReferenceOutputAssembly)' == ''">true</ReferenceOutputAssembly>
</_ProjectReferenceWithConfiguration>
<ProjectReferenceWithConfiguration>
<BuildReference Condition="'%(ProjectReferenceWithConfiguration.BuildReference)' == ''">true</BuildReference>
<ReferenceOutputAssembly Condition="'%(ProjectReferenceWithConfiguration.ReferenceOutputAssembly)' == ''">true</ReferenceOutputAssembly>
</ProjectReferenceWithConfiguration>
</ItemGroup>
</Target>
<!--
============================================================
_SplitProjectReferencesByFileExistence
Split referenced projects into two lists: those that exist on
disk and those that don't.
============================================================
-->
<Target Name="_SplitProjectReferencesByFileExistence" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!--
Use this task for matching projects with pre-resolved project outputs set by the IDE
if building inside the IDE. The IDE only includes non-MSBuild projects in the output list. We'll
use MSBuild to resolve MSBuild projects.
This task will resolve VSIP (3rd party) project references and create a new item list with only project references
to projects in the MSBuild format.
-->
<ResolveNonMSBuildProjectOutput ProjectReferences="@(ProjectReferenceWithConfiguration)" PreresolvedProjectOutputs="$(VSIDEResolvedNonMSBuildProjectOutputs)" Condition="'$(BuildingInsideVisualStudio)'=='true' and '@(ProjectReferenceWithConfiguration)'!=''">
<Output TaskParameter="ResolvedOutputPaths" ItemName="_ResolvedProjectReferencePaths" />
<Output TaskParameter="UnresolvedProjectReferences" ItemName="_MSBuildProjectReference" />
</ResolveNonMSBuildProjectOutput>
<!--
If building from the command line, simply copy the ProjectReferenceWithConfiguration item list to _MSBuildProjectReference,
since we have to assume all projects are in the MSBuild format. We have no way of building
VSIP (3rd party) projects from the command line.
-->
<ItemGroup>
<_MSBuildProjectReference Include="@(ProjectReferenceWithConfiguration)" Condition="'$(BuildingInsideVisualStudio)'!='true' and '@(ProjectReferenceWithConfiguration)'!=''" />
</ItemGroup>
<!-- Break the project list into two lists: those that exist on disk and those that don't. -->
<ItemGroup>
<_MSBuildProjectReferenceExistent Include="@(_MSBuildProjectReference)" Condition="Exists('%(Identity)')" />
<_MSBuildProjectReferenceNonexistent Include="@(_MSBuildProjectReference)" Condition="!Exists('%(Identity)')" />
</ItemGroup>
</Target>
<!--
====================================================================================
_GetProjectReferenceTargetFrameworkProperties
Builds the GetTargetFrameworks target of all existent project references to get a list
of all supported TargetFrameworks of the referenced projects. Calls the
GetReferenceNearestTargetFrameworkTask to determine the closest match for each project.
This allows a cross-targeting project to select how it should be configured to build
against the most appropriate target for the referring target framework.
======================================================================================
-->
<Target Name="_GetProjectReferenceTargetFrameworkProperties" DependsOnTargets="_AddOutputPathToGlobalPropertiesToRemove" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!--
Select the moniker to send to each project reference if not already set. NugetTargetMoniker (NTM) is preferred by default over
TargetFrameworkMoniker (TFM) because it is required to disambiguate the UWP case where TFM is fixed at .NETCore,Version=v5.0 and
has floating NTM=UAP,Version=vX.Y.Z. However, in other cases (classic PCLs), NTM contains multiple values and that will cause the MSBuild
invocation below to fail by passing invalid properties. Therefore we do not use the NTM if it contains a semicolon.
-->
<PropertyGroup Condition="'$(ReferringTargetFrameworkForProjectReferences)' == ''">
<ReferringTargetFrameworkForProjectReferences Condition="'$(NuGetTargetMoniker)' != '' and !$(NuGetTargetMoniker.Contains(';'))">$(NuGetTargetMoniker)</ReferringTargetFrameworkForProjectReferences>
<ReferringTargetFrameworkForProjectReferences Condition="'$(NuGetTargetMoniker)' == ''">$(TargetFrameworkMoniker)</ReferringTargetFrameworkForProjectReferences>
</PropertyGroup>
<!--
Honor SkipGetTargetFrameworkProperties=true metadata on project references
to mean that the project reference is known not to target multiple frameworks
and the mechanism here for selecting the best one can be skipped as an optimization.
We give this treatment to .vcxproj by default since no .vcxproj can target more
than one framework currently. The user must specify exactly one TargetFramework.
vcxproj files compile down to OS-specific binaries, either native or .NET. In the
_GetProjectReferenceTargetFrameworkProperties target of Microsoft.Common.CurrentVersion.targets,
SkipTargetFrameworkProperties is set to true for vcxproj to account for that.
This means we do not fill the Item _ProjectReferenceTargetFrameworkPossibilities or, by extension,
the AnnotatedProjects Item.
For single-targeted projects, we normally decorate the AnnotatedProjects Item with
UndefineProperties metadata specifying that TargetFramework should be undefined. Because it
isn't defined properly at that stage, however, this does not happen, and TargetFramework is
defined at this point in addition to having been defined globally. Currently, this is always
true for vcxproj.
MSBuild permits building the same project twice as long as it has different sets of global properties.
Because the TargetFramework global property is not being removed as expected by the multitargeting
part of MSBuild, the engine recognizes that there are differences and builds it twice. This can
become more noticeable if the projects build in parallel, since they could try to access the same
resources and conflict, failing the build. Note, however, that building the same project twice in
this way is always wrong even if it seems minor because they do not conflict, and the second build is
relatively fast.
-->
<ItemGroup>
<_MSBuildProjectReferenceExistent Condition="'%(_MSBuildProjectReferenceExistent.SkipGetTargetFrameworkProperties)' == '' and ('%(Extension)' == '.vcxproj' or '%(Extension)' == '.nativeproj')">
<SkipGetTargetFrameworkProperties>true</SkipGetTargetFrameworkProperties>
<UndefineProperties>%(_MSBuildProjectReferenceExistent.UndefineProperties);TargetFramework</UndefineProperties>
</_MSBuildProjectReferenceExistent>
</ItemGroup>
<!--
Allow project references to specify which target framework properties to set and their values
without consulting the referenced project. This has two use cases:
1. A caller may wish to pick a compatible but sub-optimal target framework. For example,
to unit test the .NETStandard implementation using a .NETFramework caller even though
there is also a .NETFramework implementation.
2. As an escape hatch for cases where the compatibility check performed by
GetTargetFrameworkProperties is faulty.
-->
<ItemGroup>
<_MSBuildProjectReferenceExistent Condition="'%(_MSBuildProjectReferenceExistent.SetTargetFramework)' != ''">
<SkipGetTargetFrameworkProperties>true</SkipGetTargetFrameworkProperties>
</_MSBuildProjectReferenceExistent>
</ItemGroup>
<!--
Get reference target framework lists.
Note: A future optimization could cache the closest match and set the target framework on
this MSBuild task invocation. This would (optimistically) save an evaluation of the referenced
project when the answer is the same.
-->
<MSBuild Projects="@(_MSBuildProjectReferenceExistent)" Targets="GetTargetFrameworks" BuildInParallel="$(BuildInParallel)" Properties="%(_MSBuildProjectReferenceExistent.SetConfiguration); %(_MSBuildProjectReferenceExistent.SetPlatform)" ContinueOnError="!$(BuildingProject)" RemoveProperties="%(_MSBuildProjectReferenceExistent.GlobalPropertiesToRemove);TargetFramework;RuntimeIdentifier$(_GlobalPropertiesToRemoveFromProjectReferences)" Condition="'%(_MSBuildProjectReferenceExistent.SkipGetTargetFrameworkProperties)' != 'true'" SkipNonexistentTargets="true">
<Output TaskParameter="TargetOutputs" ItemName="_ProjectReferenceTargetFrameworkPossibilities" />
</MSBuild>
<ItemGroup>
<!--
Preserve the ItemSpec value on the _ProjectReferenceTargetFrameworkPossibilities. Because relative paths in another project
context would be incorrect, the MSBuild task invocation needs expands the project reference paths in the MSBuild task above.
This is generally OK, but if the list is copied the OriginalItemSpec can become the expanded value and cause issues correlating
a project reference back to an Item instance.
-->
<_ProjectReferenceTargetFrameworkPossibilitiesOriginalItemSpec Include="@(_ProjectReferenceTargetFrameworkPossibilities->'%(OriginalItemSpec)')" />
<_ProjectReferenceTargetFrameworkPossibilities Remove="@(_ProjectReferenceTargetFrameworkPossibilities)" />
<_ProjectReferenceTargetFrameworkPossibilities Include="@(_ProjectReferenceTargetFrameworkPossibilitiesOriginalItemSpec)" />
</ItemGroup>
<!-- For each reference, get closest match -->
<!-- Pass the CurrentProjectTargetPlatform parameter to the task only if GetReferenceNearestTargetFrameworkTaskSupportsTargetPlatformParameter is true. This means
that we are using a version of NuGet which supports that parameter on this task. -->
<GetReferenceNearestTargetFrameworkTask AnnotatedProjectReferences="@(_ProjectReferenceTargetFrameworkPossibilities)" CurrentProjectTargetFramework="$(ReferringTargetFrameworkForProjectReferences)" CurrentProjectTargetPlatform="$(TargetPlatformMoniker)" CurrentProjectName="$(MSBuildProjectName)" FallbackTargetFrameworks="$(AssetTargetFallback)" Condition="'@(_ProjectReferenceTargetFrameworkPossibilities-&gt;Count())' != '0' and '$(ReferringTargetFrameworkForProjectReferences)' != ''&#xD;&#xA; And '$(GetReferenceNearestTargetFrameworkTaskSupportsTargetPlatformParameter)' == 'true'">
<Output ItemName="AnnotatedProjects" TaskParameter="AssignedProjects" />
</GetReferenceNearestTargetFrameworkTask>
<GetReferenceNearestTargetFrameworkTask AnnotatedProjectReferences="@(_ProjectReferenceTargetFrameworkPossibilities)" CurrentProjectTargetFramework="$(ReferringTargetFrameworkForProjectReferences)" CurrentProjectName="$(MSBuildProjectName)" FallbackTargetFrameworks="$(AssetTargetFallback)" Condition="'@(_ProjectReferenceTargetFrameworkPossibilities-&gt;Count())' != '0' and '$(ReferringTargetFrameworkForProjectReferences)' != ''&#xD;&#xA; And '$(GetReferenceNearestTargetFrameworkTaskSupportsTargetPlatformParameter)' != 'true'">
<Output ItemName="AnnotatedProjects" TaskParameter="AssignedProjects" />
</GetReferenceNearestTargetFrameworkTask>
<ItemGroup>
<!--
If the task was skipped or the current TargetFramework is empty, AnnotatedProjects will be empty.
In this case, copy _ProjectReferenceTargetFrameworkPossibilities as is. See:
https://github.com/dotnet/sdk/issues/416
-->
<AnnotatedProjects Include="@(_ProjectReferenceTargetFrameworkPossibilities)" Condition="'$(ReferringTargetFrameworkForProjectReferences)' == ''" />
<!-- If the NearestTargetFramework property was set and the project multi-targets, SetTargetFramework must be set. -->
<AnnotatedProjects Condition="'@(AnnotatedProjects)' == '%(Identity)' and '%(AnnotatedProjects.NearestTargetFramework)' != '' and '%(AnnotatedProjects.HasSingleTargetFramework)' != 'true'">
<SetTargetFramework>TargetFramework=%(AnnotatedProjects.NearestTargetFramework)</SetTargetFramework>
</AnnotatedProjects>
<!--
If the NearestTargetFramework property was not set or the project has a single TargetFramework, we need to Undefine
TargetFramework to avoid another project evaluation.
-->
<AnnotatedProjects Condition="'@(AnnotatedProjects)' == '%(Identity)' and ('%(AnnotatedProjects.NearestTargetFramework)' == '' or '%(AnnotatedProjects.HasSingleTargetFramework)' == 'true')">
<UndefineProperties>%(AnnotatedProjects.UndefineProperties);TargetFramework</UndefineProperties>
</AnnotatedProjects>
<!-- If the project is RID agnostic, undefine the RuntimeIdentifier property to avoid another evaluation. -->
<AnnotatedProjects Condition="'@(AnnotatedProjects)' == '%(Identity)' and '%(AnnotatedProjects.IsRidAgnostic)' == 'true'">
<UndefineProperties>%(AnnotatedProjects.UndefineProperties);RuntimeIdentifier</UndefineProperties>
</AnnotatedProjects>
<!--
Remove the items we've touched from _MSBuildProjectReferenceExistent. This will leave all projects where
SkipGetTargetFrameworkProperties was set. Then add all AnnotatedProjects back.
-->
<_MSBuildProjectReferenceExistent Remove="@(_MSBuildProjectReferenceExistent)" Condition="'%(_MSBuildProjectReferenceExistent.SkipGetTargetFrameworkProperties)' != 'true'" />
<_MSBuildProjectReferenceExistent Include="@(AnnotatedProjects)" />
</ItemGroup>
</Target>
<Target Name="GetTargetFrameworks" DependsOnTargets="GetTargetFrameworksWithPlatformForSingleTargetFramework" Returns="@(_ThisProjectBuildMetadata)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Error Condition="'$(IsCrossTargetingBuild)' == 'true'" Text="Internal MSBuild error: Non-CrossTargeting GetTargetFrameworks target should not be used in cross targeting (outer) build" />
<CombineXmlElements RootElementName="AdditionalProjectProperties" XmlElements="@(_TargetFrameworkInfo->'%(AdditionalPropertiesFromProject)')">
<Output TaskParameter="Result" PropertyName="_AdditionalPropertiesFromProject" />
</CombineXmlElements>
<ItemGroup>
<_ThisProjectBuildMetadata Include="$(MSBuildProjectFullPath)">
<TargetFrameworks>@(_TargetFrameworkInfo)</TargetFrameworks>
<TargetFrameworkMonikers>@(_TargetFrameworkInfo->'%(TargetFrameworkMonikers)')</TargetFrameworkMonikers>
<TargetPlatformMonikers>@(_TargetFrameworkInfo->'%(TargetPlatformMonikers)')</TargetPlatformMonikers>
<AdditionalPropertiesFromProject>$(_AdditionalPropertiesFromProject)</AdditionalPropertiesFromProject>
<HasSingleTargetFramework>true</HasSingleTargetFramework>
<!-- indicate to caller that project is RID agnostic so that a global property RuntimeIdentifier value can be removed -->
<IsRidAgnostic>false</IsRidAgnostic>
<IsRidAgnostic Condition=" '$(RuntimeIdentifier)' == '' and '$(RuntimeIdentifiers)' == '' ">true</IsRidAgnostic>
</_ThisProjectBuildMetadata>
</ItemGroup>
</Target>
<Target Name="GetTargetFrameworksWithPlatformForSingleTargetFramework" Returns="@(_TargetFrameworkInfo)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<_AdditionalTargetFrameworkInfoPropertyWithValue Include="@(AdditionalTargetFrameworkInfoProperty)">
<Value>$(%(AdditionalTargetFrameworkInfoProperty.Identity))</Value>
</_AdditionalTargetFrameworkInfoPropertyWithValue>
</ItemGroup>
<CombineTargetFrameworkInfoProperties RootElementName="$(TargetFramework)" PropertiesAndValues="@(_AdditionalTargetFrameworkInfoPropertyWithValue)">
<Output TaskParameter="Result" PropertyName="_AdditionalTargetFrameworkInfoProperties" />
</CombineTargetFrameworkInfoProperties>
<ItemGroup>
<_TargetFrameworkInfo Include="$(TargetFramework)">
<TargetFrameworks>$(TargetFramework)</TargetFrameworks>
<TargetFrameworkMonikers>$(TargetFrameworkMoniker)</TargetFrameworkMonikers>
<TargetPlatformMonikers>$(TargetPlatformMoniker)</TargetPlatformMonikers>
<TargetPlatformMonikers Condition="'$(TargetPlatformMoniker)' == ''">None</TargetPlatformMonikers>
<AdditionalPropertiesFromProject>$(_AdditionalTargetFrameworkInfoProperties)</AdditionalPropertiesFromProject>
</_TargetFrameworkInfo>
</ItemGroup>
</Target>
<!--
============================================================
GetTargetFrameworkProperties
Overrridden by cross-targeting projects to return the set of
properties (in the form "key1=value1;...keyN=valueN") needed
to build it with the best target for the referring project's
target framework.
The referring project's $(TargetFrameworkMoniker) is passed
in as $(ReferringTargetFramework)
-->
<Target Name="GetTargetFrameworkProperties" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<!--
============================================================
PrepareProjectReferences
Prepares project references for consumption by other targets.
[IN]
@(ProjectReference) - The list of project references.
[OUT]
@(ProjectReferenceWithConfiguration) - Project references with apporpriate metadata
@(_MSBuildProjectReferenceExistent) - Subset of @(ProjectReferenceWithConfiguration) that exist
with added SetTargetFramework metadata for cross-targeting
@(_MSBuildProjectReferenceNonExistent) - Subset of @(ProjectReferenceWithConfiguration) that do not exist
============================================================
-->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PrepareProjectReferencesDependsOn>
AssignProjectConfiguration;
_SplitProjectReferencesByFileExistence;
_GetProjectReferenceTargetFrameworkProperties
</PrepareProjectReferencesDependsOn>
</PropertyGroup>
<Target Name="PrepareProjectReferences" DependsOnTargets="$(PrepareProjectReferencesDependsOn)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<!--
============================================================
ResolveProjectReferences
Build referenced projects:
[IN]
@(ProjectReferenceWithConfiguration) - The list of project references.
[OUT]
@(_ResolvedNativeProjectReferencePaths) - Paths to referenced native projects.
@(_ResolvedProjectReferencePaths) - Paths to referenced managed projects.
============================================================
-->
<!-- By default, the outputs of project references are passed to the compiler -->
<ItemDefinitionGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ProjectReference>
<!-- Target to build in the project reference; by default, this property is blank, indicating the default targets-->
<Targets>$(ProjectReferenceBuildTargets)</Targets>
<!-- Extra item type to emit outputs of the destination into. Defaults to blank. To emit only into this list, set the ReferenceOutputAssembly metadata to false as well. -->
<OutputItemType />
<ReferenceSourceTarget>ProjectReference</ReferenceSourceTarget>
</ProjectReference>
</ItemDefinitionGroup>
<Target Name="ResolveProjectReferences" DependsOnTargets="PrepareProjectReferences" Returns="@(_ResolvedNativeProjectReferencePaths);@(_ResolvedProjectReferencePaths)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!--
When building this project from the IDE, just gather the referenced build outputs.
The IDE will already have built the project, so there's no need to do it again here.
The ContinueOnError setting is here so that, during project load, as
much information as possible will be passed to the compilers.
-->
<MSBuild Projects="@(_MSBuildProjectReferenceExistent)" Targets="GetTargetPath" BuildInParallel="$(BuildInParallel)" Properties="%(_MSBuildProjectReferenceExistent.SetConfiguration); %(_MSBuildProjectReferenceExistent.SetPlatform); %(_MSBuildProjectReferenceExistent.SetTargetFramework)" Condition="'%(_MSBuildProjectReferenceExistent.BuildReference)' == 'true' and '@(ProjectReferenceWithConfiguration)' != '' and ('$(BuildingInsideVisualStudio)' == 'true' or '$(BuildProjectReferences)' != 'true') and '$(VisualStudioVersion)' != '10.0' and '@(_MSBuildProjectReferenceExistent)' != ''" ContinueOnError="!$(BuildingProject)" RemoveProperties="%(_MSBuildProjectReferenceExistent.GlobalPropertiesToRemove)$(_GlobalPropertiesToRemoveFromProjectReferences)">
<Output TaskParameter="TargetOutputs" ItemName="_ResolvedProjectReferencePaths" Condition="'%(_MSBuildProjectReferenceExistent.ReferenceOutputAssembly)'=='true'" />
<Output TaskParameter="TargetOutputs" ItemName="%(_MSBuildProjectReferenceExistent.OutputItemType)" Condition="'%(_MSBuildProjectReferenceExistent.OutputItemType)' != ''" />
</MSBuild>
<!--
Build referenced projects when building from the command line.
-->
<MSBuild Projects="@(_MSBuildProjectReferenceExistent)" Targets="%(_MSBuildProjectReferenceExistent.Targets)" BuildInParallel="$(BuildInParallel)" Properties="%(_MSBuildProjectReferenceExistent.SetConfiguration); %(_MSBuildProjectReferenceExistent.SetPlatform); %(_MSBuildProjectReferenceExistent.SetTargetFramework)" Condition="'%(_MSBuildProjectReferenceExistent.BuildReference)' == 'true' and '@(ProjectReferenceWithConfiguration)' != '' and '$(BuildingInsideVisualStudio)' != 'true' and '$(BuildProjectReferences)' == 'true' and '@(_MSBuildProjectReferenceExistent)' != ''" ContinueOnError="$(ContinueOnError)" RemoveProperties="%(_MSBuildProjectReferenceExistent.GlobalPropertiesToRemove)$(_GlobalPropertiesToRemoveFromProjectReferences)">
<Output TaskParameter="TargetOutputs" ItemName="_ResolvedProjectReferencePaths" Condition="'%(_MSBuildProjectReferenceExistent.ReferenceOutputAssembly)'=='true' or '$(DesignTimeBuild)' == 'true'" />
<Output TaskParameter="TargetOutputs" ItemName="%(_MSBuildProjectReferenceExistent.OutputItemType)" Condition="'%(_MSBuildProjectReferenceExistent.OutputItemType)' != ''" />
</MSBuild>
<!--
Get manifest items from the (non-exe) built project references (to feed them into ResolveNativeReference).
-->
<MSBuild Projects="@(_MSBuildProjectReferenceExistent)" Targets="GetNativeManifest" BuildInParallel="$(BuildInParallel)" Properties="%(_MSBuildProjectReferenceExistent.SetConfiguration); %(_MSBuildProjectReferenceExistent.SetPlatform); %(_MSBuildProjectReferenceExistent.SetTargetFramework)" Condition="'%(_MSBuildProjectReferenceExistent.BuildReference)' == 'true' and '@(ProjectReferenceWithConfiguration)' != '' and '$(BuildingProject)' == 'true' and '@(_MSBuildProjectReferenceExistent)' != ''" ContinueOnError="$(ContinueOnError)" SkipNonexistentTargets="true" RemoveProperties="%(_MSBuildProjectReferenceExistent.GlobalPropertiesToRemove)$(_GlobalPropertiesToRemoveFromProjectReferences)">
<Output TaskParameter="TargetOutputs" ItemName="NativeReference" Condition="'%(_MSBuildProjectReferenceExistent.ReferenceOutputAssembly)' == 'true'" />
</MSBuild>
<ItemGroup>
<_ResolvedProjectReferencePaths Remove="@(_ResolvedProjectReferencePaths)" Condition="'%(_ResolvedProjectReferencePaths.ResolveableAssembly)' == 'false'" />
<!--
Copy OriginalItemSpec to OriginalProjectReferenceItemSpec, so that when ResolveAssemblyReferences
takes these items and resolves them to ReferencePath, we can still recover the _real_ OriginalItemSpec
for the unresolved reference items.
-->
<_ResolvedProjectReferencePaths>
<OriginalProjectReferenceItemSpec>%(_ResolvedProjectReferencePaths.OriginalItemSpec)</OriginalProjectReferenceItemSpec>
</_ResolvedProjectReferencePaths>
</ItemGroup>
<!-- Issue a warning for each non-existent project. -->
<Warning Text="The referenced project '%(_MSBuildProjectReferenceNonexistent.Identity)' does not exist." Condition="'@(ProjectReferenceWithConfiguration)' != '' and '@(_MSBuildProjectReferenceNonexistent)' != ''" />
</Target>
<Target Name="ResolveProjectReferencesDesignTime" Returns="@(_ProjectReferencesFromRAR);@(_ResolvedNativeProjectReferencePaths)" DependsOnTargets="ResolveProjectReferences;ResolveAssemblyReferences" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- We need to do this here because we only want project references which have passed through rar and have not been unresolved due to violating some MT rule
which means we need to pull the project references out of the referencepath item because they will only exist there if they were correctly resolved.
-->
<ItemGroup>
<_ProjectReferencesFromRAR Include="@(ReferencePath-&gt;WithMetadataValue('ReferenceSourceTarget', 'ProjectReference'))">
<OriginalItemSpec>%(ReferencePath.ProjectReferenceOriginalItemSpec)</OriginalItemSpec>
</_ProjectReferencesFromRAR>
</ItemGroup>
</Target>
<Target Name="ExpandSDKReferencesDesignTime" Returns="@(ReferencesFromSDK)" DependsOnTargets="ExpandSDKReferences" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<!--
============================================================
GetTargetPath
This target returns an item containing the build product (i.e. EXE, DLL)
that would be produced if we built this project, with some relevant
metadata.
============================================================
-->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<GetTargetPathDependsOn>$(GetTargetPathDependsOn)</GetTargetPathDependsOn>
</PropertyGroup>
<Target Name="GetTargetPath" DependsOnTargets="$(GetTargetPathDependsOn)" Returns="@(TargetPathWithTargetPlatformMoniker)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<!--
============================================================
GetTargetPathWithTargetPlatformMoniker
This stand-alone target returns the name and version of the target platform for this project.
NOTE: The ProjectReference protocol uses only GetTargetPath. Computing the item
in this target allows projects to override GetTargetPath without having to reimplement
the details of the metadata computation.
============================================================
-->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<GetTargetPathWithTargetPlatformMonikerDependsOn>$(GetTargetPathDependsOn)</GetTargetPathWithTargetPlatformMonikerDependsOn>
</PropertyGroup>
<!--NOTE: since an overridden GetTargetPath might not include a DependsOn
for this target, it's safer to establish the dependency here with a
BeforeTargets. -->
<Target Name="GetTargetPathWithTargetPlatformMoniker" BeforeTargets="GetTargetPath" DependsOnTargets="$(GetTargetPathWithTargetPlatformMonikerDependsOn)" Returns="@(TargetPathWithTargetPlatformMoniker)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<TargetPathWithTargetPlatformMoniker Include="$(TargetPath)">
<TargetPlatformMoniker>$(TargetPlatformMoniker)</TargetPlatformMoniker>
<TargetPlatformIdentifier>$(TargetPlatformIdentifier)</TargetPlatformIdentifier>
<TargetFrameworkIdentifier>$(TargetFrameworkIdentifier)</TargetFrameworkIdentifier>
<TargetFrameworkVersion>$(TargetFrameworkVersion.TrimStart('vV'))</TargetFrameworkVersion>
<ReferenceAssembly Condition="'$(ProduceReferenceAssembly)' == 'true'">$(TargetRefPath)</ReferenceAssembly>
<CopyUpToDateMarker>@(CopyUpToDateMarker)</CopyUpToDateMarker>
</TargetPathWithTargetPlatformMoniker>
</ItemGroup>
</Target>
<!--
============================================================
GetNativeManifest
Compute the manifest item for this project.
[IN]
$(_DeploymentApplicationManifestIdentity) - the manifest identity
@(ApplicationManifest) - the original application manifest item
[OUT]
@(ComputedApplicationManifest) - application manifest item with full hint path, if generated
============================================================
-->
<Target Name="GetNativeManifest" Returns="@(ComputedApplicationManifest)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<ComputedApplicationManifest Include="$(_DeploymentApplicationManifestIdentity)" Condition="'$(OutputType)'!='winexe' and '$(OutputType)'!='exe' and '$(OutputType)'!='appcontainerexe' and Exists('%(_ApplicationManifestFinal.FullPath)')">
<HintPath>%(_ApplicationManifestFinal.FullPath)</HintPath>
</ComputedApplicationManifest>
</ItemGroup>
</Target>
<!--
============================================================
ResolveNativeReferences
Resolve native references
[IN]
@(NativeReference) - The manifest reference (or list of manifest references)
[OUT]
@(NativeReferenceFile) - List of manifest files referenced.
@(_DeploymentNativePrerequisite) - List of native assembly prerequisites contained in the manifest.
@(ComClassReference) - List of COM components contained in the manifest.
@(COMReferenceFromNative) List of type libraries contained in the manifest.
@(COMFileReference) - List of loose files contained in the manifest.
@(_DeploymentLooseManifestFile) - List of extra files that should be published.
============================================================
-->
<Target Name="ResolveNativeReferences" Condition="'@(NativeReference)'!=''" DependsOnTargets="ResolveProjectReferences" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ResolveNativeReference NativeReferences="@(NativeReference)" AdditionalSearchPaths="$(ReferencePath);$(OutDir)">
<Output TaskParameter="ContainingReferenceFiles" ItemName="NativeReferenceFile" />
<Output TaskParameter="ContainedPrerequisiteAssemblies" ItemName="_DeploymentNativePrerequisite" />
<Output TaskParameter="ContainedComComponents" ItemName="ComClassReference" />
<Output TaskParameter="ContainedTypeLibraries" ItemName="COMReferenceFromNative" />
<Output TaskParameter="ContainedLooseTlbFiles" ItemName="COMFileReference" />
<Output TaskParameter="ContainedLooseEtcFiles" ItemName="_DeploymentLooseManifestFile" />
</ResolveNativeReference>
</Target>
<!--
============================================================
ResolveAssemblyReferences
Given the list of assemblies, find the closure of all assemblies that they depend on. These are
what we need to copy to the output directory.
[IN]
@(Reference) - List of assembly references as fusion names.
@(_ResolvedProjectReferencePaths) - List of project references produced by projects that this project depends on.
The 'Private' attribute on the reference corresponds to the Copy Local flag in IDE.
The 'Private' flag can have three possible values:
- 'True' means the reference should be Copied Local
- 'False' means the reference should not be Copied Local
- [Missing] means this task will decide whether to treat this reference as CopyLocal or not.
[OUT]
@(ReferencePath) - Paths to resolved primary files.
@(ReferenceDependencyPaths) - Paths to resolved dependency files.
@(_ReferenceRelatedPaths) - Paths to .xmls and .pdbs.
@(ReferenceSatellitePaths) - Paths to satellites.
@(_ReferenceSerializationAssemblyPaths) - Paths to XML serialization assemblies created by sgen.
@(_ReferenceScatterPaths) - Paths to scatter files.
@(ReferenceCopyLocalPaths) - Paths to files that should be copied to the local directory.
============================================================
-->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ResolveAssemblyReferencesDependsOn>
ResolveProjectReferences;
FindInvalidProjectReferences;
GetFrameworkPaths;
GetReferenceAssemblyPaths;
PrepareForBuild;
ResolveSDKReferences;
ExpandSDKReferences;
</ResolveAssemblyReferencesDependsOn>
</PropertyGroup>
<Target Name="ResolveAssemblyReferences" Returns="@(ReferencePath)" DependsOnTargets="$(ResolveAssemblyReferencesDependsOn)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<_ReferenceInstalledAssemblyDirectory Include="$(TargetFrameworkDirectory)" />
<_ReferenceInstalledAssemblySubsets Include="$(TargetFrameworkSubset)" />
</ItemGroup>
<!--
Only read and write cache file at build time, skip it for load time because its more
expensive to write the newly created cache file.
-->
<PropertyGroup>
<ResolveAssemblyReferencesStateFile Condition="'$(DisableRarCache)'!='true' and '$(ResolveAssemblyReferencesStateFile)' == ''">$(IntermediateOutputPath)$(MSBuildProjectFile).AssemblyReference.cache</ResolveAssemblyReferencesStateFile>
</PropertyGroup>
<!-- Make an App.Config item that exists when AutoUnify is false. -->
<ItemGroup>
<_ResolveAssemblyReferencesApplicationConfigFileForExes Include="@(AppConfigWithTargetPath)" Condition="'$(AutoGenerateBindingRedirects)'=='true' or '$(AutoUnifyAssemblyReferences)'=='false'" />
</ItemGroup>
<PropertyGroup>
<!-- Default in task is true -->
<_FindDependencies Condition="'$(BuildingProject)' != 'true' and '$(_ResolveReferenceDependencies)' != 'true'">false</_FindDependencies>
<ResolveAssemblyReferencesSilent Condition="'$(ResolveAssemblyReferencesSilent)' == '' and '$(TraceDesignTime)' != 'true' and '$(BuildingProject)' == 'false'">true</ResolveAssemblyReferencesSilent>
<ResolveAssemblyReferencesSilent Condition="'$(ResolveAssemblyReferencesSilent)' == ''">false</ResolveAssemblyReferencesSilent>
<ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch Condition="'$(ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch)' == ''">Warning</ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
<ResolveAssemblyReferencesFindRelatedSatellites Condition="'$(ResolveAssemblyReferencesFindRelatedSatellites)' == ''">$(BuildingProject)</ResolveAssemblyReferencesFindRelatedSatellites>
<ResolveAssemblyReferencesFindSerializationAssemblies Condition="'$(ResolveAssemblyReferencesFindSerializationAssemblies)' == ''">$(BuildingProject)</ResolveAssemblyReferencesFindSerializationAssemblies>
<ResolveAssemblyReferencesFindRelatedFiles Condition="'$(ResolveAssemblyReferencesFindRelatedFiles)' == ''">$(BuildingProject)</ResolveAssemblyReferencesFindRelatedFiles>
<ResolveAssemblyReferenceOutputUnresolvedAssemblyConflicts Condition="'$(ResolveAssemblyReferenceOutputUnresolvedAssemblyConflicts)' == ''">false</ResolveAssemblyReferenceOutputUnresolvedAssemblyConflicts>
</PropertyGroup>
<ItemGroup>
<!-- Remove any references which we have added as explicit reference so that we do not get duplicates. We need to make sure we do not have duplicates
because this confuses the IDE when it tries to compare the list of references passed in to the list of resolved references. If it does not match then the
ide will show one of the references as not resolved, this will not break the build but is a display issue -->
<Reference Remove="$(AdditionalExplicitAssemblyReferences)" />
<Reference Include="$(AdditionalExplicitAssemblyReferences)">
<Implicit>true</Implicit>
</Reference>
</ItemGroup>
<!--
Normally, as an optimization, finding dependencies of references marked with ExternallyResolved=true metadata is skipped.
However, skipping that step breaks binding redirect generation when there are conflicting versions within the externally
resolved graph.
-->
<PropertyGroup Condition="'$(FindDependenciesOfExternallyResolvedReferences)' == ''">
<FindDependenciesOfExternallyResolvedReferences>false</FindDependenciesOfExternallyResolvedReferences>
<FindDependenciesOfExternallyResolvedReferences Condition="'$(AutoGenerateBindingRedirects)' == 'true'">true</FindDependenciesOfExternallyResolvedReferences>
</PropertyGroup>
<ResolveAssemblyReference Assemblies="@(Reference)" AssemblyFiles="@(_ResolvedProjectReferencePaths);@(_ExplicitReference)" TargetFrameworkDirectories="@(_ReferenceInstalledAssemblyDirectory)" InstalledAssemblyTables="@(InstalledAssemblyTables);@(RedistList)" IgnoreDefaultInstalledAssemblyTables="$(IgnoreDefaultInstalledAssemblyTables)" IgnoreDefaultInstalledAssemblySubsetTables="$(IgnoreInstalledAssemblySubsetTables)" CandidateAssemblyFiles="@(Content);@(None)" SearchPaths="$(AssemblySearchPaths)" AllowedAssemblyExtensions="$(AllowedReferenceAssemblyFileExtensions)" AllowedRelatedFileExtensions="$(AllowedReferenceRelatedFileExtensions)" TargetProcessorArchitecture="$(ProcessorArchitecture)" AppConfigFile="@(_ResolveAssemblyReferencesApplicationConfigFileForExes)" AutoUnify="$(AutoUnifyAssemblyReferences)" SupportsBindingRedirectGeneration="$(GenerateBindingRedirectsOutputType)" IgnoreVersionForFrameworkReferences="$(IgnoreVersionForFrameworkReferences)" FindDependencies="$(_FindDependencies)" FindSatellites="$(ResolveAssemblyReferencesFindRelatedSatellites)" FindSerializationAssemblies="$(ResolveAssemblyReferencesFindSerializationAssemblies)" FindRelatedFiles="$(ResolveAssemblyReferencesFindRelatedFiles)" Silent="$(ResolveAssemblyReferencesSilent)" TargetFrameworkVersion="$(TargetFrameworkVersion)" TargetFrameworkMoniker="$(TargetFrameworkMoniker)" TargetFrameworkMonikerDisplayName="$(TargetFrameworkMonikerDisplayName)" TargetedRuntimeVersion="$(TargetedRuntimeVersion)" StateFile="$(ResolveAssemblyReferencesStateFile)" AssemblyInformationCachePaths="$(AssemblyInformationCachePaths)" AssemblyInformationCacheOutputPath="$(AssemblyInformationCacheOutputPath)" InstalledAssemblySubsetTables="@(InstalledAssemblySubsetTables)" TargetFrameworkSubsets="@(_ReferenceInstalledAssemblySubsets)" FullTargetFrameworkSubsetNames="$(FullReferenceAssemblyNames)" FullFrameworkFolders="$(_FullFrameworkReferenceAssemblyPaths)" FullFrameworkAssemblyTables="@(FullFrameworkAssemblyTables)" ProfileName="$(TargetFrameworkProfile)" LatestTargetFrameworkDirectories="@(LatestTargetFrameworkDirectories)" CopyLocalDependenciesWhenParentReferenceInGac="$(CopyLocalDependenciesWhenParentReferenceInGac)" DoNotCopyLocalIfInGac="$(DoNotCopyLocalIfInGac)" ResolvedSDKReferences="@(ResolvedSDKReference)" WarnOrErrorOnTargetArchitectureMismatch="$(ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch)" IgnoreTargetFrameworkAttributeVersionMismatch="$(ResolveAssemblyReferenceIgnoreTargetFrameworkAttributeVersionMismatch)" FindDependenciesOfExternallyResolvedReferences="$(FindDependenciesOfExternallyResolvedReferences)" ContinueOnError="$(ContinueOnError)" OutputUnresolvedAssemblyConflicts="$(ResolveAssemblyReferenceOutputUnresolvedAssemblyConflicts)" Condition="'@(Reference)'!='' or '@(_ResolvedProjectReferencePaths)'!='' or '@(_ExplicitReference)' != ''">
<Output TaskParameter="ResolvedFiles" ItemName="ReferencePath" />
<Output TaskParameter="ResolvedFiles" ItemName="_ResolveAssemblyReferenceResolvedFiles" />
<Output TaskParameter="ResolvedDependencyFiles" ItemName="ReferenceDependencyPaths" />
<Output TaskParameter="RelatedFiles" ItemName="_ReferenceRelatedPaths" />
<Output TaskParameter="SatelliteFiles" ItemName="ReferenceSatellitePaths" />
<Output TaskParameter="SerializationAssemblyFiles" ItemName="_ReferenceSerializationAssemblyPaths" />
<Output TaskParameter="ScatterFiles" ItemName="_ReferenceScatterPaths" />
<Output TaskParameter="CopyLocalFiles" ItemName="ReferenceCopyLocalPaths" />
<Output TaskParameter="SuggestedRedirects" ItemName="SuggestedBindingRedirects" />
<Output TaskParameter="FilesWritten" ItemName="FileWrites" />
<Output TaskParameter="DependsOnSystemRuntime" PropertyName="DependsOnSystemRuntime" />
<Output TaskParameter="DependsOnNETStandard" PropertyName="_DependsOnNETStandard" />
<Output TaskParameter="UnresolvedAssemblyConflicts" ItemName="ResolveAssemblyReferenceUnresolvedAssemblyConflicts" />
</ResolveAssemblyReference>
</Target>
<!--
============================================================
FindReferenceAssembliesForReferences
Given the list of references, create a list of assemblies to pass to the compiler that
includes reference assemblies rather than implementation assemblies where possible.
[IN]
@(ReferencePath) - List of assembly references as resolved paths with ReferenceAssembly metadata
[OUT]
@(ReferencePathWithRefAssemblies) - Paths to resolved reference (or implementation) assemblies.
============================================================
-->
<Target Name="FindReferenceAssembliesForReferences" DependsOnTargets="ResolveReferences" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<!-- Reference assemblies are not produced in all cases, but it's easier to consume them
if this metadatum is always populated. Ensure that it points to the implementation
assembly unless already specified. -->
<ReferencePath Condition="'%(ReferencePath.ReferenceAssembly)' == ''">
<ReferenceAssembly>%(FullPath)</ReferenceAssembly>
</ReferencePath>
<ReferencePathWithRefAssemblies Include="@(ReferencePath->'%(ReferenceAssembly)')" Condition="'$(CompileUsingReferenceAssemblies)' != 'false'">
<OriginalPath Condition="'%(ReferencePath.Identity)' != '@(ReferencePath->'%(ReferenceAssembly)')'">%(ReferencePath.Identity)</OriginalPath>
</ReferencePathWithRefAssemblies>
<ReferencePathWithRefAssemblies Include="@(ReferencePath)" Condition="'$(CompileUsingReferenceAssemblies)' == 'false'" />
</ItemGroup>
</Target>
<!--
====================================================================================================
GenerateBindingRedirects
Inject the binding redirects into the app config file based on suggested redirects as output from
ResolveAssemblyReferences.
[IN]
@(AppConfigWithTargetPath) - Path to the source app config file. This can be null if the project
doesn't contain an app config file.
$(TargetFileName) - The file name of the build target.
[OUT]
@(OutputAppConfigFile) - Path to the output app config file in the intermediate directory.
====================================================================================================
-->
<Target Name="GenerateBindingRedirects" Inputs="$(MSBuildAllProjects);@(AppConfigFile);$(ResolveAssemblyReferencesStateFile);$(IntermediateOutputPath);@(SuggestedBindingRedirects)" Outputs="$(_GenerateBindingRedirectsIntermediateAppConfig)" Condition="'$(AutoGenerateBindingRedirects)' == 'true' and '$(GenerateBindingRedirectsOutputType)' == 'true'" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<GenerateBindingRedirects AppConfigFile="@(AppConfigWithTargetPath)" TargetName="$(TargetFileName).config" OutputAppConfigFile="$(_GenerateBindingRedirectsIntermediateAppConfig)" SuggestedRedirects="@(SuggestedBindingRedirects)">
<Output TaskParameter="OutputAppConfigFile" ItemName="FileWrites" />
</GenerateBindingRedirects>
</Target>
<!--
====================================================================================================
GenerateBindingRedirectsUpdateAppConfig
Updates the project to use the generated app.config content. This needs to run regardless of
inputs/outputs so it is seperate from GenerateBindingRedirects.
====================================================================================================
-->
<Target Name="GenerateBindingRedirectsUpdateAppConfig" AfterTargets="GenerateBindingRedirects" Condition="'$(AutoGenerateBindingRedirects)' == 'true' and '$(GenerateBindingRedirectsOutputType)' == 'true' and Exists('$(_GenerateBindingRedirectsIntermediateAppConfig)')" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<AppConfig>$(_GenerateBindingRedirectsIntermediateAppConfig)</AppConfig>
</PropertyGroup>
<ItemGroup>
<AppConfigWithTargetPath Remove="@(AppConfigWithTargetPath)" />
<AppConfigWithTargetPath Include="$(AppConfig)">
<TargetPath>$(TargetFileName).config</TargetPath>
</AppConfigWithTargetPath>
</ItemGroup>
</Target>
<!--
===========================================================================================
GetInstalledSDKs
Gets the list of SDKs installed in the SDKDirectoryRoot and SDKRegistryRoot locations
These paths are used by the ResolveSDKReference task and the ResolveAssemblyReference task.
===========================================================================================
-->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<SDKReferenceRegistryRoot Condition="'$(SDKReferenceRegistryRoot)' == ''">Software\Microsoft\Microsoft SDKs</SDKReferenceRegistryRoot>
<SDKReferenceDirectoryRoot Condition="'$(SDKReferenceDirectoryRoot)' == ''">$(LocalAppData)\Microsoft SDKs;$(MSBuildProgramFiles32)\Microsoft SDKs</SDKReferenceDirectoryRoot>
<!-- Manifest driven extension SDK locations -->
<SDKExtensionDirectoryRoot Condition="'$(SDKExtensionDirectoryRoot)' == '' and '$(SDKIdentifier)' != ''">$(MSBuildProgramFiles32)\Microsoft SDKs\Windows Kits\10;$(MSBuildProgramFiles32)\Windows Kits\10</SDKExtensionDirectoryRoot>
<!-- UAP projects by default should support Windows 8.1 SDKs -->
<SupportWindows81SDKs Condition="'$(SupportWindows81SDKs)' == '' and '$(Support81SDKs)' != 'false' and '$(TargetPlatformIdentifier)' == 'UAP'">true</SupportWindows81SDKs>
<TargetPlatformIdentifierWindows81 Condition="'$(TargetPlatformIdentifierWindows81)' == '' and '$(SupportWindows81SDKs)' == 'true'">Windows</TargetPlatformIdentifierWindows81>
<TargetPlatformVersionWindows81 Condition="'$(TargetPlatformVersionWindows81)' == '' and '$(SupportWindows81SDKs)' == 'true'">8.1</TargetPlatformVersionWindows81>
<!-- Desktop and phone SDKs often have the exact same identifiers, don't enable phone by default -->
<SupportWindowsPhone81SDKs Condition="'$(SupportWindowsPhone81SDKs)' == '' and '$(Support81SDKs)' != 'false' and '$(TargetPlatformIdentifier)' == 'UAP'">false</SupportWindowsPhone81SDKs>
<TargetPlatformIdentifierWindowsPhone81 Condition="'$(TargetPlatformIdentifierWindowsPhone81)' == '' and '$(SupportWindowsPhone81SDKs)' == 'true'">WindowsPhoneApp</TargetPlatformIdentifierWindowsPhone81>
<TargetPlatformVersionWindowsPhone81 Condition="'$(TargetPlatformVersionWindowsPhone81)' == '' and '$(SupportWindowsPhone81SDKs)' == 'true'">8.1</TargetPlatformVersionWindowsPhone81>
</PropertyGroup>
<Target Name="GetInstalledSDKLocations" Condition="'@(SDKReference)' != ''" DependsOnTargets="$(GetInstalledSDKLocationsDependsOn)" Returns="@(InstalledSDKLocations)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<GetInstalledSDKLocations SDKDirectoryRoots="$(SDKReferenceDirectoryRoot)" SDKExtensionDirectoryRoots="$(SDKExtensionDirectoryRoot)" SDKRegistryRoot="$(SDKReferenceRegistryRoot)" TargetPlatformVersion="$(TargetPlatformVersion)" TargetPlatformIdentifier="$(TargetPlatformIdentifier)">
<Output TaskParameter="InstalledSDKs" ItemName="InstalledSDKLocations" />
</GetInstalledSDKLocations>
<!-- Also lookup 8.1 SDKs if requested -->
<GetInstalledSDKLocations SDKDirectoryRoots="$(SDKReferenceDirectoryRoot)" SDKExtensionDirectoryRoots="" SDKRegistryRoot="$(SDKReferenceRegistryRoot)" TargetPlatformVersion="$(TargetPlatformVersionWindows81)" TargetPlatformIdentifier="$(TargetPlatformIdentifierWindows81)" Condition="'$(SupportWindows81SDKs)' == 'true' and '$(TargetPlatformIdentifierWindows81)' != '' and '$(TargetPlatformVersionWindows81)' != ''" WarnWhenNoSDKsFound="false">
<Output TaskParameter="InstalledSDKs" ItemName="InstalledSDKLocations" />
</GetInstalledSDKLocations>
<GetInstalledSDKLocations SDKDirectoryRoots="$(SDKReferenceDirectoryRoot)" SDKExtensionDirectoryRoots="" SDKRegistryRoot="$(SDKReferenceRegistryRoot)" TargetPlatformVersion="$(TargetPlatformVersionWindowsPhone81)" TargetPlatformIdentifier="$(TargetPlatformIdentifierWindowsPhone81)" Condition="'$(SupportWindowsPhone81SDKs)' == 'true' and '$(TargetPlatformIdentifierWindowsPhone81)' != '' and '$(TargetPlatformVersionWindowsPhone81)' != ''" WarnWhenNoSDKsFound="false">
<Output TaskParameter="InstalledSDKs" ItemName="InstalledSDKLocations" />
</GetInstalledSDKLocations>
</Target>
<!--
============================================================
ResolveSDKReferences
Given a list of SDKReference items and a list of resolved winmd files which may contain metadata as to which sdk they came from
we need to find the sdk root folders on disk and populate a ResolvedSDKReference item which has the full path to the SDK ROOT
and the sdk identity as a piece of metadata.
[IN]
@(SDKReference) - List of sdk references (the identity in the sdk manifest file).
@(ReferencePath) -List of resolved assemblies, we are interested in the ones which have IsWinMDFile set to true.
[OUT]
@(ResolvedSDKReference) - Full path to the root of the SDK
============================================================
-->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ResolveSDKReferencesDependsOn>
GetInstalledSDKLocations
</ResolveSDKReferencesDependsOn>
</PropertyGroup>
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<TargetedSDKConfiguration Condition="'$(TargetedSDKConfiguration)' == '' and '_$(Configuration)' == '_Debug'">Debug</TargetedSDKConfiguration>
<TargetedSDKConfiguration Condition="'$(TargetedSDKConfiguration)' == '' and '_$(Configuration)' == '_Release'">Retail</TargetedSDKConfiguration>
<TargetedSDKConfiguration Condition="'$(TargetedSDKConfiguration)' == ''">Retail</TargetedSDKConfiguration>
<TargetedSDKArchitecture Condition="'$(TargetedSDKArchitecture)' == ''">$(ProcessorArchitecture)</TargetedSDKArchitecture>
<TargetedSDKArchitecture Condition="'$(TargetedSDKArchitecture)' == ''">Neutral</TargetedSDKArchitecture>
</PropertyGroup>
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ShouldMarkCertainSDKReferencesAsRuntimeOnly Condition="'$(ShouldMarkCertainSDKReferencesAsRuntimeOnly)' == ''">true</ShouldMarkCertainSDKReferencesAsRuntimeOnly>
</PropertyGroup>
<ItemGroup Condition="'$(ShouldMarkCertainSDKReferencesAsRuntimeOnly)' == 'true'" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- Dependencies that are specified as runtime-only dependencies. Therefore the associated files are not used to build Appx package. -->
<!-- TODO: Do we need to do anything like this for the new SDK? -->
<RuntimeReferenceOnlySDKDependencies Condition="'$(TargetPlatformVersion)' == '8.1'" Include="Microsoft.VCLibs, Version=11.0" />
</ItemGroup>
<Target Name="ResolveSDKReferences" Returns="@(ResolvedSDKReference)" DependsOnTargets="$(ResolveSDKReferencesDependsOn)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ResolveSDKReference SDKReferences="@(SDKReference)" RuntimeReferenceOnlySDKDependencies="@(RuntimeReferenceOnlySDKDependencies)" References="@(Reference)" TargetPlatformVersion="$(TargetPlatformVersion)" TargetPlatformIdentifier="$(TargetPlatformIdentifier)" WarnOnMissingPlatformVersion="$(SDKReferenceWarnOnMissingMaxPlatformVersion)" ProjectName="$(MSBuildProjectName)" TargetedSDKConfiguration="$(TargetedSDKConfiguration)" TargetedSDKArchitecture="$(TargetedSDKArchitecture)" InstalledSDKs="@(InstalledSDKLocations)" LogResolutionErrorsAsWarnings="$(LogSDKReferenceResolutionErrorsAsWarnings)" Prefer32Bit="$(Prefer32Bit)" ContinueOnError="$(ContinueOnError)" Condition="'@(SDKReference)'!=''">
<Output TaskParameter="ResolvedSDKReferences" ItemName="ResolvedSDKReference" />
</ResolveSDKReference>
</Target>
<Target Name="ResolveSDKReferencesDesignTime" Returns="@(ResolvedSDKReference)" DependsOnTargets="ResolveSDKReferences" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<!--
============================================================
FindInvalidProjectReferences
Find project to project references with target platform version higher than the one used by the current project and
creates a list of invalid references to be unresolved. It issues a warning for each invalid reference.
[IN]
$(TargetPlatformVersion) - Project's target platform version
@(_ProjectReferenceTargetPlatformMonikers) - List of monikers of all referenced projects gathered by the helper
target GetTargetPlatformMonikers.
[OUT]
@(InvalidProjectReferences) - List of invalid project references
============================================================
-->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<FindInvalidProjectReferencesDependsOn>
GetReferenceTargetPlatformMonikers
</FindInvalidProjectReferencesDependsOn>
</PropertyGroup>
<Target Name="FindInvalidProjectReferences" Condition="'$(FindInvalidProjectReferences)' == 'true'" DependsOnTargets="$(FindInvalidProjectReferencesDependsOn)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<FindInvalidProjectReferences TargetPlatformVersion="$(TargetPlatformVersion)" TargetPlatformIdentifier="$(TargetPlatformIdentifier)" ProjectReferences="@(TargetPathWithTargetPlatformMoniker)">
<Output TaskParameter="InvalidReferences" ItemName="InvalidProjectReferences" />
</FindInvalidProjectReferences>
<ItemGroup>
<_ResolvedProjectReferencePaths Remove="@(InvalidProjectReferences)" />
</ItemGroup>
</Target>
<Target Name="GetReferenceTargetPlatformMonikers" DependsOnTargets="PrepareProjectReferences" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<MSBuild Projects="@(_MSBuildProjectReferenceExistent)" Properties="%(_MSBuildProjectReferenceExistent.SetConfiguration); %(_MSBuildProjectReferenceExistent.SetPlatform); %(_MSBuildProjectReferenceExistent.SetTargetFramework)" Targets="GetTargetPathWithTargetPlatformMoniker" BuildInParallel="$(BuildInParallel)" ContinueOnError="!$(BuildingProject)" RemoveProperties="%(_MSBuildProjectReferenceExistent.GlobalPropertiesToRemove)$(_GlobalPropertiesToRemoveFromProjectReferences)">
<Output TaskParameter="TargetOutputs" ItemName="TargetPathWithTargetPlatformMoniker" />
</MSBuild>
</Target>
<!--
============================================================
ExpandSDKReferences
After we have resolved the sdk refrence we need to make sure that we automatically include the references which are part of the SDK (both winmd and dll)
as part of the assemblies passed to the compiler.
Project systems or project which do not want to reference all dlls or winmd files should override this target to do nothing.
============================================================
-->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ExpandSDKReferencesDependsOn>
ResolveSDKReferences
</ExpandSDKReferencesDependsOn>
<ExpandSDKAllowedReferenceExtensions Condition="'$(ExpandSDKAllowedReferenceExtensions)' == ''">
.winmd;
.dll
</ExpandSDKAllowedReferenceExtensions>
</PropertyGroup>
<Target Name="ExpandSDKReferences" Returns="@(ReferencesFromSDK)" DependsOnTargets="$(ExpandSDKReferencesDependsOn)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<GetSDKReferenceFiles ResolvedSDKReferences="@(ResolvedSDKReference)" ReferenceExtensions="$(ExpandSDKAllowedReferenceExtensions)" TargetSDKIdentifier="$(SDKIdentifier)" TargetSDKVersion="$(SDKVersion)" TargetPlatformIdentifier="$(TargetPlatformIdentifier)" TargetPlatformVersion="$(TargetPlatformVersion)" LogRedistFilesList="$(GetSDKReferenceFilesLogRedistFilesList)" LogRedistConflictWithinSDKAsWarning="$(GetSDKReferenceFilesLogRedistConflictsWithinSDKAsWarning)" LogRedistConflictBetweenSDKsAsWarning="$(GetSDKReferenceFilesLogRedistConflictsBetweenSDKsAsWarning)" LogReferencesList="$(GetSDKReferenceFilesLogReferencesList)" LogReferenceConflictWithinSDKAsWarning="$(GetSDKReferenceFilesLogReferenceConflictsWithinSDKAsWarning)" LogReferenceConflictBetweenSDKsAsWarning="$(GetSDKReferenceFilesLogReferenceConflictsBetweenSDKsAsWarning)" CacheFileFolderPath="$(GetSDKReferenceFilesCacheFolder)" LogCacheFileExceptions="$(GetSDKReferenceFilesLogCacheFileExceptions)" Condition="'@(ResolvedSDKReference)'!=''">
<Output TaskParameter="References" ItemName="ReferencePath" />
<Output TaskParameter="References" ItemName="ReferencesFromSDK" />
<Output TaskParameter="References" ItemName="_ResolveAssemblyReferenceResolvedFiles" />
<Output TaskParameter="CopyLocalFiles" ItemName="ReferenceCopyLocalPaths" />
<Output TaskParameter="RedistFiles" ItemName="ResolvedRedistFiles" />
</GetSDKReferenceFiles>
</Target>
<!--
============================================================
ExportWindowsMDFile
When a project is generating a a winmd file through c# or vb, ect the compiler will create a WinMDModule file. This file needs to be run
through the winmdexp tool in order to generate the resulting WinMD file.
===========================================================
-->
<Target Name="ExportWindowsMDFile" DependsOnTargets="Compile" Condition="'$(ExportWinMDFile)' == 'true'" Inputs="@(IntermediateAssembly);@(DocFileItem);@(_DebugSymbolsIntermediatePath);@(ReferencePathWithRefAssemblies);$(MSBuildAllProjects)" Outputs="$(_IntermediateWindowsMetadataPath);$(WinMDExpOutputPdb);$(WinMDOutputDocumentationFile)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<!-- Will be copied by the "copy WinMD artifacts" step instead -->
<CopyBuildOutputToOutputDirectory>false</CopyBuildOutputToOutputDirectory>
<CopyOutputSymbolsToOutputDirectory>false</CopyOutputSymbolsToOutputDirectory>
<CopyDocumentationFileToOutputDirectory>false</CopyDocumentationFileToOutputDirectory>
<WinMdExpToolPath Condition="'$(WinMdExpToolPath)' == ''">$(TargetFrameworkSDKToolsDirectory)</WinMdExpToolPath>
<WinMdExpUTF8Ouput Condition="'$(WinMdExpUTF8Ouput)' == ''">true</WinMdExpUTF8Ouput>
</PropertyGroup>
<WinMDExp WinMDModule="@(IntermediateAssembly)" References="@(ReferencePathWithRefAssemblies)" DisabledWarnings="$(WinMdExpNoWarn)" InputDocumentationFile="@(DocFileItem)" OutputDocumentationFile="$(WinMDOutputDocumentationFile)" TreatWarningsAsErrors="$(TreatWarningsAsErrors)" InputPDBFile="@(_DebugSymbolsIntermediatePath)" OutputPDBFile="$(WinMDExpOutputPdb)" OutputWindowsMetadataFile="$(_IntermediateWindowsMetadataPath)" EnvironmentVariables="$(WinMDExpEnvironment)" UTF8Output="$(WinMdExpUTF8Ouput)" SdkToolsPath="$(WinMdExpToolPath)" AssemblyUnificationPolicy="$(WinMDExpAssemblyUnificationPolicy)">
<Output TaskParameter="OutputWindowsMetadataFile" ItemName="FileWrites" />
</WinMDExp>
<ItemGroup>
<WinMDExpArtifacts Include="$(_IntermediateWindowsMetadataPath)" />
<WinMDExpArtifacts Include="$(WinMDOutputDocumentationFile)" />
<WinMDExpArtifacts Include="$(WinMDExpOutputPdb)" />
<FileWrites Include="$(WinMDOutputDocumentationFile);$(WinMDExpOutputPdb)" />
</ItemGroup>
</Target>
<Target Name="ResolveAssemblyReferencesDesignTime" Returns="@(_ReferencesFromRAR)" DependsOnTargets="ResolveProjectReferences;ResolveAssemblyReferences" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- We need to do this here because we only want references which have been passed into rar but are not project to project references. -->
<ItemGroup>
<_ReferencesFromRAR Include="@(ReferencePath-&gt;WithMetadataValue('ReferenceSourceTarget', 'ResolveAssemblyReference'))" />
</ItemGroup>
</Target>
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ProjectDesignTimeAssemblyResolutionSearchPaths Condition=" '$(ProjectDesignTimeAssemblyResolutionSearchPaths)' == '' ">
{CandidateAssemblyFiles};
$(ReferencePath);
{HintPathFromItem};
{TargetFrameworkDirectory};
{Registry:$(FrameworkRegistryBase),$(TargetFrameworkVersion),$(AssemblyFoldersSuffix)$(AssemblyFoldersExConditions)};
{RawFileName};
$(TargetDir)
</ProjectDesignTimeAssemblyResolutionSearchPaths>
</PropertyGroup>
<!--
==============================================================
DesignTimeResolveAssemblyReferences
Given the list of assemblies, resolve their reference paths.
This target is called by Visual Studio at run time in order to filter references
according to the targeted framework.
[IN]
@(DesignTimeReference) - List of assembly references as simple/fusion names.
[OUT]
@(ReferencePath) - Paths to resolved primary files.
==============================================================
-->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<DesignTimeResolveAssemblyReferencesDependsOn>
GetFrameworkPaths;
GetReferenceAssemblyPaths;
ResolveReferences
</DesignTimeResolveAssemblyReferencesDependsOn>
</PropertyGroup>
<Target Name="DesignTimeResolveAssemblyReferences" Condition="'$(DesignTimeReference)'!=''" DependsOnTargets="$(DesignTimeResolveAssemblyReferencesDependsOn)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<_DesignTimeReferenceInstalledAssemblyDirectory Include="$(TargetFrameworkDirectory)" />
</ItemGroup>
<PropertyGroup>
<DesignTimeResolveAssemblyReferencesStateFile Condition="'$(DisableRarCache)'!='true'">$(IntermediateOutputPath)$(MSBuildProjectFile)DesignTimeResolveAssemblyReferences.cache</DesignTimeResolveAssemblyReferencesStateFile>
</PropertyGroup>
<PropertyGroup>
<DesignTimeAssemblySearchPaths Condition=" '$(DesignTimeAssemblySearchPaths)' == '' ">
{CandidateAssemblyFiles};
$(ReferencePath);
{HintPathFromItem};
{TargetFrameworkDirectory};
{Registry:$(FrameworkRegistryBase),$(TargetFrameworkVersion),$(AssemblyFoldersSuffix)$(AssemblyFoldersExConditions)};
{RawFileName};
$(OutDir)
</DesignTimeAssemblySearchPaths>
</PropertyGroup>
<PropertyGroup>
<DesignTimeFindDependencies Condition=" '$(DesignTimeFindDependencies)' == '' ">false</DesignTimeFindDependencies>
<DesignTimeIgnoreVersionForFrameworkReferences Condition=" '$(DesignTimeIgnoreVersionForFrameworkReferences)' == '' ">false</DesignTimeIgnoreVersionForFrameworkReferences>
<DesignTimeFindSatellites Condition=" '$(DesignTimeFindSatellites)' == '' ">false</DesignTimeFindSatellites>
<DesignTimeFindSerializationAssemblies Condition=" '$(DesignTimeFindSerializationAssemblies)' == '' ">false</DesignTimeFindSerializationAssemblies>
<DesignTimeFindRelatedFiles Condition=" '$(DesignTimeFindRelatedFiles)' == '' ">false</DesignTimeFindRelatedFiles>
<DesignTimeSilentResolution Condition=" '$(DesignTimeSilentResolution)' == '' and '$(TraceDesignTime)' != 'true'">true</DesignTimeSilentResolution>
<DesignTimeAutoUnify Condition="'$(DesignTimeAutoUnify)' == ''">false</DesignTimeAutoUnify>
</PropertyGroup>
<ItemGroup>
<_DesignTimeReferenceAssemblies Include="$(DesignTimeReference)" />
</ItemGroup>
<ItemGroup>
<_RARResolvedReferencePath Include="@(ReferencePath)" />
<ReferencePath Remove="@(ReferencePath)" />
</ItemGroup>
<ResolveAssemblyReference Assemblies="@(_DesignTimeReferenceAssemblies)" TargetFrameworkDirectories="@(_DesignTimeReferenceInstalledAssemblyDirectory)" SearchPaths="$(DesignTimeAssemblySearchPaths)" AllowedAssemblyExtensions="$(AllowedReferenceAssemblyFileExtensions)" TargetProcessorArchitecture="$(ProcessorArchitecture)" CandidateAssemblyFiles="@(Content);@(None);@(_RARResolvedReferencePath)" FindDependencies="$(DesignTimeFindDependencies)" AutoUnify="$(DesignTimeAutoUnify)" IgnoreVersionForFrameworkReferences="$(DesignTimeIgnoreVersionForFrameworkReferences)" FindSatellites="$(DesignTimeFindSatellites)" FindSerializationAssemblies="$(DesignTimeFindSerializationAssemblies)" FindRelatedFiles="$(DesignTimeFindRelatedFiles)" Silent="$(DesignTimeSilentResolution)" TargetFrameworkVersion="$(TargetFrameworkVersion)" TargetFrameworkMoniker="$(TargetFrameworkMoniker)" TargetFrameworkMonikerDisplayName="$(TargetFrameworkMonikerDisplayName)" TargetedRuntimeVersion="$(TargetedRuntimeVersion)" StateFile="$(DesignTimeResolveAssemblyReferencesStateFile)" InstalledAssemblySubsetTables="@(InstalledAssemblySubsetTables)" IgnoreDefaultInstalledAssemblySubsetTables="$(IgnoreInstalledAssemblySubsetTables)" TargetFrameworkSubsets="@(_ReferenceInstalledAssemblySubsets)" FullTargetFrameworkSubsetNames="$(FullReferenceAssemblyNames)" FullFrameworkFolders="$(_FullFrameworkReferenceAssemblyPaths)" FullFrameworkAssemblyTables="@(FullFrameworkAssemblyTables)" ProfileName="$(TargetFrameworkProfile)" ResolvedSDKReferences="@(ResolvedSDKReference)" IgnoreTargetFrameworkAttributeVersionMismatch="$(DesignTimeIgnoreTargetFrameworkAttributeVersionMismatch)">
<Output TaskParameter="ResolvedFiles" ItemName="DesignTimeReferencePath" />
<Output TaskParameter="FilesWritten" ItemName="FileWrites" />
</ResolveAssemblyReference>
</Target>
<!--
============================================================
ResolveComReferences
Resolve COM references
[IN]
@(COMReference) - The list of COM references
$(InteropOutputPath) - The output directory in which to generate wrapper assemblies
When $(InteropOutputPath) is not set, then it defaults to $(IntermediateOutputPath).
[OUT]
@(ReferencePath) - Paths to referenced wrappers.
If ResolveComReferences is invoked from the IDE, PrepareForBuild may need to run to create directories.
============================================================
-->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ComReferenceExecuteAsTool Condition="'$(ComReferenceExecuteAsTool)'==''">false</ComReferenceExecuteAsTool>
</PropertyGroup>
<Target Name="ResolveComReferences" Condition="'@(COMReference)'!='' or '@(COMFileReference)'!=''" Returns="@(ReferencePath)" DependsOnTargets="PrepareForBuild;ResolveKeySource;ResolveAssemblyReferences" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition=" '$(InteropOutputPath)' == '' ">
<InteropOutputPath>$(IntermediateOutputPath)</InteropOutputPath>
</PropertyGroup>
<MakeDir Directories="$(InteropOutputPath)" />
<!--
Note: This task should not be batched, since it relies on having all the COM references fed into it at once.
-->
<PropertyGroup>
<ResolveComReferenceMSBuildArchitecture Condition="'$(ResolveComReferenceMSBuildArchitecture)' == ''">$(PlatformTargetAsMSBuildArchitecture)</ResolveComReferenceMSBuildArchitecture>
<ResolveComReferenceToolPath Condition="'$(ResolveComReferenceToolPath)' == ''">$(TargetFrameworkSDKToolsDirectory)</ResolveComReferenceToolPath>
<ResolveComReferenceSilent Condition="'$(ResolveComReferenceSilent)' == ''">false</ResolveComReferenceSilent>
</PropertyGroup>
<ResolveComReference TypeLibNames="@(COMReference)" TypeLibFiles="@(COMFileReference)" ResolvedAssemblyReferences="@(ReferencePath)" WrapperOutputDirectory="$(InteropOutputPath)" IncludeVersionInInteropName="$(IncludeVersionInInteropName)" KeyContainer="$(KeyContainerName)" KeyFile="$(KeyOriginatorFile)" DelaySign="$(DelaySign)" StateFile="@(_ResolveComReferenceCache)" TargetFrameworkVersion="$(TargetFrameworkVersion)" TargetProcessorArchitecture="$(ProcessorArchitecture)" NoClassMembers="$(ComReferenceNoClassMembers)" Silent="$(ResolveComReferenceSilent)" EnvironmentVariables="$(ResolveComReferenceEnvironment)" SdkToolsPath="$(ResolveComReferenceToolPath)" ExecuteAsTool="$(ComReferenceExecuteAsTool)" MSBuildArchitecture="$(ResolveComReferenceMSBuildArchitecture)" ContinueOnError="$(ContinueOnError)">
<Output TaskParameter="ResolvedFiles" ItemName="ReferencePath" />
<Output TaskParameter="ResolvedFiles" ItemName="ComReferenceWrappers" />
<Output TaskParameter="ResolvedFiles" ItemName="FileWrites" />
<!-- This output list only includes items with Isolated attribute set to True. It's done by the task itself. -->
<Output TaskParameter="ResolvedModules" ItemName="ResolvedIsolatedComModules" />
</ResolveComReference>
<ItemGroup>
<FileWrites Include="@(_ResolveComReferenceCache)" />
<ReferenceComWrappersToCopyLocal Include="@(ComReferenceWrappers)" Condition="'%(ComReferenceWrappers.CopyLocal)'!='false'" />
</ItemGroup>
</Target>
<Target Name="ResolveComReferencesDesignTime" Returns="@(ComReferenceWrappers)" DependsOnTargets="ResolveComReferences" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<!--
============================================================
ResolveFrameworkReferences
Overrridden by Microsoft.NET.Sdk to return
ResolvedFrameworkReference items in order to populate the
Frameworks node of the Solution Explorer in the IDE.
-->
<Target Name="ResolveFrameworkReferences" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<!--
***********************************************************************************************
***********************************************************************************************
PrepareResources Section
***********************************************************************************************
***********************************************************************************************
-->
<!--
============================================================
PrepareResources
Prepare resources for the Compile step.
============================================================
-->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PrepareResourcesDependsOn>
$(PrepareResourcesDependsOn);
PrepareResourceNames;
ResGen;
CompileLicxFiles
</PrepareResourcesDependsOn>
</PropertyGroup>
<Target Name="PrepareResources" DependsOnTargets="$(PrepareResourcesDependsOn)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<!--
============================================================
PrepareResourceNames
Prepare the names of resource files.
============================================================
-->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PrepareResourceNamesDependsOn>
AssignTargetPaths;
SplitResourcesByCulture;
CreateManifestResourceNames;
CreateCustomManifestResourceNames
</PrepareResourceNamesDependsOn>
</PropertyGroup>
<Target Name="PrepareResourceNames" DependsOnTargets="$(PrepareResourceNamesDependsOn)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<!--
============================================================
AssignTargetPaths
This target creates <TargetPath> tags for items. <TargetPath> is a relative folder plus filename
for the destination of this item.
============================================================
-->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<AssignTargetPathsDependsOn />
</PropertyGroup>
<Target Name="AssignTargetPaths" DependsOnTargets="$(AssignTargetPathsDependsOn)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<_Temporary Remove="@(_Temporary)" />
</ItemGroup>
<!-- AssignTargetPath generates TargetPath metadata that is consumed by CreateManifestResourceNames target for manifest name generation -->
<AssignTargetPath Files="@(EmbeddedResource)" RootFolder="$(MSBuildProjectDirectory)">
<Output TaskParameter="AssignedFiles" ItemName="_Temporary" />
</AssignTargetPath>
<ItemGroup>
<!-- Replace items in EmbeddedResource with the items emitted by the AssignTargetPath task that have the TargetPath metadata -->
<EmbeddedResource Remove="@(_Temporary)" />
<EmbeddedResource Include="@(_Temporary)" />
<_Temporary Remove="@(_Temporary)" />
</ItemGroup>
<AssignTargetPath Files="@(Content)" RootFolder="$(MSBuildProjectDirectory)">
<Output TaskParameter="AssignedFiles" ItemName="ContentWithTargetPath" />
</AssignTargetPath>
<AssignTargetPath Files="@(None)" RootFolder="$(MSBuildProjectDirectory)">
<Output TaskParameter="AssignedFiles" ItemName="_NoneWithTargetPath" />
</AssignTargetPath>
<AssignTargetPath Files="@(BaseApplicationManifest)" RootFolder="$(MSBuildProjectDirectory)">
<Output TaskParameter="AssignedFiles" ItemName="_DeploymentBaseManifestWithTargetPath" />
</AssignTargetPath>
<AssignTargetPath Files="@(None)" RootFolder="$(MSBuildProjectDirectory)" Condition="'@(_DeploymentBaseManifestWithTargetPath)'=='' and '%(None.Extension)'=='.manifest'">
<Output TaskParameter="AssignedFiles" ItemName="_DeploymentBaseManifestWithTargetPath" />
</AssignTargetPath>
</Target>
<!--
============================================================
GetItemTargetPaths
This target returns all items that have TargetPath metadata assigned by the AssignTargetPaths target.
============================================================
-->
<Target Name="GetItemTargetPaths" DependsOnTargets="AssignTargetPaths" Returns="&#xD;&#xA; @(EmbeddedResource);&#xD;&#xA; @(ContentWithTargetPath);&#xD;&#xA; @(_NoneWithTargetPath);&#xD;&#xA; @(_DeploymentBaseManifestWithTargetPath);&#xD;&#xA; " xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<!--
============================================================
SplitResourcesByCulture
Split EmbeddedResource items into five lists based on whether
they are resx files, licx files or other resources and whether they should be localized. Also adds Type and Culture
metadata. Type indicates whether the resource is "Resx" or "Non-Resx".
[IN]/[OUT]
@(EmbeddedResource) - The raw list of resources.
[OUT]
@(_LicxFile) - The EmbeddedResource items with extension equal to '.licx'.
============================================================
-->
<Target Name="SplitResourcesByCulture" DependsOnTargets="AssignTargetPaths" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Warning Condition="'@(ResxWithNoCulture)'!=''" Code="MSB9000" Text="ResxWithNoCulture item type is deprecated. Use EmbeddedResource items instead." />
<Warning Condition="'@(ResxWithCulture)'!=''" Code="MSB9001" Text="ResxWithCulture item type is deprecated. Use EmbeddedResource items instead." />
<Warning Condition="'@(NonResxWithCulture)'!=''" Code="MSB9002" Text="NonResxWithCulture item type is deprecated. Use EmbeddedResource items instead." />
<Warning Condition="'@(NonResxWithNoCulture)'!=''" Code="MSB9003" Text="NonResxWithNoCulture item type is deprecated. Use EmbeddedResource items instead." />
<ItemGroup>
<_LicxFile Include="@(EmbeddedResource)" Condition="'%(Extension)'=='.licx'" />
<!-- CONSUMED FOR COMPATIBILITY REASONS ONLY. EMIT EMBEDDEDRESOURCE INSTEAD -->
<EmbeddedResource Include="@(ResxWithNoCulture);@(ResxWithCulture)">
<Type>Resx</Type>
</EmbeddedResource>
<EmbeddedResource Include="@(NonResxWithCulture);@(NonResxWithNoCulture)">
<Type>Non-Resx</Type>
</EmbeddedResource>
</ItemGroup>
<AssignCulture Files="@(EmbeddedResource)" Condition="'%(Extension)'!='.licx'">
<!-- Create the list of culture resx and embedded resource files -->
<Output TaskParameter="AssignedFilesWithCulture" ItemName="_MixedResourceWithCulture" />
<!-- Create the list of non-culture resx and embedded resource files -->
<Output TaskParameter="AssignedFilesWithNoCulture" ItemName="_MixedResourceWithNoCulture" />
</AssignCulture>
<ItemGroup>
<!-- Remove EmbeddedResource items that we have processed already
i.e. either Licx, or resources that don't have culture info -->
<EmbeddedResource Remove="@(_MixedResourceWithCulture)" />
<EmbeddedResource Remove="@(_MixedResourceWithNoCulture)" />
<EmbeddedResource Remove="@(_LicxFile)" />
<!-- Add back everything except Licx, so that we have culture info -->
<EmbeddedResource Include="@(_MixedResourceWithNoCulture);@(_MixedResourceWithCulture)" Condition="'%(Extension)'=='.resx' or '%(Extension)'=='.restext'">
<Type Condition="'%(_MixedResourceWithNoCulture.Type)'=='' and '%(_MixedResourceWithCulture.Type)'==''">Resx</Type>
</EmbeddedResource>
<EmbeddedResource Include="@(_MixedResourceWithNoCulture);@(_MixedResourceWithCulture)" Condition="'%(Extension)'!='.resx' and '%(Extension)'!='.restext'">
<Type Condition="'%(_MixedResourceWithNoCulture.Type)'=='' and '%(_MixedResourceWithCulture.Type)'==''">Non-Resx</Type>
</EmbeddedResource>
<!-- EMITTED FOR COMPATIBILITY REASONS ONLY. CONSUME EMBEDDEDRESOURCE INSTEAD -->
<ResxWithNoCulture Remove="@(ResxWithNoCulture)" />
<NonResxWithNoCulture Remove="@(NonResxWithNoCulture)" />
<ResxWithCulture Remove="@(ResxWithCulture)" />
<NonResxWithCulture Remove="@(NonResxWithCulture)" />
<ResxWithNoCulture Include="@(_MixedResourceWithNoCulture)" Condition="'%(WithCulture)'=='false' and ('%(Extension)'=='.resx' or '%(Extension)'=='.restext')" />
<NonResxWithNoCulture Include="@(_MixedResourceWithNoCulture)" Condition="'%(WithCulture)'=='false' and ('%(Extension)'!='.resx' and '%(Extension)'!='.restext')" />
<ResxWithCulture Include="@(_MixedResourceWithCulture)" Condition="'%(WithCulture)'=='true' and ('%(Extension)'=='.resx' or '%(Extension)'=='.restext')" />
<NonResxWithCulture Include="@(_MixedResourceWithCulture)" Condition="'%(WithCulture)'=='true' and ('%(Extension)'!='.resx' and '%(Extension)'!='.restext')" />
<!-- Clean up temporary lists -->
<_MixedResourceWithNoCulture Remove="@(_MixedResourceWithNoCulture)" />
<_MixedResourceWithCulture Remove="@(_MixedResourceWithCulture)" />
</ItemGroup>
</Target>
<!--
=======================================================================
CreateCustomManifestResourceNames
Allows custom manifest resource name generation tasks to plug
into the build process
=======================================================================
-->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<CreateCustomManifestResourceNamesDependsOn />
</PropertyGroup>
<Target Name="CreateCustomManifestResourceNames" DependsOnTargets="$(CreateCustomManifestResourceNamesDependsOn)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<!--
============================================================
ResGen
Run GenerateResource on the given resx files.
============================================================
-->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ResGenDependsOn>ResolveAssemblyReferences;SplitResourcesByCulture;BeforeResGen;CoreResGen;AfterResGen</ResGenDependsOn>
<CoreResGenDependsOn>FindReferenceAssembliesForReferences</CoreResGenDependsOn>
<UseSourcePath Condition="'$(UseSourcePath)'==''">true</UseSourcePath>
<ResGenExecuteAsTool Condition="'$(ResGenExecuteAsTool)'==''">false</ResGenExecuteAsTool>
</PropertyGroup>
<Target Name="ResGen" DependsOnTargets="$(ResGenDependsOn)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<!--
============================================================
BeforeResGen
Redefine this target in your project in order to run tasks just before Resgen.
============================================================
-->
<Target Name="BeforeResGen" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<!--
============================================================
AfterResGen
Redefine this target in your project in order to run tasks just after Resgen.
============================================================
-->
<Target Name="AfterResGen" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<!--
============================================================
CoreResGen
============================================================
-->
<Target Name="CoreResGen" DependsOnTargets="$(CoreResGenDependsOn)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<_Temporary Remove="@(_Temporary)" />
</ItemGroup>
<PropertyGroup>
<GenerateResourceMSBuildArchitecture Condition="'$(GenerateResourceMSBuildArchitecture)' == ''">$(PlatformTargetAsMSBuildArchitecture)</GenerateResourceMSBuildArchitecture>
<ResgenToolPath Condition="'$(ResgenToolPath)' == ''">$(TargetFrameworkSDKToolsDirectory)</ResgenToolPath>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFrameworkAsMSBuildRuntime)' != '' and '$(GenerateResourceMSBuildArchitecture)' != ''">
<!-- In the general case, we want to fail to run the task if the task host it's requesting doesn't exist, because we'd rather let the
user know there's something wrong than just silently generate something that's probably not quite right. However, in a few
circumstances, there are tasks that are already aware of runtime / bitness concerns, in which case even if we go ahead and run
the more recent version of the task, it should be able to generate something correct. GenerateResource is one such task, so
we check for the existence of the targeted task host so that we can use it preferentially, but if it can't be found, we'll fall
back to the current task since it's still mostly correct.
In particular, we need to do this because otherwise people with Dev10 on a machine that they upgrade to Win8 will be broken:
they'll have ResGen from the 7.0A SDK installed, so launching ResGen will still work, but the CLR2 task host is only installed by
the 8.0A SDK, which they won't have installed, and thus without this fallback mechanism, their projects targeting v3.5 will
suddenly start failing to build.-->
<GenerateResourceMSBuildRuntime Condition="'$(GenerateResourceMSBuildRuntime)' == '' and&#xD;&#xA; $([MSBuild]::DoesTaskHostExist(`$(TargetFrameworkAsMSBuildRuntime)`, `$(GenerateResourceMSBuildArchitecture)`))">$(TargetFrameworkAsMSBuildRuntime)</GenerateResourceMSBuildRuntime>
<!-- If the targeted runtime doesn't exist, fall back to current -->
<GenerateResourceMSBuildRuntime Condition="'$(GenerateResourceMSBuildRuntime)' == ''">CurrentRuntime</GenerateResourceMSBuildRuntime>
</PropertyGroup>
<!-- 4.0 task has some new parameters that we want to make use of if we're targeting 4.0 -->
<GenerateResource Sources="@(EmbeddedResource)" UseSourcePath="$(UseSourcePath)" References="@(ReferencePathWithRefAssemblies)" UsePreserializedResources="$(GenerateResourceUsePreserializedResources)" AdditionalInputs="$(MSBuildAllProjects)" NeverLockTypeAssemblies="$(GenerateResourceNeverLockTypeAssemblies)" StateFile="$(IntermediateOutputPath)$(MSBuildProjectFile).GenerateResource.cache" StronglyTypedClassName="%(EmbeddedResource.StronglyTypedClassName)" StronglyTypedFileName="%(EmbeddedResource.StronglyTypedFileName)" StronglyTypedLanguage="%(EmbeddedResource.StronglyTypedLanguage)" StronglyTypedNamespace="%(EmbeddedResource.StronglyTypedNamespace)" StronglyTypedManifestPrefix="%(EmbeddedResource.StronglyTypedManifestPrefix)" PublicClass="%(EmbeddedResource.PublicClass)" OutputResources="@(EmbeddedResource->'$(IntermediateOutputPath)%(ManifestResourceName).resources')" Condition="'%(EmbeddedResource.Type)' == 'Resx' and '%(EmbeddedResource.GenerateResource)' != 'false' and '$(GenerateResourceMSBuildRuntime)' != 'CLR2'" SdkToolsPath="$(ResgenToolPath)" ExecuteAsTool="$(ResGenExecuteAsTool)" EnvironmentVariables="$(ResGenEnvironment)" MSBuildRuntime="$(GenerateResourceMSBuildRuntime)" MSBuildArchitecture="$(GenerateResourceMSBuildArchitecture)">
<Output TaskParameter="FilesWritten" ItemName="FileWrites" />
<Output TaskParameter="StronglyTypedFileName" ItemName="Compile" />
<!-- Gather Sources as an output since it will contain OutputResource metadata indicating the final output resource that it was compiled into -->
<Output TaskParameter="Sources" ItemName="_Temporary" />
</GenerateResource>
<!-- But we can't use those parameters if we're targeting 3.5, since we're using the 3.5 task -->
<GenerateResource Sources="@(EmbeddedResource)" UseSourcePath="$(UseSourcePath)" References="@(ReferencePath)" AdditionalInputs="$(MSBuildAllProjects)" NeverLockTypeAssemblies="$(GenerateResourceNeverLockTypeAssemblies)" StateFile="$(IntermediateOutputPath)$(MSBuildProjectFile).GenerateResource.cache" StronglyTypedClassName="%(EmbeddedResource.StronglyTypedClassName)" StronglyTypedFileName="%(EmbeddedResource.StronglyTypedFileName)" StronglyTypedLanguage="%(EmbeddedResource.StronglyTypedLanguage)" StronglyTypedNamespace="%(EmbeddedResource.StronglyTypedNamespace)" StronglyTypedManifestPrefix="%(EmbeddedResource.StronglyTypedManifestPrefix)" PublicClass="%(EmbeddedResource.PublicClass)" OutputResources="@(EmbeddedResource->'$(IntermediateOutputPath)%(ManifestResourceName).resources')" MSBuildRuntime="$(GenerateResourceMSBuildRuntime)" MSBuildArchitecture="$(GenerateResourceMSBuildArchitecture)" Condition="'%(EmbeddedResource.Type)' == 'Resx' and '%(EmbeddedResource.GenerateResource)' != 'false' and '$(GenerateResourceMSBuildRuntime)' == 'CLR2'">
<Output TaskParameter="FilesWritten" ItemName="FileWrites" />
<Output TaskParameter="StronglyTypedFileName" ItemName="Compile" />
<!-- Gather Sources as an output since it will contain OutputResource metadata indicating the final output resource that it was compiled into -->
<Output TaskParameter="Sources" ItemName="_Temporary" />
</GenerateResource>
<ItemGroup>
<EmbeddedResource Remove="@(_Temporary)" />
<!-- Add back the Sources list (with OutputResource metadata) that we output from GenerateResource into EmbeddedResource -->
<EmbeddedResource Include="@(_Temporary)" />
<_Temporary Remove="@(_Temporary)" />
<!-- EMITTED FOR COMPATIBILITY REASONS ONLY. CONSUME EMBEDDEDRESOURCE INSTEAD -->
<ManifestResourceWithNoCulture Include="@(EmbeddedResource->'%(OutputResource)')" Condition="'%(EmbeddedResource.WithCulture)'=='false' and '%(EmbeddedResource.Type)' == 'Resx'">
<EmittedForCompatibilityOnly>true</EmittedForCompatibilityOnly>
</ManifestResourceWithNoCulture>
<ManifestNonResxWithNoCultureOnDisk Include="@(EmbeddedResource)" Condition="'%(EmbeddedResource.WithCulture)'=='false' and '%(EmbeddedResource.Type)' == 'Non-Resx'">
<EmittedForCompatibilityOnly>true</EmittedForCompatibilityOnly>
</ManifestNonResxWithNoCultureOnDisk>
<!-- EMITTED FOR COMPATIBILITY REASONS ONLY. CONSUME EMBEDDEDRESOURCE INSTEAD -->
<ManifestResourceWithCulture Include="@(EmbeddedResource->'%(OutputResource)')" Condition="'%(EmbeddedResource.WithCulture)'=='true' and '%(EmbeddedResource.Type)' == 'Resx'">
<EmittedForCompatibilityOnly>true</EmittedForCompatibilityOnly>
</ManifestResourceWithCulture>
<ManifestNonResxWithCultureOnDisk Include="@(EmbeddedResource)" Condition="'%(EmbeddedResource.WithCulture)'=='true' and '%(EmbeddedResource.Type)' == 'Non-Resx'">
<EmittedForCompatibilityOnly>true</EmittedForCompatibilityOnly>
</ManifestNonResxWithCultureOnDisk>
</ItemGroup>
</Target>
<!--
============================================================
CompileLicxFiles
Compile .licx files (containing information about licensed controls used by the application) into .licenses files.
[IN]
@(_LicxFile) - The list of .licx files in the project (usually there will be just one)
[OUT]
@(CompiledLicenseFile) - The list of compiled .licenses files (there will be just one)
============================================================
-->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<CompileLicxFilesDependsOn />
</PropertyGroup>
<Target Name="CompileLicxFiles" Condition="'@(_LicxFile)'!=''" DependsOnTargets="$(CompileLicxFilesDependsOn)" Inputs="$(MSBuildAllProjects);@(_LicxFile);@(ReferencePathWithRefAssemblies);@(ReferenceDependencyPaths)" Outputs="$(IntermediateOutputPath)$(TargetFileName).licenses" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<LCMSBuildArchitecture Condition="'$(LCMSBuildArchitecture)' == ''">$(PlatformTargetAsMSBuildArchitecture)</LCMSBuildArchitecture>
</PropertyGroup>
<LC Sources="@(_LicxFile)" LicenseTarget="$(TargetFileName)" OutputDirectory="$(IntermediateOutputPath)" OutputLicense="$(IntermediateOutputPath)$(TargetFileName).licenses" ReferencedAssemblies="@(ReferencePathWithRefAssemblies);@(ReferenceDependencyPaths)" NoLogo="$(NoLogo)" ToolPath="$(LCToolPath)" SdkToolsPath="$(TargetFrameworkSDKToolsDirectory)" EnvironmentVariables="$(LCEnvironment)" MSBuildArchitecture="$(LCMSBuildArchitecture)" TargetFrameworkVersion="$(TargetFrameworkVersion)">
<Output TaskParameter="OutputLicense" ItemName="CompiledLicenseFile" />
<Output TaskParameter="OutputLicense" ItemName="FileWrites" />
</LC>
</Target>
<!--
***********************************************************************************************
***********************************************************************************************
ResolveKeySource Section
***********************************************************************************************
***********************************************************************************************
-->
<!--
============================================================
ResolveKeySource
Resolve the strong name key used to sign the assembly as well as the certificate used to
sign the ClickOnce manifests.
[IN]
$(AssemblyOriginatorKeyFile) - The file used to sign the assembly (.snk or .pfx)
$(ManifestCertificateThumbprint) - The thumbprint used to locate the certificate in the
user's certificate store.
$(ManifestKeyFile) - The key file that contains the certificate in case the
certificate is not in the user's store.
[OUT]
$(ResolvedAssemblyKeyFile) - Key used to sign the assembly
$(_DeploymentResolvedManifestCertificateThumbprint) - Certificate used to sign the manifests
============================================================
-->
<Target Name="ResolveKeySource" Condition="$(SignManifests) == 'true' or $(SignAssembly) == 'true'" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ResolveKeySource KeyFile="$(AssemblyOriginatorKeyFile)" CertificateThumbprint="$(ManifestCertificateThumbprint)" CertificateFile="$(ManifestKeyFile)" SuppressAutoClosePasswordPrompt="$(BuildingInsideVisualStudio)" ShowImportDialogDespitePreviousFailures="$(BuildingProject)" ContinueOnError="!$(BuildingProject)">
<Output TaskParameter="ResolvedKeyFile" PropertyName="KeyOriginatorFile" Condition=" '$(SignAssembly)' == 'true' " />
<Output TaskParameter="ResolvedKeyContainer" PropertyName="KeyContainerName" Condition=" '$(SignAssembly)' == 'true' " />
<Output TaskParameter="ResolvedThumbprint" PropertyName="_DeploymentResolvedManifestCertificateThumbprint" Condition=" '$(SignManifests)' == 'true' " />
</ResolveKeySource>
</Target>
<!--
***********************************************************************************************
***********************************************************************************************
Compile Section
***********************************************************************************************
***********************************************************************************************
-->
<!--
============================================================
Compile
============================================================
-->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<CompileDependsOn>
ResolveReferences;
ResolveKeySource;
SetWin32ManifestProperties;
FindReferenceAssembliesForReferences;
_GenerateCompileInputs;
BeforeCompile;
_TimeStampBeforeCompile;
_GenerateCompileDependencyCache;
CoreCompile;
_TimeStampAfterCompile;
AfterCompile;
</CompileDependsOn>
</PropertyGroup>
<Target Name="Compile" DependsOnTargets="$(CompileDependsOn)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<!--
============================================================
_GenerateCompileInputs
Create the _CoreCompileResourceInputs list of inputs to the CoreCompile target.
============================================================
-->
<Target Name="_GenerateCompileInputs" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Warning Condition="'@(ManifestResourceWithNoCulture)'!='' and '%(ManifestResourceWithNoCulture.EmittedForCompatibilityOnly)'==''" Code="MSB9004" Text="ManifestResourceWithNoCulture item type is deprecated. Emit EmbeddedResource items instead, with metadata WithCulture='false', Type='Resx', and optional LogicalName." />
<Warning Condition="'@(ManifestNonResxWithNoCultureOnDisk)'!='' and '%(ManifestNonResxWithNoCultureOnDisk.EmittedForCompatibilityOnly)'==''" Code="MSB9005" Text="ManifestNonResxWithNoCultureOnDisk item type is deprecated. Emit EmbeddedResource items instead, with metadata WithCulture='false', Type='Non-Resx', and optional LogicalName." />
<ItemGroup>
<!-- _CoreCompileResourceInputs is the list of TLDA inputs that should trigger CoreCompile, and are listed as inputs to that target -->
<_CoreCompileResourceInputs Include="@(EmbeddedResource->'%(OutputResource)')" Condition="'%(EmbeddedResource.WithCulture)' == 'false' and '%(EmbeddedResource.Type)' == 'Resx'" />
<_CoreCompileResourceInputs Include="@(EmbeddedResource)" Condition="'%(EmbeddedResource.WithCulture)' == 'false' and '%(EmbeddedResource.Type)' == 'Non-Resx' " />
<!-- CONSUMED FOR COMPATIBILITY REASONS ONLY. EMIT EMBEDDEDRESOURCE INSTEAD -->
<_CoreCompileResourceInputs Include="@(ManifestResourceWithNoCulture)" Condition="'%(ManifestResourceWithNoCulture.EmittedForCompatibilityOnly)'==''">
<Type>Resx</Type>
<WithCulture>false</WithCulture>
</_CoreCompileResourceInputs>
<_CoreCompileResourceInputs Include="@(ManifestNonResxWithNoCultureOnDisk)" Condition="'%(ManifestNonResxWithNoCultureOnDisk.EmittedForCompatibilityOnly)'==''">
<Type>Non-Resx</Type>
<WithCulture>false</WithCulture>
</_CoreCompileResourceInputs>
</ItemGroup>
</Target>
<!--
============================================================
GenerateTargetFrameworkMonikerAttribute
Emit the target framework moniker attribute as a code fragment into a temporary source file for the compiler.
============================================================
-->
<PropertyGroup Condition="'$(TargetFrameworkMoniker)' != ''" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- Do not clean if we are going to default the path to the temp directory -->
<TargetFrameworkMonikerAssemblyAttributesFileClean Condition="'$(TargetFrameworkMonikerAssemblyAttributesFileClean)' == '' and '$(TargetFrameworkMonikerAssemblyAttributesPath)' != ''">true</TargetFrameworkMonikerAssemblyAttributesFileClean>
<TargetFrameworkMonikerAssemblyAttributesPath Condition="'$(TargetFrameworkMonikerAssemblyAttributesPath)' == ''">$([System.IO.Path]::Combine('$(IntermediateOutputPath)','$(TargetFrameworkMoniker).AssemblyAttributes$(DefaultLanguageSourceExtension)'))</TargetFrameworkMonikerAssemblyAttributesPath>
</PropertyGroup>
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<GenerateTargetFrameworkAttribute Condition="'$(GenerateTargetFrameworkAttribute)' == '' and '$(TargetFrameworkMoniker)' != '' and '$(TargetingClr2Framework)' != 'true'">true</GenerateTargetFrameworkAttribute>
</PropertyGroup>
<ItemGroup Condition="'$(TargetFrameworkMonikerAssemblyAttributesFileClean)' == 'true'" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Clean Include="$(TargetFrameworkMonikerAssemblyAttributesPath)" />
</ItemGroup>
<Target Name="GenerateTargetFrameworkMonikerAttribute" BeforeTargets="BeforeCompile" DependsOnTargets="PrepareForBuild;GetReferenceAssemblyPaths" Inputs="$(MSBuildToolsPath)\Microsoft.Common.targets" Outputs="$(TargetFrameworkMonikerAssemblyAttributesPath)" Condition="'$(GenerateTargetFrameworkAttribute)' == 'true'" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- This is a file shared between projects so we have to take care to handle simultaneous writes (by ContinueOnError)
and a race between clean from one project and build from another (by not adding to FilesWritten so it doesn't clean) -->
<WriteLinesToFile File="$(TargetFrameworkMonikerAssemblyAttributesPath)" Lines="$(TargetFrameworkMonikerAssemblyAttributeText)" Overwrite="true" ContinueOnError="true" Condition="'@(Compile)' != '' and '$(TargetFrameworkMonikerAssemblyAttributeText)' != ''" />
<ItemGroup Condition="'@(Compile)' != '' and '$(TargetFrameworkMonikerAssemblyAttributeText)' != ''">
<Compile Include="$(TargetFrameworkMonikerAssemblyAttributesPath)" />
<!-- Do not put in FileWrites: this is a file shared between projects in %temp%, and cleaning it would create a race between projects during rebuild -->
</ItemGroup>
</Target>
<!--
============================================================
GenerateAdditionalSources
Emit any specified code fragments into a temporary source file for the compiler.
============================================================
-->
<PropertyGroup Condition="'$(AssemblyAttributesPath)' != ''" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<GenerateAdditionalSources Condition="'$(GenerateAdditionalSources)' == ''">true</GenerateAdditionalSources>
</PropertyGroup>
<ItemGroup Condition="'$(AssemblyAttributesPath)' != ''" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Clean Include="$(AssemblyAttributesPath)" Condition="'$(AssemblyAttributesFileClean)' != 'false'" />
</ItemGroup>
<Target Name="GenerateAdditionalSources" BeforeTargets="BeforeCompile" DependsOnTargets="PrepareForBuild;GetReferenceAssemblyPaths" Inputs="$(MSBuildAllProjects)" Outputs="$(AssemblyAttributesPath)" Condition="'@(AssemblyAttributes)' != '' and '$(GenerateAdditionalSources)' == 'true'" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<WriteCodeFragment AssemblyAttributes="@(AssemblyAttributes)" OutputFile="$(AssemblyAttributesPath)" Language="$(Language)">
<Output TaskParameter="OutputFile" ItemName="Compile" />
<Output TaskParameter="OutputFile" ItemName="FileWrites" />
</WriteCodeFragment>
</Target>
<!--
============================================================
BeforeCompile
Redefine this target in your project in order to run tasks just before Compile.
============================================================
-->
<Target Name="BeforeCompile" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<!--
============================================================
AfterCompile
Redefine this target in your project in order to run tasks just after Compile.
============================================================
-->
<Target Name="AfterCompile" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<!--
============================================================
_TimeStampBeforeCompile
If post-build events are set to fire "OnOutputUpdated", then take before
and after timestamps so that we can compare them.
============================================================
-->
<Target Name="_TimeStampBeforeCompile" Condition="'$(RunPostBuildEvent)'=='OnOutputUpdated' or ('$(RegisterForComInterop)'=='true' and '$(OutputType)'=='library')" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<_AssemblyTimestampBeforeCompile>%(IntermediateAssembly.ModifiedTime)</_AssemblyTimestampBeforeCompile>
</PropertyGroup>
</Target>
<!--
============================================================
_GenerateCompileDependencyCache
Generate a file used to track compiler dependencies between incremental build
executions. This handles cases where items are added or removed from a glob (e.g.
<Compile Include="**\*.cs" />) and can't otherwise be detected with timestamp
comparisons. The file contains a hash of compiler inputs that are known to
contribute to incremental build inconsistencies.
============================================================
-->
<Target Name="_GenerateCompileDependencyCache" Condition="'$(DesignTimeBuild)' != 'true' and '$(BuildingProject)' == 'true'" DependsOnTargets="ResolveAssemblyReferences" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<CustomAdditionalCompileInputs Include="$(IntermediateOutputPath)$(MSBuildProjectFile).CoreCompileInputs.cache" />
<CoreCompileCache Include="@(Compile)" />
<CoreCompileCache Include="@(ReferencePath)" />
<CoreCompileCache Include="$(DefineConstants)" />
</ItemGroup>
<Hash ItemsToHash="@(CoreCompileCache)" IgnoreCase="$([MSBuild]::ValueOrDefault(`$(CoreCompileCacheIgnoreCase)`, `true`))">
<Output TaskParameter="HashResult" PropertyName="CoreCompileDependencyHash" />
</Hash>
<WriteLinesToFile Lines="$(CoreCompileDependencyHash)" File="$(IntermediateOutputPath)$(MSBuildProjectFile).CoreCompileInputs.cache" Overwrite="True" WriteOnlyWhenDifferent="True" />
<ItemGroup>
<FileWrites Include="$(IntermediateOutputPath)$(MSBuildProjectFile).CoreCompileInputs.cache" />
</ItemGroup>
</Target>
<!--
============================================================
_TimeStampAfterCompile
If post-build events are set to fire "OnOutputUpdated", then take before
and after timestamps so that we can compare them.
============================================================
-->
<Target Name="_TimeStampAfterCompile" Condition="'$(RunPostBuildEvent)'=='OnOutputUpdated' or ('$(RegisterForComInterop)'=='true' and '$(OutputType)'=='library')" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<_AssemblyTimestampAfterCompile>%(IntermediateAssembly.ModifiedTime)</_AssemblyTimestampAfterCompile>
</PropertyGroup>
</Target>
<!--
================================================================
_ComputeNonExistentFileProperty
There are certain situations in which we want to always run the CoreCompile target (and
thus the Csc task), even if the timestamps of the outputs appear to be up-to-date on disk.
If we're inside the IDE during design-time, then the Csc/Vbc/Vjc task is simply being used to
initialize the host compiler, so we always want to run it. Also, if we're inside the IDE, and
the host compiler is responsible for doing the compilation during an actual build, we want to let
the host compiler determine whether the output is up-to-date, because there may be source files
in the IDE's in-memory buffers that we don't know about.
So, we always run the CoreCompile target if we're in the IDE, and either we're in design-time or
we're delegating to the host compiler for the actual build.
We compare against BuildOutOfProcess != true because we cannot assume that the build process will
have set BuildOutOfProcess to true or false. Therefore the default behavior should be to do the
legacy behavior seen before BuildingOutOfProcess was introduced if the property is not set.
================================================================
-->
<Target Name="_ComputeNonExistentFileProperty" Condition="('$(BuildingInsideVisualStudio)' == 'true') and ('$(BuildingOutOfProcess)' != 'true') and (('$(BuildingProject)' == 'false') or ('$(UseHostCompilerIfAvailable)' == 'true'))" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<NonExistentFile>__NonExistentSubDir__\__NonExistentFile__</NonExistentFile>
</PropertyGroup>
</Target>
<!--
***********************************************************************************************
***********************************************************************************************
GenerateSerializationAssemblies Section
***********************************************************************************************
***********************************************************************************************
-->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<_SGenDllName>$(TargetName).XmlSerializers.dll</_SGenDllName>
<_SGenDllCreated>false</_SGenDllCreated>
<_SGenGenerateSerializationAssembliesConfig>$(GenerateSerializationAssemblies)</_SGenGenerateSerializationAssembliesConfig>
<_SGenGenerateSerializationAssembliesConfig Condition="'$(GenerateSerializationAssemblies)' == ''">Auto</_SGenGenerateSerializationAssembliesConfig>
<_SGenGenerateSerializationAssembliesConfig Condition="'$(ConfigurationName)'=='Debug' and '$(_SGenGenerateSerializationAssembliesConfig)' == 'Auto'">Off</_SGenGenerateSerializationAssembliesConfig>
<SGenUseProxyTypes Condition="'$(SGenUseProxyTypes)' == ''">true</SGenUseProxyTypes>
<SGenUseKeep Condition="'$(SGenUseKeep)'==''">false</SGenUseKeep>
<SGenShouldGenerateSerializer Condition="'$(SGenShouldGenerateSerializer)' == ''">true</SGenShouldGenerateSerializer>
</PropertyGroup>
<!--
============================================================
GenerateSerializationAssemblies
Run GenerateSerializationAssemblies on the assembly produced by this build.
[IN]
@(BuildAssemblyName) - The assembly generated by this build.
@(BuildAssemblyPath) - The path where the assembly resides.
@(ReferencePath) - The list of references used by this assembly.
[OUT]
@(SerializationAssembly) - The path to the serialization assembly. Maybe we'll just append to an existing list.
============================================================
-->
<Target Name="GenerateSerializationAssemblies" Condition="'$(_SGenGenerateSerializationAssembliesConfig)' == 'On' or ('@(WebReferenceUrl)'!='' and '$(_SGenGenerateSerializationAssembliesConfig)' == 'Auto')" DependsOnTargets="AssignTargetPaths;Compile;ResolveKeySource" Inputs="$(MSBuildAllProjects);@(IntermediateAssembly)" Outputs="$(IntermediateOutputPath)$(_SGenDllName)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<SGenMSBuildArchitecture Condition="'$(SGenMSBuildArchitecture)' == ''">$(PlatformTargetAsMSBuildArchitecture)</SGenMSBuildArchitecture>
</PropertyGroup>
<SGen BuildAssemblyName="$(TargetFileName)" BuildAssemblyPath="$(IntermediateOutputPath)" References="@(ReferencePath)" ShouldGenerateSerializer="$(SGenShouldGenerateSerializer)" UseProxyTypes="$(SGenUseProxyTypes)" UseKeep="$(SGenUseKeep)" KeyContainer="$(KeyContainerName)" KeyFile="$(KeyOriginatorFile)" DelaySign="$(DelaySign)" ToolPath="$(SGenToolPath)" SdkToolsPath="$(TargetFrameworkSDKToolsDirectory)" EnvironmentVariables="$(SGenEnvironment)" MSBuildArchitecture="$(SGenMSBuildArchitecture)" SerializationAssembly="$(IntermediateOutputPath)$(_SGenDllName)" Platform="$(SGenPlatformTarget)" Types="$(SGenSerializationTypes)">
<Output TaskParameter="SerializationAssembly" ItemName="SerializationAssembly" />
</SGen>
</Target>
<!--
***********************************************************************************************
***********************************************************************************************
CreateSatelliteAssemblies Section
***********************************************************************************************
***********************************************************************************************
-->
<!--
============================================================
CreateSatelliteAssemblies
Create one satellite assembly for every unique culture in the resources.
============================================================
-->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<CreateSatelliteAssembliesDependsOn>
_GenerateSatelliteAssemblyInputs;
ComputeIntermediateSatelliteAssemblies;
GenerateSatelliteAssemblies
</CreateSatelliteAssembliesDependsOn>
</PropertyGroup>
<Target Name="CreateSatelliteAssemblies" DependsOnTargets="$(CreateSatelliteAssembliesDependsOn)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<!--
============================================================
_GenerateSatelliteAssemblyInputs
Create the _SatelliteAssemblyResourceInputs list of inputs to the CreateSatelliteAssemblies target.
============================================================
-->
<Target Name="_GenerateSatelliteAssemblyInputs" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Warning Condition="'@(ManifestResourceWithCulture)'!='' and '%(ManifestResourceWithCulture.EmittedForCompatibilityOnly)'==''" Code="MSB9006" Text="ManifestResourceWithCulture item type is deprecated. Emit EmbeddedResource items instead, with metadata WithCulture='true', Type='Resx', and optional LogicalName." />
<Warning Condition="'@(ManifestNonResxWithCultureOnDisk)'!='' and '%(ManifestNonResxWithCultureOnDisk.EmittedForCompatibilityOnly)'==''" Code="MSB9007" Text="ManifestNonResxWithCultureOnDisk item type is deprecated. Emit EmbeddedResource items instead, with metadata WithCulture='true', Type='Non-Resx', and optional LogicalName." />
<ItemGroup>
<!-- _SatelliteAssemblyResourceInputs is the list of TLDA inputs that should trigger CreateSatelliteAssemblies, so listed as inputs to that target -->
<_SatelliteAssemblyResourceInputs Include="@(EmbeddedResource->'%(OutputResource)')" Condition="'%(EmbeddedResource.WithCulture)' == 'true' and '%(EmbeddedResource.Type)' == 'Resx'" />
<_SatelliteAssemblyResourceInputs Include="@(EmbeddedResource)" Condition="'%(EmbeddedResource.WithCulture)' == 'true' and '%(EmbeddedResource.Type)' == 'Non-Resx'" />
<!-- CONSUMED FOR COMPATIBILITY REASONS ONLY. EMIT EMBEDDEDRESOURCE INSTEAD -->
<_SatelliteAssemblyResourceInputs Include="@(ManifestResourceWithCulture)" Condition="'%(ManifestResourceWithCulture.EmittedForCompatibilityOnly)'==''">
<Type>Resx</Type>
<WithCulture>true</WithCulture>
</_SatelliteAssemblyResourceInputs>
<_SatelliteAssemblyResourceInputs Include="@(ManifestNonResxWithCultureOnDisk)" Condition="'%(ManifestNonResxWithCultureOnDisk.EmittedForCompatibilityOnly)'==''">
<Type>Non-Resx</Type>
<WithCulture>true</WithCulture>
</_SatelliteAssemblyResourceInputs>
</ItemGroup>
</Target>
<!--
============================================================
GenerateSatelliteAssemblies
Actually run al.exe to create the satellite assemblies.
============================================================
-->
<Target Name="GenerateSatelliteAssemblies" Inputs="$(MSBuildAllProjects);@(_SatelliteAssemblyResourceInputs);$(IntermediateOutputPath)$(TargetName)$(TargetExt)" Outputs="$(IntermediateOutputPath)%(Culture)\$(TargetName).resources.dll" Condition="'@(_SatelliteAssemblyResourceInputs)' != '' and '$(GenerateSatelliteAssembliesForCore)' != 'true'" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<_ALExeToolPath>$(TargetFrameworkSDKToolsDirectory)</_ALExeToolPath>
<_ALExeToolPath Condition="'$(PlatformTarget)' == 'x64'">$(TargetFrameworkSDKToolsDirectory)$(PlatformTarget)\</_ALExeToolPath>
</PropertyGroup>
<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)" SourceModules="@(Satellite_SourceModule)" TargetType="$(Satellite_TargetType)" TemplateFile="$(IntermediateOutputPath)$(TargetName)$(TargetExt)" Title="$(Satellite_Title)" ToolPath="$(AlToolPath)" ToolExe="$(AlToolExe)" SdkToolsPath="$(SdkToolsPathMaybeWithx64Architecture)" Trademark="$(Satellite_Trademark)" Version="$(Satellite_Version)" Win32Icon="$(Satellite_Win32Icon)" Win32Resource="$(Satellite_Win32Resource)">
<Output TaskParameter="OutputAssembly" ItemName="FileWrites" />
</AL>
</Target>
<!--
============================================================
ComputeIntermediateSatelliteAssemblies
Compute the paths to the intermediate satellite assemblies,
with culture attributes so we can copy them to the right place.
============================================================
-->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ComputeIntermediateSatelliteAssembliesDependsOn>
CreateManifestResourceNames
</ComputeIntermediateSatelliteAssembliesDependsOn>
</PropertyGroup>
<Target Name="ComputeIntermediateSatelliteAssemblies" Condition="@(EmbeddedResource->'%(WithCulture)') != ''" DependsOnTargets="$(ComputeIntermediateSatelliteAssembliesDependsOn)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<IntermediateSatelliteAssembliesWithTargetPath Include="$(IntermediateOutputPath)%(EmbeddedResource.Culture)\$(TargetName).resources.dll" Condition="'%(EmbeddedResource.Culture)' != ''">
<Culture>%(EmbeddedResource.Culture)</Culture>
<TargetPath>%(EmbeddedResource.Culture)\$(TargetName).resources.dll</TargetPath>
</IntermediateSatelliteAssembliesWithTargetPath>
</ItemGroup>
</Target>
<!--
***********************************************************************************************
***********************************************************************************************
SetWin32ManifestProperties Section
***********************************************************************************************
***********************************************************************************************
-->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<EmbeddedWin32Manifest>$(Win32Manifest)</EmbeddedWin32Manifest>
</PropertyGroup>
<!--
============================================================
SetWin32ManifestProperties
Set Win32Manifest and EmbeddedManifest properties to be used later in the build.
============================================================
-->
<Target Name="SetWin32ManifestProperties" Condition="'$(Win32Manifest)'==''" DependsOnTargets="ResolveComReferences;ResolveNativeReferences;_SetExternalWin32ManifestProperties;_SetEmbeddedWin32ManifestProperties" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<Target Name="_SetExternalWin32ManifestProperties" Condition="'$(GenerateClickOnceManifests)'=='true' or '@(NativeReference)'!='' or '@(ResolvedIsolatedComModules)'!=''" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<!-- set _DeploymentBaseManifest property to the value of $(ApplicationManifest) if the property is set,
but use _DeploymentBaseManifestWithTargetPath item-group if the property is not set to support backwards
compat with earlier MSBuild versions when manifest files were determined by the item-group. If the newer
property is set though, prefer that one be used to specify the manifest. -->
<_DeploymentBaseManifest>$(ApplicationManifest)</_DeploymentBaseManifest>
<_DeploymentBaseManifest Condition="'$(_DeploymentBaseManifest)'==''">@(_DeploymentBaseManifestWithTargetPath)</_DeploymentBaseManifest>
<!-- when using external manifests, always set the NoWin32Manifest property to
true if there is no value set in the incoming project file so the
compilers that support manifest embedding know not to add
a manifest to their built assemblies -->
<NoWin32Manifest Condition="'$(NoWin32Manifest)'==''">true</NoWin32Manifest>
</PropertyGroup>
</Target>
<Target Name="_SetEmbeddedWin32ManifestProperties" Condition="'$(GenerateClickOnceManifests)'!='true' and '@(NativeReference)'=='' and '@(ResolvedIsolatedComModules)'==''" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<EmbeddedWin32Manifest>$(ApplicationManifest)</EmbeddedWin32Manifest>
<Win32Manifest>$(ApplicationManifest)</Win32Manifest>
</PropertyGroup>
<GetFrameworkPath Condition="'$(ApplicationManifest)'=='' and '$(NoWin32Manifest)'!='true'">
<Output TaskParameter="FrameworkVersion40Path" PropertyName="_FrameworkVersion40Path" />
</GetFrameworkPath>
<PropertyGroup>
<EmbeddedWin32Manifest Condition="'$(ApplicationManifest)'=='' and '$(NoWin32Manifest)'!='true' and Exists('$(_FrameworkVersion40Path)\default.win32manifest')">$(_FrameworkVersion40Path)\default.win32manifest</EmbeddedWin32Manifest>
</PropertyGroup>
</Target>
<!--
***********************************************************************************************
***********************************************************************************************
GenerateManifests Section
***********************************************************************************************
***********************************************************************************************
-->
<!--
============================================================
GenerateManifests
Generates ClickOnce application and deployment manifests or a native manifest.
============================================================
-->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<GenerateManifestsDependsOn>
SetWin32ManifestProperties;
GenerateApplicationManifest;
GenerateDeploymentManifest
</GenerateManifestsDependsOn>
</PropertyGroup>
<!--
============================================================
_GenerateResolvedDeploymentManifestEntryPoint
Use the ResolveManifestFiles to generate the GenerateResolvedDeploymentManifestEntryPoint
============================================================
-->
<Target Name="_GenerateResolvedDeploymentManifestEntryPoint" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<_DeploymentPublishFileOfTypeManifestEntryPoint Include="@(PublishFile)" Condition="'%(FileType)'=='ManifestEntryPoint'" />
</ItemGroup>
<ResolveManifestFiles TargetFrameworkVersion="$(TargetFrameworkVersion)" TargetFrameworkIdentifier="$(TargetFrameworkIdentifier)" SigningManifests="$(SignManifests)" DeploymentManifestEntryPoint="@(ApplicationManifest)" PublishFiles="@(_DeploymentPublishFileOfTypeManifestEntryPoint)">
<Output TaskParameter="OutputDeploymentManifestEntryPoint" ItemName="_DeploymentResolvedDeploymentManifestEntryPoint" />
</ResolveManifestFiles>
</Target>
<Target Name="GenerateManifests" Condition="'$(GenerateClickOnceManifests)'=='true' or '@(NativeReference)'!='' or '@(ResolvedIsolatedComModules)'!='' or '$(GenerateAppxManifest)' == 'true'" DependsOnTargets="$(GenerateManifestsDependsOn)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<!--
============================================================
GenerateApplicationManifest
Generates a ClickOnce or native application manifest.
An application manifest specifies declarative application identity, dependency and security information.
[IN]
$(_DeploymentBaseManifest) - The base app.manifest from project.
@(ResolvedIsolatedComModules) - The list of COM references to be isolated as reg-free COM dependencies for native assembly loader.
@(_DeploymentManifestFiles) - The list of loose files (content, pdb, xml, etc.) for ClickOnce.
@(_DeploymentManifestDependencies) - The list of application dependencies (typically this is the set of assembly dependencies in bin\) for ClickOnce.
@(AppConfigWithTargetPath) - App config file, if present.
$(_DeploymentManifestType) - Type of manifest to be generated, either "Native" or "ClickOnce".
[OUT]
@(ApplicationManifest) - Generated native or ClickOnce application manifest, i.e. WindowsApplication1.exe.manifest
============================================================
-->
<Target Name="GenerateApplicationManifest" DependsOnTargets="&#xD;&#xA; _DeploymentSetClickOnceVersions;&#xD;&#xA; _DeploymentGenerateLauncher;&#xD;&#xA; _DeploymentComputeNativeManifestInfo;&#xD;&#xA; _DeploymentComputeClickOnceManifestInfo;&#xD;&#xA; ResolveComReferences;&#xD;&#xA; ResolveNativeReferences;&#xD;&#xA; _GenerateResolvedDeploymentManifestEntryPoint" Inputs="&#xD;&#xA; $(MSBuildAllProjects);&#xD;&#xA; @(AppConfigWithTargetPath);&#xD;&#xA; $(_DeploymentBaseManifest);&#xD;&#xA; @(ResolvedIsolatedComModules);&#xD;&#xA; @(_DeploymentManifestDependencies);&#xD;&#xA; @(_DeploymentResolvedManifestEntryPoint);&#xD;&#xA; @(_DeploymentManifestFiles)" Outputs="@(ApplicationManifest)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<RequiresFramework35SP1Assembly ReferencedAssemblies="@(Reference)" ErrorReportUrl="$(_DeploymentFormattedErrorReportUrl)" TargetFrameworkVersion="$(TargetFrameworkVersion)" CreateDesktopShortcut="$(CreateDesktopShortcut)" SigningManifests="$(SignManifests)" Assemblies="@(_DeploymentManifestDependencies)" DeploymentManifestEntryPoint="@(_DeploymentResolvedDeploymentManifestEntryPoint)" EntryPoint="@(_DeploymentResolvedManifestEntryPoint)" Files="@(_DeploymentManifestFiles)" SuiteName="$(SuiteName)">
<Output TaskParameter="RequiresMinimumFramework35SP1" PropertyName="_DeploymentRequiresMinimumFramework35SP1" />
</RequiresFramework35SP1Assembly>
<GenerateApplicationManifest AssemblyName="$(_DeploymentApplicationManifestIdentity)" AssemblyVersion="$(_DeploymentManifestVersion)" ConfigFile="@(AppConfigWithTargetPath)" ClrVersion="$(ClrVersion)" 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)" OutputManifest="@(ApplicationManifest)" OSVersion="$(OSVersion)" Platform="$(_DeploymentPlatformTarget)" Product="$(ProductName)" Publisher="$(PublisherName)" RequiresMinimumFramework35SP1="$(_DeploymentRequiresMinimumFramework35SP1)" SuiteName="$(SuiteName)" SupportUrl="$(_DeploymentFormattedSupportUrl)" TargetCulture="$(TargetCulture)" TargetFrameworkSubset="$(TargetFrameworkSubset)" TargetFrameworkProfile="$(TargetFrameworkProfile)" TargetFrameworkVersion="$(_DeploymentManifestTargetFrameworkVersion)" TrustInfoFile="@(_DeploymentIntermediateTrustInfoFile)" UseApplicationTrust="$(UseApplicationTrust)">
<Output TaskParameter="OutputManifest" ItemName="FileWrites" />
</GenerateApplicationManifest>
<PropertyGroup>
<_DeploymentCopyApplicationManifest>true</_DeploymentCopyApplicationManifest>
</PropertyGroup>
</Target>
<!--
============================================================
_DeploymentSetClickOnceVersions
Sets ClickOnce versions
============================================================
-->
<Target Name="_DeploymentSetClickOnceVersions" Condition="'$(GenerateClickOnceManifests)'=='true'" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<_DeploymentManifestTargetFrameworkMoniker>$(TargetFrameworkMoniker)</_DeploymentManifestTargetFrameworkMoniker>
<_DeploymentManifestTargetFrameworkVersion>$(TargetFrameworkVersion)</_DeploymentManifestTargetFrameworkVersion>
</PropertyGroup>
</Target>
<!--
============================================================
_DeploymentGenerateLauncher
Generates Launcher if needed
============================================================
-->
<Target Name="_DeploymentGenerateLauncher" Condition="'$(GenerateClickOnceManifests)'=='true' and '$(_DeploymentLauncherBased)' == 'true'" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!--
If apphost based built EXE is found, use that as the Launcher.exe's entry point otherwise
use the built DLL as the entry point
-->
<ItemGroup Condition="'$(UseAppHost)' == 'true' and '$(_IsExecutable)' == 'true' and exists('$(AppHostIntermediatePath)')">
<EntryPointForLauncher Include="$(AppHostIntermediatePath)" />
<ContentWithTargetPath Include="@(EntryPointForLauncher)" />
</ItemGroup>
<ItemGroup Condition="'$(EntryPointForLauncher)'==''">
<EntryPointForLauncher Include="$(_DeploymentManifestEntryPoint)" />
</ItemGroup>
<!-- Generates Launcher and obtains its Framework version and moniker -->
<GenerateLauncher AssemblyName="$(_DeploymentApplicationManifestIdentity)" EntryPoint="@(EntryPointForLauncher)" OutputPath="$(IntermediateOutputPath)" VisualStudioVersion="$(VisualStudioVersion)">
<Output TaskParameter="OutputEntryPoint" ItemName="_DeploymentManifestLauncherEntryPoint" />
</GenerateLauncher>
<!--
.NET Core ClickOnce deployments use Launcher, which targets .NET FX 4.5 as the minimum
supported ClickOnce runtime version on target user's machine.
TargetFramework Verion and Moniker properties are used in Deployment manifest generation
task to set compatibleFrameworks element, which needs to match Launcher's target version.
Version can be overriden with DeploymentManifestTargetFrameworkVersionOverride property.
-->
<PropertyGroup>
<_DeploymentManifestTargetFrameworkVersion Condition="'$(DeploymentManifestTargetFrameworkVersionOverride)' == ''">v4.5</_DeploymentManifestTargetFrameworkVersion>
<_DeploymentManifestTargetFrameworkVersion Condition="'$(DeploymentManifestTargetFrameworkVersionOverride)' != ''">$(DeploymentManifestTargetFrameworkVersionOverride)</_DeploymentManifestTargetFrameworkVersion>
<_DeploymentManifestTargetFrameworkMoniker>.NETFramework,Version=$(_DeploymentManifestTargetFrameworkVersion)</_DeploymentManifestTargetFrameworkMoniker>
</PropertyGroup>
<!-- Sign Launcher EXE -->
<SignFile CertificateThumbprint="$(_DeploymentResolvedManifestCertificateThumbprint)" TimestampUrl="$(ManifestTimestampUrl)" SigningTarget="@(_DeploymentManifestLauncherEntryPoint)" TargetFrameworkVersion="$(TargetFrameworkVersion)" TargetFrameworkIdentifier="$(TargetFrameworkIdentifier)" Condition="'$(_DeploymentSignClickOnceManifests)'=='true'" />
<!-- Sign the original ClickOnce entrypoint -->
<SignFile CertificateThumbprint="$(_DeploymentResolvedManifestCertificateThumbprint)" TimestampUrl="$(ManifestTimestampUrl)" SigningTarget="@(_DeploymentManifestEntryPoint)" TargetFrameworkVersion="$(TargetFrameworkVersion)" TargetFrameworkIdentifier="$(TargetFrameworkIdentifier)" Condition="'$(_DeploymentSignClickOnceManifests)'=='true'" />
<!-- Sign apphost.exe if it's the entrypoint for the Launcher.exe. This is the case in loose file publish -->
<SignFile CertificateThumbprint="$(_DeploymentResolvedManifestCertificateThumbprint)" TimestampUrl="$(ManifestTimestampUrl)" SigningTarget="$(AppHostIntermediatePath)" TargetFrameworkVersion="$(TargetFrameworkVersion)" TargetFrameworkIdentifier="$(TargetFrameworkIdentifier)" Condition="'$(_DeploymentSignClickOnceManifests)'=='true' and '$(UseAppHost)' == 'true' and '$(PublishSingleFile)' != 'true' and '$(_IsExecutable)' == 'true' and exists('$(AppHostIntermediatePath)')" />
<!--
Replace entry-point with Launcher and move original project's entry-point to content group.
-->
<ItemGroup>
<ContentWithTargetPath Include="@(_DeploymentManifestEntryPoint)" />
<_DeploymentManifestEntryPoint Remove="@(_DeploymentManifestEntryPoint)" />
<_DeploymentManifestEntryPoint Include="@(_DeploymentManifestLauncherEntryPoint)" />
</ItemGroup>
</Target>
<!--
============================================================
_DeploymentComputeNativeManifestInfo
Compute info for native manifest generation
============================================================
-->
<Target Name="_DeploymentComputeNativeManifestInfo" Condition="'$(GenerateClickOnceManifests)'!='true'" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- Create list of items for manifest generation -->
<ResolveManifestFiles NativeAssemblies="@(NativeReferenceFile);@(_DeploymentNativePrerequisite)">
<Output TaskParameter="OutputAssemblies" ItemName="_DeploymentManifestDependencies" />
</ResolveManifestFiles>
<PropertyGroup>
<_DeploymentManifestType>Native</_DeploymentManifestType>
</PropertyGroup>
<!-- Obtain manifest version from the built assembly -->
<GetAssemblyIdentity AssemblyFiles="@(IntermediateAssembly)">
<Output TaskParameter="Assemblies" ItemName="_IntermediateAssemblyIdentity" />
</GetAssemblyIdentity>
<PropertyGroup>
<_DeploymentManifestVersion>@(_IntermediateAssemblyIdentity->'%(Version)')</_DeploymentManifestVersion>
</PropertyGroup>
</Target>
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<DeploymentComputeClickOnceManifestInfoDependsOn>
CleanPublishFolder;
_DeploymentGenerateTrustInfo
$(DeploymentComputeClickOnceManifestInfoDependsOn)
</DeploymentComputeClickOnceManifestInfoDependsOn>
</PropertyGroup>
<!--
============================================================
_DeploymentComputeClickOnceManifestInfo
Compute info for ClickOnce manifest generation
============================================================
-->
<Target Name="_DeploymentComputeClickOnceManifestInfo" Condition="'$(GenerateClickOnceManifests)'=='true'" DependsOnTargets="$(DeploymentComputeClickOnceManifestInfoDependsOn)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- Grab just the serialization assemblies for a referenced assembly. There may also be a symbols file in ReferenceRelatedPaths -->
<ItemGroup>
<_SGenDllsRelatedToCurrentDll Include="@(_ReferenceSerializationAssemblyPaths->'%(FullPath)')" Condition="'%(Extension)' == '.dll'" />
<_SGenDllsRelatedToCurrentDll Include="@(SerializationAssembly->'%(FullPath)')" Condition="'%(Extension)' == '.dll'" />
</ItemGroup>
<ItemGroup Condition="!exists('$(ProjectLockFile)')">
<_CopyLocalFalseRefPaths Include="@(ReferencePath)" Condition="'%(CopyLocal)' == 'false'" />
<_CopyLocalFalseRefPathsWithExclusion Include="@(_CopyLocalFalseRefPaths)" Exclude="@(ReferenceCopyLocalPaths);@(_NETStandardLibraryNETFrameworkLib)" />
</ItemGroup>
<!-- Flag primary dependencies-certain warnings emitted during application manifest generation apply only to them. -->
<ItemGroup>
<_SatelliteAssemblies Include="@(IntermediateSatelliteAssembliesWithTargetPath);@(ReferenceSatellitePaths)" />
<_DeploymentReferencePaths Include="@(ReferenceCopyLocalPaths)" Condition="('%(Extension)' == '.dll' Or '%(Extension)' == '.exe' Or '%(Extension)' == '.md') and ('%(ReferenceCopyLocalPaths.CopyToPublishDirectory)' != 'false')">
<IsPrimary>true</IsPrimary>
</_DeploymentReferencePaths>
<_DeploymentReferencePaths Include="@(_CopyLocalFalseRefPathsWithExclusion)" />
</ItemGroup>
<!-- Include managed references in clickonce manifest only if single file publish is false -->
<ItemGroup Condition="'$(PublishSingleFile)' != 'true'">
<_ManifestManagedReferences Include="@(_DeploymentReferencePaths);@(ReferenceDependencyPaths);@(_SGenDllsRelatedToCurrentDll);@(SerializationAssembly);@(ReferenceCOMWrappersToCopyLocal)" Exclude="@(_SatelliteAssemblies);@(_ReferenceScatterPaths);@(_ExcludedAssembliesFromManifestGeneration)" />
</ItemGroup>
<!-- Include the following files in clickonce manifest only if single file publish is false -->
<ItemGroup Condition="'$(PublishSingleFile)' != 'true'">
<!--
_ClickOnceRuntimeCopyLocalItems group contains any runtimes folder assets of Nuget packages that are not included in
_DeploymentReferencePaths (e.g. pdbs). They are populated from the RuntimeTargetsCopyLocalItems and NativeCopyLocalItems
group that contain the RID-specific assets that go in runtimes folder on publish. They are output groups of the
ResolvePackageAssets target in dotnet/sdk
-->
<_ClickOnceRuntimeCopyLocalItems Include="@(RuntimeTargetsCopyLocalItems)" Condition="'%(RuntimeTargetsCopyLocalItems.CopyLocal)' == 'true'" />
<_ClickOnceRuntimeCopyLocalItems Include="@(NativeCopyLocalItems)" Condition="'%(NativeCopyLocalItems.CopyLocal)' == 'true'" />
<_ClickOnceRuntimeCopyLocalItems Remove="@(_DeploymentReferencePaths)" />
<_ClickOnceFiles Include="@(ContentWithTargetPath);@(_DeploymentManifestIconFile);@(AppConfigWithTargetPath);@(NetCoreRuntimeJsonFilesForClickOnce);@(_ClickOnceRuntimeCopyLocalItems)" />
</ItemGroup>
<!-- For single file publish, we need to include the SF bundle EXE and files excluded from the bundle EXE in the clickonce manifest -->
<ItemGroup Condition="'$(PublishSingleFile)' == 'true'">
<_ClickOnceFiles Include="$(PublishedSingleFilePath)" />
<_ClickOnceFiles Include="@(_FilesExcludedFromBundle)" />
</ItemGroup>
<!-- For single file publish in .net core app, sign the SF EXE if signing is enabled -->
<SignFile CertificateThumbprint="$(_DeploymentResolvedManifestCertificateThumbprint)" TimestampUrl="$(ManifestTimestampUrl)" SigningTarget="$(PublishedSingleFilePath)" TargetFrameworkVersion="$(TargetFrameworkVersion)" TargetFrameworkIdentifier="$(TargetFrameworkIdentifier)" Condition="'$(_DeploymentSignClickOnceManifests)'=='true' and '$(_DeploymentLauncherBased)' == 'true' and '$(PublishSingleFile)' == 'true'" />
<!--
If ReadyToRun is enabled in loose files scenario, we need to remove entries of the IL images that have gone through R2R
compiler and replace them with the entries for their R2R images. The R2R application image also needs to be signed if necessary.
-->
<ItemGroup Condition="'$(PublishReadyToRun)' == 'true' and '$(PublishSingleFile)' != 'true'">
<_ManifestManagedReferences Remove="@(_ReadyToRunCompileList)" />
<_ClickOnceFiles Remove="@(_ReadyToRunCompileList)" />
<_ClickOnceFiles Include="@(_ReadyToRunFilesToPublish)" />
<_ClickOnceTargetFile Include="@(_ReadyToRunFilesToPublish)" Condition="'%(Filename)%(Extension)' == '$(TargetFileName)'" />
</ItemGroup>
<!-- Sign application image created by R2R -->
<SignFile CertificateThumbprint="$(_DeploymentResolvedManifestCertificateThumbprint)" TimestampUrl="$(ManifestTimestampUrl)" SigningTarget="@(_ClickOnceTargetFile)" TargetFrameworkVersion="$(TargetFrameworkVersion)" TargetFrameworkIdentifier="$(TargetFrameworkIdentifier)" Condition="'$(_DeploymentSignClickOnceManifests)' == 'true' and '$(PublishReadyToRun)' == 'true' and '$(PublishSingleFile)' != 'true'" />
<!-- Copy the application executable from Obj folder to app.publish folder.
This is being done to avoid Windows Forms designer memory issues that can arise while operating directly on files located in Obj directory. -->
<Copy SourceFiles="@(_DeploymentManifestEntryPoint)" DestinationFolder="$(PublishDir)">
<Output TaskParameter="DestinationFiles" ItemName="_DeploymentClickOnceApplicationExecutable" />
</Copy>
<!-- Sign the application executable located in app.publish folder. Signing this file is done to comply with SmartScreen. -->
<SignFile CertificateThumbprint="$(_DeploymentResolvedManifestCertificateThumbprint)" TimestampUrl="$(ManifestTimestampUrl)" SigningTarget="@(_DeploymentClickOnceApplicationExecutable)" Condition="'$(_DeploymentResolvedManifestCertificateThumbprint)'!='' and '$(_DeploymentSignClickOnceManifests)'=='true' and '$(TargetExt)' == '.exe'" />
<!-- Create list of items for manifest generation -->
<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="@(_SatelliteAssemblies)" SigningManifests="$(SignManifests)" TargetCulture="$(TargetCulture)" TargetFrameworkIdentifier="$(TargetFrameworkIdentifier)" TargetFrameworkVersion="$(TargetFrameworkVersion)">
<Output TaskParameter="OutputAssemblies" ItemName="_DeploymentManifestDependenciesUnfiltered" />
<Output TaskParameter="OutputFiles" ItemName="_DeploymentManifestFiles" />
<Output TaskParameter="OutputEntryPoint" ItemName="_DeploymentResolvedManifestEntryPoint" />
</ResolveManifestFiles>
<!-- We have to filter items out of the dependencies that have neither CopyLocal set to true, -->
<!-- nor the dependency type manually set to 'Install'. -->
<ItemGroup>
<_DeploymentManifestDependencies Include="@(_DeploymentManifestDependenciesUnfiltered)" Condition="!('%(_DeploymentManifestDependenciesUnfiltered.CopyLocal)' == 'false' And '%(_DeploymentManifestDependenciesUnfiltered.DependencyType)' != 'Install')" />
</ItemGroup>
<PropertyGroup>
<_DeploymentManifestType>ClickOnce</_DeploymentManifestType>
</PropertyGroup>
<!--
Manifest platform should always be MSIL for Launcher-based deployments, as the Launcher is MSIL.
Do not set _DeploymentPlatformTarget property in Launcher case - this is interpreted as MSIL,
by GenerateApplicationManifest and GenerateDeploymentManifest tasks.
Otherwise, set it to PlatformTarget.
-->
<PropertyGroup>
<_DeploymentPlatformTarget Condition="'$(_DeploymentLauncherBased)' != 'true'">$(PlatformTarget)</_DeploymentPlatformTarget>
</PropertyGroup>
<!-- Obtain manifest version from ApplicationVersion and ApplicationRevision properties -->
<FormatVersion Version="$(ApplicationVersion)" Revision="$(ApplicationRevision)">
<Output TaskParameter="OutputVersion" PropertyName="_DeploymentManifestVersion" />
</FormatVersion>
<FormatUrl InputUrl="$(_DeploymentUrl)">
<Output TaskParameter="OutputUrl" PropertyName="_DeploymentFormattedDeploymentUrl" />
</FormatUrl>
<FormatUrl InputUrl="$(SupportUrl)">
<Output TaskParameter="OutputUrl" PropertyName="_DeploymentFormattedSupportUrl" />
</FormatUrl>
<FormatUrl InputUrl="$(ErrorReportUrl)">
<Output TaskParameter="OutputUrl" PropertyName="_DeploymentFormattedErrorReportUrl" />
</FormatUrl>
</Target>
<!--
============================================================
_DeploymentGenerateTrustInfo
Generates the application permission set for inclusion in the generated ClickOnce application manifest.
============================================================
-->
<Target Name="_DeploymentGenerateTrustInfo" Condition="'$(TargetZone)'!=''" Inputs="&#xD;&#xA; $(MSBuildAllProjects);&#xD;&#xA; $(_DeploymentBaseManifest);&#xD;&#xA; " Outputs="@(_DeploymentIntermediateTrustInfoFile)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<GenerateTrustInfo BaseManifest="$(_DeploymentBaseManifest)" ApplicationDependencies="@(ReferencePath);@(ReferenceDependencyPaths)" ExcludedPermissions="$(ExcludedPermissions)" TargetFrameworkMoniker="$(TargetFrameworkMoniker)" TargetZone="$(TargetZone)" TrustInfoFile="@(_DeploymentIntermediateTrustInfoFile)">
<Output TaskParameter="TrustInfoFile" ItemName="FileWrites" />
</GenerateTrustInfo>
</Target>
<!--
============================================================
GenerateDeploymentManifest
Generates a ClickOnce deployment manifest.
An deployment manifest specifies declarative application identity and application update information.
============================================================
-->
<Target Name="GenerateDeploymentManifest" DependsOnTargets="GenerateApplicationManifest" Inputs="&#xD;&#xA; $(MSBuildAllProjects);&#xD;&#xA; @(ApplicationManifest)&#xD;&#xA; " Outputs="@(DeployManifest)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<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)" TargetFrameworkVersion="$(_DeploymentManifestTargetFrameworkVersion)" TargetFrameworkMoniker="$(_DeploymentManifestTargetFrameworkMoniker)" TrustUrlParameters="$(TrustUrlParameters)" UpdateEnabled="$(UpdateEnabled)" UpdateInterval="$(_DeploymentBuiltUpdateInterval)" UpdateMode="$(UpdateMode)" UpdateUnit="$(_DeploymentBuiltUpdateIntervalUnits)" Condition="'$(GenerateClickOnceManifests)'=='true'">
<Output TaskParameter="OutputManifest" ItemName="FileWrites" />
</GenerateDeploymentManifest>
</Target>
<!--
***********************************************************************************************
***********************************************************************************************
PrepareForRun Section
***********************************************************************************************
***********************************************************************************************
-->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<SkipCopyUnchangedFiles Condition="'$(SkipCopyUnchangedFiles)' == ''">true</SkipCopyUnchangedFiles>
<UseCommonOutputDirectory Condition="'$(UseCommonOutputDirectory)' == ''">false</UseCommonOutputDirectory>
</PropertyGroup>
<!--
============================================================
PrepareForRun
Copy the build outputs to the final directory if they have changed.
============================================================
-->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PrepareForRunDependsOn>
CopyFilesToOutputDirectory
</PrepareForRunDependsOn>
</PropertyGroup>
<Target Name="PrepareForRun" DependsOnTargets="$(PrepareForRunDependsOn)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<!--
============================================================
CopyFilesToOutputDirectory
Copy all build outputs, satellites and other necessary files to the final directory.
============================================================
-->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- By default we're not using Hard or Symbolic Links to copy to the output directory, and never when building in VS -->
<CreateHardLinksForCopyAdditionalFilesIfPossible Condition="'$(BuildingInsideVisualStudio)' == 'true' or '$(CreateHardLinksForCopyAdditionalFilesIfPossible)' == ''">false</CreateHardLinksForCopyAdditionalFilesIfPossible>
<CreateSymbolicLinksForCopyAdditionalFilesIfPossible Condition="'$(BuildingInsideVisualStudio)' == 'true' or '$(CreateSymbolicLinksForCopyAdditionalFilesIfPossible)' == ''">false</CreateSymbolicLinksForCopyAdditionalFilesIfPossible>
</PropertyGroup>
<Target Name="CopyFilesToOutputDirectory" DependsOnTargets="&#xD;&#xA; ComputeIntermediateSatelliteAssemblies;&#xD;&#xA; _CopyFilesMarkedCopyLocal;&#xD;&#xA; _CopySourceItemsToOutputDirectory;&#xD;&#xA; _CopyAppConfigFile;&#xD;&#xA; _CopyManifestFiles;&#xD;&#xA; _CheckForCompileOutputs;&#xD;&#xA; _SGenCheckForOutputs" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<!-- By default we're not using Hard Links to copy to the output directory, and never when building in VS -->
<CreateHardLinksForCopyFilesToOutputDirectoryIfPossible Condition="'$(BuildingInsideVisualStudio)' == 'true' or '$(CreateHardLinksForCopyFilesToOutputDirectoryIfPossible)' == ''">false</CreateHardLinksForCopyFilesToOutputDirectoryIfPossible>
<CreateSymbolicLinksForCopyFilesToOutputDirectoryIfPossible Condition="'$(BuildingInsideVisualStudio)' == 'true' or '$(CreateSymbolicLinksForCopyFilesToOutputDirectoryIfPossible)' == ''">false</CreateSymbolicLinksForCopyFilesToOutputDirectoryIfPossible>
<ErrorIfLinkFailsForCopyFilesToOutputDirectory Condition="'$(BuildingInsideVisualStudio)' == 'true' or '$(ErrorIfLinkFailsForCopyFilesToOutputDirectory)' == ''">false</ErrorIfLinkFailsForCopyFilesToOutputDirectory>
</PropertyGroup>
<PropertyGroup>
<CopyBuildOutputToOutputDirectory Condition="'$(CopyBuildOutputToOutputDirectory)'==''">true</CopyBuildOutputToOutputDirectory>
<CopyOutputSymbolsToOutputDirectory Condition="'$(CopyOutputSymbolsToOutputDirectory)'==''">true</CopyOutputSymbolsToOutputDirectory>
<CopyDocumentationFileToOutputDirectory Condition="'$(CopyDocumentationFileToOutputDirectory)'==''">true</CopyDocumentationFileToOutputDirectory>
</PropertyGroup>
<!-- Copy the build product (.dll or .exe). -->
<Copy SourceFiles="@(IntermediateAssembly)" DestinationFolder="$(OutDir)" SkipUnchangedFiles="$(SkipCopyUnchangedFiles)" OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)" Retries="$(CopyRetryCount)" RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)" UseHardlinksIfPossible="$(CreateHardLinksForCopyFilesToOutputDirectoryIfPossible)" UseSymboliclinksIfPossible="$(CreateSymbolicLinksForCopyFilesToOutputDirectoryIfPossible)" ErrorIfLinkFails="$(ErrorIfLinkFailsForCopyFilesToOutputDirectory)" Condition="'$(CopyBuildOutputToOutputDirectory)' == 'true' and '$(SkipCopyBuildProduct)' != 'true'">
<Output TaskParameter="DestinationFiles" ItemName="MainAssembly" />
<Output TaskParameter="DestinationFiles" ItemName="FileWrites" />
</Copy>
<!-- Copy the reference assembly build product (.dll or .exe). -->
<CopyRefAssembly SourcePath="@(IntermediateRefAssembly)" DestinationPath="$(TargetRefPath)" Condition="'$(ProduceReferenceAssembly)' == 'true' and '$(CopyBuildOutputToOutputDirectory)' == 'true' and '$(SkipCopyBuildProduct)' != 'true'">
<Output TaskParameter="DestinationPath" ItemName="ReferenceAssembly" />
<Output TaskParameter="DestinationPath" ItemName="FileWrites" />
</CopyRefAssembly>
<Message Importance="High" Text="$(MSBuildProjectName) -&gt; @(MainAssembly->'%(FullPath)')" Condition="'$(CopyBuildOutputToOutputDirectory)' == 'true' and '$(SkipCopyBuildProduct)'!='true'" />
<!-- Copy the additional modules. -->
<Copy SourceFiles="@(AddModules)" DestinationFolder="$(OutDir)" SkipUnchangedFiles="$(SkipCopyUnchangedFiles)" OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)" Retries="$(CopyRetryCount)" RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)" UseHardlinksIfPossible="$(CreateHardLinksForCopyAdditionalFilesIfPossible)" UseSymboliclinksIfPossible="$(CreateSymbolicLinksForCopyAdditionalFilesIfPossible)" Condition="'@(AddModules)' != ''">
<Output TaskParameter="DestinationFiles" ItemName="FileWrites" />
</Copy>
<!-- Copy the serialization assembly if it exists. -->
<Copy SourceFiles="$(IntermediateOutputPath)$(_SGenDllName)" DestinationFiles="$(OutDir)$(_SGenDllName)" SkipUnchangedFiles="$(SkipCopyUnchangedFiles)" OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)" Retries="$(CopyRetryCount)" RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)" UseHardlinksIfPossible="$(CreateHardLinksForCopyFilesToOutputDirectoryIfPossible)" UseSymboliclinksIfPossible="$(CreateSymbolicLinksForCopyFilesToOutputDirectoryIfPossible)" ErrorIfLinkFails="$(ErrorIfLinkFailsForCopyFilesToOutputDirectory)" Condition="'$(_SGenDllCreated)'=='true'">
<Output TaskParameter="DestinationFiles" ItemName="FileWrites" />
</Copy>
<!-- Copy the debug information file (.pdb), if any -->
<Copy SourceFiles="@(_DebugSymbolsIntermediatePath)" DestinationFiles="@(_DebugSymbolsOutputPath)" SkipUnchangedFiles="$(SkipCopyUnchangedFiles)" OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)" Retries="$(CopyRetryCount)" RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)" UseHardlinksIfPossible="$(CreateHardLinksForCopyFilesToOutputDirectoryIfPossible)" UseSymboliclinksIfPossible="$(CreateSymbolicLinksForCopyFilesToOutputDirectoryIfPossible)" ErrorIfLinkFails="$(ErrorIfLinkFailsForCopyFilesToOutputDirectory)" Condition="'$(_DebugSymbolsProduced)'=='true' and '$(SkipCopyingSymbolsToOutputDirectory)' != 'true' and '$(CopyOutputSymbolsToOutputDirectory)'=='true'">
<Output TaskParameter="DestinationFiles" ItemName="FileWrites" />
</Copy>
<!-- Copy the resulting XML documentation file, if any. -->
<Copy SourceFiles="@(DocFileItem)" DestinationFiles="@(FinalDocFile)" SkipUnchangedFiles="$(SkipCopyUnchangedFiles)" OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)" Retries="$(CopyRetryCount)" RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)" UseHardlinksIfPossible="$(CreateHardLinksForCopyFilesToOutputDirectoryIfPossible)" UseSymboliclinksIfPossible="$(CreateSymbolicLinksForCopyFilesToOutputDirectoryIfPossible)" ErrorIfLinkFails="$(ErrorIfLinkFailsForCopyFilesToOutputDirectory)" Condition="'$(_DocumentationFileProduced)'=='true' and '$(CopyDocumentationFileToOutputDirectory)'=='true'">
<Output TaskParameter="DestinationFiles" ItemName="FileWrites" />
</Copy>
<!-- Copy satellite assemblies. -->
<Copy SourceFiles="@(IntermediateSatelliteAssembliesWithTargetPath)" DestinationFiles="@(IntermediateSatelliteAssembliesWithTargetPath->'$(OutDir)%(Culture)\$(TargetName).resources.dll')" SkipUnchangedFiles="$(SkipCopyUnchangedFiles)" OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)" Retries="$(CopyRetryCount)" RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)" UseHardlinksIfPossible="$(CreateHardLinksForCopyFilesToOutputDirectoryIfPossible)" UseSymboliclinksIfPossible="$(CreateSymbolicLinksForCopyFilesToOutputDirectoryIfPossible)" ErrorIfLinkFails="$(ErrorIfLinkFailsForCopyFilesToOutputDirectory)" Condition="'@(IntermediateSatelliteAssembliesWithTargetPath)' != ''">
<Output TaskParameter="DestinationFiles" ItemName="FileWrites" />
</Copy>
<!--
Copy COM reference wrappers, isolated COM references, COM references included by
native (manifest) references, native (manifest) reference files themselves.
-->
<Copy SourceFiles="@(ReferenceComWrappersToCopyLocal); @(ResolvedIsolatedComModules); @(_DeploymentLooseManifestFile); @(NativeReferenceFile)" DestinationFolder="$(OutDir)" SkipUnchangedFiles="$(SkipCopyUnchangedFiles)" OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)" Retries="$(CopyRetryCount)" RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)" UseHardlinksIfPossible="$(CreateHardLinksForCopyAdditionalFilesIfPossible)" UseSymboliclinksIfPossible="$(CreateSymbolicLinksForCopyAdditionalFilesIfPossible)" Condition="'@(ReferenceComWrappersToCopyLocal)' != '' or '@(ResolvedIsolatedComModules)' != '' or '@(_DeploymentLooseManifestFile)' != '' or '@(NativeReferenceFile)' != '' ">
<Output TaskParameter="DestinationFiles" ItemName="FileWritesShareable" />
</Copy>
<!-- Copy the build product of WinMDExp. -->
<Copy SourceFiles="@(WinMDExpArtifacts)" DestinationFolder="$(OutDir)" SkipUnchangedFiles="$(SkipCopyUnchangedFiles)" OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)" Retries="$(CopyRetryCount)" RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)" UseHardlinksIfPossible="$(CreateHardLinksForCopyFilesToOutputDirectoryIfPossible)" UseSymboliclinksIfPossible="$(CreateSymbolicLinksForCopyFilesToOutputDirectoryIfPossible)" ErrorIfLinkFails="$(ErrorIfLinkFailsForCopyFilesToOutputDirectory)" Condition="'$(SkipCopyWinMDArtifact)' != 'true' and '@(WinMDExpArtifacts)' != ''">
<Output TaskParameter="DestinationFiles" ItemName="FileWrites" />
<Output TaskParameter="DestinationFiles" ItemName="FinalWinmdExpArtifacts" />
</Copy>
<Message Importance="High" Text="$(MSBuildProjectName) -&gt; $([System.IO.Path]::GetFullPath('$(_WindowsMetadataOutputPath)'))" Condition="'$(SkipCopyWinMDArtifact)' != 'true' and '$(_WindowsMetadataOutputPath)' != ''" />
</Target>
<!--
============================================================
_CopyFilesMarkedCopyLocal
Copy references that are marked as "CopyLocal" and their dependencies, including .pdbs, .xmls and satellites.
============================================================
-->
<Target Name="_CopyFilesMarkedCopyLocal" Condition="'@(ReferenceCopyLocalPaths)' != ''" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<!-- By default we're not using Hard Links to copy to the output directory, and never when building in VS -->
<CreateHardLinksForCopyLocalIfPossible Condition="'$(BuildingInsideVisualStudio)' == 'true' or '$(CreateHardLinksForCopyLocalIfPossible)' == ''">false</CreateHardLinksForCopyLocalIfPossible>
<CreateSymbolicLinksForCopyLocalIfPossible Condition="'$(BuildingInsideVisualStudio)' == 'true' or '$(CreateSymbolicLinksForCopyLocalIfPossible)' == ''">false</CreateSymbolicLinksForCopyLocalIfPossible>
</PropertyGroup>
<Copy SourceFiles="@(ReferenceCopyLocalPaths)" DestinationFiles="@(ReferenceCopyLocalPaths->'$(OutDir)%(DestinationSubDirectory)%(Filename)%(Extension)')" SkipUnchangedFiles="$(SkipCopyUnchangedFiles)" OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)" Retries="$(CopyRetryCount)" RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)" UseHardlinksIfPossible="$(CreateHardLinksForCopyLocalIfPossible)" UseSymboliclinksIfPossible="$(CreateSymbolicLinksForCopyLocalIfPossible)" Condition="'$(UseCommonOutputDirectory)' != 'true'">
<Output TaskParameter="DestinationFiles" ItemName="FileWritesShareable" />
<Output TaskParameter="CopiedFiles" ItemName="ReferencesCopiedInThisBuild" />
</Copy>
<!-- If this project produces reference assemblies *and* copied (possibly transitive)
references on this build, subsequent builds of projects that depend on it must
not be considered up to date, so touch this marker file that is considered an
input to projects that reference this one. -->
<Touch Files="@(CopyUpToDateMarker)" AlwaysCreate="true" Condition="'@(ReferencesCopiedInThisBuild)' != ''">
<Output TaskParameter="TouchedFiles" ItemName="FileWrites" />
</Touch>
</Target>
<!--
============================================================
_CopySourceItemsToOutputDirectory
============================================================
-->
<Target Name="_CopySourceItemsToOutputDirectory" DependsOnTargets="&#xD;&#xA; GetCopyToOutputDirectoryItems;&#xD;&#xA; _CopyOutOfDateSourceItemsToOutputDirectory;&#xD;&#xA; _CopyOutOfDateSourceItemsToOutputDirectoryAlways" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<!--
============================================================
GetCopyToOutputDirectoryItems
Get all project items that may need to be transferred to the output directory.
This includes baggage items from transitively referenced projects. It would appear
that this target computes full transitive closure of content items for all referenced
projects; however that is not the case. It only collects the content items from its
immediate children and not children of children. The reason this happens is that
the ProjectReferenceWithConfiguration list that is consumed by _SplitProjectReferencesByFileExistence
is only populated in the current project and is empty in the children. The empty list
causes _MSBuildProjectReferenceExistent to be empty and terminates the recursion.
============================================================
-->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<_TargetsThatPrepareProjectReferences>_SplitProjectReferencesByFileExistence</_TargetsThatPrepareProjectReferences>
<!--
GetCopyToOutputDirectoryItems depends on an unspecified dependency _SplitProjectReferencesByFileExistence -> AssignProjectConfiguration (https://github.com/microsoft/msbuild/issues/4677).
When the unspecified dependency does not happen by accident, content copying is only 1 level deep instead of transitive.
This target enforces the dependency.
TODO: make transitive content copying the default when the breaking change is acceptable.
-->
<_TargetsThatPrepareProjectReferences Condition=" '$(MSBuildCopyContentTransitively)' == 'true' ">
AssignProjectConfiguration;
_SplitProjectReferencesByFileExistence
</_TargetsThatPrepareProjectReferences>
<GetCopyToOutputDirectoryItemsDependsOn>
AssignTargetPaths;
$(_TargetsThatPrepareProjectReferences);
_GetProjectReferenceTargetFrameworkProperties;
_PopulateCommonStateForGetCopyToOutputDirectoryItems
</GetCopyToOutputDirectoryItemsDependsOn>
<!--
Mitigation for https://github.com/microsoft/msbuild/issues/4677
When MSBuildCopyContentTransitively == true, all content copying is transitive.
When MSBuildCopyContentTransitively == false, content copying is 1 level deep.
When MSBuildCopyContentTransitively != {true, false}, the legacy behaviour in https://github.com/microsoft/msbuild/issues/4677 manifests.
-->
<_RecursiveTargetForContentCopying>GetCopyToOutputDirectoryItems</_RecursiveTargetForContentCopying>
<!-- Enforce 1 level deep content copying by replacing the recursive content target with the target that retrieves the content for the current project only. -->
<_RecursiveTargetForContentCopying Condition=" '$(MSBuildCopyContentTransitively)' == 'false' ">_GetCopyToOutputDirectoryItemsFromThisProject</_RecursiveTargetForContentCopying>
</PropertyGroup>
<Target Name="_PopulateCommonStateForGetCopyToOutputDirectoryItems" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- In the general case, clients need very little of the metadata which is generated by invoking this target on this project and its children. For those
cases, we can immediately discard the unwanted metadata, reducing memory usage, particularly in very large and interconnected systems of projects.
However, if some client does require the original functionality, it is sufficient to set MSBuildDisableGetCopyToOutputDirectoryItemsOptimization to
a non-empty value and the original behavior will be restored. -->
<PropertyGroup Condition=" '$(MSBuildDisableGetCopyToOutputDirectoryItemsOptimization)' == '' ">
<_GCTODIKeepDuplicates>false</_GCTODIKeepDuplicates>
<_GCTODIKeepMetadata>CopyToOutputDirectory;TargetPath</_GCTODIKeepMetadata>
</PropertyGroup>
</Target>
<Target Name="_GetCopyToOutputDirectoryItemsFromTransitiveProjectReferences" DependsOnTargets="_PopulateCommonStateForGetCopyToOutputDirectoryItems;_AddOutputPathToGlobalPropertiesToRemove" Returns="@(_TransitiveItemsToCopyToOutputDirectory)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- Get items from child projects first. -->
<MSBuild Projects="@(_MSBuildProjectReferenceExistent)" Targets="$(_RecursiveTargetForContentCopying)" BuildInParallel="$(BuildInParallel)" Properties="%(_MSBuildProjectReferenceExistent.SetConfiguration); %(_MSBuildProjectReferenceExistent.SetPlatform); %(_MSBuildProjectReferenceExistent.SetTargetFramework)" Condition="'@(_MSBuildProjectReferenceExistent)' != '' and '$(_GetChildProjectCopyToOutputDirectoryItems)' == 'true' and '%(_MSBuildProjectReferenceExistent.Private)' != 'false' and '$(UseCommonOutputDirectory)' != 'true'" ContinueOnError="$(ContinueOnError)" SkipNonexistentTargets="true" RemoveProperties="%(_MSBuildProjectReferenceExistent.GlobalPropertiesToRemove)$(_GlobalPropertiesToRemoveFromProjectReferences)">
<Output TaskParameter="TargetOutputs" ItemName="_AllChildProjectItemsWithTargetPath" />
</MSBuild>
<!-- Target outputs must be full paths because they will be consumed by a different project. -->
<ItemGroup>
<_TransitiveItemsToCopyToOutputDirectory KeepDuplicates=" '$(_GCTODIKeepDuplicates)' != 'false' " KeepMetadata="$(_GCTODIKeepMetadata)" Include="@(_AllChildProjectItemsWithTargetPath->'%(FullPath)')" Condition="'%(_AllChildProjectItemsWithTargetPath.CopyToOutputDirectory)'=='Always'" />
<_TransitiveItemsToCopyToOutputDirectory KeepDuplicates=" '$(_GCTODIKeepDuplicates)' != 'false' " KeepMetadata="$(_GCTODIKeepMetadata)" Include="@(_AllChildProjectItemsWithTargetPath->'%(FullPath)')" Condition="'%(_AllChildProjectItemsWithTargetPath.CopyToOutputDirectory)'=='PreserveNewest'" />
</ItemGroup>
<!-- Remove items which we will never again use - they just sit around taking up memory otherwise -->
<ItemGroup>
<_AllChildProjectItemsWithTargetPath Remove="@(_AllChildProjectItemsWithTargetPath)" />
</ItemGroup>
<!-- Copy paste _GetCopyToOutputDirectoryItemsFromThisProject but keep the items that came from other projects via ProjectReference's OutputItemType metadata -->
<ItemGroup>
<_TransitiveItemsToCopyToOutputDirectory KeepMetadata="$(_GCTODIKeepMetadata)" Include="@(ContentWithTargetPath->'%(FullPath)')" Condition="'%(ContentWithTargetPath.CopyToOutputDirectory)'=='Always' AND '%(ContentWithTargetPath.MSBuildSourceProjectFile)'!=''" />
<_TransitiveItemsToCopyToOutputDirectory KeepMetadata="$(_GCTODIKeepMetadata)" Include="@(ContentWithTargetPath->'%(FullPath)')" Condition="'%(ContentWithTargetPath.CopyToOutputDirectory)'=='PreserveNewest' AND '%(ContentWithTargetPath.MSBuildSourceProjectFile)'!=''" />
</ItemGroup>
<ItemGroup>
<_TransitiveItemsToCopyToOutputDirectory KeepMetadata="$(_GCTODIKeepMetadata)" Include="@(EmbeddedResource->'%(FullPath)')" Condition="'%(EmbeddedResource.CopyToOutputDirectory)'=='Always' AND '%(EmbeddedResource.MSBuildSourceProjectFile)'!=''" />
<_TransitiveItemsToCopyToOutputDirectory KeepMetadata="$(_GCTODIKeepMetadata)" Include="@(EmbeddedResource->'%(FullPath)')" Condition="'%(EmbeddedResource.CopyToOutputDirectory)'=='PreserveNewest' AND '%(EmbeddedResource.MSBuildSourceProjectFile)'!=''" />
</ItemGroup>
<ItemGroup>
<_CompileItemsToCopy Include="@(Compile->'%(FullPath)')" Condition="('%(Compile.CopyToOutputDirectory)'=='Always' or '%(Compile.CopyToOutputDirectory)'=='PreserveNewest') AND '%(Compile.MSBuildSourceProjectFile)'!=''" />
</ItemGroup>
<AssignTargetPath Files="@(_CompileItemsToCopy)" RootFolder="$(MSBuildProjectDirectory)">
<Output TaskParameter="AssignedFiles" ItemName="_CompileItemsToCopyWithTargetPath" />
</AssignTargetPath>
<ItemGroup>
<_TransitiveItemsToCopyToOutputDirectory KeepMetadata="$(_GCTODIKeepMetadata)" Include="@(_CompileItemsToCopyWithTargetPath)" Condition="'%(_CompileItemsToCopyWithTargetPath.CopyToOutputDirectory)'=='Always'" />
<_TransitiveItemsToCopyToOutputDirectory KeepMetadata="$(_GCTODIKeepMetadata)" Include="@(_CompileItemsToCopyWithTargetPath)" Condition="'%(_CompileItemsToCopyWithTargetPath.CopyToOutputDirectory)'=='PreserveNewest'" />
</ItemGroup>
<ItemGroup>
<_TransitiveItemsToCopyToOutputDirectory KeepMetadata="$(_GCTODIKeepMetadata)" Include="@(_NoneWithTargetPath->'%(FullPath)')" Condition="'%(_NoneWithTargetPath.CopyToOutputDirectory)'=='Always' AND '%(_NoneWithTargetPath.MSBuildSourceProjectFile)'!=''" />
<_TransitiveItemsToCopyToOutputDirectory KeepMetadata="$(_GCTODIKeepMetadata)" Include="@(_NoneWithTargetPath->'%(FullPath)')" Condition="'%(_NoneWithTargetPath.CopyToOutputDirectory)'=='PreserveNewest' AND '%(_NoneWithTargetPath.MSBuildSourceProjectFile)'!=''" />
</ItemGroup>
</Target>
<Target Name="_GetCopyToOutputDirectoryItemsFromThisProject" DependsOnTargets="AssignTargetPaths;_PopulateCommonStateForGetCopyToOutputDirectoryItems" Returns="@(_ThisProjectItemsToCopyToOutputDirectory)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<_ThisProjectItemsToCopyToOutputDirectory KeepMetadata="$(_GCTODIKeepMetadata)" Include="@(ContentWithTargetPath->'%(FullPath)')" Condition="'%(ContentWithTargetPath.CopyToOutputDirectory)'=='Always' AND '%(ContentWithTargetPath.MSBuildSourceProjectFile)'==''" />
<_ThisProjectItemsToCopyToOutputDirectory KeepMetadata="$(_GCTODIKeepMetadata)" Include="@(ContentWithTargetPath->'%(FullPath)')" Condition="'%(ContentWithTargetPath.CopyToOutputDirectory)'=='PreserveNewest' AND '%(ContentWithTargetPath.MSBuildSourceProjectFile)'==''" />
</ItemGroup>
<ItemGroup>
<_ThisProjectItemsToCopyToOutputDirectory KeepMetadata="$(_GCTODIKeepMetadata)" Include="@(EmbeddedResource->'%(FullPath)')" Condition="'%(EmbeddedResource.CopyToOutputDirectory)'=='Always' AND '%(EmbeddedResource.MSBuildSourceProjectFile)'==''" />
<_ThisProjectItemsToCopyToOutputDirectory KeepMetadata="$(_GCTODIKeepMetadata)" Include="@(EmbeddedResource->'%(FullPath)')" Condition="'%(EmbeddedResource.CopyToOutputDirectory)'=='PreserveNewest' AND '%(EmbeddedResource.MSBuildSourceProjectFile)'==''" />
</ItemGroup>
<ItemGroup>
<_CompileItemsToCopy Include="@(Compile->'%(FullPath)')" Condition="('%(Compile.CopyToOutputDirectory)'=='Always' or '%(Compile.CopyToOutputDirectory)'=='PreserveNewest') AND '%(Compile.MSBuildSourceProjectFile)'==''" />
</ItemGroup>
<AssignTargetPath Files="@(_CompileItemsToCopy)" RootFolder="$(MSBuildProjectDirectory)">
<Output TaskParameter="AssignedFiles" ItemName="_CompileItemsToCopyWithTargetPath" />
</AssignTargetPath>
<ItemGroup>
<_ThisProjectItemsToCopyToOutputDirectory KeepMetadata="$(_GCTODIKeepMetadata)" Include="@(_CompileItemsToCopyWithTargetPath)" Condition="'%(_CompileItemsToCopyWithTargetPath.CopyToOutputDirectory)'=='Always'" />
<_ThisProjectItemsToCopyToOutputDirectory KeepMetadata="$(_GCTODIKeepMetadata)" Include="@(_CompileItemsToCopyWithTargetPath)" Condition="'%(_CompileItemsToCopyWithTargetPath.CopyToOutputDirectory)'=='PreserveNewest'" />
</ItemGroup>
<ItemGroup>
<_ThisProjectItemsToCopyToOutputDirectory KeepMetadata="$(_GCTODIKeepMetadata)" Include="@(_NoneWithTargetPath->'%(FullPath)')" Condition="'%(_NoneWithTargetPath.CopyToOutputDirectory)'=='Always' AND '%(_NoneWithTargetPath.MSBuildSourceProjectFile)'==''" />
<_ThisProjectItemsToCopyToOutputDirectory KeepMetadata="$(_GCTODIKeepMetadata)" Include="@(_NoneWithTargetPath->'%(FullPath)')" Condition="'%(_NoneWithTargetPath.CopyToOutputDirectory)'=='PreserveNewest' AND '%(_NoneWithTargetPath.MSBuildSourceProjectFile)'==''" />
</ItemGroup>
</Target>
<Target Name="GetCopyToOutputDirectoryItems" Returns="@(AllItemsFullPathWithTargetPath)" KeepDuplicateOutputs=" '$(MSBuildDisableGetCopyToOutputDirectoryItemsOptimization)' == '' " DependsOnTargets="$(GetCopyToOutputDirectoryItemsDependsOn)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- Compose the content items as the union between transitive content items and content items from this project. -->
<!-- Use CallTarget to avoid breaking targets that hook right before GetCopyToOutputDirectoryItems but expect to run after _GetCopyToOutputDirectoryItemsFromTransitiveProjectReferences and _GetCopyToOutputDirectoryItemsFromThisProject -->
<CallTarget Targets="_GetCopyToOutputDirectoryItemsFromTransitiveProjectReferences">
<Output TaskParameter="TargetOutputs" ItemName="_TransitiveItemsToCopyToOutputDirectory" />
</CallTarget>
<CallTarget Targets="_GetCopyToOutputDirectoryItemsFromThisProject">
<Output TaskParameter="TargetOutputs" ItemName="_ThisProjectItemsToCopyToOutputDirectory" />
</CallTarget>
<ItemGroup Condition="'$(CopyConflictingTransitiveContent)' == 'false'">
<_TransitiveItemsToCopyToOutputDirectory Remove="@(_ThisProjectItemsToCopyToOutputDirectory)" MatchOnMetadata="TargetPath" MatchOnMetadataOptions="PathLike" />
</ItemGroup>
<ItemGroup>
<_TransitiveItemsToCopyToOutputDirectoryAlways KeepDuplicates=" '$(_GCTODIKeepDuplicates)' != 'false' " KeepMetadata="$(_GCTODIKeepMetadata)" Include="@(_TransitiveItemsToCopyToOutputDirectory->'%(FullPath)')" Condition="'%(_TransitiveItemsToCopyToOutputDirectory.CopyToOutputDirectory)'=='Always'" />
<_TransitiveItemsToCopyToOutputDirectoryPreserveNewest KeepDuplicates=" '$(_GCTODIKeepDuplicates)' != 'false' " KeepMetadata="$(_GCTODIKeepMetadata)" Include="@(_TransitiveItemsToCopyToOutputDirectory->'%(FullPath)')" Condition="'%(_TransitiveItemsToCopyToOutputDirectory.CopyToOutputDirectory)'=='PreserveNewest'" />
<_ThisProjectItemsToCopyToOutputDirectoryAlways KeepDuplicates=" '$(_GCTODIKeepDuplicates)' != 'false' " KeepMetadata="$(_GCTODIKeepMetadata)" Include="@(_ThisProjectItemsToCopyToOutputDirectory->'%(FullPath)')" Condition="'%(_ThisProjectItemsToCopyToOutputDirectory.CopyToOutputDirectory)'=='Always'" />
<_ThisProjectItemsToCopyToOutputDirectoryPreserveNewest KeepDuplicates=" '$(_GCTODIKeepDuplicates)' != 'false' " KeepMetadata="$(_GCTODIKeepMetadata)" Include="@(_ThisProjectItemsToCopyToOutputDirectory->'%(FullPath)')" Condition="'%(_ThisProjectItemsToCopyToOutputDirectory.CopyToOutputDirectory)'=='PreserveNewest'" />
<!-- Append the items from this project last so that they will be copied last. -->
<_SourceItemsToCopyToOutputDirectoryAlways Include="@(_TransitiveItemsToCopyToOutputDirectoryAlways);@(_ThisProjectItemsToCopyToOutputDirectoryAlways)" />
<_SourceItemsToCopyToOutputDirectory Include="@(_TransitiveItemsToCopyToOutputDirectoryPreserveNewest);@(_ThisProjectItemsToCopyToOutputDirectoryPreserveNewest)" />
<AllItemsFullPathWithTargetPath Include="@(_SourceItemsToCopyToOutputDirectoryAlways->'%(FullPath)');@(_SourceItemsToCopyToOutputDirectory->'%(FullPath)')" />
<!-- Empty intermediate items to release memory -->
<_TransitiveItemsToCopyToOutputDirectoryAlways Remove="@(_TransitiveItemsToCopyToOutputDirectoryAlways)" />
<_TransitiveItemsToCopyToOutputDirectoryPreserveNewest Remove="@(_TransitiveItemsToCopyToOutputDirectoryPreserveNewest)" />
<_TransitiveItemsToCopyToOutputDirectory Remove="@(_TransitiveItemsToCopyToOutputDirectory)" />
<_ThisProjectItemsToCopyToOutputDirectoryAlways Remove="@(_ThisProjectItemsToCopyToOutputDirectoryAlways)" />
<_ThisProjectItemsToCopyToOutputDirectoryPreserveNewest Remove="@(_ThisProjectItemsToCopyToOutputDirectoryPreserveNewest)" />
<_ThisProjectItemsToCopyToOutputDirectory Remove="@(_ThisProjectItemsToCopyToOutputDirectory)" />
</ItemGroup>
</Target>
<!--
============================================================
GetCopyToPublishDirectoryItems
Default implementation of GetCopyToPublishDirectoryItems for projects that do not
use Microsoft.NET.Sdk. It simply returns whatever GetCopyToOutputDirectoryItems
does with CopyToPublishDirectory implied by CopyToOutputDirectory, which is the
same as Microsoft.NET.Sdk default when its CopyToPublishDirectory is not used.
Microsoft.NET.Sdk projects will override this to allow the publish output to be
customized independently from the build output.
Having a default implementation here allows the Microsoft.NET.Sdk Publish target
to work when a Microsoft.NET.Sdk-based project references a non-Microsoft.NET.Sdk-based
project.
============================================================
-->
<Target Name="GetCopyToPublishDirectoryItems" DependsOnTargets="GetCopyToOutputDirectoryItems" Returns="@(AllPublishItemsFullPathWithTargetPath)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<AllPublishItemsFullPathWithTargetPath Include="@(AllItemsFullPathWithTargetPath)">
<CopyToPublishDirectory>%(CopyToOutputDirectory)</CopyToPublishDirectory>
</AllPublishItemsFullPathWithTargetPath>
</ItemGroup>
</Target>
<!--
============================================================
_CopyOutOfDateSourceItemsToOutputDirectory
Copy files that have the CopyToOutputDirectory attribute set to 'PreserveNewest'.
============================================================
-->
<Target Name="_CopyOutOfDateSourceItemsToOutputDirectory" Condition=" '@(_SourceItemsToCopyToOutputDirectory)' != '' " Inputs="@(_SourceItemsToCopyToOutputDirectory)" Outputs="@(_SourceItemsToCopyToOutputDirectory->'$(OutDir)%(TargetPath)')" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!--
Not using SkipUnchangedFiles="true" because the application may want to change
one of these files and not have an incremental build replace it.
-->
<Copy SourceFiles="@(_SourceItemsToCopyToOutputDirectory)" DestinationFiles="@(_SourceItemsToCopyToOutputDirectory->'$(OutDir)%(TargetPath)')" OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)" Retries="$(CopyRetryCount)" RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)" UseHardlinksIfPossible="$(CreateHardLinksForAdditionalFilesIfPossible)" UseSymboliclinksIfPossible="$(CreateSymbolicLinksForAdditionalFilesIfPossible)">
<Output TaskParameter="DestinationFiles" ItemName="FileWrites" />
</Copy>
</Target>
<!--
============================================================
_CopyOutOfDateSourceItemsToOutputDirectoryAlways
Copy files that have the CopyToOutputDirectory attribute set to 'Always'.
============================================================
-->
<Target Name="_CopyOutOfDateSourceItemsToOutputDirectoryAlways" Condition=" '@(_SourceItemsToCopyToOutputDirectoryAlways)' != '' " xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!--
Not using SkipUnchangedFiles="true" because the application may want to change
one of these files and not have an incremental build replace it.
-->
<Copy SourceFiles="@(_SourceItemsToCopyToOutputDirectoryAlways)" DestinationFiles="@(_SourceItemsToCopyToOutputDirectoryAlways->'$(OutDir)%(TargetPath)')" OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)" Retries="$(CopyRetryCount)" RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)" UseHardlinksIfPossible="$(CreateHardLinksForAdditionalFilesIfPossible)" UseSymboliclinksIfPossible="$(CreateSymbolicLinksForAdditionalFilesIfPossible)">
<Output TaskParameter="DestinationFiles" ItemName="FileWrites" />
</Copy>
</Target>
<!--
============================================================
_CopyAppConfigFile
Copy the application config file.
============================================================
-->
<Target Name="_CopyAppConfigFile" Condition=" '@(AppConfigWithTargetPath)' != '' " Inputs="@(AppConfigWithTargetPath)" Outputs="@(AppConfigWithTargetPath->'$(OutDir)%(TargetPath)')" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!--
Copy the application's .config file, if any.
Not using SkipUnchangedFiles="true" because the application may want to change
the app.config and not have an incremental build replace it.
-->
<Copy SourceFiles="@(AppConfigWithTargetPath)" DestinationFiles="@(AppConfigWithTargetPath->'$(OutDir)%(TargetPath)')" OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)" Retries="$(CopyRetryCount)" RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)" UseHardlinksIfPossible="$(CreateHardLinksForAdditionalFilesIfPossible)" UseSymboliclinksIfPossible="$(CreateSymbolicLinksForAdditionalFilesIfPossible)">
<Output TaskParameter="DestinationFiles" ItemName="FileWrites" />
</Copy>
</Target>
<!--
================================================================
_CopyManifestFiles
================================================================
Copy the built manifests (.exe.manifest, .application/.xbap) to the final directory.
-->
<Target Name="_CopyManifestFiles" Condition=" '$(_DeploymentCopyApplicationManifest)'=='true' or '$(GenerateClickOnceManifests)'=='true' " DependsOnTargets="PrepareForBuild" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Copy SourceFiles="@(ApplicationManifest)" DestinationFolder="$(OutDir)" SkipUnchangedFiles="$(SkipCopyUnchangedFiles)" OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)" Retries="$(CopyRetryCount)" RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)" UseHardlinksIfPossible="$(CreateHardLinksForAdditionalFilesIfPossible)" UseSymboliclinksIfPossible="$(CreateSymbolicLinksForAdditionalFilesIfPossible)" Condition="'$(GenerateClickOnceManifests)'=='true' or '$(_DeploymentCopyApplicationManifest)'=='true'">
<Output TaskParameter="DestinationFiles" ItemName="_DeploymentMainApplicationManifest" />
<Output TaskParameter="DestinationFiles" ItemName="FileWrites" />
</Copy>
<Message Importance="Normal" Condition="'$(_DeploymentCopyApplicationManifest)'=='true'" Text="$(MSBuildProjectName) -&gt; @(_DeploymentMainApplicationManifest->'%(FullPath)')" />
<Copy SourceFiles="@(DeployManifest)" DestinationFolder="$(OutDir)" SkipUnchangedFiles="$(SkipCopyUnchangedFiles)" OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)" Retries="$(CopyRetryCount)" RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)" UseHardlinksIfPossible="$(CreateHardLinksForAdditionalFilesIfPossible)" UseSymboliclinksIfPossible="$(CreateSymbolicLinksForAdditionalFilesIfPossible)" Condition="'$(GenerateClickOnceManifests)'=='true'">
<Output TaskParameter="DestinationFiles" ItemName="_DeploymentMainDeployManifest" />
<Output TaskParameter="DestinationFiles" ItemName="FileWrites" />
</Copy>
<Message Importance="Normal" Condition="'$(GenerateClickOnceManifests)'=='true'" Text="$(MSBuildProjectName) -&gt; @(_DeploymentMainDeployManifest->'%(FullPath)')" />
</Target>
<!--
================================================================
_CheckForCompileOutputs
Checks each file output from the main "Compile" target to make sure they really exist.
If they do, then record them in the clean cache.
============================================================
-->
<Target Name="_CheckForCompileOutputs" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!--Record the main compile outputs.-->
<ItemGroup>
<FileWrites Include="@(IntermediateAssembly)" Condition="Exists('@(IntermediateAssembly)')" />
<FileWrites Include="@(IntermediateRefAssembly)" Condition="'$(ProduceReferenceAssembly)' == 'true' and Exists('@(IntermediateRefAssembly)')" />
</ItemGroup>
<!-- Record the .xml if one was produced. -->
<PropertyGroup>
<_DocumentationFileProduced Condition="!Exists('@(DocFileItem)')">false</_DocumentationFileProduced>
</PropertyGroup>
<ItemGroup>
<FileWrites Include="@(DocFileItem)" Condition="'$(_DocumentationFileProduced)'=='true'" />
</ItemGroup>
<!-- Record the .pdb if one was produced. -->
<PropertyGroup>
<_DebugSymbolsProduced Condition="!Exists('@(_DebugSymbolsIntermediatePath)')">false</_DebugSymbolsProduced>
</PropertyGroup>
<ItemGroup>
<FileWrites Include="@(_DebugSymbolsIntermediatePath)" Condition="'$(_DebugSymbolsProduced)'=='true'" />
</ItemGroup>
</Target>
<!--
============================================================
_SGenCheckForOutputs
Checks each file output from the "GenerateSerializationAssemblies" target to make sure they really exist.
If they do, then record them in the clean cache.
============================================================
-->
<Target Name="_SGenCheckForOutputs" Condition="'$(_SGenGenerateSerializationAssembliesConfig)' == 'On' or ('@(WebReferenceUrl)'!='' and '$(_SGenGenerateSerializationAssembliesConfig)' == 'Auto')" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- Record the serializer .dll if one was produced.-->
<PropertyGroup>
<_SGenDllCreated Condition="Exists('$(IntermediateOutputPath)$(_SGenDllName)')">true</_SGenDllCreated>
</PropertyGroup>
<ItemGroup>
<FileWrites Include="$(IntermediateOutputPath)$(_SGenDllName)" Condition="Exists('$(IntermediateOutputPath)$(_SGenDllName)')" />
</ItemGroup>
</Target>
<!--
***********************************************************************************************
***********************************************************************************************
UnmanagedRegistration Section
***********************************************************************************************
***********************************************************************************************
-->
<!--
============================================================
UnmanagedRegistration
Registers the main assembly for COM interop.
============================================================
-->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<UnmanagedRegistrationDependsOn />
</PropertyGroup>
<Target Name="UnmanagedRegistration" Condition="'$(RegisterForComInterop)'=='true' and '$(OutputType)'=='library'" DependsOnTargets="$(UnmanagedRegistrationDependsOn)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<RegisterAssemblyMSBuildArchitecture Condition="'$(RegisterAssemblyMSBuildArchitecture)' == ''">$(PlatformTargetAsMSBuildArchitecture)</RegisterAssemblyMSBuildArchitecture>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFrameworkAsMSBuildRuntime)' != '' and '$(RegisterAssemblyMSBuildArchitecture)' != ''">
<!-- Falling back to the current runtime if we are targeting CLR2 and the task host doesn't exist will lead to
incorrect behavior in some cases, but it's the same incorrect behavior as Visual Studio 2010, and thus better
than causing build breaks on upgrade to Win8 the way not doing so would. For more details, see the
corresponding comment in GenerateResource. -->
<RegisterAssemblyMSBuildRuntime Condition="'$(RegisterAssemblyMSBuildRuntime)' == '' and&#xD;&#xA; $([MSBuild]::DoesTaskHostExist(`$(TargetFrameworkAsMSBuildRuntime)`, `$(RegisterAssemblyMSBuildArchitecture)`))">$(TargetFrameworkAsMSBuildRuntime)</RegisterAssemblyMSBuildRuntime>
<!-- If the targeted runtime doesn't exist, fall back to current -->
<RegisterAssemblyMSBuildRuntime Condition="'$(RegisterAssemblyMSBuildRuntime)' == ''">CurrentRuntime</RegisterAssemblyMSBuildRuntime>
</PropertyGroup>
<RegisterAssembly Assemblies="@(_OutputPathItem->'%(FullPath)$(TargetFileName)')" TypeLibFiles="@(_OutputPathItem->'%(FullPath)$(TargetName).tlb')" AssemblyListFile="@(_UnmanagedRegistrationCache)" CreateCodeBase="true" MSBuildRuntime="$(RegisterAssemblyMSBuildRuntime)" MSBuildArchitecture="$(RegisterAssemblyMSBuildArchitecture)" Condition="!Exists('@(_UnmanagedRegistrationCache)')" />
<ItemGroup>
<FileWrites Include="@(_OutputPathItem->'%(FullPath)$(TargetName).tlb')" />
</ItemGroup>
</Target>
<!--
***********************************************************************************************
***********************************************************************************************
IncrementalClean Section
***********************************************************************************************
***********************************************************************************************
-->
<!--
============================================================
IncrementalClean
Remove files that were produced in a prior build but weren't produced in the current build.
The reason is that if, for example, the name of the .exe has changed we want to delete the
old copy.
Leave the Clean cache file containing only the files produced in the current build.
============================================================
-->
<Target Name="IncrementalClean" DependsOnTargets="$(IncrementalCleanDependsOn);_CleanGetCurrentAndPriorFileWrites" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- Subtract list of files produced in prior builds from list of files produced in this build. -->
<ItemGroup>
<_CleanOrphanFileWrites Include="@(_CleanPriorFileWrites)" Exclude="@(_CleanCurrentFileWrites)" />
</ItemGroup>
<!-- Find all files in the final output directory. -->
<FindUnderPath Path="$(OutDir)" Files="@(_CleanOrphanFileWrites)">
<Output TaskParameter="InPath" ItemName="_CleanOrphanFileWritesInOutput" />
</FindUnderPath>
<!-- Find all files in the intermediate output directory. -->
<FindUnderPath Path="$(IntermediateOutputPath)" Files="@(_CleanOrphanFileWrites)">
<Output TaskParameter="InPath" ItemName="_CleanOrphanFileWritesInIntermediate" />
</FindUnderPath>
<!-- Delete the orphaned files. -->
<Delete Files="@(_CleanOrphanFileWritesInIntermediate);@(_CleanOrphanFileWritesInOutput)" TreatErrorsAsWarnings="true">
<Output TaskParameter="DeletedFiles" ItemName="_CleanOrphanFilesDeleted" />
</Delete>
<!-- Create a list of everything that wasn't deleted or was outside
the current final output and intermediate output directories. -->
<ItemGroup>
<_CleanRemainingFileWritesAfterIncrementalClean Include="@(_CleanPriorFileWrites);@(_CleanCurrentFileWrites)" Exclude="@(_CleanOrphanFilesDeleted)" />
</ItemGroup>
<!-- Remove duplicates. -->
<RemoveDuplicates Inputs="@(_CleanRemainingFileWritesAfterIncrementalClean)">
<Output TaskParameter="Filtered" ItemName="_CleanUniqueRemainingFileWritesAfterIncrementalClean" />
</RemoveDuplicates>
<!-- Write new list of current files back to disk, replacing the existing list.-->
<WriteLinesToFile File="$(IntermediateOutputPath)$(CleanFile)" Lines="@(_CleanUniqueRemainingFileWritesAfterIncrementalClean)" Condition="'@(_CleanUnfilteredPriorFileWrites)'!='@(_CleanUniqueRemainingFileWritesAfterIncrementalClean)'" Overwrite="true" />
</Target>
<!--
============================================================
_CleanGetCurrentAndPriorFileWrites
Get the list of files built in the current build and in prior builds.
============================================================
-->
<Target Name="_CleanGetCurrentAndPriorFileWrites" DependsOnTargets="_CheckForCompileOutputs;_SGenCheckForOutputs" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- Read the list of files produced by a prior builds from disk. -->
<ReadLinesFromFile File="$(IntermediateOutputPath)$(CleanFile)">
<Output TaskParameter="Lines" ItemName="_CleanUnfilteredPriorFileWrites" />
</ReadLinesFromFile>
<!--
Convert the list of references to the absolute paths so we can make valid comparisons
across two lists
-->
<ConvertToAbsolutePath Paths="@(_ResolveAssemblyReferenceResolvedFiles)">
<Output TaskParameter="AbsolutePaths" ItemName="_ResolveAssemblyReferenceResolvedFilesAbsolute" />
</ConvertToAbsolutePath>
<!--
Subtract any resolved assembly files from *prior* file writes because deleting
these would break subsequent builds because the assemblies would be unresolvable.
-->
<ItemGroup>
<_CleanPriorFileWrites Include="@(_CleanUnfilteredPriorFileWrites)" Exclude="@(_ResolveAssemblyReferenceResolvedFilesAbsolute)" />
</ItemGroup>
<!--
Of shareable files, keep only those that are in the project's directory.
We never clean shareable files outside of the project directory because
the build may be to a common output directory and other projects may need
them.
Only subtract the outputs from ResolveAssemblyReferences target because that's the
only "Resolve" target that tries to resolve assemblies directly from the output
directory.
-->
<FindUnderPath Path="$(MSBuildProjectDirectory)" Files="@(FileWritesShareable)" UpdateToAbsolutePaths="true">
<Output TaskParameter="InPath" ItemName="FileWrites" />
</FindUnderPath>
<!-- Find all files in the final output directory. -->
<FindUnderPath Path="$(OutDir)" Files="@(FileWrites)" UpdateToAbsolutePaths="true">
<Output TaskParameter="InPath" ItemName="_CleanCurrentFileWritesInOutput" />
</FindUnderPath>
<!-- Find all files in the intermediate output directory. -->
<FindUnderPath Path="$(IntermediateOutputPath)" Files="@(FileWrites)" UpdateToAbsolutePaths="true">
<Output TaskParameter="InPath" ItemName="_CleanCurrentFileWritesInIntermediate" />
</FindUnderPath>
<!--
Subtract any resolved assembly files from *current* file writes because deleting
these would break subsequent builds because the assemblies would be unresolvable.
Only subtract the outputs from ResolveAssemblyReferences target because that's the
only "Resolve" target that tries to resolve assemblies directly from the output
directory.
-->
<ItemGroup>
<_CleanCurrentFileWritesWithNoReferences Include="@(_CleanCurrentFileWritesInOutput);@(_CleanCurrentFileWritesInIntermediate)" Exclude="@(_ResolveAssemblyReferenceResolvedFilesAbsolute)" />
</ItemGroup>
<!-- Remove duplicates from files produced in this build. -->
<RemoveDuplicates Inputs="@(_CleanCurrentFileWritesWithNoReferences)">
<Output TaskParameter="Filtered" ItemName="_CleanCurrentFileWrites" />
</RemoveDuplicates>
</Target>
<!--
***********************************************************************************************
***********************************************************************************************
Clean Section
***********************************************************************************************
***********************************************************************************************
-->
<!--
============================================================
Clean
Delete all intermediate and final build outputs.
============================================================
-->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<CleanDependsOn>
BeforeClean;
UnmanagedUnregistration;
CoreClean;
CleanReferencedProjects;
CleanPublishFolder;
AfterClean
</CleanDependsOn>
</PropertyGroup>
<Target Name="Clean" Condition=" '$(_InvalidConfigurationWarning)' != 'true' " DependsOnTargets="$(CleanDependsOn)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<!--
============================================================
BeforeClean
Redefine this target in your project in order to run tasks just before Clean.
============================================================
-->
<Target Name="BeforeClean" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<!--
============================================================
AfterClean
Redefine this target in your project in order to run tasks just after Clean.
============================================================
-->
<Target Name="AfterClean" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<!--
============================================================
CleanReferencedProjects
Call Clean target on all Referenced Projects.
============================================================
-->
<Target Name="CleanReferencedProjects" DependsOnTargets="PrepareProjectReferences" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!--
When building the project directly from the command-line, clean those referenced projects
that exist on disk. For IDE builds and command-line .SLN builds, the solution build manager
takes care of this.
-->
<MSBuild Projects="@(_MSBuildProjectReferenceExistent)" Targets="Clean" Properties="%(_MSBuildProjectReferenceExistent.SetConfiguration); %(_MSBuildProjectReferenceExistent.SetPlatform); %(_MSBuildProjectReferenceExistent.SetTargetFramework)" BuildInParallel="$(BuildInParallel)" Condition="'$(BuildingInsideVisualStudio)' != 'true' and '$(BuildProjectReferences)' == 'true' and '@(_MSBuildProjectReferenceExistent)' != ''" ContinueOnError="$(ContinueOnError)" RemoveProperties="%(_MSBuildProjectReferenceExistent.GlobalPropertiesToRemove)$(_GlobalPropertiesToRemoveFromProjectReferences)" />
</Target>
<!--
============================================================
CoreClean
============================================================
-->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<CoreCleanDependsOn />
</PropertyGroup>
<Target Name="CoreClean" DependsOnTargets="$(CoreCleanDependsOn)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- First clean any explicitly specified cleanable files.
Declare items of this type if you want Clean to delete them. -->
<Delete Files="@(Clean)" TreatErrorsAsWarnings="true" />
<!-- Read in list of files that were written to disk in past builds. -->
<ReadLinesFromFile File="$(IntermediateOutputPath)$(CleanFile)">
<Output TaskParameter="Lines" ItemName="_CleanPriorFileWrites" />
</ReadLinesFromFile>
<!-- Find all files in the final output directory. -->
<FindUnderPath Path="$(OutDir)" Files="@(_CleanPriorFileWrites)">
<Output TaskParameter="InPath" ItemName="_CleanPriorFileWritesInOutput" />
</FindUnderPath>
<!-- Find all files in the intermediate output directory. -->
<FindUnderPath Path="$(IntermediateOutputPath)" Files="@(_CleanPriorFileWrites)">
<Output TaskParameter="InPath" ItemName="_CleanPriorFileWritesInIntermediate" />
</FindUnderPath>
<!-- Delete those files. -->
<Delete Files="@(_CleanPriorFileWritesInOutput);@(_CleanPriorFileWritesInIntermediate)" TreatErrorsAsWarnings="true">
<Output TaskParameter="DeletedFiles" ItemName="_CleanPriorFileWritesDeleted" />
</Delete>
<!-- Create a list of everything that wasn't deleted. -->
<ItemGroup>
<_CleanRemainingFileWritesAfterClean Include="@(_CleanPriorFileWrites)" Exclude="@(_CleanPriorFileWritesDeleted)" />
</ItemGroup>
<!-- Remove duplicates. -->
<RemoveDuplicates Inputs="@(_CleanRemainingFileWritesAfterClean)">
<Output TaskParameter="Filtered" ItemName="_CleanUniqueRemainingFileWrites" />
</RemoveDuplicates>
<!-- Make sure the directory exists. -->
<MakeDir Directories="$(IntermediateOutputPath)" />
<!-- Write new list of current files back to disk. -->
<WriteLinesToFile File="$(IntermediateOutputPath)$(CleanFile)" Lines="@(_CleanUniqueRemainingFileWrites)" Overwrite="true" />
</Target>
<!--
============================================================
_CleanRecordFileWrites
Save the list of all files written to disk so that it can be used for "Clean" later.
Files written in prior builds are not removed from Clean cache.
============================================================
-->
<Target Name="_CleanRecordFileWrites" DependsOnTargets="_CleanGetCurrentAndPriorFileWrites" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!--
Merge list of files from prior builds with the current build and then
remove duplicates.
-->
<RemoveDuplicates Inputs="@(_CleanPriorFileWrites);@(_CleanCurrentFileWrites)">
<Output TaskParameter="Filtered" ItemName="_CleanUniqueFileWrites" />
</RemoveDuplicates>
<!-- Make sure the directory exists. -->
<MakeDir Directories="$(IntermediateOutputPath)" />
<!-- Write merged file list back to disk, replacing existing contents. -->
<WriteLinesToFile File="$(IntermediateOutputPath)$(CleanFile)" Lines="@(_CleanUniqueFileWrites)" Overwrite="true" />
</Target>
<!--
============================================================
CleanPublishFolder
============================================================
-->
<Target Name="CleanPublishFolder" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<RemoveDir Directories="$(PublishDir)" Condition="'$(PublishDir)'=='$(OutputPath)app.publish\' and Exists('$(PublishDir)')" />
</Target>
<!--
***********************************************************************************************
***********************************************************************************************
PostBuildEvent Section
***********************************************************************************************
***********************************************************************************************
-->
<!--
============================================================
PostBuildEvent
Run the post-build event. This step is driven by two parameters:
(1) The $(RunPostBuildEvent) property is set by the user through the IDE and can be one of four values.
- OnBuildSuccess: In this case, every step of the build must succeed for the post-build step to run.
- <Blank>: This is the same as OnBuildSuccess.
- OnOutputUpdated: In this case, the post-build step will run only if the main output assembly was
actually updated.
- Always: The post-build step is always run.
(2) The $(_AssemblyTimestampBeforeCompile) and $(_AssemblyTimestampAfterCompile) values are
set by the _TimeStampBeforeCompile and _TimeStampAfterCompile targets. If the assembly was actually
rebuilt during this build, then the two values will be different.
============================================================
-->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PostBuildEventDependsOn />
</PropertyGroup>
<Target Name="PostBuildEvent" Condition="'$(PostBuildEvent)' != '' and ('$(RunPostBuildEvent)' != 'OnOutputUpdated' or '$(_AssemblyTimestampBeforeCompile)' != '$(_AssemblyTimestampAfterCompile)')" DependsOnTargets="$(PostBuildEventDependsOn)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Exec WorkingDirectory="$(OutDir)" Command="$(PostBuildEvent)" />
</Target>
<!--
***********************************************************************************************
***********************************************************************************************
Publish Section
***********************************************************************************************
***********************************************************************************************
-->
<!--
============================================================
Publish
This target is only called when doing ClickOnce publishing outside the IDE, which implicitly builds before publishing.
============================================================
-->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PublishDependsOn Condition="'$(PublishableProject)'=='true'">
SetGenerateManifests;
Build;
PublishOnly
</PublishDependsOn>
<PublishDependsOn Condition="'$(PublishableProject)'!='true'">
_DeploymentUnpublishable
</PublishDependsOn>
</PropertyGroup>
<Target Name="Publish" DependsOnTargets="$(PublishDependsOn)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<!--
============================================================
_DeploymentUnpublishable
This target is used to block an attempt to ClickOnce publish a non-publishable project, such as a ClassLibrary, when building outside the IDE.
============================================================
-->
<Target Name="_DeploymentUnpublishable" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Message Text="Skipping unpublishable project." />
</Target>
<!--
============================================================
SetGenerateManifests
This target simply assures the GenerateClickOnceManifests property is set whenever the publish target is invoked.
============================================================
-->
<Target Name="SetGenerateManifests" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Error Condition="'$(OutputType)'!='winexe' and '$(OutputType)'!='exe' and '$(OutputType)'!='appcontainerexe'" Text="Publish is only valid for 'Windows Application' or 'Console Application' project types." />
<Error Condition="'$(_DeploymentSignClickOnceManifests)'=='true' and '$(ManifestCertificateThumbprint)'=='' and '$(ManifestKeyFile)'==''" Text="A signing key is required in order to publish this project. Please specify a ManifestKeyFile or ManifestCertificateThumbprint value. Publishing from Visual Studio will automatically configure a signing key for this project." />
<PropertyGroup>
<GenerateClickOnceManifests>true</GenerateClickOnceManifests>
</PropertyGroup>
</Target>
<!--
============================================================
PublishOnly
The "PublishOnly" target is intended for ClickOnce publishing inside the IDE, where the build has already been done
by the BuildManager.
============================================================
-->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PublishOnlyDependsOn>
SetGenerateManifests;
PublishBuild;
BeforePublish;
GenerateManifests;
CopyFilesToOutputDirectory;
_CopyFilesToPublishFolder;
_DeploymentGenerateBootstrapper;
ResolveKeySource;
_DeploymentSignClickOnceDeployment;
AfterPublish
</PublishOnlyDependsOn>
</PropertyGroup>
<Target Name="PublishOnly" DependsOnTargets="$(PublishOnlyDependsOn)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<!--
============================================================
BeforePublish
Redefine this target in your project in order to run tasks just before Publish.
============================================================
-->
<Target Name="BeforePublish" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<!--
============================================================
AfterPublish
Redefine this target in your project in order to run tasks just after Publish.
============================================================
-->
<Target Name="AfterPublish" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<!--
============================================================
PublishBuild
Defines the set of targets that publishing is directly dependent on.
============================================================
-->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PublishBuildDependsOn>
BuildOnlySettings;
PrepareForBuild;
ResolveReferences;
PrepareResources;
ResolveKeySource;
GenerateSerializationAssemblies;
CreateSatelliteAssemblies;
</PublishBuildDependsOn>
</PropertyGroup>
<Target Name="PublishBuild" DependsOnTargets="$(PublishBuildDependsOn)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<!--
============================================================
_CopyFilesToPublishFolder
============================================================
-->
<Target Name="_CopyFilesToPublishFolder" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- Compute name of application folder, which includes the assembly name plus formatted application version.
The application version is formatted to use "_" in place of "." chars (i.e. "1_0_0_0" instead of "1.0.0.0").
This is done because some servers misinterpret "." as a file extension. -->
<FormatVersion Version="$(ApplicationVersion)" Revision="$(ApplicationRevision)" FormatType="Path">
<Output TaskParameter="OutputVersion" PropertyName="_DeploymentApplicationVersionFragment" />
</FormatVersion>
<PropertyGroup>
<_DeploymentApplicationFolderName>Application Files\$(AssemblyName)_$(_DeploymentApplicationVersionFragment)</_DeploymentApplicationFolderName>
<_DeploymentApplicationDir>$(PublishDir)$(_DeploymentApplicationFolderName)\</_DeploymentApplicationDir>
</PropertyGroup>
<PropertyGroup>
<!-- By default we're not using Hard or Symbolic Links to copy to the publish directory, and never when building in VS -->
<CreateHardLinksForPublishFilesIfPossible Condition="'$(BuildingInsideVisualStudio)' == 'true' or '$(CreateHardLinksForPublishFilesIfPossible)' == ''">false</CreateHardLinksForPublishFilesIfPossible>
<CreateSymbolicLinksForPublishFilesIfPossible Condition="'$(BuildingInsideVisualStudio)' == 'true' or '$(CreateSymbolicLinksForPublishFilesIfPossible)' == ''">false</CreateSymbolicLinksForPublishFilesIfPossible>
</PropertyGroup>
<!-- Copy files to publish folder -->
<Copy Condition="'$(PublishSingleFile)' != 'true'" SourceFiles="@(_ApplicationManifestFinal);&#xD;&#xA; @(_DeploymentResolvedManifestEntryPoint);&#xD;&#xA; @(_DeploymentManifestFiles);&#xD;&#xA; @(ReferenceComWrappersToCopyLocal);&#xD;&#xA; @(ResolvedIsolatedComModules);&#xD;&#xA; @(_DeploymentLooseManifestFile)" DestinationFiles="@(_ApplicationManifestFinal->'$(_DeploymentApplicationDir)%(TargetPath)');&#xD;&#xA; @(_DeploymentManifestEntryPoint->'$(_DeploymentApplicationDir)%(TargetPath)$(_DeploymentFileMappingExtension)');&#xD;&#xA; @(_DeploymentManifestFiles->'$(_DeploymentApplicationDir)%(TargetPath)$(_DeploymentFileMappingExtension)');&#xD;&#xA; @(ReferenceComWrappersToCopyLocal->'$(_DeploymentApplicationDir)%(FileName)%(Extension)$(_DeploymentFileMappingExtension)');&#xD;&#xA; @(ResolvedIsolatedComModules->'$(_DeploymentApplicationDir)%(FileName)%(Extension)$(_DeploymentFileMappingExtension)');&#xD;&#xA; @(_DeploymentLooseManifestFile->'$(_DeploymentApplicationDir)%(FileName)%(Extension)$(_DeploymentFileMappingExtension)')" SkipUnchangedFiles="$(SkipCopyUnchangedFiles)" OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)" Retries="$(CopyRetryCount)" UseHardlinksIfPossible="$(CreateHardLinksForPublishFilesIfPossible)" UseSymboliclinksIfPossible="$(CreateSymbolicLinksForPublishFilesIfPossible)" RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)" />
<Copy SourceFiles="@(_DeploymentManifestDependencies)" DestinationFiles="@(_DeploymentManifestDependencies->'$(_DeploymentApplicationDir)%(TargetPath)$(_DeploymentFileMappingExtension)')" SkipUnchangedFiles="$(SkipCopyUnchangedFiles)" OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)" Retries="$(CopyRetryCount)" RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)" UseHardlinksIfPossible="$(CreateHardLinksForPublishFilesIfPossible)" UseSymboliclinksIfPossible="$(CreateSymbolicLinksForPublishFilesIfPossible)" Condition="'$(PublishSingleFile)' != 'true' and '%(_DeploymentManifestDependencies.DependencyType)'=='Install'" />
<Copy Condition="'$(PublishSingleFile)' != 'true'" SourceFiles="@(_ReferenceScatterPaths)" DestinationFiles="@(_ReferenceScatterPaths->'$(_DeploymentApplicationDir)%(Filename)%(Extension)$(_DeploymentFileMappingExtension)')" SkipUnchangedFiles="$(SkipCopyUnchangedFiles)" OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)" Retries="$(CopyRetryCount)" RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)" UseHardlinksIfPossible="$(CreateHardLinksForPublishFilesIfPossible)" UseSymboliclinksIfPossible="$(CreateSymbolicLinksForPublishFilesIfPossible)" />
<ItemGroup Condition="'$(PublishSingleFile)' == 'true'">
<PublishedSingleFileToBeCopied Include="@(_DeploymentManifestFiles)" />
</ItemGroup>
<!-- For single-file publish case, we need to only copy the clickonce manifest, manifest entry point (launcher) and the SF EXE -->
<Copy Condition="'$(PublishSingleFile)' == 'true'" SourceFiles="@(_ApplicationManifestFinal);&#xD;&#xA; @(_DeploymentResolvedManifestEntryPoint);&#xD;&#xA; @(PublishedSingleFileToBeCopied);" DestinationFiles="@(_ApplicationManifestFinal->'$(_DeploymentApplicationDir)%(TargetPath)');&#xD;&#xA; @(_DeploymentManifestEntryPoint->'$(_DeploymentApplicationDir)%(TargetPath)$(_DeploymentFileMappingExtension)');&#xD;&#xA; @(PublishedSingleFileToBeCopied->'$(_DeploymentApplicationDir)%(TargetPath)$(_DeploymentFileMappingExtension)')" SkipUnchangedFiles="$(SkipCopyUnchangedFiles)" OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)" Retries="$(CopyRetryCount)" UseHardlinksIfPossible="$(CreateHardLinksForPublishFilesIfPossible)" UseSymboliclinksIfPossible="$(CreateSymbolicLinksForPublishFilesIfPossible)" RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)" />
<FormatUrl InputUrl="$(_DeploymentApplicationUrl)">
<Output TaskParameter="OutputUrl" PropertyName="_DeploymentFormattedApplicationUrl" />
</FormatUrl>
<FormatUrl InputUrl="$(_DeploymentComponentsUrl)">
<Output TaskParameter="OutputUrl" PropertyName="_DeploymentFormattedComponentsUrl" />
</FormatUrl>
</Target>
<!--
============================================================
_DeploymentGenerateBootstrapper
============================================================
-->
<Target Name="_DeploymentGenerateBootstrapper" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- Build setup.exe bootstrapper and copy referenced packages -->
<GenerateBootstrapper ApplicationFile="$(TargetDeployManifestFileName)" ApplicationName="$(AssemblyName)" ApplicationUrl="$(_DeploymentFormattedApplicationUrl)" BootstrapperItems="@(BootstrapperPackage)" ComponentsLocation="$(BootstrapperComponentsLocation)" ComponentsUrl="$(_DeploymentFormattedComponentsUrl)" Culture="$(TargetCulture)" FallbackCulture="$(FallbackCulture)" OutputPath="$(PublishDir)" SupportUrl="$(_DeploymentFormattedSupportUrl)" Path="$(GenerateBootstrapperSdkPath)" VisualStudioVersion="$(VisualStudioVersion)" Condition="'$(BootstrapperEnabled)'=='true'" />
</Target>
<!--
============================================================
_DeploymentSignClickOnceDeployment
============================================================
-->
<Target Name="_DeploymentSignClickOnceDeployment" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- Sign manifests and the bootstrapper -->
<SignFile CertificateThumbprint="$(_DeploymentResolvedManifestCertificateThumbprint)" TimestampUrl="$(ManifestTimestampUrl)" SigningTarget="$(_DeploymentApplicationDir)$(_DeploymentTargetApplicationManifestFileName)" TargetFrameworkIdentifier="$(TargetFrameworkIdentifier)" TargetFrameworkVersion="$(TargetFrameworkVersion)" Condition="'$(_DeploymentSignClickOnceManifests)'=='true'" />
<!-- Update entry point path in deploy manifest -->
<UpdateManifest ApplicationPath="$(_DeploymentApplicationFolderName)\$(_DeploymentTargetApplicationManifestFileName)" TargetFrameworkVersion="$(_DeploymentManifestTargetFrameworkVersion)" ApplicationManifest="$(_DeploymentApplicationDir)$(_DeploymentTargetApplicationManifestFileName)" InputManifest="$(OutDir)$(TargetDeployManifestFileName)" OutputManifest="$(PublishDir)$(TargetDeployManifestFileName)">
<Output TaskParameter="OutputManifest" ItemName="PublishedDeployManifest" />
</UpdateManifest>
<SignFile CertificateThumbprint="$(_DeploymentResolvedManifestCertificateThumbprint)" TimestampUrl="$(ManifestTimestampUrl)" SigningTarget="$(PublishDir)$(TargetDeployManifestFileName)" TargetFrameworkIdentifier="$(TargetFrameworkIdentifier)" TargetFrameworkVersion="$(TargetFrameworkVersion)" Condition="'$(_DeploymentSignClickOnceManifests)'=='true'" />
<SignFile CertificateThumbprint="$(_DeploymentResolvedManifestCertificateThumbprint)" TimestampUrl="$(ManifestTimestampUrl)" SigningTarget="$(PublishDir)\setup.exe" Condition="'$(BootstrapperEnabled)'=='true' and '$(_DeploymentSignClickOnceManifests)'=='true'" />
</Target>
<!--
***********************************************************************************************
***********************************************************************************************
AllProjectOutputGroups Section
***********************************************************************************************
***********************************************************************************************
-->
<!--
============================================================
AllProjectOutputGroups
The targets below drive output groups, which provide generic information about a
project's inputs (e.g., content files, compilation sources, etc.) and built outputs
(e.g., built EXE/DLL, PDB, XML documentation files, etc.)
Each target may produce two kinds of items: outputs and dependencies. Outputs are
items from the current project; dependencies are items that are brought into the
current project as a result of referencing other projects or components.
For both outputs and dependencies, the Include attribute
specifies the location of the output/dependency; it must be a full path. Any number
of additional attributes may be placed on an output/dependency item.
============================================================
-->
<Target Name="AllProjectOutputGroups" DependsOnTargets="&#xD;&#xA; BuiltProjectOutputGroup;&#xD;&#xA; DebugSymbolsProjectOutputGroup;&#xD;&#xA; DocumentationProjectOutputGroup;&#xD;&#xA; SatelliteDllsProjectOutputGroup;&#xD;&#xA; SourceFilesProjectOutputGroup;&#xD;&#xA; ContentFilesProjectOutputGroup;&#xD;&#xA; SGenFilesOutputGroup" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<!--
This is the key output for the BuiltProjectOutputGroup and is meant to be read directly from the IDE.
Reading an item is faster than invoking a target.
-->
<ItemGroup Condition=" '$(OutputType)' != 'winmdobj' " xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<BuiltProjectOutputGroupKeyOutput Include="@(IntermediateAssembly->'%(FullPath)')">
<IsKeyOutput>true</IsKeyOutput>
<FinalOutputPath>$(TargetPath)</FinalOutputPath>
<TargetPath>$(TargetFileName)</TargetPath>
<COM2REG Condition="'$(RegisterForComInterop)'=='true' and '$(OutputType)'=='library'">true</COM2REG>
</BuiltProjectOutputGroupKeyOutput>
</ItemGroup>
<ItemGroup Condition=" '$(OutputType)' == 'winmdobj' " xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<WinMDExpOutputWindowsMetadataFileItem Include="$(_IntermediateWindowsMetadataPath)" Condition="'$(_IntermediateWindowsMetadataPath)' != ''" />
<BuiltProjectOutputGroupKeyOutput Include="@(WinMDExpOutputWindowsMetadataFileItem->'%(FullPath)')">
<IsKeyOutput>true</IsKeyOutput>
<FinalOutputPath>$(TargetPath)</FinalOutputPath>
<TargetPath>$(TargetFileName)</TargetPath>
</BuiltProjectOutputGroupKeyOutput>
</ItemGroup>
<!--
============================================================
BuiltProjectOutputGroup
============================================================
-->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<BuiltProjectOutputGroupDependsOn>PrepareForBuild</BuiltProjectOutputGroupDependsOn>
<AddAppConfigToBuildOutputs Condition="('$(AddAppConfigToBuildOutputs)'=='') and ('$(OutputType)'!='library' and '$(OutputType)'!='winmdobj')">true</AddAppConfigToBuildOutputs>
</PropertyGroup>
<Target Name="BuiltProjectOutputGroup" Returns="@(BuiltProjectOutputGroupOutput)" DependsOnTargets="$(BuiltProjectOutputGroupDependsOn)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<_BuiltProjectOutputGroupOutputIntermediate Include="@(BuiltProjectOutputGroupKeyOutput)" />
</ItemGroup>
<!-- This item represents the app.config file -->
<ItemGroup>
<_BuiltProjectOutputGroupOutputIntermediate Include="$(AppConfig)" Condition="'$(AddAppConfigToBuildOutputs)'=='true'">
<FinalOutputPath>$(TargetDir)$(TargetFileName).config</FinalOutputPath>
<TargetPath>$(TargetFileName).config</TargetPath>
<!-- For compatibility with 2.0 -->
<OriginalItemSpec>$(AppConfig)</OriginalItemSpec>
</_BuiltProjectOutputGroupOutputIntermediate>
</ItemGroup>
<ItemGroup>
<_IsolatedComReference Include="@(COMReference)" Condition=" '%(COMReference.Isolated)' == 'true' " />
<_IsolatedComReference Include="@(COMFileReference)" Condition=" '%(COMFileReference.Isolated)' == 'true' " />
</ItemGroup>
<!-- This item represents the native manifest, example: WindowsApplication1.exe.manifest or Native.ClassLibrary1.manifest -->
<ItemGroup>
<_BuiltProjectOutputGroupOutputIntermediate Include="$(OutDir)$(_DeploymentTargetApplicationManifestFileName)" Condition="'@(NativeReference)'!='' or '@(_IsolatedComReference)'!=''">
<TargetPath>$(_DeploymentTargetApplicationManifestFileName)</TargetPath>
<!-- For compatibility with 2.0 -->
<OriginalItemSpec>$(OutDir)$(_DeploymentTargetApplicationManifestFileName)</OriginalItemSpec>
</_BuiltProjectOutputGroupOutputIntermediate>
</ItemGroup>
<!-- Convert intermediate items into final items; this way we can get the full path for each item -->
<ItemGroup>
<BuiltProjectOutputGroupOutput Include="@(_BuiltProjectOutputGroupOutputIntermediate->'%(FullPath)')">
<!-- For compatibility with 2.0 -->
<OriginalItemSpec Condition="'%(_BuiltProjectOutputGroupOutputIntermediate.OriginalItemSpec)' == ''">%(_BuiltProjectOutputGroupOutputIntermediate.FullPath)</OriginalItemSpec>
</BuiltProjectOutputGroupOutput>
</ItemGroup>
</Target>
<!--
============================================================
DebugSymbolsProjectOutputGroup
This target performs population of the Debug Symbols project output group.
============================================================
-->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<DebugSymbolsProjectOutputGroupDependsOn />
</PropertyGroup>
<ItemGroup Condition="'$(_DebugSymbolsProduced)' != 'false' and '$(OutputType)' != 'winmdobj'" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<DebugSymbolsProjectOutputGroupOutput Include="@(_DebugSymbolsIntermediatePath->'%(FullPath)')">
<FinalOutputPath>@(_DebugSymbolsOutputPath->'%(FullPath)')</FinalOutputPath>
<TargetPath>@(_DebugSymbolsIntermediatePath->'%(Filename)%(Extension)')</TargetPath>
</DebugSymbolsProjectOutputGroupOutput>
</ItemGroup>
<ItemGroup Condition="'$(_DebugSymbolsProduced)' != 'false' and '$(OutputType)' == 'winmdobj'" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<WinMDExpOutputPdbItem Include="$(WinMDExpOutputPdb)" Condition="'$(WinMDExpOutputPdb)' != ''" />
<WinMDExpFinalOutputPdbItem Include="$(_WinMDDebugSymbolsOutputPath)" Condition="'$(_WinMDDebugSymbolsOutputPath)' != ''" />
<DebugSymbolsProjectOutputGroupOutput Include="@(WinMDExpOutputPdbItem->'%(FullPath)')">
<FinalOutputPath>@(WinMDExpFinalOutputPdbItem->'%(FullPath)')</FinalOutputPath>
<TargetPath>@(WinMDExpOutputPdbItem->'%(Filename)%(Extension)')</TargetPath>
</DebugSymbolsProjectOutputGroupOutput>
</ItemGroup>
<Target Name="DebugSymbolsProjectOutputGroup" Returns="@(DebugSymbolsProjectOutputGroupOutput)" DependsOnTargets="$(DebugSymbolsProjectOutputGroupDependsOn)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<!--
============================================================
DocumentationProjectOutputGroup
This target performs population of the Documentation project output group.
============================================================
-->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<DocumentationProjectOutputGroupDependsOn />
</PropertyGroup>
<ItemGroup Condition="'$(DocumentationFile)'!='' and '$(OutputType)' != 'winmdobj'" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<DocumentationProjectOutputGroupOutput Include="@(DocFileItem->'%(FullPath)')">
<FinalOutputPath>@(FinalDocFile->'%(FullPath)')</FinalOutputPath>
<IsKeyOutput>true</IsKeyOutput>
<TargetPath>@(DocFileItem->'%(Filename)%(Extension)')</TargetPath>
</DocumentationProjectOutputGroupOutput>
</ItemGroup>
<ItemGroup Condition="'$(DocumentationFile)' != '' and '$(OutputType)' == 'winmdobj'" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<WinMDOutputDocumentationFileItem Include="$(WinMDOutputDocumentationFile)" Condition="'$(WinMDOutputDocumentationFile)' != ''" />
<WinMDExpFinalOutputDocItem Include="$(_WinMDDocFileOutputPath)" Condition="'$(_WinMDDocFileOutputPath)' != ''" />
<DocumentationProjectOutputGroupOutput Include="@(WinMDOutputDocumentationFileItem->'%(FullPath)')">
<FinalOutputPath>@(WinMDExpFinalOutputDocItem->'%(FullPath)')</FinalOutputPath>
<TargetPath>@(WinMDOutputDocumentationFileItem->'%(Filename)%(Extension)')</TargetPath>
</DocumentationProjectOutputGroupOutput>
</ItemGroup>
<Target Name="DocumentationProjectOutputGroup" Returns="@(DocumentationProjectOutputGroupOutput)" DependsOnTargets="$(DocumentationProjectOutputGroupDependsOn)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<!--
============================================================
SatelliteDllsProjectOutputGroup
This target performs population of the Satellite Files project output group.
============================================================
-->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<SatelliteDllsProjectOutputGroupDependsOn>PrepareForBuild;PrepareResourceNames</SatelliteDllsProjectOutputGroupDependsOn>
</PropertyGroup>
<Target Name="SatelliteDllsProjectOutputGroup" Returns="@(SatelliteDllsProjectOutputGroupOutput)" DependsOnTargets="$(SatelliteDllsProjectOutputGroupDependsOn)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<SatelliteDllsProjectOutputGroupOutputIntermediate Include="$(IntermediateOutputPath)%(EmbeddedResource.Culture)\$(TargetName).resources.dll" Condition="'%(EmbeddedResource.WithCulture)' == 'true'">
<TargetPath>%(EmbeddedResource.Culture)\$(TargetName).resources.dll</TargetPath>
<Culture>%(EmbeddedResource.Culture)</Culture>
</SatelliteDllsProjectOutputGroupOutputIntermediate>
</ItemGroup>
<!-- Convert intermediate items into final items; this way we can get the full path for each item. -->
<ItemGroup>
<SatelliteDllsProjectOutputGroupOutput Include="@(SatelliteDllsProjectOutputGroupOutputIntermediate->'%(FullPath)')">
<FinalOutputPath Condition=" '%(SatelliteDllsProjectOutputGroupOutputIntermediate.FinalOutputPath)' == '' ">$(TargetDir)%(SatelliteDllsProjectOutputGroupOutputIntermediate.TargetPath)</FinalOutputPath>
<!-- For compatibility with 2.0 -->
<OriginalItemSpec>%(SatelliteDllsProjectOutputGroupOutputIntermediate.Identity)</OriginalItemSpec>
</SatelliteDllsProjectOutputGroupOutput>
</ItemGroup>
</Target>
<!--
============================================================
SourceFilesProjectOutputGroup
This target performs population of the Source Files project output group.
Source files are items in the project whose type is "Compile" and "EmbeddedResource".
============================================================
-->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<SourceFilesProjectOutputGroupDependsOn>PrepareForBuild;AssignTargetPaths</SourceFilesProjectOutputGroupDependsOn>
</PropertyGroup>
<Target Name="SourceFilesProjectOutputGroup" Returns="@(SourceFilesProjectOutputGroupOutput)" DependsOnTargets="$(SourceFilesProjectOutputGroupDependsOn)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<AssignTargetPath Files="@(Compile)" RootFolder="$(MSBuildProjectDirectory)">
<Output TaskParameter="AssignedFiles" ItemName="_CompileWithTargetPath" />
</AssignTargetPath>
<ItemGroup>
<!-- First we deal with Compile, EmbeddedResource and AppConfig -->
<SourceFilesProjectOutputGroupOutput Include="@(_CompileWithTargetPath->'%(FullPath)');@(EmbeddedResource->'%(FullPath)');@(_LicxFile->'%(FullPath)');@(AppConfigWithTargetPath->'%(FullPath)')" />
<!-- Include the project file -->
<SourceFilesProjectOutputGroupOutput Include="$(MSBuildProjectFullPath)">
<!-- For compatibility with 2.0 -->
<OriginalItemSpec>$(MSBuildProjectFullPath)</OriginalItemSpec>
<TargetPath>$(ProjectFileName)</TargetPath>
</SourceFilesProjectOutputGroupOutput>
</ItemGroup>
</Target>
<!-- Get just the compile items -->
<Target Name="GetCompile" Returns="@(Compile)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<!--
============================================================
ContentFilesProjectOutputGroup
This target performs population of the Content Files project output group.
Content files are items in the project whose type is "Content".
============================================================
-->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ContentFilesProjectOutputGroupDependsOn>PrepareForBuild;AssignTargetPaths</ContentFilesProjectOutputGroupDependsOn>
</PropertyGroup>
<Target Name="ContentFilesProjectOutputGroup" Returns="@(ContentFilesProjectOutputGroupOutput)" DependsOnTargets="$(ContentFilesProjectOutputGroupDependsOn)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- Convert items into final items; this way we can get the full path for each item. -->
<ItemGroup>
<ContentFilesProjectOutputGroupOutput Include="@(ContentWithTargetPath->'%(FullPath)')" />
</ItemGroup>
</Target>
<!--
============================================================
SGenFilesOutputGroup
This target performs population of the GenerateSerializationAssemblies Files project output group.
GenerateSerializationAssemblies files are those generated by the GenerateSerializationAssemblies target and task.
============================================================
-->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<SGenFilesOutputGroupDependsOn />
</PropertyGroup>
<ItemGroup Condition="'$(_SGenGenerateSerializationAssembliesConfig)' == 'On' or ('@(WebReferenceUrl)'!='' and '$(_SGenGenerateSerializationAssembliesConfig)' == 'Auto')" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<SGenFilesOutputGroupOutput Include="@(_OutputPathItem->'%(FullPath)$(_SGenDllName)')">
<FinalOutputPath>@(_OutputPathItem->'%(FullPath)$(_SGenDllName)')</FinalOutputPath>
<TargetPath>$(_SGenDllName)</TargetPath>
</SGenFilesOutputGroupOutput>
</ItemGroup>
<Target Name="SGenFilesOutputGroup" Returns="@(SGenFilesOutputGroupOutput)" DependsOnTargets="$(SGenFilesOutputGroupDependsOn)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<!--
============================================================
SDKRelated Output groups
These targets are to gather information from the SDKs.
============================================================
-->
<!-- Get the resolved SDK reference items -->
<Target Name="GetResolvedSDKReferences" DependsOnTargets="ResolveSDKReferences" Returns="@(ResolvedSDKReference)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<!-- Target will return no results by default but will be populated by other targets elsewhere.
Needed for certain build environments that import partial sets of targets. -->
<Target Name="CollectReferencedNuGetPackages" Returns="@(ReferencedNuGetPackages)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<!-- Get the TargetFrameworks that are supported for the Visual Studio TargetFramework drop down -->
<Target Name="GenerateSupportedTargetFrameworkAlias" Returns="@(SupportedTargetFrameworkAlias)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<!--
============================================================
PriFilesOutputGroup
This target performs population of the pri files output group
============================================================
-->
<Target Name="PriFilesOutputGroup" Condition="'@(_ReferenceRelatedPaths)' != ''" DependsOnTargets="BuildOnlySettings;PrepareForBuild;AssignTargetPaths;ResolveReferences" Returns="@(PriFilesOutputGroupOutput)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- This item represents dependent pri file's -->
<ItemGroup>
<PriFilesOutputGroupOutput Include="@(_ReferenceRelatedPaths->'%(FullPath)')" Condition="'%(Extension)' == '.pri'" />
</ItemGroup>
</Target>
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<SDKRedistOutputGroupDependsOn>ResolveSDKReferences;ExpandSDKReferences</SDKRedistOutputGroupDependsOn>
</PropertyGroup>
<!--
============================================================
SDKRedistOutputGroup
This target gathers the Redist folders from the SDKs which have been resolved.
============================================================
-->
<Target Name="SDKRedistOutputGroup" Returns="@(SDKRedistOutputGroupOutput)" DependsOnTargets="$(SDKRedistOutputGroupDependsOn)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- This list starts with the least specific files to the most specific so that later files can overwrite earlier files-->
<ItemGroup>
<SDKRedistOutputGroupOutput Include="@(ResolvedRedistFiles)" />
</ItemGroup>
</Target>
<!--
***********************************************************************************************
***********************************************************************************************
AllProjectOutputGroupsDependencies Section
***********************************************************************************************
***********************************************************************************************
-->
<!--
============================================================
CommonOutputGroupsDependsOn
Dependencies common to many of the *OutputGroupDependencies targets.
============================================================
-->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<CommonOutputGroupsDependsOn>
$(CommonOutputGroupsDependsOn);
BuildOnlySettings;
PrepareForBuild;
AssignTargetPaths;
ResolveReferences
</CommonOutputGroupsDependsOn>
</PropertyGroup>
<!--
============================================================
AllProjectOutputGroupsDependencies
============================================================
-->
<Target Name="AllProjectOutputGroupsDependencies" DependsOnTargets="&#xD;&#xA; BuiltProjectOutputGroupDependencies;&#xD;&#xA; DebugSymbolsProjectOutputGroupDependencies;&#xD;&#xA; SatelliteDllsProjectOutputGroupDependencies;&#xD;&#xA; DocumentationProjectOutputGroupDependencies;&#xD;&#xA; SGenFilesOutputGroupDependencies" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<!--
============================================================
BuiltProjectOutputGroupDependencies
This target performs population of the Built project output group dependencies.
============================================================
-->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<BuiltProjectOutputGroupDependenciesDependsOn>
$(BuiltProjectOutputGroupDependenciesDependsOn);
$(CommonOutputGroupsDependsOn)
</BuiltProjectOutputGroupDependenciesDependsOn>
</PropertyGroup>
<Target Name="BuiltProjectOutputGroupDependencies" DependsOnTargets="$(BuiltProjectOutputGroupDependenciesDependsOn)" Returns="@(BuiltProjectOutputGroupDependency)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<BuiltProjectOutputGroupDependency Include="@(ReferencePath->'%(FullPath)');&#xD;&#xA; @(ReferenceDependencyPaths->'%(FullPath)');&#xD;&#xA; @(NativeReferenceFile->'%(FullPath)');&#xD;&#xA; @(_DeploymentLooseManifestFile->'%(FullPath)');&#xD;&#xA; @(ResolvedIsolatedComModules->'%(FullPath)')" />
</ItemGroup>
</Target>
<!--
============================================================
DebugSymbolsProjectOutputGroupDependencies
This target performs population of the dependencies for the debug symbols project output group.
============================================================
-->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<DebugSymbolsProjectOutputGroupDependenciesDependsOn>
$(DebugSymbolsProjectOutputGroupDependenciesDependsOn);
$(CommonOutputGroupsDependsOn)
</DebugSymbolsProjectOutputGroupDependenciesDependsOn>
</PropertyGroup>
<Target Name="DebugSymbolsProjectOutputGroupDependencies" Condition="'$(DebugSymbols)'!='false'" DependsOnTargets="$(DebugSymbolsProjectOutputGroupDependenciesDependsOn)" Returns="@(DebugSymbolsProjectOutputGroupDependency)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- This item represents dependent PDB's -->
<ItemGroup>
<DebugSymbolsProjectOutputGroupDependency Include="@(_ReferenceRelatedPaths->'%(FullPath)')" Condition="'%(Extension)' == '.pdb'" />
</ItemGroup>
</Target>
<!--
============================================================
SatelliteDllsProjectOutputGroupDependencies
This target performs population of the dependencies for the satellite files project output group.
============================================================
-->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<SatelliteDllsProjectOutputGroupDependenciesDependsOn>
$(SatelliteDllsProjectOutputGroupDependenciesDependsOn);
$(CommonOutputGroupsDependsOn)
</SatelliteDllsProjectOutputGroupDependenciesDependsOn>
</PropertyGroup>
<Target Name="SatelliteDllsProjectOutputGroupDependencies" DependsOnTargets="$(SatelliteDllsProjectOutputGroupDependenciesDependsOn)" Returns="@(SatelliteDllsProjectOutputGroupDependency)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- This item represents dependent satellites -->
<ItemGroup>
<SatelliteDllsProjectOutputGroupDependency Include="@(ReferenceSatellitePaths->'%(FullPath)')" />
</ItemGroup>
</Target>
<!--
============================================================
DocumentationProjectOutputGroupDependencies
This target performs population of the dependencies for the documentation project output group.
============================================================
-->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<DocumentationProjectOutputGroupDependenciesDependsOn>
$(DocumentationProjectOutputGroupDependenciesDependsOn);
$(CommonOutputGroupsDependsOn)
</DocumentationProjectOutputGroupDependenciesDependsOn>
</PropertyGroup>
<Target Name="DocumentationProjectOutputGroupDependencies" Condition="'$(DocumentationFile)'!=''" DependsOnTargets="$(DocumentationProjectOutputGroupDependenciesDependsOn)" Returns="@(DocumentationProjectOutputGroupDependency)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- This item represents dependent XMLs -->
<ItemGroup>
<DocumentationProjectOutputGroupDependency Include="@(_ReferenceRelatedPaths->'%(FullPath)')" Condition="'%(Extension)' == '.xml'" />
</ItemGroup>
</Target>
<!--
============================================================
SGenFilesOutputGroupDependencies
This target performs population of the dependencies for the GenerateSerializationAssemblies project output group.
============================================================
-->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<SGenFilesOutputGroupDependenciesDependsOn>
$(SGenFilesOutputGroupDependenciesDependsOn);
$(CommonOutputGroupsDependsOn)
</SGenFilesOutputGroupDependenciesDependsOn>
</PropertyGroup>
<Target Name="SGenFilesOutputGroupDependencies" DependsOnTargets="$(SGenFilesOutputGroupDependenciesDependsOn)" Returns="@(SGenFilesOutputGroupDependency)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- This item represents sgen xml serializer dll's -->
<ItemGroup>
<SGenFilesOutputGroupDependency Include="@(_ReferenceSerializationAssemblyPaths->'%(FullPath)')" Condition="'%(Extension)' == '.dll'" />
</ItemGroup>
</Target>
<!--
============================================================
ReferenceCopyLocalPathsOutputGroup
Exposes the set of items that should be copied locally based on the project's references.
============================================================
-->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ReferenceCopyLocalPathsOutputGroupDependsOn>
$(ReferenceCopyLocalPathsOutputGroupDependsOn);
$(CommonOutputGroupsDependsOn)
</ReferenceCopyLocalPathsOutputGroupDependsOn>
</PropertyGroup>
<Target Name="ReferenceCopyLocalPathsOutputGroup" DependsOnTargets="$(ReferenceCopyLocalPathsOutputGroupDependsOn)" Returns="@(ReferenceCopyLocalPathsOutputGroupOutput)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<ReferenceCopyLocalPathsOutputGroupOutput Include="@(ReferenceCopyLocalPaths)">
<TargetPath>%(ReferenceCopyLocalPaths.DestinationSubDirectory)%(ReferenceCopyLocalPaths.Filename)%(ReferenceCopyLocalPaths.Extension)</TargetPath>
</ReferenceCopyLocalPathsOutputGroupOutput>
</ItemGroup>
</Target>
<!--
============================================================
DesignerRuntimeImplementationProjectOutputGroup
Exposes build items to be used by designer. The default is empty, but
SDKs can override it as appropriate. The empty stub is required so that
the project system can always rely on calling it even if it is not
overridden.
============================================================
-->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<DesignerRuntimeImplementationProjectOutputGroupDependsOn>
$(DesignerRuntimeImplementationProjectOutputGroupDependsOn);
$(CommonOutputGroupsDependsOn)
</DesignerRuntimeImplementationProjectOutputGroupDependsOn>
</PropertyGroup>
<Target Name="DesignerRuntimeImplementationProjectOutputGroup" DependsOnTargets="$(DesignerRuntimeImplementationProjectOutputGroupDependsOn)" Returns="@(DesignerRuntimeImplementationProjectOutputGroupOutput)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<!--
============================================================
.editorconfig support
============================================================
-->
<!-- Expose the set of potential .editorconfig files so the project system can
retrieve them. -->
<Target Name="GetPotentialEditorConfigFiles" Returns="@(PotentialEditorConfigFiles)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<CodeAnalysisTargets Condition="'$(CodeAnalysisTargets)'==''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CodeAnalysis\Microsoft.CodeAnalysis.targets</CodeAnalysisTargets>
</PropertyGroup>
<!--<Import Project="$(CodeAnalysisTargets)" Condition="Exists('$(CodeAnalysisTargets)')" />-->
<!--<Import Project="$(ReportingServicesTargets)" Condition="Exists('$(ReportingServicesTargets)')" />-->
<!--<Import Project="$(MSBuildToolsPath)\Microsoft.NETFramework.targets" Condition="('$(TargetFrameworkIdentifier)' == '' or '$(TargetFrameworkIdentifier)' == '.NETFramework') and ('$(TargetRuntime)' == 'Managed')" />-->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportXamlTargets Condition="'$(ImportXamlTargets)'=='' and ('$(TargetFrameworkVersion)' != 'v2.0' and '$(TargetFrameworkVersion)' != 'v3.5') and Exists('$(MSBuildToolsPath)\Microsoft.Xaml.targets')">true</ImportXamlTargets>
</PropertyGroup>
<!--<Import Project="$(MSBuildToolsPath)\Microsoft.Xaml.targets" Condition="('$(ImportXamlTargets)' == 'true')" />-->
<!-- imports Microsoft.WorkflowBuildExtensions.targets only if TargetFrameworkVersion is v4.5 or above or TargetFrameworkfVersion specified does not conform to the format of vX.X[.X.X] -->
<!-- Underlying assumption is that there shouldn't be any other versions between v4.0.* and v4.5 -->
<!--<Import Project="$(MSBuildToolsPath)\Microsoft.WorkflowBuildExtensions.targets" Condition="('$(TargetFrameworkVersion)' != 'v2.0' and '$(TargetFrameworkVersion)' != 'v3.5' and (!$([System.String]::IsNullOrEmpty('$(TargetFrameworkVersion)')) and !$(TargetFrameworkVersion.StartsWith('v4.0')))) and Exists('$(MSBuildToolsPath)\Microsoft.WorkflowBuildExtensions.targets')" />-->
<!-- This import is temporary and will be removed once it is moved into the silverlight targets -->
<!--<Import Project="$(MSBuildToolsPath)\Microsoft.WinFX.targets" Condition="'$(TargetFrameworkIdentifier)' == 'Silverlight' and Exists('$(MSBuildToolsPath)\Microsoft.WinFX.targets')" />-->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<MsTestToolsTargets Condition="'$(MsTestToolsTargets)'==''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\TeamTest\Microsoft.TeamTest.targets</MsTestToolsTargets>
</PropertyGroup>
<!--<Import Project="$(MsTestToolsTargets)" Condition="Exists('$(MsTestToolsTargets)')" />-->
<!-- App packaging support -->
<!--
Following two targets are needed to be present in every project being built
because the app packaging targets recursively scan all projects referenced
from projects that generate app packages for them.
-->
<Target Name="CleanAppxPackage" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<Target Name="GetPackagingOutputs" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<MsAppxPackageTargets Condition="'$(MsAppxPackageTargets)'==''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\AppxPackage\Microsoft.AppXPackage.Targets</MsAppxPackageTargets>
</PropertyGroup>
<!--<Import Project="$(MsAppxPackageTargets)" Condition="'$(WindowsAppContainer)' == 'true' and Exists('$(MsAppxPackageTargets)')" />-->
<!-- This import is temporary and will be removed once it is moved into the silverlight targets -->
<!--<Import Project="$(MSBuildToolsPath)\Microsoft.Data.Entity.targets" Condition="'$(TargetFrameworkIdentifier)' == 'Silverlight' and Exists('$(MSBuildToolsPath)\Microsoft.Data.Entity.targets')" />-->
<!-- Import NuGet.targets (required for GetReferenceNearestTargetFrameworkTask and used for Restore functionality) -->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<MSBuildUseVisualStudioDirectoryLayout Condition="'$(MSBuildUseVisualStudioDirectoryLayout)'==''">$([MSBuild]::IsRunningFromVisualStudio())</MSBuildUseVisualStudioDirectoryLayout>
<NuGetRestoreTargets Condition="'$(NuGetRestoreTargets)'=='' and '$(MSBuildUseVisualStudioDirectoryLayout)'=='true'">$(MSBuildToolsPath32)\..\..\..\Common7\IDE\CommonExtensions\Microsoft\NuGet\NuGet.targets</NuGetRestoreTargets>
<NuGetRestoreTargets Condition="'$(NuGetRestoreTargets)'==''">$(MSBuildToolsPath)\NuGet.targets</NuGetRestoreTargets>
</PropertyGroup>
<!--
============================================================================================================================================
<Import Project="$(NuGetRestoreTargets)" Condition="'$(IsRestoreTargetsFileLoaded)' != 'true' and Exists('$(NuGetRestoreTargets)')">
C:\Program Files\dotnet\sdk\6.0.100-preview.5.21302.13\NuGet.targets
============================================================================================================================================
-->
<!--
***********************************************************************************************
NuGet.targets
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
created a backup copy. Incorrect changes to this file will make it
impossible to load or build your projects from the command-line or the IDE.
Copyright (c) .NET Foundation. All rights reserved.
***********************************************************************************************
This target file contains the NuGet Restore target for walking the project and reference graph
and restoring dependencies from the graph.
Ways to use this targets file:
1. Invoke it directly and provide project file paths using $(RestoreGraphProjectInput).
2. With a solution this may be used as a target in the metaproj.
3. Import the targets file from a project.
Restore flow summary:
1. Top level projects (entry points) are determined.
2. Each project and all of its project references are walked recursively.
3. The project is evaluated for each $(TargetFramework). Items are created
for project properties and dependencies. Each item is marked
with the project it came from so that it can be matched up later.
4. All restore items generated by the walk are grouped together by
project and convert into a project spec.
The result file contains:
1. A list of projects to restore.
2. The complete closure of all projects referenced (Includes project references that are not being restored directly).
3. Package and project dependencies for each project.
4. DotnetCliTool references
-->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- Mark that this target file has been loaded. -->
<IsRestoreTargetsFileLoaded>true</IsRestoreTargetsFileLoaded>
<!-- Load NuGet.Build.Tasks.dll, this can be overridden to use a different version with $(RestoreTaskAssemblyFile) -->
<RestoreTaskAssemblyFile Condition=" '$(RestoreTaskAssemblyFile)' == '' ">NuGet.Build.Tasks.dll</RestoreTaskAssemblyFile>
<!-- Do not hide errors and warnings by default -->
<HideWarningsAndErrors Condition=" '$(HideWarningsAndErrors)' == '' ">false</HideWarningsAndErrors>
<!-- Recurse by default -->
<RestoreRecursive Condition=" '$(RestoreRecursive)' == '' ">true</RestoreRecursive>
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
<RestoreUseSkipNonexistentTargets Condition=" '$(RestoreUseSkipNonexistentTargets)' == '' ">true</RestoreUseSkipNonexistentTargets>
<!-- RuntimeIdentifier compatibility check -->
<ValidateRuntimeIdentifierCompatibility Condition=" '$(ValidateRuntimeIdentifierCompatibility)' == '' ">false</ValidateRuntimeIdentifierCompatibility>
<!-- Error handling while walking projects -->
<RestoreContinueOnError Condition=" '$(RestoreContinueOnError)' == '' ">WarnAndContinue</RestoreContinueOnError>
<!-- Build in parallel -->
<RestoreBuildInParallel Condition=" '$(BuildInParallel)' != '' ">$(BuildInParallel)</RestoreBuildInParallel>
<RestoreBuildInParallel Condition=" '$(RestoreBuildInParallel)' == '' ">true</RestoreBuildInParallel>
<!-- Check if the restore target was executed on a sln file -->
<_RestoreSolutionFileUsed Condition=" '$(_RestoreSolutionFileUsed)' == '' AND '$(SolutionDir)' != '' AND $(MSBuildProjectFullPath.EndsWith('.metaproj')) == 'true' ">true</_RestoreSolutionFileUsed>
<!-- We default to MSBuildInteractive. -->
<NuGetInteractive Condition=" '$(NuGetInteractive)' == '' ">$(MSBuildInteractive)</NuGetInteractive>
<!-- Mark that this targets file supports package download. -->
<PackageDownloadSupported>true</PackageDownloadSupported>
<!-- Mark that this targets file GetReferenceNearestTargetFrameworkTask task supports the TargetPlatformMoniker -->
<GetReferenceNearestTargetFrameworkTaskSupportsTargetPlatformParameter>true</GetReferenceNearestTargetFrameworkTaskSupportsTargetPlatformParameter>
<!-- Flag if the Central package file is enabled -->
<_CentralPackageVersionsEnabled Condition="'$(ManagePackageVersionsCentrally)' == 'true' AND '$(CentralPackageVersionsFileImported)' == 'true'">true</_CentralPackageVersionsEnabled>
</PropertyGroup>
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- Exclude packages from changing restore inputs. -->
<_GenerateRestoreGraphProjectEntryInputProperties>ExcludeRestorePackageImports=true</_GenerateRestoreGraphProjectEntryInputProperties>
<!-- Standalone mode
This is used by NuGet.exe to inject targets into the project that will be
walked next. In normal /t:Restore mode this causes a duplicate import
since NuGet.targets it loaded as part of MSBuild, there is should be
skipped. -->
<_GenerateRestoreGraphProjectEntryInputProperties Condition=" '$(RestoreUseCustomAfterTargets)' == 'true' ">
$(_GenerateRestoreGraphProjectEntryInputProperties);
NuGetRestoreTargets=$(MSBuildThisFileFullPath);
RestoreUseCustomAfterTargets=$(RestoreUseCustomAfterTargets);
CustomAfterMicrosoftCommonCrossTargetingTargets=$(MSBuildThisFileFullPath);
CustomAfterMicrosoftCommonTargets=$(MSBuildThisFileFullPath);
</_GenerateRestoreGraphProjectEntryInputProperties>
<!-- Include SolutionDir and SolutionName for solution restores and persist these properties during the walk. -->
<_GenerateRestoreGraphProjectEntryInputProperties Condition=" '$(_RestoreSolutionFileUsed)' == 'true' ">
$(_GenerateRestoreGraphProjectEntryInputProperties);
_RestoreSolutionFileUsed=true;
SolutionDir=$(SolutionDir);
SolutionName=$(SolutionName);
SolutionFileName=$(SolutionFileName);
SolutionPath=$(SolutionPath);
SolutionExt=$(SolutionExt);
</_GenerateRestoreGraphProjectEntryInputProperties>
</PropertyGroup>
<!-- Tasks -->
<UsingTask TaskName="NuGet.Build.Tasks.RestoreTask" AssemblyFile="$(RestoreTaskAssemblyFile)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<UsingTask TaskName="NuGet.Build.Tasks.WriteRestoreGraphTask" AssemblyFile="$(RestoreTaskAssemblyFile)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<UsingTask TaskName="NuGet.Build.Tasks.GetRestoreProjectJsonPathTask" AssemblyFile="$(RestoreTaskAssemblyFile)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<UsingTask TaskName="NuGet.Build.Tasks.GetRestoreProjectReferencesTask" AssemblyFile="$(RestoreTaskAssemblyFile)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<UsingTask TaskName="NuGet.Build.Tasks.GetRestorePackageReferencesTask" AssemblyFile="$(RestoreTaskAssemblyFile)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<UsingTask TaskName="NuGet.Build.Tasks.GetCentralPackageVersionsTask" AssemblyFile="$(RestoreTaskAssemblyFile)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<UsingTask TaskName="NuGet.Build.Tasks.GetRestorePackageDownloadsTask" AssemblyFile="$(RestoreTaskAssemblyFile)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<UsingTask TaskName="NuGet.Build.Tasks.GetRestoreFrameworkReferencesTask" AssemblyFile="$(RestoreTaskAssemblyFile)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<UsingTask TaskName="NuGet.Build.Tasks.GetRestoreDotnetCliToolsTask" AssemblyFile="$(RestoreTaskAssemblyFile)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<UsingTask TaskName="NuGet.Build.Tasks.GetProjectTargetFrameworksTask" AssemblyFile="$(RestoreTaskAssemblyFile)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<UsingTask TaskName="NuGet.Build.Tasks.GetRestoreSolutionProjectsTask" AssemblyFile="$(RestoreTaskAssemblyFile)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<UsingTask TaskName="NuGet.Build.Tasks.GetRestoreSettingsTask" AssemblyFile="$(RestoreTaskAssemblyFile)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<UsingTask TaskName="NuGet.Build.Tasks.WarnForInvalidProjectsTask" AssemblyFile="$(RestoreTaskAssemblyFile)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<UsingTask TaskName="NuGet.Build.Tasks.GetReferenceNearestTargetFrameworkTask" AssemblyFile="$(RestoreTaskAssemblyFile)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<UsingTask TaskName="NuGet.Build.Tasks.GetRestoreProjectStyleTask" AssemblyFile="$(RestoreTaskAssemblyFile)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<UsingTask TaskName="NuGet.Build.Tasks.NuGetMessageTask" AssemblyFile="$(RestoreTaskAssemblyFile)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<!--
============================================================
Restore
Main entry point for restoring packages
============================================================
-->
<Target Name="Restore" DependsOnTargets="_GenerateRestoreGraph" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- Drop any duplicate items -->
<RemoveDuplicates Inputs="@(_RestoreGraphEntry)">
<Output TaskParameter="Filtered" ItemName="_RestoreGraphEntryFiltered" />
</RemoveDuplicates>
<!-- Call restore -->
<RestoreTask RestoreGraphItems="@(_RestoreGraphEntryFiltered)" RestoreDisableParallel="$(RestoreDisableParallel)" RestoreNoCache="$(RestoreNoCache)" RestoreIgnoreFailedSources="$(RestoreIgnoreFailedSources)" RestoreRecursive="$(RestoreRecursive)" RestoreForce="$(RestoreForce)" HideWarningsAndErrors="$(HideWarningsAndErrors)" Interactive="$(NuGetInteractive)" RestoreForceEvaluate="$(RestoreForceEvaluate)" RestorePackagesConfig="$(RestorePackagesConfig)" />
</Target>
<!--
============================================================
GenerateRestoreGraphFile
Writes the output of _GenerateRestoreGraph to disk
============================================================
-->
<Target Name="GenerateRestoreGraphFile" DependsOnTargets="_GenerateRestoreGraph" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- Validate -->
<Error Condition="$(RestoreGraphOutputPath) == ''" Text="Missing RestoreGraphOutputPath property!" />
<!-- Drop any duplicate items -->
<RemoveDuplicates Inputs="@(_RestoreGraphEntry)">
<Output TaskParameter="Filtered" ItemName="_RestoreGraphEntryFiltered" />
</RemoveDuplicates>
<!-- Write file -->
<WriteRestoreGraphTask RestoreGraphItems="@(_RestoreGraphEntryFiltered)" RestoreGraphOutputPath="$(RestoreGraphOutputPath)" RestoreRecursive="$(RestoreRecursive)" />
</Target>
<!--
============================================================
CollectPackageReferences
Gathers all PackageReference items from the project.
This target may be used as an extension point to modify
package references before NuGet reads them.
============================================================
-->
<Target Name="CollectPackageReferences" Returns="@(PackageReference)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<!--
============================================================
CollectCentralPackageVersions
Gathers all PackageVersion items from the central package versions file.
============================================================
-->
<Target Name="CollectCentralPackageVersions" Returns="@(PackageVersion)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<!--
============================================================
CollectPackageDownloads
Gathers all PackageDownload items from the project.
This target may be used as an extension point to modify
package downloads before NuGet reads them.
============================================================
-->
<Target Name="CollectPackageDownloads" Returns="@(PackageDownload)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<!--
============================================================
CollectFrameworkReferences
============================================================
-->
<Target Name="CollectFrameworkReferences" Returns="@(_FrameworkReferenceForRestore)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<_FrameworkReferenceForRestore Include="@(FrameworkReference)" Condition="'%(FrameworkReference.IsTransitiveFrameworkReference)' != 'true'" />
</ItemGroup>
</Target>
<!--
============================================================
_LoadRestoreGraphEntryPoints
Find project entry points and load them into items.
============================================================
-->
<Target Name="_LoadRestoreGraphEntryPoints" Returns="@(RestoreGraphProjectInputItems)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- Allow overriding items with RestoreGraphProjectInput -->
<ItemGroup Condition=" @(RestoreGraphProjectInputItems) == '' ">
<RestoreGraphProjectInputItems Include="$(RestoreGraphProjectInput)" />
</ItemGroup>
<!-- Project case -->
<ItemGroup Condition=" $(MSBuildProjectFullPath.EndsWith('.metaproj')) != 'true' AND @(RestoreGraphProjectInputItems) == '' ">
<RestoreGraphProjectInputItems Include="$(MSBuildProjectFullPath)" />
</ItemGroup>
<!-- Solution case -->
<GetRestoreSolutionProjectsTask Condition=" $(MSBuildProjectFullPath.EndsWith('.metaproj')) == 'true' AND @(RestoreGraphProjectInputItems) == '' " ProjectReferences="@(ProjectReference)" SolutionFilePath="$(MSBuildProjectFullPath)">
<Output TaskParameter="OutputProjectReferences" ItemName="RestoreGraphProjectInputItems" />
</GetRestoreSolutionProjectsTask>
</Target>
<!--
============================================================
_FilterRestoreGraphProjectInputItems
Filter out unsupported project entry points.
============================================================
-->
<Target Name="_FilterRestoreGraphProjectInputItems" DependsOnTargets="_LoadRestoreGraphEntryPoints" Returns="@(FilteredRestoreGraphProjectInputItems)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<RestoreProjectFilterMode Condition=" '$(RestoreProjectFilterMode)' == '' ">exclusionlist</RestoreProjectFilterMode>
</PropertyGroup>
<!-- Filter to a list of known supported types -->
<ItemGroup Condition=" '$(RestoreProjectFilterMode)' == 'inclusionlist' ">
<_FilteredRestoreGraphProjectInputItemsTmp Include="@(RestoreGraphProjectInputItems)" Condition=" '%(RestoreGraphProjectInputItems.Extension)' == '.csproj' Or&#xD;&#xA; '%(RestoreGraphProjectInputItems.Extension)' == '.vbproj' Or&#xD;&#xA; '%(RestoreGraphProjectInputItems.Extension)' == '.fsproj' Or&#xD;&#xA; '%(RestoreGraphProjectInputItems.Extension)' == '.nuproj' Or&#xD;&#xA; '%(RestoreGraphProjectInputItems.Extension)' == '.proj' Or&#xD;&#xA; '%(RestoreGraphProjectInputItems.Extension)' == '.msbuildproj' Or&#xD;&#xA; '%(RestoreGraphProjectInputItems.Extension)' == '.vcxproj' " />
</ItemGroup>
<!-- Filter out disallowed types -->
<ItemGroup Condition=" '$(RestoreProjectFilterMode)' == 'exclusionlist' ">
<_FilteredRestoreGraphProjectInputItemsTmp Include="@(RestoreGraphProjectInputItems)" Condition=" '%(RestoreGraphProjectInputItems.Extension)' != '.metaproj'&#xD;&#xA; AND '%(RestoreGraphProjectInputItems.Extension)' != '.shproj'&#xD;&#xA; AND '%(RestoreGraphProjectInputItems.Extension)' != '.vcxitems'&#xD;&#xA; AND '%(RestoreGraphProjectInputItems.Extension)' != '' " />
</ItemGroup>
<!-- No filtering -->
<ItemGroup Condition=" '$(RestoreProjectFilterMode)' != 'exclusionlist' AND '$(RestoreProjectFilterMode)' != 'inclusionlist' ">
<_FilteredRestoreGraphProjectInputItemsTmp Include="@(RestoreGraphProjectInputItems)" />
</ItemGroup>
<!-- Remove duplicates -->
<RemoveDuplicates Inputs="@(_FilteredRestoreGraphProjectInputItemsTmp)">
<Output TaskParameter="Filtered" ItemName="FilteredRestoreGraphProjectInputItemsWithoutDuplicates" />
</RemoveDuplicates>
<!-- Remove projects that do not support restore. -->
<!-- With SkipNonexistentTargets support -->
<MSBuild Condition=" '$(RestoreUseSkipNonexistentTargets)' == 'true' " BuildInParallel="$(RestoreBuildInParallel)" Projects="@(FilteredRestoreGraphProjectInputItemsWithoutDuplicates)" Targets="_IsProjectRestoreSupported" SkipNonexistentTargets="true" Properties="$(_GenerateRestoreGraphProjectEntryInputProperties)">
<Output TaskParameter="TargetOutputs" ItemName="FilteredRestoreGraphProjectInputItems" />
</MSBuild>
<!-- Without SkipNonexistentTargets support -->
<MSBuild Condition=" '$(RestoreUseSkipNonexistentTargets)' != 'true' " Projects="@(FilteredRestoreGraphProjectInputItemsWithoutDuplicates)" Targets="_IsProjectRestoreSupported" ContinueOnError="$(RestoreContinueOnError)" Properties="$(_GenerateRestoreGraphProjectEntryInputProperties)">
<Output TaskParameter="TargetOutputs" ItemName="FilteredRestoreGraphProjectInputItems" />
</MSBuild>
<!-- Warn for projects that do not support restore. -->
<WarnForInvalidProjectsTask Condition=" '$(DisableWarnForInvalidRestoreProjects)' != 'true' AND '$(HideWarningsAndErrors)' != 'true' " AllProjects="@(FilteredRestoreGraphProjectInputItemsWithoutDuplicates)" ValidProjects="@(FilteredRestoreGraphProjectInputItems)" />
</Target>
<!--
============================================================
_GenerateRestoreGraph
Entry point for creating the project to project restore graph.
============================================================
-->
<Target Name="_GenerateRestoreGraph" DependsOnTargets="_FilterRestoreGraphProjectInputItems;_GetAllRestoreProjectPathItems" Returns="@(_RestoreGraphEntry)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Message Text="Generating dg file" Importance="low" />
<Message Text="%(_RestoreProjectPathItems.Identity)" Importance="low" />
<!-- Use all projects if RestoreRecursive is true. Otherwise use only the top level projects. -->
<ItemGroup>
<_GenerateRestoreGraphProjectEntryInput Include="@(FilteredRestoreGraphProjectInputItems)" Condition=" '$(RestoreRecursive)' != 'true' " />
<_GenerateRestoreGraphProjectEntryInput Include="@(_RestoreProjectPathItems)" Condition=" '$(RestoreRecursive)' == 'true' " />
</ItemGroup>
<!-- Add top level entries to the direct restore list. These projects will also restore tools. -->
<MSBuild BuildInParallel="$(RestoreBuildInParallel)" Projects="@(_GenerateRestoreGraphProjectEntryInput)" Targets="_GenerateRestoreGraphProjectEntry" Properties="$(_GenerateRestoreGraphProjectEntryInputProperties)">
<Output TaskParameter="TargetOutputs" ItemName="_RestoreGraphEntry" />
</MSBuild>
<!-- Generate a spec for every project including dependencies. -->
<MSBuild BuildInParallel="$(RestoreBuildInParallel)" Projects="@(_RestoreProjectPathItems)" Targets="_GenerateProjectRestoreGraph" Properties="$(_GenerateRestoreGraphProjectEntryInputProperties)">
<Output TaskParameter="TargetOutputs" ItemName="_RestoreGraphEntry" />
</MSBuild>
</Target>
<!--
============================================================
_GenerateRestoreGraphProjectEntry
Top level entry point within a project.
============================================================
-->
<Target Name="_GenerateRestoreGraphProjectEntry" DependsOnTargets="_GenerateRestoreSpecs;_GenerateDotnetCliToolReferenceSpecs" Returns="@(_RestoreGraphEntry)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- Returns restore graph entries for the project and all dependencies -->
</Target>
<!--
============================================================
_GenerateRestoreSpecs
Mark entry points for restore.
============================================================
-->
<Target Name="_GenerateRestoreSpecs" DependsOnTargets="_GetRestoreProjectStyle" Returns="@(_RestoreGraphEntry)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Message Text="Restore entry point $(MSBuildProjectFullPath)" Importance="low" />
<!-- Mark entry point -->
<ItemGroup Condition=" '$(RestoreProjects)' == '' OR '$(RestoreProjects)' == 'true' ">
<_RestoreGraphEntry Include="$([System.Guid]::NewGuid())" Condition=" '$(RestoreProjectStyle)' != 'Unknown' ">
<Type>RestoreSpec</Type>
<ProjectUniqueName>$(MSBuildProjectFullPath)</ProjectUniqueName>
</_RestoreGraphEntry>
</ItemGroup>
</Target>
<!--
============================================================
_GenerateDotnetCliToolReferenceSpecs
Collect DotnetCliToolReferences
============================================================
-->
<Target Name="_GenerateDotnetCliToolReferenceSpecs" DependsOnTargets="_GetRestoreSettings" Returns="@(_RestoreGraphEntry)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<DotnetCliToolTargetFramework Condition=" '$(DotnetCliToolTargetFramework)' == '' ">netcoreapp1.0</DotnetCliToolTargetFramework>
</PropertyGroup>
<!-- Write out tool references -->
<GetRestoreDotnetCliToolsTask Condition=" '$(RestoreDotnetCliToolReferences)' == '' OR '$(RestoreDotnetCliToolReferences)' == 'true' " ProjectPath="$(MSBuildProjectFullPath)" ToolFramework="$(DotnetCliToolTargetFramework)" RestorePackagesPath="$(_OutputPackagesPath)" RestoreFallbackFolders="$(_OutputFallbackFolders)" RestoreSources="$(_OutputSources)" RestoreConfigFilePaths="$(_OutputConfigFilePaths)" DotnetCliToolReferences="@(DotnetCliToolReference)">
<Output TaskParameter="RestoreGraphItems" ItemName="_RestoreGraphEntry" />
</GetRestoreDotnetCliToolsTask>
</Target>
<!--
============================================================
_GetProjectJsonPath
Discover the project.json path if one exists for the project.
============================================================
-->
<Target Name="_GetProjectJsonPath" Returns="$(_CurrentProjectJsonPath)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- Get project.json path -->
<!-- Skip this if the project style is already set. -->
<GetRestoreProjectJsonPathTask ProjectPath="$(MSBuildProjectFullPath)" Condition=" '$(RestoreProjectStyle)' == 'ProjectJson' OR '$(RestoreProjectStyle)' == '' ">
<Output TaskParameter="ProjectJsonPath" PropertyName="_CurrentProjectJsonPath" />
</GetRestoreProjectJsonPathTask>
</Target>
<!--
============================================================
_GetRestoreProjectStyle
Determine the project restore type.
============================================================
-->
<Target Name="_GetRestoreProjectStyle" DependsOnTargets="_GetProjectJsonPath;CollectPackageReferences" Returns="$(RestoreProjectStyle);$(PackageReferenceCompatibleProjectStyle)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!--
Older versions of MSBuild do not support the Count() item function which is an optimization. Expanding the
entire item list into a semicolon delimited string is slower but older versions of MSBuild don't support it so
use the older logic if necessary
-->
<PropertyGroup Condition="'$(MSBuildAssemblyVersion)' &lt; '15.0'">
<_HasPackageReferenceItems Condition="'@(PackageReference)' != ''">true</_HasPackageReferenceItems>
</PropertyGroup>
<PropertyGroup Condition="'$(MSBuildAssemblyVersion)' &gt;= '15.0'">
<_HasPackageReferenceItems Condition="@(PackageReference-&gt;Count()) &gt; 0">true</_HasPackageReferenceItems>
</PropertyGroup>
<GetRestoreProjectStyleTask HasPackageReferenceItems="$(_HasPackageReferenceItems)" MSBuildProjectDirectory="$(MSBuildProjectDirectory)" MSBuildProjectName="$(MSBuildProjectName)" ProjectJsonPath="$(_CurrentProjectJsonPath)" RestoreProjectStyle="$(RestoreProjectStyle)">
<Output TaskParameter="ProjectStyle" PropertyName="RestoreProjectStyle" />
<Output TaskParameter="IsPackageReferenceCompatibleProjectStyle" PropertyName="PackageReferenceCompatibleProjectStyle" />
</GetRestoreProjectStyleTask>
<PropertyGroup>
<_HasPackageReferenceItems />
</PropertyGroup>
</Target>
<!--
============================================================
EnableIntermediateOutputPathMismatchWarning
If using PackageReference, enable an MSBuild warning if BaseIntermediateOutputPath is set to something different
than MSBuildProjectExtensionsPath, because it may be unexpected that the assets and related files wouldn't be written
to the BaseIntermediateOutputPath.
============================================================
-->
<Target Name="EnableIntermediateOutputPathMismatchWarning" DependsOnTargets="_GetRestoreProjectStyle" BeforeTargets="_CheckForInvalidConfigurationAndPlatform" Condition="'$(RestoreProjectStyle)' == 'PackageReference'" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition="'$(EnableBaseIntermediateOutputPathMismatchWarning)' == ''">
<EnableBaseIntermediateOutputPathMismatchWarning>true</EnableBaseIntermediateOutputPathMismatchWarning>
</PropertyGroup>
</Target>
<!--
============================================================
_GetRestoreTargetFrameworksOutput
Read target frameworks from the project.
Non-NETCore project frameworks will be returned.
============================================================
-->
<Target Name="_GetRestoreTargetFrameworksOutput" DependsOnTargets="_GetRestoreProjectStyle" Returns="@(_RestoreTargetFrameworksOutputFiltered)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<_RestoreProjectFramework />
</PropertyGroup>
<!-- For project.json projects target frameworks will be read from project.json. -->
<GetProjectTargetFrameworksTask Condition=" '$(RestoreProjectStyle)' != 'ProjectJson'" ProjectPath="$(MSBuildProjectFullPath)" TargetFrameworks="$(TargetFrameworks)" TargetFramework="$(TargetFramework)" TargetFrameworkMoniker="$(TargetFrameworkMoniker)" TargetPlatformIdentifier="$(TargetPlatformIdentifier)" TargetPlatformVersion="$(TargetPlatformVersion)" TargetPlatformMinVersion="$(TargetPlatformMinVersion)">
<Output TaskParameter="ProjectTargetFrameworks" PropertyName="_RestoreProjectFramework" />
</GetProjectTargetFrameworksTask>
<ItemGroup Condition=" '$(_RestoreProjectFramework)' != '' ">
<_RestoreTargetFrameworksOutputFiltered Include="$(_RestoreProjectFramework.Split(';'))" />
</ItemGroup>
</Target>
<!--
============================================================
_GetRestoreTargetFrameworksAsItems
Read $(TargetFrameworks) from the project as items.
Projects that do not have $(TargetFrameworks) will noop.
============================================================
-->
<Target Name="_GetRestoreTargetFrameworksAsItems" DependsOnTargets="_GetRestoreProjectStyle" Returns="@(_RestoreTargetFrameworkItems)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Condition=" '$(TargetFrameworks)' != '' ">
<_RestoreTargetFrameworkItems Include="$(TargetFrameworks.Split(';'))" />
</ItemGroup>
</Target>
<!--
============================================================
_GetRestoreSettings
============================================================
-->
<Target Name="_GetRestoreSettings" Condition=" '$(RestoreProjectStyle)' == 'PackageReference' OR '$(RestoreProjectStyle)' == 'ProjectJson' OR '$(RestoreProjectStyle)' == 'DotnetToolReference' OR '$(RestoreProjectStyle)' == 'PackagesConfig'" DependsOnTargets="_GetRestoreSettingsOverrides;_GetRestoreSettingsCurrentProject;_GetRestoreSettingsAllFrameworks" Returns="$(_OutputSources);$(_OutputPackagesPath);$(_OutputRepositoryPath);$(_OutputFallbackFolders);$(_OutputConfigFilePaths)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition=" '$(RestoreSolutionDirectory)' == '' AND '$(RestoreProjectStyle)' == 'PackagesConfig' AND '$(SolutionDir)' != '*Undefined*'">
<RestoreSolutionDirectory>$(SolutionDir)</RestoreSolutionDirectory>
</PropertyGroup>
<!-- For transitive project styles, we rely on evaluating all the settings and including them in the dg spec to faciliate no-op restore-->
<GetRestoreSettingsTask ProjectUniqueName="$(MSBuildProjectFullPath)" RestoreSources="$(RestoreSources)" RestorePackagesPath="$(RestorePackagesPath)" RestoreRepositoryPath="$(RestoreRepositoryPath)" RestoreFallbackFolders="$(RestoreFallbackFolders)" RestoreConfigFile="$(RestoreConfigFile)" RestoreRootConfigDirectory="$(RestoreRootConfigDirectory)" RestoreSolutionDirectory="$(RestoreSolutionDirectory)" RestoreSettingsPerFramework="@(_RestoreSettingsPerFramework)" RestorePackagesPathOverride="$(_RestorePackagesPathOverride)" RestoreRepositoryPathOverride="$(_RestoreRepositoryPathOverride)" RestoreSourcesOverride="$(_RestoreSourcesOverride)" RestoreFallbackFoldersOverride="$(_RestoreFallbackFoldersOverride)" RestoreProjectStyle="$(RestoreProjectStyle)" MSBuildStartupDirectory="$(MSBuildStartupDirectory)">
<Output TaskParameter="OutputSources" PropertyName="_OutputSources" />
<Output TaskParameter="OutputPackagesPath" PropertyName="_OutputPackagesPath" />
<Output TaskParameter="OutputRepositoryPath" PropertyName="_OutputRepositoryPath" />
<Output TaskParameter="OutputFallbackFolders" PropertyName="_OutputFallbackFolders" />
<Output TaskParameter="OutputConfigFilePaths" PropertyName="_OutputConfigFilePaths" />
</GetRestoreSettingsTask>
</Target>
<!--
============================================================
_GetRestoreSettingsCurrentProject
Generate items for a single framework.
============================================================
-->
<Target Name="_GetRestoreSettingsCurrentProject" Condition=" '$(TargetFrameworks)' == '' AND '$(PackageReferenceCompatibleProjectStyle)' == 'true' " DependsOnTargets="_GetRestoreSettingsPerFramework" Returns="@(_RestoreSettingsPerFramework)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<!--
============================================================
_GetRestoreSettingsCurrentProject
Generate items for a single framework.
============================================================
-->
<Target Name="_GetRestoreSettingsAllFrameworks" Condition=" '$(TargetFrameworks)' != '' AND '$(PackageReferenceCompatibleProjectStyle)' == 'true' " DependsOnTargets="_GetRestoreTargetFrameworksAsItems;_GetRestoreProjectStyle" Returns="@(_RestoreSettingsPerFramework)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- Read additional sources and fallback folders for each framework -->
<MSBuild BuildInParallel="$(RestoreBuildInParallel)" Projects="$(MSBuildProjectFullPath)" Targets="_GetRestoreSettingsPerFramework" Properties="TargetFramework=%(_RestoreTargetFrameworkItems.Identity);&#xD;&#xA; $(_GenerateRestoreGraphProjectEntryInputProperties)">
<Output TaskParameter="TargetOutputs" ItemName="_RestoreSettingsPerFramework" />
</MSBuild>
</Target>
<!--
============================================================
_GetRestoreSettingsPerFramework
Generate items with framework specific settings.
============================================================
-->
<Target Name="_GetRestoreSettingsPerFramework" Returns="@(_RestoreSettingsPerFramework)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<_RestoreSettingsPerFramework Include="$([System.Guid]::NewGuid())">
<RestoreAdditionalProjectSources>$(RestoreAdditionalProjectSources)</RestoreAdditionalProjectSources>
<RestoreAdditionalProjectFallbackFolders>$(RestoreAdditionalProjectFallbackFolders)</RestoreAdditionalProjectFallbackFolders>
<RestoreAdditionalProjectFallbackFoldersExcludes>$(RestoreAdditionalProjectFallbackFoldersExcludes)</RestoreAdditionalProjectFallbackFoldersExcludes>
</_RestoreSettingsPerFramework>
</ItemGroup>
</Target>
<!--
============================================================
_GenerateRestoreProjectSpec
Generate a restore project spec for the current project.
============================================================
-->
<Target Name="_GenerateRestoreProjectSpec" DependsOnTargets="_GetRestoreProjectStyle;_GetRestoreTargetFrameworksOutput;_GetRestoreSettings" Returns="@(_RestoreGraphEntry)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- Determine the restore output path -->
<PropertyGroup Condition=" '$(PackageReferenceCompatibleProjectStyle)' == 'true' OR '$(RestoreProjectStyle)' == 'ProjectJson' ">
<RestoreOutputPath Condition=" '$(RestoreOutputPath)' == '' ">$(MSBuildProjectExtensionsPath)</RestoreOutputPath>
</PropertyGroup>
<ConvertToAbsolutePath Paths="$(RestoreOutputPath)" Condition=" '$(PackageReferenceCompatibleProjectStyle)' == 'true' OR '$(RestoreProjectStyle)' == 'ProjectJson'">
<Output TaskParameter="AbsolutePaths" PropertyName="RestoreOutputAbsolutePath" />
</ConvertToAbsolutePath>
<!--
Determine project name for the assets file.
Highest priority: PackageId
If PackageId does not exist use: AssemblyName
If AssemblyName does not exist fallback to the project file name without the extension: $(MSBuildProjectName)
For non-NETCore projects use only: $(MSBuildProjectName)
-->
<PropertyGroup>
<_RestoreProjectName>$(MSBuildProjectName)</_RestoreProjectName>
<_RestoreProjectName Condition=" '$(PackageReferenceCompatibleProjectStyle)' == 'true' AND '$(AssemblyName)' != '' ">$(AssemblyName)</_RestoreProjectName>
<_RestoreProjectName Condition=" '$(PackageReferenceCompatibleProjectStyle)' == 'true' AND '$(PackageId)' != '' ">$(PackageId)</_RestoreProjectName>
</PropertyGroup>
<!--
Determine project version for .NETCore projects
Default to 1.0.0
Use Version if it exists
Override with PackageVersion if it exists (same as pack)
-->
<PropertyGroup Condition=" '$(PackageReferenceCompatibleProjectStyle)' == 'true' ">
<_RestoreProjectVersion>1.0.0</_RestoreProjectVersion>
<_RestoreProjectVersion Condition=" '$(Version)' != '' ">$(Version)</_RestoreProjectVersion>
<_RestoreProjectVersion Condition=" '$(PackageVersion)' != '' ">$(PackageVersion)</_RestoreProjectVersion>
</PropertyGroup>
<!-- Determine if this will use cross targeting -->
<PropertyGroup Condition=" '$(PackageReferenceCompatibleProjectStyle)' == 'true' AND '$(TargetFrameworks)' != '' ">
<_RestoreCrossTargeting>true</_RestoreCrossTargeting>
</PropertyGroup>
<!-- Determine if ContentFiles should be written by NuGet -->
<PropertyGroup Condition=" '$(PackageReferenceCompatibleProjectStyle)' == 'true' AND '$(_RestoreSkipContentFileWrite)' == '' ">
<_RestoreSkipContentFileWrite Condition=" '$(TargetFrameworks)' == '' AND '$(TargetFramework)' == '' ">true</_RestoreSkipContentFileWrite>
</PropertyGroup>
<!-- Write properties for the top level entry point -->
<ItemGroup Condition=" '$(PackageReferenceCompatibleProjectStyle)' == 'true' ">
<_RestoreGraphEntry Include="$([System.Guid]::NewGuid())">
<Type>ProjectSpec</Type>
<Version>$(_RestoreProjectVersion)</Version>
<ProjectUniqueName>$(MSBuildProjectFullPath)</ProjectUniqueName>
<ProjectPath>$(MSBuildProjectFullPath)</ProjectPath>
<ProjectName>$(_RestoreProjectName)</ProjectName>
<Sources>$(_OutputSources)</Sources>
<FallbackFolders>$(_OutputFallbackFolders)</FallbackFolders>
<PackagesPath>$(_OutputPackagesPath)</PackagesPath>
<ProjectStyle>$(RestoreProjectStyle)</ProjectStyle>
<OutputPath>$(RestoreOutputAbsolutePath)</OutputPath>
<RuntimeIdentifiers>$(RuntimeIdentifiers);$(RuntimeIdentifier)</RuntimeIdentifiers>
<RuntimeSupports>$(RuntimeSupports)</RuntimeSupports>
<CrossTargeting>$(_RestoreCrossTargeting)</CrossTargeting>
<RestoreLegacyPackagesDirectory>$(RestoreLegacyPackagesDirectory)</RestoreLegacyPackagesDirectory>
<ValidateRuntimeAssets>$(ValidateRuntimeIdentifierCompatibility)</ValidateRuntimeAssets>
<SkipContentFileWrite>$(_RestoreSkipContentFileWrite)</SkipContentFileWrite>
<ConfigFilePaths>$(_OutputConfigFilePaths)</ConfigFilePaths>
<TreatWarningsAsErrors>$(TreatWarningsAsErrors)</TreatWarningsAsErrors>
<WarningsAsErrors>$(WarningsAsErrors)</WarningsAsErrors>
<NoWarn>$(NoWarn)</NoWarn>
<RestorePackagesWithLockFile>$(RestorePackagesWithLockFile)</RestorePackagesWithLockFile>
<NuGetLockFilePath>$(NuGetLockFilePath)</NuGetLockFilePath>
<RestoreLockedMode>$(RestoreLockedMode)</RestoreLockedMode>
<_CentralPackageVersionsEnabled>$(_CentralPackageVersionsEnabled)</_CentralPackageVersionsEnabled>
</_RestoreGraphEntry>
</ItemGroup>
<!-- Use project.json -->
<ItemGroup Condition=" '$(RestoreProjectStyle)' == 'ProjectJson' ">
<_RestoreGraphEntry Include="$([System.Guid]::NewGuid())">
<Type>ProjectSpec</Type>
<ProjectUniqueName>$(MSBuildProjectFullPath)</ProjectUniqueName>
<ProjectPath>$(MSBuildProjectFullPath)</ProjectPath>
<ProjectName>$(_RestoreProjectName)</ProjectName>
<Sources>$(_OutputSources)</Sources>
<OutputPath>$(RestoreOutputAbsolutePath)</OutputPath>
<FallbackFolders>$(_OutputFallbackFolders)</FallbackFolders>
<PackagesPath>$(_OutputPackagesPath)</PackagesPath>
<ProjectJsonPath>$(_CurrentProjectJsonPath)</ProjectJsonPath>
<ProjectStyle>$(RestoreProjectStyle)</ProjectStyle>
<ConfigFilePaths>$(_OutputConfigFilePaths)</ConfigFilePaths>
</_RestoreGraphEntry>
</ItemGroup>
<!-- Use packages.config -->
<ItemGroup Condition=" '$(RestoreProjectStyle)' == 'PackagesConfig' ">
<_RestoreGraphEntry Include="$([System.Guid]::NewGuid())">
<Type>ProjectSpec</Type>
<ProjectUniqueName>$(MSBuildProjectFullPath)</ProjectUniqueName>
<ProjectPath>$(MSBuildProjectFullPath)</ProjectPath>
<ProjectName>$(_RestoreProjectName)</ProjectName>
<ProjectStyle>$(RestoreProjectStyle)</ProjectStyle>
<PackagesConfigPath Condition="Exists('$(MSBuildProjectDirectory)\packages.$(MSBuildProjectName).config')">$(MSBuildProjectDirectory)\packages.$(MSBuildProjectName).config</PackagesConfigPath>
<PackagesConfigPath Condition="Exists('$(MSBuildProjectDirectory)\packages.config')">$(MSBuildProjectDirectory)\packages.config</PackagesConfigPath>
<RestorePackagesWithLockFile>$(RestorePackagesWithLockFile)</RestorePackagesWithLockFile>
<NuGetLockFilePath>$(NuGetLockFilePath)</NuGetLockFilePath>
<RestoreLockedMode>$(RestoreLockedMode)</RestoreLockedMode>
<Sources>$(_OutputSources)</Sources>
<SolutionDir>$(SolutionDir)</SolutionDir>
<RepositoryPath>$(_OutputRepositoryPath)</RepositoryPath>
<ConfigFilePaths>$(_OutputConfigFilePaths)</ConfigFilePaths>
<PackagesPath>$(_OutputPackagesPath)</PackagesPath>
<TargetFrameworks>@(_RestoreTargetFrameworksOutputFiltered)</TargetFrameworks>
</_RestoreGraphEntry>
</ItemGroup>
<!-- Non-NuGet type -->
<ItemGroup Condition=" '$(RestoreProjectStyle)' == 'Unknown' ">
<_RestoreGraphEntry Include="$([System.Guid]::NewGuid())">
<Type>ProjectSpec</Type>
<ProjectUniqueName>$(MSBuildProjectFullPath)</ProjectUniqueName>
<ProjectPath>$(MSBuildProjectFullPath)</ProjectPath>
<ProjectName>$(_RestoreProjectName)</ProjectName>
<ProjectStyle>$(RestoreProjectStyle)</ProjectStyle>
<TargetFrameworks>@(_RestoreTargetFrameworksOutputFiltered)</TargetFrameworks>
</_RestoreGraphEntry>
</ItemGroup>
</Target>
<!--
============================================================
_GenerateProjectRestoreGraph
Recursively walk project to project references.
============================================================
-->
<Target Name="_GenerateProjectRestoreGraph" DependsOnTargets="&#xD;&#xA; _GetRestoreProjectStyle;&#xD;&#xA; _GenerateRestoreProjectSpec;&#xD;&#xA; _GenerateRestoreDependencies" Returns="@(_RestoreGraphEntry)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- Output from dependency targets -->
</Target>
<!--
============================================================
_GenerateRestoreDependencies
Generate items for package and project references.
============================================================
-->
<Target Name="_GenerateRestoreDependencies" DependsOnTargets="_GenerateProjectRestoreGraphAllFrameworks;_GenerateProjectRestoreGraphCurrentProject" Returns="@(_RestoreGraphEntry)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<!--
============================================================
_GenerateProjectRestoreGraphAllFrameworks
Walk dependencies for all frameworks.
============================================================
-->
<Target Name="_GenerateProjectRestoreGraphAllFrameworks" Condition=" '$(TargetFrameworks)' != '' " DependsOnTargets="_GetRestoreTargetFrameworksAsItems" Returns="@(_RestoreGraphEntry)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- Get project and package references -->
<!-- Evaluate for each framework -->
<MSBuild BuildInParallel="$(RestoreBuildInParallel)" Projects="$(MSBuildProjectFullPath)" Targets="_GenerateProjectRestoreGraphPerFramework" Properties="TargetFramework=%(_RestoreTargetFrameworkItems.Identity);&#xD;&#xA; $(_GenerateRestoreGraphProjectEntryInputProperties)">
<Output TaskParameter="TargetOutputs" ItemName="_RestoreGraphEntry" />
</MSBuild>
</Target>
<!--
============================================================
_GenerateProjectRestoreGraphCurrentProject
Walk dependencies with the current framework.
============================================================
-->
<Target Name="_GenerateProjectRestoreGraphCurrentProject" Condition=" '$(TargetFrameworks)' == '' " DependsOnTargets="_GenerateProjectRestoreGraphPerFramework" Returns="@(_RestoreGraphEntry)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<!--
============================================================
_GenerateProjectRestoreGraphPerFramework
Walk dependencies using $(TargetFramework)
============================================================
-->
<Target Name="_GenerateProjectRestoreGraphPerFramework" DependsOnTargets="_GetRestoreProjectStyle;CollectPackageReferences;CollectPackageDownloads;CollectFrameworkReferences;CollectCentralPackageVersions" Returns="@(_RestoreGraphEntry)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- Write out project references -->
<GetRestoreProjectReferencesTask ProjectUniqueName="$(MSBuildProjectFullPath)" ProjectReferences="@(ProjectReference)" TargetFrameworks="$(TargetFramework)" ParentProjectPath="$(MSBuildProjectFullPath)">
<Output TaskParameter="RestoreGraphItems" ItemName="_RestoreGraphEntry" />
</GetRestoreProjectReferencesTask>
<!-- Write out package references-->
<GetRestorePackageReferencesTask Condition=" '$(PackageReferenceCompatibleProjectStyle)' == 'true' " ProjectUniqueName="$(MSBuildProjectFullPath)" PackageReferences="@(PackageReference)" TargetFrameworks="$(TargetFramework)">
<Output TaskParameter="RestoreGraphItems" ItemName="_RestoreGraphEntry" />
</GetRestorePackageReferencesTask>
<!-- Write out central package versions -->
<GetCentralPackageVersionsTask Condition=" '$(PackageReferenceCompatibleProjectStyle)' == 'true' AND '$(_CentralPackageVersionsEnabled)' == 'true' " ProjectUniqueName="$(MSBuildProjectFullPath)" CentralPackageVersions="@(PackageVersion)" TargetFrameworks="$(TargetFramework)">
<Output TaskParameter="RestoreGraphItems" ItemName="_RestoreGraphEntry" />
</GetCentralPackageVersionsTask>
<!-- Write out package downloads -->
<GetRestorePackageDownloadsTask Condition=" '$(PackageReferenceCompatibleProjectStyle)' == 'true' " ProjectUniqueName="$(MSBuildProjectFullPath)" PackageDownloads="@(PackageDownload)" TargetFrameworks="$(TargetFramework)">
<Output TaskParameter="RestoreGraphItems" ItemName="_RestoreGraphEntry" />
</GetRestorePackageDownloadsTask>
<!-- Write out Framework References-->
<GetRestoreFrameworkReferencesTask Condition=" '$(PackageReferenceCompatibleProjectStyle)' == 'true' " ProjectUniqueName="$(MSBuildProjectFullPath)" FrameworkReferences="@(FrameworkReference)" TargetFrameworks="$(TargetFramework)">
<Output TaskParameter="RestoreGraphItems" ItemName="_RestoreGraphEntry" />
</GetRestoreFrameworkReferencesTask>
<!-- Write out target framework information -->
<ItemGroup Condition=" '$(PackageReferenceCompatibleProjectStyle)' == 'true'">
<_RestoreGraphEntry Include="$([System.Guid]::NewGuid())">
<Type>TargetFrameworkInformation</Type>
<ProjectUniqueName>$(MSBuildProjectFullPath)</ProjectUniqueName>
<PackageTargetFallback>$(PackageTargetFallback)</PackageTargetFallback>
<AssetTargetFallback>$(AssetTargetFallback)</AssetTargetFallback>
<TargetFramework>$(TargetFramework)</TargetFramework>
<TargetFrameworkIdentifier>$(TargetFrameworkIdentifier)</TargetFrameworkIdentifier>
<TargetFrameworkVersion>$(TargetFrameworkVersion)</TargetFrameworkVersion>
<TargetFrameworkMoniker>$(TargetFrameworkMoniker)</TargetFrameworkMoniker>
<TargetFrameworkProfile>$(TargetFrameworkProfile)</TargetFrameworkProfile>
<TargetPlatformMoniker>$(TargetPlatformMoniker)</TargetPlatformMoniker>
<TargetPlatformIdentifier>$(TargetPlatformIdentifier)</TargetPlatformIdentifier>
<TargetPlatformVersion>$(TargetPlatformVersion)</TargetPlatformVersion>
<TargetPlatformMinVersion>$(TargetPlatformMinVersion)</TargetPlatformMinVersion>
<RuntimeIdentifierGraphPath>$(RuntimeIdentifierGraphPath)</RuntimeIdentifierGraphPath>
</_RestoreGraphEntry>
</ItemGroup>
</Target>
<!--
============================================================
_GenerateRestoreProjectPathItemsCurrentProject
Get absolute paths for all project references.
============================================================
-->
<Target Name="_GenerateRestoreProjectPathItemsCurrentProject" Condition=" '$(TargetFrameworks)' == '' " DependsOnTargets="_GenerateRestoreProjectPathItemsPerFramework" Returns="@(_RestoreProjectPathItems)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<!--
============================================================
_GenerateRestoreProjectPathItemsPerFramework
Get absolute paths for all project references.
============================================================
-->
<Target Name="_GenerateRestoreProjectPathItemsPerFramework" Returns="@(_RestoreProjectPathItems)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- Get the absolute paths to all projects -->
<ConvertToAbsolutePath Paths="@(ProjectReference)">
<Output TaskParameter="AbsolutePaths" PropertyName="_RestoreGraphAbsoluteProjectPaths" />
</ConvertToAbsolutePath>
<ItemGroup>
<_RestoreProjectPathItems Include="$(_RestoreGraphAbsoluteProjectPaths)" />
</ItemGroup>
</Target>
<!--
============================================================
_GenerateRestoreProjectPathItems
Get all project references regardless of framework
============================================================
-->
<Target Name="_GenerateRestoreProjectPathItems" DependsOnTargets="_GenerateRestoreProjectPathItemsAllFrameworks;_GenerateRestoreProjectPathItemsCurrentProject" Returns="@(_CurrentRestoreProjectPathItems)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- Drop any duplicate items -->
<RemoveDuplicates Inputs="@(_RestoreProjectPathItems)">
<Output TaskParameter="Filtered" ItemName="_CurrentRestoreProjectPathItems" />
</RemoveDuplicates>
</Target>
<!--
============================================================
_GenerateRestoreProjectPathItemsAllFrameworks
Get all project references regardless of framework
============================================================
-->
<Target Name="_GenerateRestoreProjectPathItemsAllFrameworks" Condition=" '$(TargetFrameworks)' != '' " DependsOnTargets="_GetRestoreTargetFrameworksAsItems" Returns="@(_RestoreProjectPathItems)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- Get all project references for the current project -->
<!-- With SkipNonexistentTargets support -->
<MSBuild Condition=" '$(RestoreUseSkipNonexistentTargets)' == 'true' " BuildInParallel="$(RestoreBuildInParallel)" Projects="$(MSBuildProjectFullPath)" Targets="_GenerateRestoreProjectPathItemsPerFramework" SkipNonexistentTargets="true" SkipNonexistentProjects="true" Properties="TargetFramework=%(_RestoreTargetFrameworkItems.Identity);&#xD;&#xA; $(_GenerateRestoreGraphProjectEntryInputProperties)">
<Output TaskParameter="TargetOutputs" ItemName="_RestoreProjectPathItems" />
</MSBuild>
<!-- Without SkipNonexistentTargets support -->
<MSBuild Condition=" '$(RestoreUseSkipNonexistentTargets)' != 'true' " Projects="$(MSBuildProjectFullPath)" Targets="_GenerateRestoreProjectPathItemsPerFramework" ContinueOnError="$(RestoreContinueOnError)" Properties="TargetFramework=%(_RestoreTargetFrameworkItems.Identity);&#xD;&#xA; $(_GenerateRestoreGraphProjectEntryInputProperties)">
<Output TaskParameter="TargetOutputs" ItemName="_RestoreProjectPathItems" />
</MSBuild>
</Target>
<!--
============================================================
_GenerateRestoreProjectPathWalk
Recursively walk projects
============================================================
-->
<Target Name="_GenerateRestoreProjectPathWalk" DependsOnTargets="_GenerateRestoreProjectPathItems" Returns="@(_RestoreProjectPathItems)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- Walk project references -->
<!-- With SkipNonexistentTargets -->
<MSBuild Condition=" '$(RestoreUseSkipNonexistentTargets)' == 'true' " BuildInParallel="$(RestoreBuildInParallel)" Projects="@(_CurrentRestoreProjectPathItems)" Targets="_GenerateRestoreProjectPathWalk" SkipNonexistentTargets="true" SkipNonexistentProjects="true" Properties="$(_GenerateRestoreGraphProjectEntryInputProperties)">
<Output TaskParameter="TargetOutputs" ItemName="_GenerateRestoreProjectPathWalkOutputs" />
</MSBuild>
<!-- Without SkipNonexistentTargets -->
<MSBuild Condition=" '$(RestoreUseSkipNonexistentTargets)' != 'true' " Projects="@(_CurrentRestoreProjectPathItems)" Targets="_GenerateRestoreProjectPathWalk" ContinueOnError="$(RestoreContinueOnError)" Properties="$(_GenerateRestoreGraphProjectEntryInputProperties)">
<Output TaskParameter="TargetOutputs" ItemName="_GenerateRestoreProjectPathWalkOutputs" />
</MSBuild>
<!-- Include the current project in the result -->
<ItemGroup>
<_GenerateRestoreProjectPathWalkOutputs Include="$(MSBuildProjectFullPath)" />
</ItemGroup>
<!-- Remove duplicates -->
<RemoveDuplicates Inputs="@(_GenerateRestoreProjectPathWalkOutputs)">
<Output TaskParameter="Filtered" ItemName="_RestoreProjectPathItems" />
</RemoveDuplicates>
</Target>
<!--
============================================================
_GetAllRestoreProjectPathItems
Get the full list of known projects.
This includes all child projects from all target frameworks.
============================================================
-->
<Target Name="_GetAllRestoreProjectPathItems" DependsOnTargets="_FilterRestoreGraphProjectInputItems" Returns="@(_RestoreProjectPathItems)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<NuGetMessageTask Name="DeterminingProjectsToRestore" Importance="High" />
<!-- Walk projects -->
<!-- With SkipNonexistentTargets -->
<MSBuild Condition=" '$(RestoreUseSkipNonexistentTargets)' == 'true' " BuildInParallel="$(RestoreBuildInParallel)" Projects="@(FilteredRestoreGraphProjectInputItems)" Targets="_GenerateRestoreProjectPathWalk" SkipNonexistentTargets="true" SkipNonexistentProjects="true" Properties="$(_GenerateRestoreGraphProjectEntryInputProperties)">
<Output TaskParameter="TargetOutputs" ItemName="_RestoreProjectPathItemsOutputs" />
</MSBuild>
<!-- Without SkipNonexistentTargets -->
<MSBuild Condition=" '$(RestoreUseSkipNonexistentTargets)' != 'true' " Projects="@(FilteredRestoreGraphProjectInputItems)" Targets="_GenerateRestoreProjectPathWalk" ContinueOnError="$(RestoreContinueOnError)" Properties="$(_GenerateRestoreGraphProjectEntryInputProperties)">
<Output TaskParameter="TargetOutputs" ItemName="_RestoreProjectPathItemsOutputs" />
</MSBuild>
<!-- Remove duplicates -->
<RemoveDuplicates Inputs="@(_RestoreProjectPathItemsOutputs)">
<Output TaskParameter="Filtered" ItemName="_RestoreProjectPathItemsWithoutDupes" />
</RemoveDuplicates>
<!-- Remove projects that do not support restore. -->
<!-- With SkipNonexistentTargets -->
<MSBuild Condition=" '$(RestoreUseSkipNonexistentTargets)' == 'true' " BuildInParallel="$(RestoreBuildInParallel)" Projects="@(_RestoreProjectPathItemsWithoutDupes)" Targets="_IsProjectRestoreSupported" SkipNonexistentTargets="true" SkipNonexistentProjects="true" Properties="$(_GenerateRestoreGraphProjectEntryInputProperties)">
<Output TaskParameter="TargetOutputs" ItemName="_RestoreProjectPathItems" />
</MSBuild>
<!-- Without SkipNonexistentTargets -->
<MSBuild Condition=" '$(RestoreUseSkipNonexistentTargets)' != 'true' " Projects="@(_RestoreProjectPathItemsWithoutDupes)" Targets="_IsProjectRestoreSupported" ContinueOnError="$(RestoreContinueOnError)" Properties="$(_GenerateRestoreGraphProjectEntryInputProperties)">
<Output TaskParameter="TargetOutputs" ItemName="_RestoreProjectPathItems" />
</MSBuild>
</Target>
<!--
============================================================
_GetRestoreSettingsOverrides
Get global property overrides that should be resolved
against the current working directory instead of the project.
This is done by calling into NuGet.targets in a new scope,
project properties will not be returned by the calls below.
============================================================
-->
<Target Name="_GetRestoreSettingsOverrides" Returns="$(_RestorePackagesPathOverride);$(_RestoreRepositoryPathOverride);$(_RestoreSourcesOverride);$(_RestoreFallbackFoldersOverride)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- RestorePackagesPathOverride -->
<MSBuild BuildInParallel="$(RestoreBuildInParallel)" Condition=" '$(RestorePackagesPath)' != '' " Projects="$(MSBuildThisFileFullPath)" Targets="_GetRestorePackagesPathOverride">
<Output TaskParameter="TargetOutputs" PropertyName="_RestorePackagesPathOverride" />
</MSBuild>
<!-- RestoreRepositoryPathOverride -->
<MSBuild BuildInParallel="$(RestoreBuildInParallel)" Condition=" '$(RestoreRepositoryPathOverride)' != '' " Projects="$(MSBuildThisFileFullPath)" Targets="_GetRestoreRepositoryPathOverride">
<Output TaskParameter="TargetOutputs" PropertyName="_RestoreRepositoryPathOverride" />
</MSBuild>
<!-- RestoreSourcesOverride -->
<MSBuild BuildInParallel="$(RestoreBuildInParallel)" Condition=" '$(RestoreSources)' != '' " Projects="$(MSBuildThisFileFullPath)" Targets="_GetRestoreSourcesOverride">
<Output TaskParameter="TargetOutputs" PropertyName="_RestoreSourcesOverride" />
</MSBuild>
<!-- RestoreFallbackFoldersOverride -->
<MSBuild BuildInParallel="$(RestoreBuildInParallel)" Condition=" '$(RestoreFallbackFolders)' != '' " Projects="$(MSBuildThisFileFullPath)" Targets="_GetRestoreFallbackFoldersOverride">
<Output TaskParameter="TargetOutputs" PropertyName="_RestoreFallbackFoldersOverride" />
</MSBuild>
</Target>
<!--
============================================================
_GetRestorePackagesPathOverride
============================================================
-->
<Target Name="_GetRestorePackagesPathOverride" Returns="$(_RestorePackagesPathOverride)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<_RestorePackagesPathOverride>$(RestorePackagesPath)</_RestorePackagesPathOverride>
</PropertyGroup>
</Target>
<!--
============================================================
_GetRestoreRepositoryPathOverride
============================================================
-->
<Target Name="_GetRestoreRepositoryPathOverride" Returns="$(_RestoreRepositoryPathOverride)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<_RestorePackagesPathOverride>$(RestoreRepositoryPath)</_RestorePackagesPathOverride>
</PropertyGroup>
</Target>
<!--
============================================================
_GetRestoreSourcesOverride
============================================================
-->
<Target Name="_GetRestoreSourcesOverride" Returns="$(_RestoreSourcesOverride)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<_RestoreSourcesOverride>$(RestoreSources)</_RestoreSourcesOverride>
</PropertyGroup>
</Target>
<!--
============================================================
_GetRestoreFallbackFoldersOverride
============================================================
-->
<Target Name="_GetRestoreFallbackFoldersOverride" Returns="$(_RestoreFallbackFoldersOverride)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<_RestoreFallbackFoldersOverride>$(RestoreFallbackFolders)</_RestoreFallbackFoldersOverride>
</PropertyGroup>
</Target>
<!--
============================================================
_IsProjectRestoreSupported
Verify restore targets exist in the project.
============================================================
-->
<Target Name="_IsProjectRestoreSupported" Returns="@(_ValidProjectsForRestore)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<_ValidProjectsForRestore Include="$(MSBuildProjectFullPath)" />
</ItemGroup>
</Target>
<!--
============================================================
Import NuGet.RestoreEx.targets if the MSBuild property 'RestoreEnableStaticGraph'
is 'true'. This file overrides the Restore target to use MSBuild Static Graph
to load and evaluate projects which is much faster.
This feature is not supported for NuGet.exe scenarios and NuGet.RestoreEx.targets
won't exist in that case.
============================================================
-->
<!--<Import Project="NuGet.RestoreEx.targets" Condition="'$(RestoreUseStaticGraphEvaluation)' == 'true' And Exists('NuGet.RestoreEx.targets')" />-->
<!--
============================================================================================================================================
</Import>
C:\Program Files\dotnet\sdk\6.0.100-preview.5.21302.13\Microsoft.Common.CurrentVersion.targets
============================================================================================================================================
-->
<!--<Import Project="$(CustomAfterMicrosoftCommonTargets)" Condition="'$(CustomAfterMicrosoftCommonTargets)' != '' and Exists('$(CustomAfterMicrosoftCommonTargets)')" />-->
<!--
============================================================================================================================================
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.targets\ImportAfter\*" Condition="'$(ImportByWildcardAfterMicrosoftCommonTargets)' == 'true' and exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.targets\ImportAfter')">
C:\Program Files\dotnet\sdk\6.0.100-preview.5.21302.13\Current\Microsoft.Common.targets\ImportAfter\Microsoft.NET.Build.Extensions.targets
============================================================================================================================================
-->
<!--
***********************************************************************************************
Microsoft.NET.Build.Extensions.targets
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
created a backup copy. Incorrect changes to this file will make it
impossible to load or build your projects from the command-line or the IDE.
Copyright (c) .NET Foundation. All rights reserved.
***********************************************************************************************
-->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<MicrosoftNETBuildExtensionsTargets Condition="'$(MicrosoftNETBuildExtensionsTargets)' == ''">$(MSBuildExtensionsPath)\Microsoft\Microsoft.NET.Build.Extensions\Microsoft.NET.Build.Extensions.targets</MicrosoftNETBuildExtensionsTargets>
</PropertyGroup>
<!--
============================================================================================================================================
<Import Project="$(MicrosoftNETBuildExtensionsTargets)" Condition="Exists('$(MicrosoftNETBuildExtensionsTargets)')">
C:\Program Files\dotnet\sdk\6.0.100-preview.5.21302.13\Microsoft\Microsoft.NET.Build.Extensions\Microsoft.NET.Build.Extensions.targets
============================================================================================================================================
-->
<!--
***********************************************************************************************
Microsoft.NET.Build.Extensions.targets
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
created a backup copy. Incorrect changes to this file will make it
impossible to load or build your projects from the command-line or the IDE.
Copyright (c) .NET Foundation. All rights reserved.
***********************************************************************************************
-->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<_TargetFrameworkVersionWithoutV>$(TargetFrameworkVersion.TrimStart('vV'))</_TargetFrameworkVersionWithoutV>
<MicrosoftNETBuildExtensionsTasksAssembly Condition="'$(MicrosoftNETBuildExtensionsTasksAssembly)' == '' AND '$(MSBuildRuntimeType)' == 'Core'">$(MSBuildThisFileDirectory)\tools\net6.0\Microsoft.NET.Build.Extensions.Tasks.dll</MicrosoftNETBuildExtensionsTasksAssembly>
<MicrosoftNETBuildExtensionsTasksAssembly Condition="'$(MicrosoftNETBuildExtensionsTasksAssembly)' == ''">$(MSBuildThisFileDirectory)\tools\net472\Microsoft.NET.Build.Extensions.Tasks.dll</MicrosoftNETBuildExtensionsTasksAssembly>
<!-- Include conflict resolution targets for NETFramework and allow other frameworks to opt-in -->
<ResolveAssemblyConflicts Condition="'$(ResolveAssemblyConflicts)' == '' AND '$(TargetFrameworkIdentifier)' == '.NETFramework'">true</ResolveAssemblyConflicts>
</PropertyGroup>
<!--<Import Project="Microsoft.NET.Build.Extensions.NETFramework.targets" Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'" />-->
<!-- Only import ConflictResolution targets for non-SDK projects, SDK projects have ConflictResolution built in -->
<!--<Import Project="Microsoft.NET.Build.Extensions.ConflictResolution.targets" Condition="'$(ResolveAssemblyConflicts)' == 'true' AND '$(UsingMicrosoftNETSdk)' != 'true'" />-->
<!--
============================================================================================================================================
</Import>
C:\Program Files\dotnet\sdk\6.0.100-preview.5.21302.13\Current\Microsoft.Common.targets\ImportAfter\Microsoft.NET.Build.Extensions.targets
============================================================================================================================================
-->
<!--
============================================================================================================================================
</Import>
============================================================================================================================================
-->
<!--
============================================================================================================================================
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.targets\ImportAfter\*" Condition="'$(ImportByWildcardAfterMicrosoftCommonTargets)' == 'true' and exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.targets\ImportAfter')">
C:\Program Files\dotnet\sdk\6.0.100-preview.5.21302.13\Current\Microsoft.Common.targets\ImportAfter\Microsoft.TestPlatform.ImportAfter.targets
============================================================================================================================================
-->
<!--
***********************************************************************************************
Microsoft.TestPlatform.ImportAfter.targets
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
created a backup copy. Incorrect changes to this file will make it
impossible to load or build your projects from the command-line or the IDE.
Copyright (c) .NET Foundation. All rights reserved.
***********************************************************************************************
-->
<!-- Import Microsoft.TestPlatform.targets for VSTest target -->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
<VSTestTargets Condition="'$(VSTestTargets)'==''">$(MSBuildExtensionsPath)\Microsoft.TestPlatform.targets</VSTestTargets>
</PropertyGroup>
<!--
============================================================================================================================================
<Import Project="$(VSTestTargets)" Condition="Exists('$(VSTestTargets)')">
C:\Program Files\dotnet\sdk\6.0.100-preview.5.21302.13\Microsoft.TestPlatform.targets
============================================================================================================================================
-->
<!--
***********************************************************************************************
Microsoft.TestPlatform.targets
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
created a backup copy. Incorrect changes to this file will make it
impossible to load or build your projects from the command-line or the IDE.
Copyright (c) .NET Foundation. All rights reserved.
***********************************************************************************************
-->
<!-- Load Microsoft.TestPlatform.Build.Tasks.dll, this can be overridden to use a different version with $(VSTestTaskAssemblyFile) -->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<VSTestTaskAssemblyFile Condition="$(VSTestTaskAssemblyFile) == ''">Microsoft.TestPlatform.Build.dll</VSTestTaskAssemblyFile>
<VSTestConsolePath Condition="$(VSTestConsolePath) == ''">$([System.IO.Path]::Combine($(MSBuildThisFileDirectory),"vstest.console.dll"))</VSTestConsolePath>
</PropertyGroup>
<UsingTask TaskName="Microsoft.TestPlatform.Build.Tasks.VSTestTask" AssemblyFile="$(VSTestTaskAssemblyFile)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<UsingTask TaskName="Microsoft.TestPlatform.Build.Tasks.VSTestLogsTask" AssemblyFile="$(VSTestTaskAssemblyFile)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<!--
============================================================
Test target
Main entry point for running tests through vstest.console.exe
============================================================
-->
<Target Name="VSTest" DependsOnTargets="ShowInfoMessageIfProjectHasNoIsTestProjectProperty" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<CallTarget Condition="'$(VSTestNoBuild)' != 'true' AND '$(IsTestProject)' == 'true'" Targets="BuildProject" />
<CallTarget Targets="ShowCallOfVSTestTaskWithParameter" />
<Microsoft.TestPlatform.Build.Tasks.VSTestTask TestFileFullPath="$(TargetPath)" VSTestSetting="$([MSBuild]::ValueOrDefault($(VSTestSetting), '$(RunSettingsFilePath)'))" VSTestTestAdapterPath="$(VSTestTestAdapterPath)" VSTestFramework="$(TargetFrameworkMoniker)" VSTestPlatform="$(PlatformTarget)" VSTestTestCaseFilter="$(VSTestTestCaseFilter)" VSTestLogger="$(VSTestLogger)" VSTestListTests="$(VSTestListTests)" VSTestDiag="$(VSTestDiag)" VSTestCLIRunSettings="$(VSTestCLIRunSettings)" VSTestConsolePath="$(VSTestConsolePath)" VSTestResultsDirectory="$(VSTestResultsDirectory)" VSTestVerbosity="$(VSTestVerbosity)" VSTestCollect="$(VSTestCollect)" VSTestBlame="$(VSTestBlame)" VSTestBlameCrash="$(VSTestBlameCrash)" VSTestBlameCrashDumpType="$(VSTestBlameCrashDumpType)" VSTestBlameCrashCollectAlways="$(VSTestBlameCrashCollectAlways)" VSTestBlameHang="$(VSTestBlameHang)" VSTestBlameHangDumpType="$(VSTestBlameHangDumpType)" VSTestBlameHangTimeout="$(VSTestBlameHangTimeout)" VSTestTraceDataCollectorDirectoryPath="$(TraceDataCollectorDirectoryPath)" VSTestNoLogo="$(VSTestNoLogo)" Condition="'$(IsTestProject)' == 'true'" />
</Target>
<Target Name="ShowInfoMessageIfProjectHasNoIsTestProjectProperty" Condition="'$(IsTestProject)' == ''" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Microsoft.TestPlatform.Build.Tasks.VSTestLogsTask LogType="NoIsTestProjectProperty" ProjectFilePath="$(MSBuildProjectFullPath)" />
</Target>
<Target Name="BuildProject" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<CallTarget Targets="ShowMsbuildWithParameter" />
<Microsoft.TestPlatform.Build.Tasks.VSTestLogsTask LogType="BuildStarted" />
<MSBuild Projects="$(MSBuildProjectFullPath)" />
<Microsoft.TestPlatform.Build.Tasks.VSTestLogsTask LogType="BuildCompleted" />
<Message Text="Done Building project $(MSBuildProjectFullPath) for TargetFramework=$(TargetFramework)" Importance="low" />
</Target>
<Target Name="ShowMsbuildWithParameter" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Message Text="Building project $(MSBuildProjectFullPath) for TargetFramework=$(TargetFramework)" Importance="low" />
<Message Text="Value passed to msbuild are..." Importance="low" />
<Message Text="Configuration = $(Configuration)" Importance="low" />
<Message Text="TargetFramework = $(TargetFramework)" Importance="low" />
<Message Text="Platform = $(PlatformTarget)" Importance="low" />
<Message Text="OutputPath = $(OutputPath)" Importance="low" />
</Target>
<Target Name="ShowCallOfVSTestTaskWithParameter" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Message Text="Calling task Microsoft.TestPlatform.Build.Tasks.VSTestTask with following parameter..." Importance="low" />
<Message Text="TestFileFullPath = $(TargetPath)" Importance="low" />
<Message Text="VSTestSetting = $(VSTestSetting)" Importance="low" />
<Message Text="VSTestTestAdapterPath = $(VSTestTestAdapterPath)" Importance="low" />
<Message Text="VSTestFramework = $(TargetFrameworkMoniker)" Importance="low" />
<Message Text="VSTestPlatform = $(PlatformTarget)" Importance="low" />
<Message Text="VSTestTestCaseFilter = $(VSTestTestCaseFilter)" Importance="low" />
<Message Text="VSTestLogger = $(VSTestLogger)" Importance="low" />
<Message Text="VSTestListTests = $(VSTestListTests)" Importance="low" />
<Message Text="VSTestDiag = $(VSTestDiag)" Importance="low" />
<Message Text="VSTestCLIRunSettings = $(VSTestCLIRunSettings)" Importance="low" />
<Message Text="VSTestResultsDirectory = $(VSTestResultsDirectory)" Importance="low" />
<Message Text="VSTestConsolePath = $(VSTestConsolePath)" Importance="low" />
<Message Text="VSTestVerbosity = $(VSTestVerbosity)" Importance="low" />
<Message Text="VSTestCollect = $(VSTestCollect)" Importance="low" />
<Message Text="VSTestBlame = $(VSTestBlame)" Importance="low" />
<Message Text="VSTestTraceDataCollectorDirectoryPath = $(TraceDataCollectorDirectoryPath)" Importance="low" />
<Message Text="VSTestNoLogo = $(VSTestNoLogo)" Importance="low" />
</Target>
<!--
============================================================================================================================================
</Import>
C:\Program Files\dotnet\sdk\6.0.100-preview.5.21302.13\Current\Microsoft.Common.targets\ImportAfter\Microsoft.TestPlatform.ImportAfter.targets
============================================================================================================================================
-->
<!--
============================================================================================================================================
</Import>
C:\Program Files\dotnet\sdk\6.0.100-preview.5.21302.13\Microsoft.Common.CurrentVersion.targets
============================================================================================================================================
-->
<!--<Import Project="$(MSBuildUserExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.targets\ImportAfter\*" Condition="'$(ImportUserLocationsByWildcardAfterMicrosoftCommonTargets)' == 'true' and exists('$(MSBuildUserExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.targets\ImportAfter')" />-->
<!--
============================================================================================================================================
</Import>
C:\Program Files\dotnet\sdk\6.0.100-preview.5.21302.13\Microsoft.Common.targets
============================================================================================================================================
-->
<!--
Prepare to import project extensions which usually come from packages. Package management systems will create a file at:
$(MSBuildProjectExtensionsPath)\$(MSBuildProjectFile).<SomethingUnique>.targets
Each package management system should use a unique moniker to avoid collisions. It is a wild-card import so the package
management system can write out multiple files but the order of the import is alphabetic because MSBuild sorts the list.
-->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportProjectExtensionTargets Condition="'$(ImportProjectExtensionTargets)' == ''">true</ImportProjectExtensionTargets>
</PropertyGroup>
<!--
============================================================================================================================================
<Import Project="$(MSBuildProjectExtensionsPath)$(MSBuildProjectFile).*.targets" Condition="'$(ImportProjectExtensionTargets)' == 'true' and exists('$(MSBuildProjectExtensionsPath)')">
C:\temp\consoleapp1\obj\consoleapp1.csproj.nuget.g.targets
============================================================================================================================================
-->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
</PropertyGroup>
<!--
============================================================================================================================================
</Import>
C:\Program Files\dotnet\sdk\6.0.100-preview.5.21302.13\Microsoft.Common.targets
============================================================================================================================================
-->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportDirectoryBuildTargets Condition="'$(ImportDirectoryBuildTargets)' == ''">true</ImportDirectoryBuildTargets>
</PropertyGroup>
<!--
Determine the path to the directory build targets file if the user did not disable $(ImportDirectoryBuildTargets) and
they did not already specify an absolute path to use via $(DirectoryBuildTargetsPath)
-->
<PropertyGroup Condition="'$(ImportDirectoryBuildTargets)' == 'true' and '$(DirectoryBuildTargetsPath)' == ''" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<_DirectoryBuildTargetsFile Condition="'$(_DirectoryBuildTargetsFile)' == ''">Directory.Build.targets</_DirectoryBuildTargetsFile>
<_DirectoryBuildTargetsBasePath Condition="'$(_DirectoryBuildTargetsBasePath)' == ''">$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), '$(_DirectoryBuildTargetsFile)'))</_DirectoryBuildTargetsBasePath>
<DirectoryBuildTargetsPath Condition="'$(_DirectoryBuildTargetsBasePath)' != '' and '$(_DirectoryBuildTargetsFile)' != ''">$([System.IO.Path]::Combine('$(_DirectoryBuildTargetsBasePath)', '$(_DirectoryBuildTargetsFile)'))</DirectoryBuildTargetsPath>
</PropertyGroup>
<!--<Import Project="$(DirectoryBuildTargetsPath)" Condition="'$(ImportDirectoryBuildTargets)' == 'true' and exists('$(DirectoryBuildTargetsPath)')" />-->
<!--<ImportGroup Condition="'$(MSBuildAssemblyVersion)' == ''">-->
<!--<Import Project="$(MSBuildExtensionsPath)\4.0\Microsoft.NETFramework.props\ImportAfter\*" Condition="'$(ImportByWildcardAfter40MicrosoftNetFrameworkProps)' == 'true' and exists('$(MSBuildExtensionsPath)\4.0\Microsoft.NETFramework.props\ImportAfter')" />-->
<!--<Import Project="$(MSBuildUserExtensionsPath)\4.0\Microsoft.NETFramework.props\ImportAfter\*" Condition="'$(ImportUserLocationsByWildcardAfter40MicrosoftNetFrameworkProps)' == 'true' and exists('$(MSBuildUserExtensionsPath)\4.0\Microsoft.NETFramework.props\ImportAfter')" />-->
<!--</ImportGroup>-->
<!--<ImportGroup Condition="'$(MSBuildAssemblyVersion)' == ''">-->
<!--<Import Project="$(MSBuildExtensionsPath)\4.0\Microsoft.Common.targets\ImportAfter\*" Condition="'$(ImportByWildcardAfter40MicrosoftCommonTargets)' == 'true' and exists('$(MSBuildExtensionsPath)\4.0\Microsoft.Common.targets\ImportAfter')" />-->
<!--<Import Project="$(MSBuildUserExtensionsPath)\4.0\Microsoft.Common.targets\ImportAfter\*" Condition="'$(ImportUserLocationsByWildcardAfter40MicrosoftCommonTargets)' == 'true' and exists('$(MSBuildUserExtensionsPath)\4.0\Microsoft.Common.targets\ImportAfter')" />-->
<!--</ImportGroup>-->
<!-- Fix up FrameworkPathOverride, which is primarily used to determine the location of mscorlib.dll in the
(relatively uncommon) situation where the reference assemblies, in which it's usually found, are not
installed. -->
<PropertyGroup Condition="'$(MSBuildAssemblyVersion)' == ''" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<FrameworkPathOverride Condition="!Exists('$(FrameworkPathOverride)\mscorlib.dll')">$(MSBuildFrameworkToolsPath)</FrameworkPathOverride>
</PropertyGroup>
<!--
============================================================================================================================================
</Import>
C:\Program Files\dotnet\sdk\6.0.100-preview.5.21302.13\Microsoft.CSharp.CurrentVersion.targets
============================================================================================================================================
-->
<!--<Import Project="$(MSBuildToolsPath)\Microsoft.ServiceModel.targets" Condition="('$(TargetFrameworkVersion)' != 'v2.0' and '$(TargetFrameworkVersion)' != 'v3.0' and '$(TargetFrameworkVersion)' != 'v3.5') and Exists('$(MSBuildToolsPath)\Microsoft.ServiceModel.targets')" />-->
<Target Name="_SetTargetFrameworkMonikerAttribute" BeforeTargets="GenerateTargetFrameworkMonikerAttribute" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<TargetFrameworkMonikerAssemblyAttributeText Condition="'$(TargetFrameworkMoniker)' != '' and '$(TargetingClr2Framework)' != 'true'">
// &lt;autogenerated /&gt;
using System%3b
using System.Reflection%3b
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute("$(TargetFrameworkMoniker)", FrameworkDisplayName = "$(TargetFrameworkMonikerDisplayName)")]
</TargetFrameworkMonikerAssemblyAttributeText>
</PropertyGroup>
</Target>
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Utf8Output Condition="'$(Utf8Output)' == ''">true</Utf8Output>
<!-- NoCompilerStandardLib maps to the compiler's /nostdlib option. By default we always
want that switch to be passed to the compiler so that either we or the user
provides the references
NoStdLib on the other hand indicates that the user doesn't want standard references
so only if NoStdLib isn't set to true, will we provide the standard references
-->
<NoCompilerStandardLib Condition=" '$(NoCompilerStandardLib)' == '' ">true</NoCompilerStandardLib>
<ErrorEndLocation Condition="'$(BuildingInsideVisualStudio)' == 'true' and '$(ErrorEndLocation)' == ''">true</ErrorEndLocation>
<!-- When building inside VS, by default use the same language for compiler messages as VS itself does. -->
<PreferredUILang Condition="'$(BuildingInsideVisualStudio)' == 'true' and '$(PreferredUILang)' == ''">$([System.Globalization.CultureInfo]::CurrentUICulture.Name)</PreferredUILang>
</PropertyGroup>
<!-- Add any "automatic" compiler references that need to be resolved when NoCompilerStandardLib is set
but the user hasn't told us to not include standard references -->
<ItemGroup Condition=" '$(NoCompilerStandardLib)' == 'true' and '$(NoStdLib)' != 'true' " xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- Note that unlike VB, C# does not automatically locate System.dll as a "standard library"
instead the reference is always passed from the project. Also, for mscorlib.dll
we need to provide the explicit location in order to avoid resolving from, e.g.,
{CandidateAssemblyFiles}.
-->
<_ExplicitReference Include="$(FrameworkPathOverride)\mscorlib.dll" />
</ItemGroup>
<!--<Import Project="$(CustomAfterMicrosoftCSharpTargets)" Condition="'$(CustomAfterMicrosoftCSharpTargets)' != '' and Exists('$(CustomAfterMicrosoftCSharpTargets)')" />-->
<!--<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.CSharp.targets\ImportAfter\*" Condition="'$(ImportByWildcardAfterMicrosoftCSharpTargets)' == 'true' and exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.CSharp.targets\ImportAfter')" />-->
<!--<Import Project="$(MSBuildUserExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.CSharp.targets\ImportAfter\*" Condition="'$(ImportUserLocationsByWildcardAfterMicrosoftCSharpTargets)' == 'true' and exists('$(MSBuildUserExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.CSharp.targets\ImportAfter')" />-->
<!--
============================================================================================================================================
</Import>
C:\Program Files\dotnet\sdk\6.0.100-preview.5.21302.13\Microsoft.CSharp.targets
============================================================================================================================================
-->
<!--
============================================================================================================================================
<Import Project="$(MSBuildToolsPath)\Microsoft.Managed.After.targets">
C:\Program Files\dotnet\sdk\6.0.100-preview.5.21302.13\Microsoft.Managed.After.targets
============================================================================================================================================
-->
<!--
***********************************************************************************************
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
created a backup copy. Incorrect changes to this file will make it
impossible to load or build your projects from the command-line or the IDE.
This file defines common build logic for all managed languaged: C#, VisualBasic, F#
It is imported after the common targets have been imported.
Copyright (C) Microsoft Corporation. All rights reserved.
***********************************************************************************************
-->
<!-- Define crosstargeting for static graph, so it can identify inner and outer build graph nodes -->
<PropertyGroup>
<InnerBuildProperty>TargetFramework</InnerBuildProperty>
<InnerBuildPropertyValues>TargetFrameworks</InnerBuildPropertyValues>
</PropertyGroup>
<PropertyGroup Condition="'$(IsGraphBuild)' == 'true'">
<AddTransitiveProjectReferencesInStaticGraph Condition="'$(AddTransitiveProjectReferencesInStaticGraph)' == '' and '$(UsingMicrosoftNETSdk)' == 'true' and '$(DisableTransitiveProjectReferences)' != 'true'">true</AddTransitiveProjectReferencesInStaticGraph>
</PropertyGroup>
<ItemGroup Condition="'$(IsGraphBuild)' == 'true'">
<!-- WPF projects generate a project with a random name at build time and then build the project via the IBuildEngine callbacks.
Detect WPF, and exclude the generated project from static graph isolation constraint checking.
Escape the item to avoid eager evaluation of the wildcards.
-->
<GraphIsolationExemptReference Condition="'$(UseWPF)' == 'true' or '@(Page)' != '' or '@(ApplicationDefinition)' != '' or '@(XamlPage)' != '' or '@(XamlAppDef)' != ''" Include="$([MSBuild]::Escape('$(MSBuildProjectDirectory)\$(MSBuildProjectName)*_wpftmp$(MSBuildProjectExtension)'))" />
</ItemGroup>
<!--
Properties for extension of ProjectReferenceTargets.
Append any current value which may have been provided in a Directory.Build.props since the intent was likely to append, not prepend.
-->
<PropertyGroup Condition="'$(IsGraphBuild)' == 'true'">
<!-- Empty case is for outer builds which do not import the target files that set BuildProjectReferences -->
<_MainReferenceTarget Condition="'$(BuildProjectReferences)' == '' or '$(BuildProjectReferences)' == 'true'">.projectReferenceTargetsOrDefaultTargets</_MainReferenceTarget>
<_MainReferenceTarget Condition="'$(_MainReferenceTarget)' == ''">GetTargetPath</_MainReferenceTarget>
<ProjectReferenceTargetsForBuildInOuterBuild>GetTargetFrameworks;$(ProjectReferenceTargetsForBuildInOuterBuild)</ProjectReferenceTargetsForBuildInOuterBuild>
<ProjectReferenceTargetsForBuild>$(_MainReferenceTarget);GetNativeManifest;$(_RecursiveTargetForContentCopying);GetTargetFrameworksWithPlatformForSingleTargetFramework;$(ProjectReferenceTargetsForBuild)</ProjectReferenceTargetsForBuild>
<ProjectReferenceTargetsForCleanInOuterBuild>GetTargetFrameworks;$(ProjectReferenceTargetsForCleanInOuterBuild)</ProjectReferenceTargetsForCleanInOuterBuild>
<ProjectReferenceTargetsForClean>Clean;GetTargetFrameworksWithPlatformForSingleTargetFramework;$(ProjectReferenceTargetsForClean)</ProjectReferenceTargetsForClean>
<ProjectReferenceTargetsForRebuildInOuterBuild>$(ProjectReferenceTargetsForCleanInOuterBuild);$(ProjectReferenceTargetsForBuildInOuterBuild);$(ProjectReferenceTargetsForRebuildInOuterBuild)</ProjectReferenceTargetsForRebuildInOuterBuild>
<ProjectReferenceTargetsForRebuild>$(ProjectReferenceTargetsForClean);$(ProjectReferenceTargetsForBuild);$(ProjectReferenceTargetsForRebuild)</ProjectReferenceTargetsForRebuild>
<ProjectReferenceTargetsForPublish>GetCopyToPublishDirectoryItems;$(ProjectReferenceTargetsForPublish)</ProjectReferenceTargetsForPublish>
<ProjectReferenceTargetsForGetCopyToPublishDirectoryItems>GetCopyToPublishDirectoryItems;$(ProjectReferenceTargetsForGetCopyToPublishDirectoryItems)</ProjectReferenceTargetsForGetCopyToPublishDirectoryItems>
</PropertyGroup>
<ItemGroup Condition="'$(IsGraphBuild)' == 'true'">
<ProjectReferenceTargets Include="Build" Targets="$(ProjectReferenceTargetsForBuildInOuterBuild)" Condition=" '$(ProjectReferenceTargetsForBuildInOuterBuild)' != '' " OuterBuild="true" />
<ProjectReferenceTargets Include="Build" Targets="$(ProjectReferenceTargetsForBuild)" Condition=" '$(ProjectReferenceTargetsForBuild)' != '' " />
<ProjectReferenceTargets Include="Clean" Targets="$(ProjectReferenceTargetsForCleanInOuterBuild)" Condition=" '$(ProjectReferenceTargetsForCleanInOuterBuild)' != '' " OuterBuild="true" />
<ProjectReferenceTargets Include="Clean" Targets="$(ProjectReferenceTargetsForClean)" Condition=" '$(ProjectReferenceTargetsForClean)' != '' " />
<ProjectReferenceTargets Include="Rebuild" Targets="$(ProjectReferenceTargetsForRebuildInOuterBuild)" Condition=" '$(ProjectReferenceTargetsForRebuildInOuterBuild)' != '' " />
<ProjectReferenceTargets Include="Rebuild" Targets="$(ProjectReferenceTargetsForRebuild)" Condition=" '$(ProjectReferenceTargetsForRebuild)' != '' " />
<ProjectReferenceTargets Include="Publish" Targets="$(ProjectReferenceTargetsForPublish)" Condition=" '$(ProjectReferenceTargetsForPublish)' != '' " />
<ProjectReferenceTargets Include="GetCopyToPublishDirectoryItems" Targets="$(ProjectReferenceTargetsForGetCopyToPublishDirectoryItems)" Condition=" '$(ProjectReferenceTargetsForGetCopyToPublishDirectoryItems)' != '' " />
</ItemGroup>
<!--
============================================================================================================================================
</Import>
C:\Program Files\dotnet\sdk\6.0.100-preview.5.21302.13\Microsoft.CSharp.targets
============================================================================================================================================
-->
<!-- Really should be imported right after Microsoft.NETFramework.props, but because Microsoft.CSharp.targets imports
Microsoft.Common.targets from the current directory rather than using MSBuildToolsPath (which would redirect to our
targets), and Microsoft.Common.targets does likewise with Microsoft.NETFramework.props, we're stuck doing it this
way instead. -->
<!--<ImportGroup Condition="'$(MSBuildAssemblyVersion)' == ''">-->
<!--<Import Project="$(MSBuildExtensionsPath)\4.0\Microsoft.NETFramework.props\ImportAfter\*" Condition="'$(ImportByWildcardAfter40MicrosoftNetFrameworkProps)' == 'true' and exists('$(MSBuildExtensionsPath)\4.0\Microsoft.NETFramework.props\ImportAfter')" />-->
<!--<Import Project="$(MSBuildUserExtensionsPath)\4.0\Microsoft.NETFramework.props\ImportAfter\*" Condition="'$(ImportUserLocationsByWildcardAfter40MicrosoftNetFrameworkProps)' == 'true' and exists('$(MSBuildUserExtensionsPath)\4.0\Microsoft.NETFramework.props\ImportAfter')" />-->
<!--</ImportGroup>-->
<!-- Really should be imported right after Microsoft.Common.targets, but because Microsoft.CSharp.targets imports
Microsoft.Common.targets from the current directory rather than using MSBuildToolsPath (which would redirect to our
targets), we're stuck doing it this way instead. -->
<!--<ImportGroup Condition="'$(MSBuildAssemblyVersion)' == ''">-->
<!--<Import Project="$(MSBuildExtensionsPath)\4.0\Microsoft.Common.targets\ImportAfter\*" Condition="'$(ImportByWildcardAfter40MicrosoftCommonTargets)' == 'true' and exists('$(MSBuildExtensionsPath)\4.0\Microsoft.Common.targets\ImportAfter')" />-->
<!--<Import Project="$(MSBuildUserExtensionsPath)\4.0\Microsoft.Common.targets\ImportAfter\*" Condition="'$(ImportUserLocationsByWildcardAfter40MicrosoftCommonTargets)' == 'true' and exists('$(MSBuildUserExtensionsPath)\4.0\Microsoft.Common.targets\ImportAfter')" />-->
<!--</ImportGroup>-->
<!--<ImportGroup Condition="'$(MSBuildAssemblyVersion)' == ''">-->
<!--<Import Project="$(MSBuildExtensionsPath)\4.0\Microsoft.CSharp.targets\ImportAfter\*" Condition="'$(ImportByWildcardAfter40MicrosoftCSharpTargets)' == 'true' and exists('$(MSBuildExtensionsPath)\4.0\Microsoft.CSharp.targets\ImportAfter')" />-->
<!--<Import Project="$(MSBuildUserExtensionsPath)\4.0\Microsoft.CSharp.targets\ImportAfter\*" Condition="'$(ImportUserLocationsByWildcardAfter40MicrosoftCSharpTargets)' == 'true' and exists('$(MSBuildUserExtensionsPath)\4.0\Microsoft.CSharp.targets\ImportAfter')" />-->
<!--</ImportGroup>-->
<!-- Fix up FrameworkPathOverride, which is primarily used to determine the location of mscorlib.dll in the
(relatively uncommon) situation where the reference assemblies, in which it's usually found, are not
installed. Defined here rather than in Microsoft.Common.targets because the .NET Microsoft.CSharp.targets
imports Microsoft.Common.targets from the current directory. -->
<PropertyGroup Condition="'$(MSBuildAssemblyVersion)' == ''" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<FrameworkPathOverride Condition="!Exists('$(FrameworkPathOverride)\mscorlib.dll')">$(MSBuildFrameworkToolsPath)</FrameworkPathOverride>
</PropertyGroup>
<!--
============================================================================================================================================
</Import>
C:\Program Files\dotnet\sdk\6.0.100-preview.5.21302.13\Sdks\Microsoft.NET.Sdk\Sdk\Sdk.targets
============================================================================================================================================
-->
<!--<Import Project="$(MSBuildThisFileDirectory)..\targets\Microsoft.NET.Sdk.CrossTargeting.targets" Condition="'$(IsCrossTargetingBuild)' == 'true'" />-->
<!--
============================================================================================================================================
<Import Project="$(MSBuildThisFileDirectory)..\targets\Microsoft.NET.Sdk.targets" Condition="'$(IsCrossTargetingBuild)' != 'true'">
C:\Program Files\dotnet\sdk\6.0.100-preview.5.21302.13\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.targets
============================================================================================================================================
-->
<!--
***********************************************************************************************
Microsoft.NET.Sdk.targets
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
created a backup copy. Incorrect changes to this file will make it
impossible to load or build your projects from the command-line or the IDE.
Copyright (c) .NET Foundation. All rights reserved.
***********************************************************************************************
-->
<!--
============================================================================================================================================
<Import Project="Microsoft.NET.Sdk.Common.targets">
C:\Program Files\dotnet\sdk\6.0.100-preview.5.21302.13\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.Common.targets
============================================================================================================================================
-->
<!--
***********************************************************************************************
Microsoft.NET.Sdk.Common.targets
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
created a backup copy. Incorrect changes to this file will make it
impossible to load or build your projects from the command-line or the IDE.
Copyright (c) .NET Foundation. All rights reserved.
***********************************************************************************************
-->
<!-- This file is imported by both cross-targeting and inner builds. Set properties that need to be available to both here. -->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<MicrosoftNETBuildTasksDirectoryRoot>$(MSBuildThisFileDirectory)..\tools\</MicrosoftNETBuildTasksDirectoryRoot>
<MicrosoftNETBuildTasksTFM Condition=" '$(MSBuildRuntimeType)' == 'Core'">net6.0</MicrosoftNETBuildTasksTFM>
<MicrosoftNETBuildTasksTFM Condition=" '$(MicrosoftNETBuildTasksTFM)' == ''">net472</MicrosoftNETBuildTasksTFM>
<MicrosoftNETBuildTasksDirectory>$(MicrosoftNETBuildTasksDirectoryRoot)$(MicrosoftNETBuildTasksTFM)\</MicrosoftNETBuildTasksDirectory>
<MicrosoftNETBuildTasksAssembly>$(MicrosoftNETBuildTasksDirectory)Microsoft.NET.Build.Tasks.dll</MicrosoftNETBuildTasksAssembly>
<!--
Hardcoded list of known implicit packges that are added to project from default SDK targets implicitly.
Should be re-visited when multiple TFM support is added to Dependencies logic.
-->
<DefaultImplicitPackages>Microsoft.NETCore.App;NETStandard.Library</DefaultImplicitPackages>
</PropertyGroup>
<!--
Some versions of Microsoft.NET.Test.Sdk.targets change the OutputType after we've set _IsExecutable and
HasRuntimeOutput default in Microsoft.NET.Sdk.BeforeCommon.targets. Refresh these value here for backwards
compatibilty with that.
-->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<_IsExecutable Condition="'$(OutputType)' == 'Exe' or '$(OutputType)'=='WinExe'">true</_IsExecutable>
<HasRuntimeOutput Condition="'$(_UsingDefaultForHasRuntimeOutput)' == 'true'">$(_IsExecutable)</HasRuntimeOutput>
</PropertyGroup>
<PropertyGroup Condition="'$(DotnetCliToolTargetFramework)' == ''" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- Maximum supported target framework for DotnetCliProjectTools is .NET Core 2.2 -->
<DotnetCliToolTargetFramework>netcoreapp2.2</DotnetCliToolTargetFramework>
</PropertyGroup>
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<IncludeBuildOutput Condition=" '$(PackAsTool)' == 'true' ">false</IncludeBuildOutput>
<PackageType Condition=" '$(PackAsTool)' == 'true' ">DotnetTool</PackageType>
<RuntimeIdentifiers Condition=" '$(PackAsTool)' == 'true' ">$(RuntimeIdentifiers);$(PackAsToolShimRuntimeIdentifiers)</RuntimeIdentifiers>
</PropertyGroup>
<UsingTask TaskName="NETSdkError" AssemblyFile="$(MicrosoftNETBuildTasksAssembly)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<UsingTask TaskName="NETSdkWarning" AssemblyFile="$(MicrosoftNETBuildTasksAssembly)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<UsingTask TaskName="NETSdkInformation" AssemblyFile="$(MicrosoftNETBuildTasksAssembly)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<UsingTask TaskName="ShowPreviewMessage" AssemblyFile="$(MicrosoftNETBuildTasksAssembly)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<!--
============================================================================================================================================
</Import>
C:\Program Files\dotnet\sdk\6.0.100-preview.5.21302.13\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.targets
============================================================================================================================================
-->
<!--<ImportGroup>-->
<!--
============================================================================================================================================
<Import Project="$(MSBuildThisFileDirectory)Microsoft.PackageDependencyResolution.targets" Condition="Exists('$(MSBuildThisFileDirectory)Microsoft.PackageDependencyResolution.targets') and ('$(Language)' != 'C++' or '$(_EnablePackageReferencesInVCProjects)' == 'true')">
C:\Program Files\dotnet\sdk\6.0.100-preview.5.21302.13\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResolution.targets
============================================================================================================================================
-->
<!--
***********************************************************************************************
Microsoft.PackageDependencyResolution.targets
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
created a backup copy. Incorrect changes to this file will make it
impossible to load or build your projects from the command-line or the IDE.
Copyright (c) .NET Foundation. All rights reserved.
***********************************************************************************************
-->
<!--
*************************************
1. INPUT PROPERTIES
- That configure the PackageDependency targets
*************************************
-->
<!-- General Properties -->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ProjectAssetsFile Condition="'$(ProjectAssetsFile)' == ''">$(MSBuildProjectExtensionsPath)/project.assets.json</ProjectAssetsFile>
<ProjectAssetsFile>$([MSBuild]::NormalizePath($(MSBuildProjectDirectory), $(ProjectAssetsFile)))</ProjectAssetsFile>
<!-- Note that the assets.cache file has contents that are unique to the current TFM and configuration and therefore cannot
be stored in a shared directory next to the assets.json file -->
<ProjectAssetsCacheFile Condition="'$(ProjectAssetsCacheFile)' == ''">$(IntermediateOutputPath)$(MSBuildProjectName).assets.cache</ProjectAssetsCacheFile>
<ProjectAssetsCacheFile>$([MSBuild]::NormalizePath($(MSBuildProjectDirectory), $(ProjectAssetsCacheFile)))</ProjectAssetsCacheFile>
<!-- Don't copy local for netstandard projects. -->
<CopyLocalLockFileAssemblies Condition="'$(CopyLocalLockFileAssemblies)' == '' and&#xD;&#xA; '$(TargetFrameworkIdentifier)' == '.NETStandard'">false</CopyLocalLockFileAssemblies>
<!-- Don't copy local for netcoreapp projects before 3.0 or non-exe and non-component projects. -->
<CopyLocalLockFileAssemblies Condition="'$(CopyLocalLockFileAssemblies)' == '' and&#xD;&#xA; '$(TargetFrameworkIdentifier)' == '.NETCoreApp' and&#xD;&#xA; ('$(_TargetFrameworkVersionWithoutV)' &lt; '3.0' or&#xD;&#xA; ('$(HasRuntimeOutput)' != 'true' and '$(EnableDynamicLoading)' != 'true'))">false</CopyLocalLockFileAssemblies>
<!-- All other project types should copy local. -->
<CopyLocalLockFileAssemblies Condition="'$(CopyLocalLockFileAssemblies)' == ''">true</CopyLocalLockFileAssemblies>
<ContentPreprocessorOutputDirectory Condition="'$(ContentPreprocessorOutputDirectory)' == ''">$(IntermediateOutputPath)NuGet\</ContentPreprocessorOutputDirectory>
<UseTargetPlatformAsNuGetTargetMoniker Condition="'$(UseTargetPlatformAsNuGetTargetMoniker)' == '' AND '$(TargetFrameworkMoniker)' == '.NETCore,Version=v5.0'">true</UseTargetPlatformAsNuGetTargetMoniker>
<NuGetTargetMoniker Condition="'$(NuGetTargetMoniker)' == '' AND '$(UseTargetPlatformAsNuGetTargetMoniker)' == 'true'">$(TargetPlatformIdentifier),Version=v$([System.Version]::Parse('$(TargetPlatformMinVersion)').ToString(3))</NuGetTargetMoniker>
<NuGetTargetMoniker Condition="'$(NuGetTargetMoniker)' == '' AND '$(UseTargetPlatformAsNuGetTargetMoniker)' != 'true'">$(TargetFrameworkMoniker)</NuGetTargetMoniker>
<EmitAssetsLogMessages Condition="'$(EmitAssetsLogMessages)' == ''">true</EmitAssetsLogMessages>
<!-- Setting this property to true restores pre-16.7 behaviour of ResolvePackageDependencies to produce
TargetDefinitions, FileDefinitions and FileDependencies items. -->
<EmitLegacyAssetsFileItems Condition="'$(EmitLegacyAssetsFileItems)' == ''">false</EmitLegacyAssetsFileItems>
</PropertyGroup>
<!-- Target Moniker + RID-->
<PropertyGroup Condition="'$(_NugetTargetMonikerAndRID)' == ''" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<_NugetTargetMonikerAndRID Condition="'$(RuntimeIdentifier)' == ''">$(NuGetTargetMoniker)</_NugetTargetMonikerAndRID>
<_NugetTargetMonikerAndRID Condition="'$(RuntimeIdentifier)' != ''">$(NuGetTargetMoniker)/$(RuntimeIdentifier)</_NugetTargetMonikerAndRID>
</PropertyGroup>
<!-- Embed all project.assets.json files into the binary log when building with /bl -->
<ItemGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<EmbedInBinlog Include="$(ProjectAssetsFile)" Condition="Exists('$(ProjectAssetsFile)') AND $(EmbedProjectAssetsFile) != false" />
</ItemGroup>
<!--
*************************************
2. EXTERNAL PROPERTIES and ITEMS
- Override or add to external targets
*************************************
-->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ResolveAssemblyReferencesDependsOn>
$(ResolveAssemblyReferencesDependsOn);
ResolvePackageDependenciesForBuild;
_HandlePackageFileConflicts;
</ResolveAssemblyReferencesDependsOn>
<PrepareResourcesDependsOn>
ResolvePackageDependenciesForBuild;
_HandlePackageFileConflicts;
$(PrepareResourcesDependsOn)
</PrepareResourcesDependsOn>
</PropertyGroup>
<!-- Common tokens used in preprocessed content files -->
<ItemGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PreprocessorValue Include="rootnamespace">
<Value>$(RootNamespace)</Value>
</PreprocessorValue>
<PreprocessorValue Include="assemblyname">
<Value>$(AssemblyName)</Value>
</PreprocessorValue>
<PreprocessorValue Include="fullpath">
<Value>$(MSBuildProjectDirectory)</Value>
</PreprocessorValue>
<PreprocessorValue Include="outputfilename">
<Value>$(TargetFileName)</Value>
</PreprocessorValue>
<PreprocessorValue Include="filename">
<Value>$(MSBuildProjectFile)</Value>
</PreprocessorValue>
<PreprocessorValue Include="@(NuGetPreprocessorValue)" Exclude="@(PreprocessorValue)" />
</ItemGroup>
<!--
This will prevent RAR from spending time locating dependencies and related files for assemblies
that came from packages. PackageReference should already be promoted to a closure of Reference
items and we are responsible for adding package relates files to CopyLocal items, not RAR. This
is only configurable as a compat opt-out in case skipping the slow RAR code breaks something.
-->
<PropertyGroup Condition="'$(MarkPackageReferencesAsExternallyResolved)' == ''" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<MarkPackageReferencesAsExternallyResolved>true</MarkPackageReferencesAsExternallyResolved>
</PropertyGroup>
<!--
*************************************
3. BUILD TARGETS
- Override the Depends-On properties, or the individual targets
*************************************
-->
<!--
============================================================
ResolvePackageDependenciesForBuild
Populate items for build. This is triggered before target
"AssignProjectConfiguration" to ensure ProjectReference items
are populated before ResolveProjectReferences is run.
============================================================
-->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ResolvePackageDependenciesForBuildDependsOn>
ResolveLockFileReferences;
ResolveLockFileAnalyzers;
ResolveLockFileCopyLocalFiles;
ResolveRuntimePackAssets;
RunProduceContentAssets;
IncludeTransitiveProjectReferences
</ResolvePackageDependenciesForBuildDependsOn>
</PropertyGroup>
<Target Name="ResolvePackageDependenciesForBuild" Condition=" ('$(DesignTimeBuild)' != 'true' and '$(_CleaningWithoutRebuilding)' != 'true')&#xD;&#xA; Or Exists('$(ProjectAssetsFile)')" BeforeTargets="AssignProjectConfiguration" DependsOnTargets="$(ResolvePackageDependenciesForBuildDependsOn)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<!--
*************************************
4. Package Dependency TASK and TARGETS
- Raise the lock file to MSBuild Items and create derived items
*************************************
-->
<!--
============================================================
RunResolvePackageDependencies
Generate Definitions and Dependencies based on ResolvePackageDependencies task
============================================================
-->
<UsingTask TaskName="Microsoft.NET.Build.Tasks.ResolvePackageDependencies" AssemblyFile="$(MicrosoftNETBuildTasksAssembly)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<UsingTask TaskName="Microsoft.NET.Build.Tasks.CheckForTargetInAssetsFile" AssemblyFile="$(MicrosoftNETBuildTasksAssembly)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<UsingTask TaskName="Microsoft.NET.Build.Tasks.JoinItems" AssemblyFile="$(MicrosoftNETBuildTasksAssembly)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<UsingTask TaskName="Microsoft.NET.Build.Tasks.ResolvePackageAssets" AssemblyFile="$(MicrosoftNETBuildTasksAssembly)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<!-- The condition on this target causes it to be skipped during design-time builds if
the restore operation hasn't run yet. This is to avoid displaying an error in
the Visual Studio error list when a project is created before NuGet restore has
run and created the assets file. -->
<Target Name="RunResolvePackageDependencies" Condition=" '$(DesignTimeBuild)' != 'true' Or Exists('$(ProjectAssetsFile)')" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- Verify that the assets file has a target for the right framework. Otherwise, if we restored for the
wrong framework, we'd end up finding no references to pass to the compiler, and we'd get a ton of
compile errors. -->
<CheckForTargetInAssetsFile AssetsFilePath="$(ProjectAssetsFile)" TargetFramework="$(TargetFramework)" RuntimeIdentifier="$(RuntimeIdentifier)" Condition=" '$(DesignTimeBuild)' != 'true'" />
<ResolvePackageDependencies ProjectPath="$(MSBuildProjectFullPath)" ProjectAssetsFile="$(ProjectAssetsFile)" ProjectLanguage="$(Language)" EmitLegacyAssetsFileItems="$(EmitLegacyAssetsFileItems)" TargetFramework="$(TargetFramework)" ContinueOnError="ErrorAndContinue">
<Output TaskParameter="PackageDefinitions" ItemName="PackageDefinitions" />
<Output TaskParameter="PackageDependencies" ItemName="PackageDependencies" />
<!-- These outputs only produced when EmitLegacyAssetsFileItems is true -->
<Output TaskParameter="TargetDefinitions" ItemName="TargetDefinitions" />
<Output TaskParameter="FileDefinitions" ItemName="FileDefinitions" />
<Output TaskParameter="FileDependencies" ItemName="FileDependencies" />
</ResolvePackageDependencies>
</Target>
<Target Name="ResolvePackageAssets" Condition=" '$(DesignTimeBuild)' != 'true' Or Exists('$(ProjectAssetsFile)')" DependsOnTargets="ProcessFrameworkReferences;_DefaultMicrosoftNETPlatformLibrary;_ComputePackageReferencePublish" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp'&#xD;&#xA; and '$(_TargetFrameworkVersionWithoutV)' &gt;= '3.0'&#xD;&#xA; and '$(UseAppHostFromAssetsFile)' == ''">
<!-- For .NET Core 3.0 and higher, we'll get the apphost from an apphost pack (via ProcessFrameworkReferences) -->
<UseAppHostFromAssetsFile>false</UseAppHostFromAssetsFile>
</PropertyGroup>
<PropertyGroup Condition="'$(UseAppHostFromAssetsFile)' == ''">
<UseAppHostFromAssetsFile>true</UseAppHostFromAssetsFile>
</PropertyGroup>
<PropertyGroup Condition="'$(EnsureRuntimePackageDependencies)' == ''&#xD;&#xA; and '$(TargetFrameworkIdentifier)' == '.NETCoreApp'&#xD;&#xA; and '$(_TargetFrameworkVersionWithoutV)' &lt; '3.0'&#xD;&#xA; and '$(EnsureNETCoreAppRuntime)' != 'false'">
<EnsureRuntimePackageDependencies>true</EnsureRuntimePackageDependencies>
</PropertyGroup>
<!-- Only copy local runtime target assets if targeting netcoreapp -->
<PropertyGroup Condition="'$(CopyLocalRuntimeTargetAssets)' == '' and '$(TargetFrameworkIdentifier)' == '.NETCoreApp'">
<CopyLocalRuntimeTargetAssets>true</CopyLocalRuntimeTargetAssets>
</PropertyGroup>
<ItemGroup>
<_PackAsToolShimRuntimeIdentifiers Condition="@(_PackAsToolShimRuntimeIdentifiers) ==''" Include="$(PackAsToolShimRuntimeIdentifiers)" />
<!-- Pass these packages into the ResolvePackageAssets task to verify that the restored versions of the packages
match the expected version -->
<ExpectedPlatformPackages Include="@(PackageReference)" Condition="'%(Identity)' == 'Microsoft.NETCore.App'" />
<ExpectedPlatformPackages Include="@(PackageReference)" Condition="'%(Identity)' == 'Microsoft.AspNetCore.App'" />
<ExpectedPlatformPackages Include="@(PackageReference)" Condition="'%(Identity)' == 'Microsoft.AspNetCore.All'" />
</ItemGroup>
<ResolvePackageAssets ProjectAssetsFile="$(ProjectAssetsFile)" ProjectAssetsCacheFile="$(ProjectAssetsCacheFile)" ProjectPath="$(MSBuildProjectFullPath)" ProjectLanguage="$(Language)" EmitAssetsLogMessages="$(EmitAssetsLogMessages)" TargetFramework="$(TargetFramework)" RuntimeIdentifier="$(RuntimeIdentifier)" PlatformLibraryName="$(MicrosoftNETPlatformLibrary)" RuntimeFrameworks="@(RuntimeFramework)" IsSelfContained="$(SelfContained)" MarkPackageReferencesAsExternallyResolved="$(MarkPackageReferencesAsExternallyResolved)" DisablePackageAssetsCache="$(DisablePackageAssetsCache)" DisableFrameworkAssemblies="$(DisableLockFileFrameworks)" CopyLocalRuntimeTargetAssets="$(CopyLocalRuntimeTargetAssets)" DisableTransitiveProjectReferences="$(DisableTransitiveProjectReferences)" DisableTransitiveFrameworkReferences="$(DisableTransitiveFrameworkReferences)" DotNetAppHostExecutableNameWithoutExtension="$(_DotNetAppHostExecutableNameWithoutExtension)" ShimRuntimeIdentifiers="@(_PackAsToolShimRuntimeIdentifiers)" EnsureRuntimePackageDependencies="$(EnsureRuntimePackageDependencies)" VerifyMatchingImplicitPackageVersion="$(VerifyMatchingImplicitPackageVersion)" ExpectedPlatformPackages="@(ExpectedPlatformPackages)" SatelliteResourceLanguages="$(SatelliteResourceLanguages)" DesignTimeBuild="$(DesignTimeBuild)" ContinueOnError="$(ContinueOnError)" PackageReferences="@(PackageReference)">
<!-- NOTE: items names here are inconsistent because they match prior implementation
(that was spread across different tasks/targets) for backwards compatibility. -->
<Output TaskParameter="Analyzers" ItemName="ResolvedAnalyzers" />
<Output TaskParameter="ApphostsForShimRuntimeIdentifiers" ItemName="_ApphostsForShimRuntimeIdentifiersResolvePackageAssets" />
<Output TaskParameter="ContentFilesToPreprocess" ItemName="_ContentFilesToPreprocess" />
<Output TaskParameter="FrameworkAssemblies" ItemName="ResolvedFrameworkAssemblies" />
<Output TaskParameter="FrameworkReferences" ItemName="TransitiveFrameworkReference" />
<Output TaskParameter="NativeLibraries" ItemName="NativeCopyLocalItems" />
<Output TaskParameter="ResourceAssemblies" ItemName="ResourceCopyLocalItems" />
<Output TaskParameter="RuntimeAssemblies" ItemName="RuntimeCopyLocalItems" />
<Output TaskParameter="RuntimeTargets" ItemName="RuntimeTargetsCopyLocalItems" />
<Output TaskParameter="CompileTimeAssemblies" ItemName="ResolvedCompileFileDefinitions" />
<Output TaskParameter="TransitiveProjectReferences" ItemName="_TransitiveProjectReferences" />
<Output TaskParameter="PackageFolders" ItemName="AssetsFilePackageFolder" />
<Output TaskParameter="PackageDependencies" ItemName="PackageDependencies" />
</ResolvePackageAssets>
<ItemGroup Condition="'$(UseAppHostFromAssetsFile)' == 'true'">
<_NativeRestoredAppHostNETCore Include="@(NativeCopyLocalItems)" Condition="'%(NativeCopyLocalItems.FileName)%(NativeCopyLocalItems.Extension)' == '$(_DotNetAppHostExecutableName)'" />
</ItemGroup>
<ItemGroup Condition="'@(_ApphostsForShimRuntimeIdentifiers)' == ''">
<_ApphostsForShimRuntimeIdentifiers Include="@(_ApphostsForShimRuntimeIdentifiersResolvePackageAssets)" />
</ItemGroup>
</Target>
<!--
============================================================
ResolvePackageDependenciesDesignTime
Aggregate the dependencies produced by ResolvePackageDependencies to a form
that's consumable by an IDE to display package dependencies.
============================================================
-->
<UsingTask TaskName="Microsoft.NET.Build.Tasks.PreprocessPackageDependenciesDesignTime" AssemblyFile="$(MicrosoftNETBuildTasksAssembly)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<Target Name="ResolvePackageDependenciesDesignTime" Returns="@(_PackageDependenciesDesignTime)" DependsOnTargets="RunResolvePackageDependencies;ResolveAssemblyReferencesDesignTime" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PreprocessPackageDependenciesDesignTime PackageDefinitions="@(PackageDefinitions)" PackageDependencies="@(PackageDependencies)" DefaultImplicitPackages="$(DefaultImplicitPackages)" TargetFramework="$(TargetFramework)">
<Output TaskParameter="PackageDependenciesDesignTime" ItemName="_PackageDependenciesDesignTime" />
</PreprocessPackageDependenciesDesignTime>
</Target>
<!--
============================================================
CollectSDKReferencesDesignTime
Aggregates the sdk specified as project items and implicit
packages references.
============================================================
-->
<UsingTask TaskName="Microsoft.NET.Build.Tasks.CollectSDKReferencesDesignTime" AssemblyFile="$(MicrosoftNETBuildTasksAssembly)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<Target Name="CollectSDKReferencesDesignTime" Returns="@(_SDKReference)" DependsOnTargets="CollectPackageReferences" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<CollectSDKReferencesDesignTime SdkReferences="@(SdkReference)" PackageReferences="@(PackageReference)" DefaultImplicitPackages="$(DefaultImplicitPackages)">
<Output TaskParameter="SDKReferencesDesignTime" ItemName="_SDKReference" />
</CollectSDKReferencesDesignTime>
</Target>
<!--
============================================================
CollectResolvedSDKReferencesDesignTime
Aggregates the sdk specified as project items and implicit
packages produced by ResolvePackageDependencies.
============================================================
-->
<Target Name="CollectResolvedSDKReferencesDesignTime" Returns="@(_ResolvedSDKReference)" DependsOnTargets="ResolveSDKReferencesDesignTime;CollectPackageReferences" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<CollectSDKReferencesDesignTime SdkReferences="@(ResolvedSdkReference)" PackageReferences="@(PackageReference)" DefaultImplicitPackages="$(DefaultImplicitPackages)">
<Output TaskParameter="SDKReferencesDesignTime" ItemName="_ResolvedSDKReference" />
</CollectSDKReferencesDesignTime>
</Target>
<!--
============================================================
RunProduceContentAssets
Process content assets by handling preprocessing tokens where necessary, and
produce copy local items, content items grouped by "build action" and file writes
============================================================
-->
<UsingTask TaskName="Microsoft.NET.Build.Tasks.ProduceContentAssets" AssemblyFile="$(MicrosoftNETBuildTasksAssembly)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<Target Name="RunProduceContentAssets" DependsOnTargets="ResolvePackageAssets" Condition="'@(_ContentFilesToPreprocess)' != ''" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ProduceContentAssets ContentFileDependencies="@(_ContentFilesToPreprocess)" ContentPreprocessorValues="@(PreprocessorValue)" ContentPreprocessorOutputDirectory="$(ContentPreprocessorOutputDirectory)" ProduceOnlyPreprocessorFiles="true" ProjectLanguage="$(Language)">
<Output TaskParameter="CopyLocalItems" ItemName="_ContentCopyLocalItems" />
<Output TaskParameter="ProcessedContentItems" ItemName="_ProcessedContentItems" />
<Output TaskParameter="FileWrites" ItemName="FileWrites" />
</ProduceContentAssets>
<!-- The items in _ProcessedContentItems need to go into the appropriately-named item group,
but the names depend upon the items themselves. Split it apart. -->
<CreateItem Include="@(_ProcessedContentItems)" Condition="'@(_ProcessedContentItems)' != ''">
<Output TaskParameter="Include" ItemName="%(_ProcessedContentItems.ProcessedItemType)" />
</CreateItem>
</Target>
<!--
============================================================
Reference Targets: For populating References based on lock file
- ResolveLockFileReferences
============================================================
-->
<Target Name="ResolveLockFileReferences" DependsOnTargets="ResolvePackageAssets" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Condition="'$(MarkPackageReferencesAsExternallyResolved)' == 'true'">
<!--
Update Reference items with NuGetPackageId metadata to set ExternallyResolved appropriately.
NetStandard.Library adds its assets in targets this way and not in the standard way that
would get ExternallyResolved set in ResolvePackageAssets.
-->
<Reference Condition="'%(Reference.NuGetPackageId)' != ''">
<ExternallyResolved>true</ExternallyResolved>
</Reference>
<!-- Add framework references from NuGet packages here, so that if there is also a matching reference from a NuGet package,
it will be treated the same as a reference from the project file. If there is already an explicit Reference from the
project, use that, in order to preserve metadata (such as aliases). -->
<Reference Include="@(ResolvedFrameworkAssemblies)" Exclude="@(Reference)" />
</ItemGroup>
<!-- If there are any references from a NuGet package that match a simple reference which
would resolve to a framework assembly, then update the NuGet references to use the
simple name as the ItemSpec. This will prevent the VS project system from marking
a reference with a warning. See https://github.com/dotnet/sdk/issues/1499 -->
<JoinItems Left="@(ResolvedCompileFileDefinitions)" LeftKey="FileName" LeftMetadata="*" Right="@(Reference)" RightKey="" RightMetadata="*">
<Output TaskParameter="JoinResult" ItemName="_JoinedResolvedCompileFileDefinitions" />
</JoinItems>
<ItemGroup>
<Reference Remove="@(_JoinedResolvedCompileFileDefinitions)" />
<Reference Include="@(_JoinedResolvedCompileFileDefinitions)" />
</ItemGroup>
<ItemGroup>
<ResolvedCompileFileDefinitionsToAdd Include="@(ResolvedCompileFileDefinitions)" />
<ResolvedCompileFileDefinitionsToAdd Remove="%(_JoinedResolvedCompileFileDefinitions.HintPath)" />
<!-- Add the references we computed -->
<Reference Include="@(ResolvedCompileFileDefinitionsToAdd)" />
</ItemGroup>
</Target>
<!--
============================================================
ProjectReference Targets: Include transitive project references before
ResolveProjectReferences is called
- IncludeTransitiveProjectReferences
============================================================
-->
<Target Name="IncludeTransitiveProjectReferences" DependsOnTargets="ResolvePackageAssets" Condition="'$(DisableTransitiveProjectReferences)' != 'true'" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<ProjectReference Include="@(_TransitiveProjectReferences)" />
</ItemGroup>
</Target>
<!--
============================================================
Analyzer Targets: For populating Analyzers based on lock file
- ResolveLockFileAnalyzers
============================================================
-->
<Target Name="ResolveLockFileAnalyzers" DependsOnTargets="ResolvePackageAssets" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Analyzer Include="@(ResolvedAnalyzers)" />
</ItemGroup>
</Target>
<!--
============================================================
ResolveLockFileCopyLocalFiles
Resolves the files from the assets file to copy for build and publish.
============================================================
-->
<Target Name="ResolveLockFileCopyLocalFiles" DependsOnTargets="ResolvePackageAssets;RunProduceContentAssets" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<_ResolvedCopyLocalBuildAssets Include="@(RuntimeCopyLocalItems)" Condition="'%(RuntimeCopyLocalItems.CopyLocal)' == 'true'" />
<_ResolvedCopyLocalBuildAssets Include="@(ResourceCopyLocalItems)" Condition="'%(ResourceCopyLocalItems.CopyLocal)' == 'true'" />
<!-- Always exclude the apphost executable from copy local assets; we will copy the generated apphost instead. -->
<_ResolvedCopyLocalBuildAssets Include="@(NativeCopyLocalItems)" Exclude="@(_NativeRestoredAppHostNETCore)" Condition="'%(NativeCopyLocalItems.CopyLocal)' == 'true'" />
<_ResolvedCopyLocalBuildAssets Include="@(RuntimeTargetsCopyLocalItems)" Condition="'%(RuntimeTargetsCopyLocalItems.CopyLocal)' == 'true'" />
<ReferenceCopyLocalPaths Include="@(_ContentCopyLocalItems)" />
<ReferenceCopyLocalPaths Include="@(_ResolvedCopyLocalBuildAssets)" Condition="'$(CopyLocalLockFileAssemblies)' == 'true'" />
</ItemGroup>
</Target>
<!-- Override EnsureNETCoreAppRuntime target which is included in Microsoft.NETCore.App NuGet package for
.NET Core 2.x. It no longer works with the .NET 5.0.100 SDK, as the ParentTarget metadata has changed format
but the targets in the NuGet package still expect the old format.
So here we just override that target. We have logic in the SDK that covers this scenario and generates
NETSDK1056. -->
<Target Name="EnsureNETCoreAppRuntime" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<!--
============================================================================================================================================
</Import>
C:\Program Files\dotnet\sdk\6.0.100-preview.5.21302.13\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.targets
============================================================================================================================================
-->
<!--<Import Project="$(MSBuildThisFileDirectory)Microsoft.PackageDependencyResolutionStubs.targets" Condition="Exists('$(MSBuildThisFileDirectory)Microsoft.PackageDependencyResolutionStubs.targets') and ('$(Language)' == 'C++' and '$(_EnablePackageReferencesInVCProjects)' != 'true')" />-->
<!--</ImportGroup>-->
<!--
============================================================================================================================================
<Import Project="Microsoft.NET.Sdk.DefaultItems.targets">
C:\Program Files\dotnet\sdk\6.0.100-preview.5.21302.13\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.DefaultItems.targets
============================================================================================================================================
-->
<!--
***********************************************************************************************
Microsoft.NET.Sdk.DefaultItems.targets
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
created a backup copy. Incorrect changes to this file will make it
impossible to load or build your projects from the command-line or the IDE.
Copyright (c) .NET Foundation. All rights reserved.
***********************************************************************************************
-->
<!-- Don't get the default item globs by default when the flag is not set. -->
<PropertyGroup Condition="'$(UsingNETSdkDefaults)' == 'true'" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<EnableDefaultItems Condition=" '$(EnableDefaultItems)' == '' ">true</EnableDefaultItems>
<EnableDefaultCompileItems Condition=" '$(EnableDefaultCompileItems)' == '' ">true</EnableDefaultCompileItems>
<EnableDefaultEmbeddedResourceItems Condition=" '$(EnableDefaultEmbeddedResourceItems)' == '' ">true</EnableDefaultEmbeddedResourceItems>
<EnableDefaultNoneItems Condition=" '$(EnableDefaultNoneItems)' == '' ">true</EnableDefaultNoneItems>
</PropertyGroup>
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- Set DefaultItemExcludes property for items that should be excluded from the default Compile, etc items.
This is in the .targets because it needs to come after the final BaseOutputPath has been evaluated. -->
<!-- bin folder, by default -->
<DefaultItemExcludes>$(DefaultItemExcludes);$(BaseOutputPath)/**</DefaultItemExcludes>
<!-- obj folder, by default -->
<DefaultItemExcludes>$(DefaultItemExcludes);$(BaseIntermediateOutputPath)/**</DefaultItemExcludes>
<!-- Various files that should generally always be ignored -->
<DefaultItemExcludes>$(DefaultItemExcludes);**/*.user</DefaultItemExcludes>
<DefaultItemExcludes>$(DefaultItemExcludes);**/*.*proj</DefaultItemExcludes>
<DefaultItemExcludes>$(DefaultItemExcludes);**/*.sln</DefaultItemExcludes>
<DefaultItemExcludes>$(DefaultItemExcludes);**/*.vssscc</DefaultItemExcludes>
<!-- WARNING: This pattern is there to ignore folders such as .git and .vs, but it will also match items included with a
relative path outside the project folder (for example "..\Shared\Shared.cs"). So be sure only to apply it to items
that are in the project folder. -->
<DefaultExcludesInProjectFolder>$(DefaultItemExcludesInProjectFolder);**/.*/**</DefaultExcludesInProjectFolder>
</PropertyGroup>
<!-- Set the default versions of the NETStandard.Library or Microsoft.NETCore.App packages to reference.
The implicit package references themselves are defined in Microsoft.NET.Sdk.props, so that they can be overridden
in the project file. -->
<PropertyGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETStandard' And '$(_TargetFrameworkVersionWithoutV)' &lt; '2.1'" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- If targeting .NET Standard 1.x, use version 1.6.1 of the package. This is so that when projects are packed, the dependency on the package produced won't change when
updating to the 2.0 or higher SDK. When targeting .NET Standard 2.0 or higher, the NETStandard.Library reference won't show up as a dependency of the package
produced, so we will roll forward to the latest version. -->
<NETStandardImplicitPackageVersion Condition="'$(NETStandardImplicitPackageVersion)' =='' And '$(_TargetFrameworkVersionWithoutV)' &lt; '2.0'">1.6.1</NETStandardImplicitPackageVersion>
<!-- Default to use the latest stable 2.0.x release. -->
<NETStandardImplicitPackageVersion Condition="'$(NETStandardImplicitPackageVersion)' ==''">2.0.3</NETStandardImplicitPackageVersion>
</PropertyGroup>
<!--
============================================================================================================================================
<Import Project="Microsoft.NET.Sdk.DefaultItems.Shared.targets">
C:\Program Files\dotnet\sdk\6.0.100-preview.5.21302.13\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.DefaultItems.Shared.targets
============================================================================================================================================
-->
<!--
***********************************************************************************************
Microsoft.NET.Sdk.DefaultItems.Shared.targets: Properties and targets pulled from Microsoft.NET.Sdk.DefaultItems.targets
to be shared by the WAP project system
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
created a backup copy. Incorrect changes to this file will make it
impossible to load or build your projects from the command-line or the IDE.
Copyright (c) .NET Foundation. All rights reserved.
***********************************************************************************************
-->
<!--
Determine the version (including patch) of .NET Core to target.
When targeting .NET Core, the TargetFramework is used to specify the major and minor version of the runtime to use. By default,
the patch version is inferred. The general logic is that self-contained apps will target the latest patch that the SDK
knows about, while framework-dependent apps will target the ".0" patch (and roll forward to the latest patch installed at
runtime).
When targeting .NET Core 1.0 and 1.1, framework-dependent apps use 1.0.5 and 1.1.2, respectively. This is done for compatibility
with previous releases that bumped the self-contained and framework-dependent versions together.
The TargetLatestRuntimePatch property can be set to true or false to explicitly opt in or out of the logic to roll forward
to the latest patch, regardless of whether the app is self-contained or framework-dependent.
The RuntimeFrameworkVersion is where the actual version of the .NET Core runtime to target can be set. If set, it will be
used in the implicit PackageReference to Microsoft.NETCore.App.
The framework version that is written to the runtimeconfig.json file is based on the actual resolved package version
of Microsoft.NETCore.App. This is to allow floating the verion number (ie the RuntimeFrameworkVersion could be set to
"2.0-*".
-->
<PropertyGroup Condition="'$(TargetLatestRuntimePatch)' == ''" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<TargetLatestRuntimePatch Condition="'$(SelfContained)' == 'true' ">true</TargetLatestRuntimePatch>
<TargetLatestRuntimePatch Condition="'$(SelfContained)' != 'true' ">false</TargetLatestRuntimePatch>
<_TargetLatestRuntimePatchIsDefault>true</_TargetLatestRuntimePatchIsDefault>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp' And '$(DisableImplicitFrameworkReferences)' != 'true'" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<VerifyMatchingImplicitPackageVersion Condition="'$(VerifyMatchingImplicitPackageVersion)' == ''">true</VerifyMatchingImplicitPackageVersion>
</PropertyGroup>
<ItemGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- Set implicit metadata on ASP.NET package references -->
<PackageReference Update="Microsoft.AspNetCore.App">
<PrivateAssets Condition="'%(PackageReference.Version)' == ''">all</PrivateAssets>
<Publish Condition="'%(PackageReference.Version)' == ''">true</Publish>
</PackageReference>
<PackageReference Update="Microsoft.AspNetCore.All">
<PrivateAssets Condition="'%(PackageReference.Version)' == ''">all</PrivateAssets>
<Publish Condition="'%(PackageReference.Version)' == ''">true</Publish>
</PackageReference>
<!-- Allow RuntimeFrameworkVersion to be used to explicitly specify the version of Microsoft.NETCore.App -->
<PackageReference Update="Microsoft.NETCore.App" Version="$(RuntimeFrameworkVersion)" Condition="'$(RuntimeFrameworkVersion)' != ''" AllowExplicitVersion="true" />
<!-- If implicit PackageReferences are disabled, then don't warn about explicit versions at all -->
<PackageReference Update="@(PackageReference)" Condition="'$(DisableImplicitFrameworkReferences)' == 'true'" AllowExplicitVersion="true" />
</ItemGroup>
<UsingTask TaskName="ApplyImplicitVersions" AssemblyFile="$(MicrosoftNETBuildTasksAssembly)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<UsingTask TaskName="CheckIfPackageReferenceShouldBeFrameworkReference" AssemblyFile="$(MicrosoftNETBuildTasksAssembly)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<Target Name="UpdateAspNetToFrameworkReference" Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp' And '$(_TargetFrameworkVersionWithoutV)' &gt;= '3.0'" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<CheckIfPackageReferenceShouldBeFrameworkReference PackageReferences="@(PackageReference)" FrameworkReferences="@(FrameworkReference)" PackageReferenceToReplace="Microsoft.AspNetCore.All" FrameworkReferenceToUse="Microsoft.AspNetCore.App">
<Output TaskParameter="ShouldRemovePackageReference" PropertyName="_ShouldRemoveAspNetCoreAll" />
</CheckIfPackageReferenceShouldBeFrameworkReference>
<!-- NETSDK1079: The Microsoft.AspNetCore.All package is not supported when targeting .NET Core 3.0 or higher.
A FrameworkReference to Microsoft.AspNetCore.App should be used instead, and will be implicitly included by Microsoft.NET.Sdk.Web. -->
<NETSdkError Condition="'$(_ShouldRemoveAspNetCoreAll)' == 'true'" ResourceName="AspNetCoreAllNotSupported" />
<CheckIfPackageReferenceShouldBeFrameworkReference PackageReferences="@(PackageReference)" FrameworkReferences="@(FrameworkReference)" PackageReferenceToReplace="Microsoft.AspNetCore.App" FrameworkReferenceToUse="Microsoft.AspNetCore.App">
<Output TaskParameter="ShouldRemovePackageReference" PropertyName="_ShouldRemoveAspNetCoreApp" />
<Output TaskParameter="ShouldAddFrameworkReference" PropertyName="_ShouldAddAspNetCoreAppFrameworkReference" />
</CheckIfPackageReferenceShouldBeFrameworkReference>
<ItemGroup>
<PackageReference Remove="Microsoft.AspNetCore.App" Condition="'$(_ShouldRemoveAspNetCoreApp)' == 'true'" />
<FrameworkReference Include="Microsoft.AspNetCore.App" Condition="'$(_ShouldAddAspNetCoreAppFrameworkReference)' == 'true'" />
</ItemGroup>
<!-- NETSDK1080: A PackageReference to Microsoft.AspNetCore.App is not necessary when targeting .NET Core 3.0 or higher.
If Microsoft.NET.Sdk.Web is used, the shared framework will be referenced automatically. Otherwise, the PackageReference
should be replaced with a FrameworkReference. -->
<NETSdkWarning Condition="'$(_ShouldRemoveAspNetCoreApp)' == 'true'" ResourceName="AspNetCoreUsesFrameworkReference" />
</Target>
<Target Name="ApplyImplicitVersions" BeforeTargets="_CheckForInvalidConfigurationAndPlatform;CollectPackageReferences;ProcessFrameworkReferences" DependsOnTargets="UpdateAspNetToFrameworkReference;CheckForImplicitPackageReferenceOverrides" Condition="'@(PackageReference)' != ''" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ApplyImplicitVersions TargetFrameworkVersion="$(_TargetFrameworkVersionWithoutV)" TargetLatestRuntimePatch="$(TargetLatestRuntimePatch)" PackageReferences="@(PackageReference)" ImplicitPackageReferenceVersions="@(ImplicitPackageReferenceVersion)">
<Output TaskParameter="PackageReferencesToUpdate" ItemName="PackageReferenceToUpdate" />
<Output TaskParameter="SdkBuildWarnings" ItemName="SdkBuildWarning" />
</ApplyImplicitVersions>
<ItemGroup>
<PackageReference Remove="@(PackageReferenceToUpdate)" />
<PackageReference Include="@(PackageReferenceToUpdate)" />
</ItemGroup>
<ItemGroup>
<!-- Support using a patch version in the TargetFramework, ie netcoreapp1.1.1
Note that this isn't officially supported, but it worked in the past so
this should prevent breaking it. -->
<PackageReference Condition="'%(PackageReference.Identity)' == 'Microsoft.NETCore.App'">
<Version Condition="'%(PackageReference.Version)' == ''">$(_TargetFrameworkVersionWithoutV)</Version>
</PackageReference>
</ItemGroup>
</Target>
<UsingTask TaskName="CheckForImplicitPackageReferenceOverrides" AssemblyFile="$(MicrosoftNETBuildTasksAssembly)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<!-- Remove package references with metadata IsImplicitlyDefined = true, if there are other PackageReference items with the same identity -->
<Target Name="CheckForImplicitPackageReferenceOverrides" BeforeTargets="_CheckForInvalidConfigurationAndPlatform;CollectPackageReferences" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ImplicitPackageReferenceInformationLink>https://aka.ms/sdkimplicitrefs</ImplicitPackageReferenceInformationLink>
</PropertyGroup>
<CheckForImplicitPackageReferenceOverrides PackageReferenceItems="@(PackageReference)" MoreInformationLink="$(ImplicitPackageReferenceInformationLink)">
<Output TaskParameter="ItemsToRemove" ItemName="_PackageReferenceToRemove" />
<Output TaskParameter="ItemsToAdd" ItemName="_PackageReferenceToAdd" />
</CheckForImplicitPackageReferenceOverrides>
<ItemGroup>
<!-- Remove and add the PackageReference items according to the output from the task -->
<PackageReference Remove="@(_PackageReferenceToRemove)" />
<PackageReference Include="@(_PackageReferenceToAdd)" />
<!-- Clear items for other targets to use -->
<_PackageReferenceToAdd Remove="@(_PackageReferenceToAdd)" />
</ItemGroup>
<!-- If any implicit package references were overridden, then don't check that RuntimeFrameworkVersion matches the package version -->
<PropertyGroup Condition="'@(_PackageReferenceToRemove)' != ''">
<VerifyMatchingImplicitPackageVersion>false</VerifyMatchingImplicitPackageVersion>
</PropertyGroup>
</Target>
<UsingTask TaskName="CheckForDuplicateItems" AssemblyFile="$(MicrosoftNETBuildTasksAssembly)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<Target Name="CheckForDuplicateItems" BeforeTargets="_CheckForInvalidConfigurationAndPlatform;CoreCompile" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<DefaultItemsMoreInformationLink>https://aka.ms/sdkimplicititems</DefaultItemsMoreInformationLink>
</PropertyGroup>
<!-- NOTE for design-time builds we continue on errors and remove the duplicate items.
This is because otherwise there won't be any references to pass to the compiler, leading to design-time
compilation errors for every API that is used in the project. Amidst all the compile errors, it would
be easy to miss the duplicate items error which is the real source of the problem. -->
<CheckForDuplicateItems Items="@(Compile)" ItemName="Compile" DefaultItemsEnabled="$(EnableDefaultItems)" DefaultItemsOfThisTypeEnabled="$(EnableDefaultCompileItems)" PropertyNameToDisableDefaultItems="EnableDefaultCompileItems" MoreInformationLink="$(DefaultItemsMoreInformationLink)" ContinueOnError="$(ContinueOnError)">
<Output TaskParameter="DeduplicatedItems" ItemName="DeduplicatedCompileItems" />
</CheckForDuplicateItems>
<CheckForDuplicateItems Items="@(EmbeddedResource)" ItemName="EmbeddedResource" DefaultItemsEnabled="$(EnableDefaultItems)" DefaultItemsOfThisTypeEnabled="$(EnableDefaultEmbeddedResourceItems)" PropertyNameToDisableDefaultItems="EnableDefaultEmbeddedResourceItems" MoreInformationLink="$(DefaultItemsMoreInformationLink)" ContinueOnError="$(ContinueOnError)">
<Output TaskParameter="DeduplicatedItems" ItemName="DeduplicatedEmbeddedResourceItems" />
</CheckForDuplicateItems>
<!-- Default content items are enabled by the Web SDK, not the .NET SDK, but we check it here for simplicity -->
<CheckForDuplicateItems Items="@(Content)" ItemName="Content" DefaultItemsEnabled="$(EnableDefaultItems)" DefaultItemsOfThisTypeEnabled="$(EnableDefaultContentItems)" PropertyNameToDisableDefaultItems="EnableDefaultContentItems" MoreInformationLink="$(DefaultItemsMoreInformationLink)" ContinueOnError="$(ContinueOnError)">
<Output TaskParameter="DeduplicatedItems" ItemName="DeduplicatedContentItems" />
</CheckForDuplicateItems>
<ItemGroup Condition="'$(DesignTimeBuild)' == 'true' And '@(DeduplicatedCompileItems)' != ''">
<Compile Remove="@(Compile)" />
<Compile Include="@(DeduplicatedCompileItems)" />
</ItemGroup>
<ItemGroup Condition="'$(DesignTimeBuild)' == 'true' And '@(DeduplicatedEmbeddedResourceItems)' != ''">
<EmbeddedResource Remove="@(EmbeddedResource)" />
<EmbeddedResource Include="@(DeduplicatedEmbeddedResourceItems)" />
</ItemGroup>
<ItemGroup Condition="'$(DesignTimeBuild)' == 'true' And '@(DeduplicatedContentItems)' != ''">
<Content Remove="@(Content)" />
<Content Include="@(DeduplicatedContentItems)" />
</ItemGroup>
</Target>
<Target Name="_CheckForTransitiveWindowsDesktopDependencies" AfterTargets="ResolvePackageAssets" Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp' and $([MSBuild]::VersionGreaterThanOrEquals($(_TargetFrameworkVersionWithoutV), '5.0')) and '$(TargetPlatformIdentifier)' != 'Windows' and '@(TransitiveFrameworkReference)' != ''" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<_WindowsDesktopTransitiveFrameworkReference Include="@(TransitiveFrameworkReference)" Condition="'%(Identity)' == 'Microsoft.WindowsDesktop.App' Or&#xD;&#xA; '%(Identity)' == 'Microsoft.WindowsDesktop.App.WPF' Or&#xD;&#xA; '%(Identity)' == 'Microsoft.WindowsDesktop.App.WindowsForms'" />
</ItemGroup>
<NetSdkError Condition="'@(_WindowsDesktopTransitiveFrameworkReference)' != ''" ResourceName="WindowsDesktopTargetPlatformMustBeWindows" />
</Target>
<!--
============================================================================================================================================
</Import>
C:\Program Files\dotnet\sdk\6.0.100-preview.5.21302.13\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.DefaultItems.targets
============================================================================================================================================
-->
<!-- This target runs before build but not before restore, to avoid duplicating these warnings
if building with an implicit restore. -->
<Target Name="WarnForExplicitVersions" BeforeTargets="_CheckForInvalidConfigurationAndPlatform" DependsOnTargets="ApplyImplicitVersions" Condition="'@(SdkBuildWarning)' != ''" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<NetSdkWarning FormattedText="%(SdkBuildWarning.Identity)" />
</Target>
<!--
Automatically add Link metadata to items of specific types if they are outside of the project folder and don't already have the Link metadata set.
This will cause them to be shown in the Solution Explorer. If an item has LinkBase metadata, the automatic Link will start with that value, and
the items will appear in the Solution Explorer under the folder specified by LinkBase.
-->
<ItemGroup Condition="'$(SetLinkMetadataAutomatically)' != 'false'" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Compile Update="@(Compile)">
<!-- First, add a trailing slash to the LinkBase metadata if necessary. This allows us to use the same value
for the Link metadata whether or not LinkBase metadata is set: %(LinkBase)%(RecursiveDir)%(Filename)%(Extension)
Note that RecursiveDir already includes the trailing slash.
-->
<LinkBase Condition="'%(LinkBase)' != ''">$([MSBuild]::EnsureTrailingSlash(%(LinkBase)))</LinkBase>
<!-- Set the Link metadata if it's not already set, if the item wasn't defined in a shared project, and the item is outside of the project directory.
Check whether the item was defined in a shared project by checking whether the extension of the defining project was .projitems.
Check whether an item is inside the project directory by seeing if the FullPath starts with EnsureTrailingSlash(MSBuildProjectDirectory)
The FullPath and the MSBuildProjectDirectory will both already be normalized full paths.
The call to [MSBuild]::ValueOrDefault() is there in order to allow calling StartsWith on the FullPath value, since it's
not possible to call a string method on a metadata item directly. The intrinsic ValueOrDefault() will be more
performant than calling String.Copy(), which has been used for this in other contexts, but actually makes a copy
of the string data.
-->
<Link Condition="'%(Link)' == '' And '%(DefiningProjectExtension)' != '.projitems' And !$([MSBuild]::ValueOrDefault('%(FullPath)', '').StartsWith($([MSBuild]::EnsureTrailingSlash($(MSBuildProjectDirectory)))))">%(LinkBase)%(RecursiveDir)%(Filename)%(Extension)</Link>
</Compile>
<AdditionalFiles Update="@(AdditionalFiles)">
<LinkBase Condition="'%(LinkBase)' != ''">$([MSBuild]::EnsureTrailingSlash(%(LinkBase)))</LinkBase>
<Link Condition="'%(Link)' == '' And '%(DefiningProjectExtension)' != '.projitems' And !$([MSBuild]::ValueOrDefault('%(FullPath)', '').StartsWith($([MSBuild]::EnsureTrailingSlash($(MSBuildProjectDirectory)))))">%(LinkBase)%(RecursiveDir)%(Filename)%(Extension)</Link>
</AdditionalFiles>
<None Update="@(None)">
<LinkBase Condition="'%(LinkBase)' != ''">$([MSBuild]::EnsureTrailingSlash(%(LinkBase)))</LinkBase>
<Link Condition="'%(Link)' == '' And '%(DefiningProjectExtension)' != '.projitems' And !$([MSBuild]::ValueOrDefault('%(FullPath)', '').StartsWith($([MSBuild]::EnsureTrailingSlash($(MSBuildProjectDirectory)))))">%(LinkBase)%(RecursiveDir)%(Filename)%(Extension)</Link>
</None>
<Content Update="@(Content)">
<LinkBase Condition="'%(LinkBase)' != ''">$([MSBuild]::EnsureTrailingSlash(%(LinkBase)))</LinkBase>
<Link Condition="'%(Link)' == '' And '%(DefiningProjectExtension)' != '.projitems' And !$([MSBuild]::ValueOrDefault('%(FullPath)', '').StartsWith($([MSBuild]::EnsureTrailingSlash($(MSBuildProjectDirectory)))))">%(LinkBase)%(RecursiveDir)%(Filename)%(Extension)</Link>
</Content>
<EmbeddedResource Update="@(EmbeddedResource)">
<LinkBase Condition="'%(LinkBase)' != ''">$([MSBuild]::EnsureTrailingSlash(%(LinkBase)))</LinkBase>
<Link Condition="'%(Link)' == '' And '%(DefiningProjectExtension)' != '.projitems' And !$([MSBuild]::ValueOrDefault('%(FullPath)', '').StartsWith($([MSBuild]::EnsureTrailingSlash($(MSBuildProjectDirectory)))))">%(LinkBase)%(RecursiveDir)%(Filename)%(Extension)</Link>
</EmbeddedResource>
<Page Update="@(Page)">
<LinkBase Condition="'%(LinkBase)' != ''">$([MSBuild]::EnsureTrailingSlash(%(LinkBase)))</LinkBase>
<Link Condition="'%(Link)' == '' And '%(DefiningProjectExtension)' != '.projitems' And !$([MSBuild]::ValueOrDefault('%(FullPath)', '').StartsWith($([MSBuild]::EnsureTrailingSlash($(MSBuildProjectDirectory)))))">%(LinkBase)%(RecursiveDir)%(Filename)%(Extension)</Link>
</Page>
<Resource Update="@(Resource)">
<LinkBase Condition="'%(LinkBase)' != ''">$([MSBuild]::EnsureTrailingSlash(%(LinkBase)))</LinkBase>
<Link Condition="'%(Link)' == '' And '%(DefiningProjectExtension)' != '.projitems' And !$([MSBuild]::ValueOrDefault('%(FullPath)', '').StartsWith($([MSBuild]::EnsureTrailingSlash($(MSBuildProjectDirectory)))))">%(LinkBase)%(RecursiveDir)%(Filename)%(Extension)</Link>
</Resource>
</ItemGroup>
<Target Name="_CheckForFailedSDKResolution" BeforeTargets="_CheckForInvalidConfigurationAndPlatform" Condition="'$(SdkResolverHonoredGlobalJson)' == 'false'" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<NetSdkError ResourceName="GlobalJsonSDKResolutionFailed" FormatArguments="$(SdkResolverGlobalJsonPath)" />
</Target>
<Target Name="_CheckForInvalidWindowsDesktopTargetingConfiguration" BeforeTargets="_CheckForInvalidConfigurationAndPlatform" Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp' and $([MSBuild]::VersionGreaterThanOrEquals($(_TargetFrameworkVersionWithoutV), '5.0')) and ('$(UseWindowsForms)' == 'true' or '$(UseWPF)' == 'true')" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<NETSdkError Condition="'$(TargetPlatformIdentifier)' != 'Windows'" ResourceName="WindowsDesktopTargetPlatformMustBeWindows" />
</Target>
<Target Name="_CheckForUnnecessaryWindowsDesktopSDK" BeforeTargets="_CheckForInvalidConfigurationAndPlatform" Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp' and $([MSBuild]::VersionGreaterThanOrEquals($(_TargetFrameworkVersionWithoutV), '5.0')) and '$(_MicrosoftWindowsDesktopSdkImported)' == 'true' and '$(TargetFrameworks)' == ''" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<NETSdkWarning ResourceName="UnnecessaryWindowsDesktopSDK" />
</Target>
<!--
============================================================================================================================================
</Import>
C:\Program Files\dotnet\sdk\6.0.100-preview.5.21302.13\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.targets
============================================================================================================================================
-->
<!--
============================================================================================================================================
<Import Project="Microsoft.NET.Sdk.FrameworkReferenceResolution.targets">
C:\Program Files\dotnet\sdk\6.0.100-preview.5.21302.13\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.FrameworkReferenceResolution.targets
============================================================================================================================================
-->
<!--
***********************************************************************************************
Microsoft.NET.Sdk.FrameworkReferenceResolution.targets
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
created a backup copy. Incorrect changes to this file will make it
impossible to load or build your projects from the command-line or the IDE.
Copyright (c) .NET Foundation. All rights reserved.
***********************************************************************************************
-->
<PropertyGroup>
<ResolveAssemblyReferencesDependsOn>
$(ResolveAssemblyReferencesDependsOn);
ResolveTargetingPackAssets;
</ResolveAssemblyReferencesDependsOn>
</PropertyGroup>
<UsingTask TaskName="CheckForDuplicateFrameworkReferences" AssemblyFile="$(MicrosoftNETBuildTasksAssembly)" />
<UsingTask TaskName="ProcessFrameworkReferences" AssemblyFile="$(MicrosoftNETBuildTasksAssembly)" />
<UsingTask TaskName="ResolveAppHosts" AssemblyFile="$(MicrosoftNETBuildTasksAssembly)" />
<!--
============================================================
ProcessFrameworkReferences
Matches FrameworkReference items with KnownFrameworkReference items to determine the corresponding
targeting pack and if necessary the runtime pack. If the packs aren't available in the NetCoreTargetingPackRoot
folder, then generate PackageDownload items in order to download the packs during restore.
Also resolves app host packs in a similar fashion, and checks for duplicate FrameworkReference items.
============================================================
-->
<Target Name="ProcessFrameworkReferences" BeforeTargets="_CheckForInvalidConfigurationAndPlatform;CollectPackageReferences;CollectPackageDownloads" Condition="'@(FrameworkReference)' != ''">
<CheckForDuplicateFrameworkReferences FrameworkReferences="@(FrameworkReference)" MoreInformationLink="https://aka.ms/sdkimplicitrefs">
<Output TaskParameter="ItemsToRemove" ItemName="_FrameworkReferenceToRemove" />
<Output TaskParameter="ItemsToAdd" ItemName="_FrameworkReferenceToAdd" />
</CheckForDuplicateFrameworkReferences>
<ItemGroup>
<FrameworkReference Remove="@(_FrameworkReferenceToRemove)" />
<FrameworkReference Include="@(_FrameworkReferenceToAdd)" />
</ItemGroup>
<PropertyGroup>
<EnableTargetingPackDownload Condition="'$(EnableTargetingPackDownload)' == ''">true</EnableTargetingPackDownload>
<EnableRuntimePackDownload Condition="'$(EnableRuntimePackDownload)' == ''">true</EnableRuntimePackDownload>
</PropertyGroup>
<PropertyGroup>
<_NuGetRestoreSupported Condition="('$(Language)' == 'C++' and '$(_EnablePackageReferencesInVCProjects)' != 'true')">false</_NuGetRestoreSupported>
</PropertyGroup>
<ItemGroup>
<_PackAsToolShimRuntimeIdentifiers Condition="@(_PackAsToolShimRuntimeIdentifiers) ==''" Include="$(PackAsToolShimRuntimeIdentifiers)" />
</ItemGroup>
<ProcessFrameworkReferences FrameworkReferences="@(FrameworkReference)" KnownFrameworkReferences="@(KnownFrameworkReference)" KnownRuntimePacks="@(KnownRuntimePack)" TargetFrameworkIdentifier="$(TargetFrameworkIdentifier)" TargetFrameworkVersion="$(_TargetFrameworkVersionWithoutV)" TargetPlatformIdentifier="$(TargetPlatformIdentifier)" TargetPlatformVersion="$(TargetPlatformVersion)" TargetingPackRoot="$(NetCoreTargetingPackRoot)" RuntimeGraphPath="$(BundledRuntimeIdentifierGraphFile)" SelfContained="$(SelfContained)" ReadyToRunEnabled="$(PublishReadyToRun)" ReadyToRunUseCrossgen2="$(PublishReadyToRunUseCrossgen2)" RuntimeIdentifier="$(RuntimeIdentifier)" RuntimeIdentifiers="$(RuntimeIdentifiers)" RuntimeFrameworkVersion="$(RuntimeFrameworkVersion)" TargetLatestRuntimePatch="$(TargetLatestRuntimePatch)" TargetLatestRuntimePatchIsDefault="$(_TargetLatestRuntimePatchIsDefault)" EnableTargetingPackDownload="$(EnableTargetingPackDownload)" EnableRuntimePackDownload="$(EnableRuntimePackDownload)" KnownCrossgen2Packs="@(KnownCrossgen2Pack)" NETCoreSdkRuntimeIdentifier="$(NETCoreSdkRuntimeIdentifier)">
<Output TaskParameter="PackagesToDownload" ItemName="_PackageToDownload" />
<Output TaskParameter="RuntimeFrameworks" ItemName="RuntimeFramework" />
<Output TaskParameter="TargetingPacks" ItemName="TargetingPack" />
<Output TaskParameter="RuntimePacks" ItemName="RuntimePack" />
<Output TaskParameter="Crossgen2Packs" ItemName="Crossgen2Pack" />
<Output TaskParameter="UnavailableRuntimePacks" ItemName="UnavailableRuntimePack" />
</ProcessFrameworkReferences>
<PropertyGroup Condition="'$(AppHostRuntimeIdentifier)' == '' And&#xD;&#xA; ('$(UseAppHost)' == 'true' Or '$(EnableComHosting)' == 'true' Or '$(UseIJWHost)' == 'true')">
<AppHostRuntimeIdentifier>$(RuntimeIdentifier)</AppHostRuntimeIdentifier>
<AppHostRuntimeIdentifier Condition="'$(AppHostRuntimeIdentifier)' == ''">$(DefaultAppHostRuntimeIdentifier)</AppHostRuntimeIdentifier>
</PropertyGroup>
<ResolveAppHosts TargetFrameworkIdentifier="$(TargetFrameworkIdentifier)" TargetFrameworkVersion="$(_TargetFrameworkVersionWithoutV)" TargetingPackRoot="$(NetCoreTargetingPackRoot)" AppHostRuntimeIdentifier="$(AppHostRuntimeIdentifier)" OtherRuntimeIdentifiers="$(RuntimeIdentifiers)" RuntimeFrameworkVersion="$(RuntimeFrameworkVersion)" PackAsToolShimRuntimeIdentifiers="@(_PackAsToolShimRuntimeIdentifiers)" DotNetAppHostExecutableNameWithoutExtension="$(_DotNetAppHostExecutableNameWithoutExtension)" DotNetSingleFileHostExecutableNameWithoutExtension="$(_DotNetSingleFileHostExecutableNameWithoutExtension)" DotNetComHostLibraryNameWithoutExtension="$(_DotNetComHostLibraryNameWithoutExtension)" DotNetIjwHostLibraryNameWithoutExtension="$(_DotNetIjwHostLibraryNameWithoutExtension)" RuntimeGraphPath="$(BundledRuntimeIdentifierGraphFile)" KnownAppHostPacks="@(KnownAppHostPack)" NuGetRestoreSupported="$(_NuGetRestoreSupported)" NetCoreTargetingPackRoot="$(NetCoreTargetingPackRoot)">
<Output TaskParameter="PackagesToDownload" ItemName="_PackageToDownload" />
<Output TaskParameter="AppHost" ItemName="AppHostPack" />
<Output TaskParameter="SingleFileHost" ItemName="SingleFileHostPack" />
<Output TaskParameter="ComHost" ItemName="ComHostPack" />
<Output TaskParameter="IjwHost" ItemName="IjwHostPack" />
<Output TaskParameter="PackAsToolShimAppHostPacks" ItemName="PackAsToolShimAppHostPack" />
</ResolveAppHosts>
<PropertyGroup Condition="'$(UsePackageDownload)' == ''">
<UsePackageDownload Condition="'$(MSBuildRuntimeType)' == 'Core'">true</UsePackageDownload>
<UsePackageDownload Condition="'$(PackageDownloadSupported)' == 'true'">true</UsePackageDownload>
<UsePackageDownload Condition="'$(UsePackageDownload)' == ''">false</UsePackageDownload>
</PropertyGroup>
<ItemGroup Condition="'$(UsePackageDownload)' == 'true'">
<PackageDownload Include="@(_PackageToDownload)">
<Version>[%(_PackageToDownload.Version)]</Version>
</PackageDownload>
</ItemGroup>
<ItemGroup Condition="'$(UsePackageDownload)' != 'true'">
<PackageReference Include="@(_PackageToDownload)" IsImplicitlyDefined="true" PrivateAssets="all" ExcludeAssets="all" />
</ItemGroup>
</Target>
<!--
============================================================
AddTransitiveFrameworkReferences
Adds FrameworkReference items for shared frameworks which weren't directly referenced,
but were referenced transitively via a project or package reference. NuGet writes these
to the assets file, and the ResolvePackageAssets target adds them to the TransitiveFrameworkReference
item. Here, we add them to FrameworkReference if they aren't already referenced.
We add a transitive attribute to the FrameworkReferences so NuGet can filter them out from CollectFrameworkReferences.
============================================================
-->
<Target Name="AddTransitiveFrameworkReferences" AfterTargets="ResolvePackageAssets" Condition="'@(TransitiveFrameworkReference)' != ''">
<ItemGroup>
<FrameworkReference Include="@(TransitiveFrameworkReference)" Exclude="@(FrameworkReference)" IsTransitiveFrameworkReference="true" />
</ItemGroup>
</Target>
<UsingTask TaskName="ResolveFrameworkReferences" AssemblyFile="$(MicrosoftNETBuildTasksAssembly)" />
<!--
============================================================
ResolveFrameworkReferences
Resolves paths to various FrameworkReference-related items (targeting packs, runtime packs,
app host packs). Some of these may already have had the path set if they were in the
NetCoreTargetingPackRoot folder. Others which were downloaded as NuGet packages will
need to have the path set here.
============================================================
-->
<Target Name="ResolveFrameworkReferences" DependsOnTargets="ProcessFrameworkReferences;ResolvePackageAssets" Condition="'@(FrameworkReference)' != ''" Returns="@(ResolvedFrameworkReference)">
<GetPackageDirectory Items="@(TargetingPack)" PackageFolders="@(AssetsFilePackageFolder)">
<Output TaskParameter="Output" ItemName="ResolvedTargetingPack" />
</GetPackageDirectory>
<ItemGroup>
<ResolvedTargetingPack Condition="'%(ResolvedTargetingPack.Path)' == '' and '%(ResolvedTargetingPack.PackageDirectory)' != ''">
<Path>%(ResolvedTargetingPack.PackageDirectory)</Path>
</ResolvedTargetingPack>
</ItemGroup>
<GetPackageDirectory Items="@(AppHostPack)" PackageFolders="@(AssetsFilePackageFolder)">
<Output TaskParameter="Output" ItemName="ResolvedAppHostPack" />
</GetPackageDirectory>
<GetPackageDirectory Items="@(SingleFileHostPack)" PackageFolders="@(AssetsFilePackageFolder)">
<Output TaskParameter="Output" ItemName="ResolvedSingleFileHostPack" />
</GetPackageDirectory>
<GetPackageDirectory Items="@(Crossgen2Pack)" PackageFolders="@(AssetsFilePackageFolder)">
<Output TaskParameter="Output" ItemName="ResolvedCrossgen2Pack" />
</GetPackageDirectory>
<GetPackageDirectory Items="@(PackAsToolShimAppHostPack)" PackageFolders="@(AssetsFilePackageFolder)">
<Output TaskParameter="Output" ItemName="_ApphostsForShimRuntimeIdentifiersGetPackageDirectory" />
</GetPackageDirectory>
<GetPackageDirectory Items="@(ComHostPack)" PackageFolders="@(AssetsFilePackageFolder)">
<Output TaskParameter="Output" ItemName="ResolvedComHostPack" />
</GetPackageDirectory>
<GetPackageDirectory Items="@(IjwHostPack)" PackageFolders="@(AssetsFilePackageFolder)">
<Output TaskParameter="Output" ItemName="ResolvedIjwHostPack" />
</GetPackageDirectory>
<ItemGroup>
<_ApphostsForShimRuntimeIdentifiers Include="%(_ApphostsForShimRuntimeIdentifiersGetPackageDirectory.PackageDirectory)\%(_ApphostsForShimRuntimeIdentifiersGetPackageDirectory.PathInPackage)">
<RuntimeIdentifier>%(_ApphostsForShimRuntimeIdentifiersGetPackageDirectory.RuntimeIdentifier)</RuntimeIdentifier>
</_ApphostsForShimRuntimeIdentifiers>
</ItemGroup>
<ItemGroup>
<ResolvedAppHostPack Condition="'%(ResolvedAppHostPack.Path)' == '' and '%(ResolvedAppHostPack.PackageDirectory)' != ''">
<Path>%(ResolvedAppHostPack.PackageDirectory)\%(ResolvedAppHostPack.PathInPackage)</Path>
</ResolvedAppHostPack>
</ItemGroup>
<PropertyGroup Condition="'@(ResolvedAppHostPack)' != '' And '$(AppHostSourcePath)' == ''">
<AppHostSourcePath>@(ResolvedAppHostPack->'%(Path)')</AppHostSourcePath>
</PropertyGroup>
<ItemGroup>
<ResolvedSingleFileHostPack Condition="'%(ResolvedSingleFileHostPack.Path)' == '' and '%(ResolvedSingleFileHostPack.PackageDirectory)' != ''">
<Path>%(ResolvedSingleFileHostPack.PackageDirectory)\%(ResolvedSingleFileHostPack.PathInPackage)</Path>
</ResolvedSingleFileHostPack>
</ItemGroup>
<PropertyGroup Condition="'@(ResolvedSingleFileHostPack)' != '' And '$(SingleFileHostSourcePath)' == ''">
<SingleFileHostSourcePath>@(ResolvedSingleFileHostPack->'%(Path)')</SingleFileHostSourcePath>
</PropertyGroup>
<ItemGroup>
<ResolvedComHostPack Condition="'%(ResolvedComHostPack.Path)' == '' and '%(ResolvedComHostPack.PackageDirectory)' != ''">
<Path>%(ResolvedComHostPack.PackageDirectory)\%(ResolvedComHostPack.PathInPackage)</Path>
</ResolvedComHostPack>
</ItemGroup>
<PropertyGroup Condition="'@(ResolvedComHostPack)' != '' And '$(ComHostSourcePath)' == ''">
<ComHostSourcePath>@(ResolvedComHostPack->'%(Path)')</ComHostSourcePath>
</PropertyGroup>
<ItemGroup>
<ResolvedIjwHostPack Condition="'%(ResolvedIjwHostPack.Path)' == '' and '%(ResolvedIjwHostPack.PackageDirectory)' != ''">
<Path>%(ResolvedIjwHostPack.PackageDirectory)\%(ResolvedIjwHostPack.PathInPackage)</Path>
</ResolvedIjwHostPack>
</ItemGroup>
<PropertyGroup Condition="'@(ResolvedIjwHostPack)' != '' And '$(IjwHostSourcePath)' == ''">
<IjwHostSourcePath>@(ResolvedIjwHostPack->'%(Path)')</IjwHostSourcePath>
</PropertyGroup>
<GetPackageDirectory Items="@(RuntimePack)" PackageFolders="@(AssetsFilePackageFolder)">
<Output TaskParameter="Output" ItemName="ResolvedRuntimePack" />
</GetPackageDirectory>
<ResolveFrameworkReferences FrameworkReferences="@(FrameworkReference)" ResolvedTargetingPacks="@(ResolvedTargetingPack)" ResolvedRuntimePacks="@(ResolvedRuntimePack)">
<Output TaskParameter="ResolvedFrameworkReferences" ItemName="ResolvedFrameworkReference" />
</ResolveFrameworkReferences>
</Target>
<UsingTask TaskName="GetPackageDirectory" AssemblyFile="$(MicrosoftNETBuildTasksAssembly)" />
<UsingTask TaskName="ResolveTargetingPackAssets" AssemblyFile="$(MicrosoftNETBuildTasksAssembly)" />
<!--
============================================================
ResolveTargetingPackAssets
Resolve assets (primarily references) from targeting packs.
============================================================
-->
<Target Name="ResolveTargetingPackAssets" DependsOnTargets="ResolveFrameworkReferences" Condition="'@(FrameworkReference)' != ''">
<!-- For design-time builds, don't generate an error if a targeting pack isn't available (ie because it hasn't been restored yet) -->
<PropertyGroup Condition="'$(GenerateErrorForMissingTargetingPacks)' == ''">
<GenerateErrorForMissingTargetingPacks>true</GenerateErrorForMissingTargetingPacks>
<GenerateErrorForMissingTargetingPacks Condition="'$(DesignTimeBuild)' == 'true'">false</GenerateErrorForMissingTargetingPacks>
</PropertyGroup>
<ResolveTargetingPackAssets FrameworkReferences="@(FrameworkReference)" ResolvedTargetingPacks="@(ResolvedTargetingPack)" RuntimeFrameworks="@(RuntimeFramework)" GenerateErrorForMissingTargetingPacks="$(GenerateErrorForMissingTargetingPacks)" NuGetRestoreSupported="$(_NuGetRestoreSupported)" NetCoreTargetingPackRoot="$(NetCoreTargetingPackRoot)">
<Output TaskParameter="ReferencesToAdd" ItemName="Reference" />
<Output TaskParameter="PlatformManifests" ItemName="PlatformManifestsFromTargetingPacks" />
<Output TaskParameter="PackageConflictPreferredPackages" PropertyName="PackageConflictPreferredPackages" />
<Output TaskParameter="PackageConflictOverrides" ItemName="PackageConflictOverrides" />
<Output TaskParameter="UsedRuntimeFrameworks" ItemName="_UsedRuntimeFramework" />
</ResolveTargetingPackAssets>
<ItemGroup Condition="'$(RuntimeIdentifier)' == '' or '$(SelfContained)' != 'true'">
<PackageConflictPlatformManifests Include="@(PlatformManifestsFromTargetingPacks)" />
</ItemGroup>
<ItemGroup>
<RuntimeFramework Remove="@(RuntimeFramework)" />
<RuntimeFramework Include="@(_UsedRuntimeFramework)" />
</ItemGroup>
</Target>
<UsingTask TaskName="ResolveRuntimePackAssets" AssemblyFile="$(MicrosoftNETBuildTasksAssembly)" />
<!--
============================================================
IncludeTargetingPackReference
Add package reference for required targeting pack if necessary
============================================================
-->
<Target Name="IncludeTargetingPackReference" BeforeTargets="_CheckForInvalidConfigurationAndPlatform;CollectPackageReferences;CheckForImplicitPackageReferenceOverrides" Condition="'$(TargetFrameworkMoniker)' != '' and '$(TargetFrameworkIdentifier)' == '.NETFramework' and '$(AutomaticallyUseReferenceAssemblyPackages)' == 'true'">
<GetReferenceAssemblyPaths TargetFrameworkMoniker="$(TargetFrameworkMoniker)" RootPath="$(TargetFrameworkRootPath)" TargetFrameworkFallbackSearchPaths="$(TargetFrameworkFallbackSearchPaths)" BypassFrameworkInstallChecks="true" SuppressNotFoundError="true">
<Output TaskParameter="FullFrameworkReferenceAssemblyPaths" PropertyName="_FullFrameworkReferenceAssemblyPaths" />
</GetReferenceAssemblyPaths>
<ItemGroup>
<_ExistingReferenceAssembliesPackageReference Include="@(PackageReference)" Condition="'%(PackageReference.Identity)' == 'Microsoft.NETFramework.ReferenceAssemblies'" />
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="$(MicrosoftNETFrameworkReferenceAssembliesLatestPackageVersion)" IsImplicitlyDefined="true" PrivateAssets="All" Condition="'$(_FullFrameworkReferenceAssemblyPaths)' == '' and '@(_ExistingReferenceAssembliesPackageReference)' == ''" />
</ItemGroup>
</Target>
<!--
============================================================
ResolveRuntimePackAssets
Resolve assets from runtime packs.
============================================================
-->
<Target Name="ResolveRuntimePackAssets" DependsOnTargets="ResolveFrameworkReferences" Condition="'@(RuntimePack)' != ''">
<ResolveRuntimePackAssets FrameworkReferences="@(FrameworkReference)" ResolvedRuntimePacks="@(ResolvedRuntimePack)" UnavailableRuntimePacks="@(UnavailableRuntimePack)" SatelliteResourceLanguages="$(SatelliteResourceLanguages)" DesignTimeBuild="$(DesignTimeBuild)">
<Output TaskParameter="RuntimePackAssets" ItemName="RuntimePackAsset" />
</ResolveRuntimePackAssets>
<ItemGroup>
<ReferenceCopyLocalPaths Include="@(RuntimePackAsset)" Condition="'$(CopyLocalLockFileAssemblies)' == 'true' and ('$(SelfContained)' == 'true' or '%(RuntimePackAsset.RuntimePackAlwaysCopyLocal)' == 'true') and '%(RuntimePackAsset.AssetType)' != 'pgodata'" />
</ItemGroup>
</Target>
<!--
Adds metadata so the SDK will generate the UserSecretsIdAttribute.
This is associated with ASP.NET Core, but may be used in projects that don't use the Web SDK (especially test projects).
So it is in the base .NET SDK. (It used to be in the Microsoft.AspNetCore.App package, but now that that's a targeting
pack we don't support importing build logic from it directly).
If GeneratedUserSecretsAttributeFile is set, that means Microsoft.Extensions.Configuration.UserSecrets 2.1
or earlier was referenced as a package. This didn't use the AssemblyAttribute item group, so we cannot
avoid duplicate AssemblyAttribute items without skipping this target altogether..
-->
<Target Name="_GetUserSecretsAssemblyAttribute" BeforeTargets="GetAssemblyAttributes" Condition=" '$(UserSecretsId)' != '' AND '$(GenerateUserSecretsAttribute)' != 'false' AND '$(GeneratedUserSecretsAttributeFile)' == '' ">
<!--
If the Microsoft.Extensions.Configuration.UserSecrets package 2.2 or higher is referenced directly,
it will also add an AssemblyAttribute item. Since this attribute only allows one per assembly, do not
duplicate the item.
Also don't add the attribute if there is neither a Microsoft.AspNetCore.App FrameworkReference nor a
Microsoft.Extensions.Configuration.UserSecrets PackageReference, in order to preserve 2.x SDK behavior
where projects would successfully build if they define the UserSecretsId property but don't reference
the corresponding API.
-->
<ItemGroup Condition=" @(AssemblyAttribute-&gt;WithMetadataValue('Identity', 'Microsoft.Extensions.Configuration.UserSecrets.UserSecretsIdAttribute')-&gt;Count()) == 0 And&#xD;&#xA; (@(FrameworkReference-&gt;WithMetadataValue('Identity', 'Microsoft.AspNetCore.App')-&gt;Count()) != 0 Or&#xD;&#xA; @(PackageReference-&gt;WithMetadataValue('Identity', 'Microsoft.Extensions.Configuration.UserSecrets')-&gt;Count()) != 0)">
<AssemblyAttribute Include="Microsoft.Extensions.Configuration.UserSecrets.UserSecretsIdAttribute">
<_Parameter1>$(UserSecretsId.Trim())</_Parameter1>
</AssemblyAttribute>
</ItemGroup>
</Target>
<!--
============================================================================================================================================
</Import>
C:\Program Files\dotnet\sdk\6.0.100-preview.5.21302.13\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.targets
============================================================================================================================================
-->
<UsingTask TaskName="GenerateDepsFile" AssemblyFile="$(MicrosoftNETBuildTasksAssembly)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<UsingTask TaskName="GenerateRuntimeConfigurationFiles" AssemblyFile="$(MicrosoftNETBuildTasksAssembly)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<UsingTask TaskName="GetAssemblyVersion" AssemblyFile="$(MicrosoftNETBuildTasksAssembly)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<UsingTask TaskName="GenerateSatelliteAssemblies" AssemblyFile="$(MicrosoftNETBuildTasksAssembly)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<DisableStandardFrameworkResolution Condition="'$(DisableStandardFrameworkResolution)' == ''">$(_IsNETCoreOrNETStandard)</DisableStandardFrameworkResolution>
</PropertyGroup>
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<EnableDynamicLoading Condition="'$(EnableDynamicLoading)' == '' and '$(EnableComHosting)' == 'true'">true</EnableDynamicLoading>
<GenerateRuntimeConfigurationFiles Condition=" '$(GenerateRuntimeConfigurationFiles)' == '' and '$(TargetFrameworkIdentifier)' == '.NETCoreApp' and ('$(HasRuntimeOutput)' == 'true' or '$(EnableComHosting)' == 'true' or '$(EnableDynamicLoading)' == 'true') ">true</GenerateRuntimeConfigurationFiles>
<UserRuntimeConfig Condition=" '$(UserRuntimeConfig)' == '' ">$(MSBuildProjectDirectory)/runtimeconfig.template.json</UserRuntimeConfig>
<GenerateSatelliteAssembliesForCore Condition=" '$(GenerateSatelliteAssembliesForCore)' == '' and '$(MSBuildRuntimeType)' == 'Core' ">true</GenerateSatelliteAssembliesForCore>
<ComputeNETCoreBuildOutputFiles Condition=" '$(ComputeNETCoreBuildOutputFiles)' == '' and '$(TargetFrameworkIdentifier)' == '.NETCoreApp'">true</ComputeNETCoreBuildOutputFiles>
<_GenerateRuntimeConfigurationPropertyInputsCache Condition="'$(_GenerateRuntimeConfigurationPropertyInputsCache)' == ''">$(IntermediateOutputPath)$(MSBuildProjectName).genruntimeconfig.cache</_GenerateRuntimeConfigurationPropertyInputsCache>
<_GenerateRuntimeConfigurationPropertyInputsCache>$([MSBuild]::NormalizePath($(MSBuildProjectDirectory), $(_GenerateRuntimeConfigurationPropertyInputsCache)))</_GenerateRuntimeConfigurationPropertyInputsCache>
</PropertyGroup>
<ItemGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<GenerateRuntimeConfigurationFilesInputs Include="$(ProjectAssetsFile)" />
<GenerateRuntimeConfigurationFilesInputs Include="$(ProjectAssetsCacheFile)" />
<GenerateRuntimeConfigurationFilesInputs Include="$(UserRuntimeConfig)" Condition=" Exists($(UserRuntimeConfig)) " />
</ItemGroup>
<PropertyGroup Condition="'$(GenerateRuntimeConfigDevFile)' == ''" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<GenerateRuntimeConfigDevFile>true</GenerateRuntimeConfigDevFile>
<!-- Post-net6.0, stop generating *.runtimeconfig.dev.json files to reduce probing paths. -->
<!-- https://github.com/dotnet/sdk/issues/16818 -->
<GenerateRuntimeConfigDevFile Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp' and $([MSBuild]::VersionGreaterThanOrEquals($(TargetFrameworkVersion), '6.0'))">false</GenerateRuntimeConfigDevFile>
</PropertyGroup>
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ProjectDepsFileName Condition="'$(ProjectDepsFileName)' == ''">$(AssemblyName).deps.json</ProjectDepsFileName>
<ProjectDepsFilePath Condition="'$(ProjectDepsFilePath)' == ''">$(TargetDir)$(ProjectDepsFileName)</ProjectDepsFilePath>
<ProjectRuntimeConfigFileName Condition="'$(ProjectRuntimeConfigFileName)' == ''">$(AssemblyName).runtimeconfig.json</ProjectRuntimeConfigFileName>
<ProjectRuntimeConfigFilePath Condition="'$(ProjectRuntimeConfigFilePath)' == ''">$(TargetDir)$(ProjectRuntimeConfigFileName)</ProjectRuntimeConfigFilePath>
<ProjectRuntimeConfigDevFilePath Condition="'$(ProjectRuntimeConfigDevFilePath)' == '' and $(GenerateRuntimeConfigDevFile) == 'true'">$(TargetDir)$(AssemblyName).runtimeconfig.dev.json</ProjectRuntimeConfigDevFilePath>
<IncludeMainProjectInDepsFile Condition=" '$(IncludeMainProjectInDepsFile)' == '' ">true</IncludeMainProjectInDepsFile>
</PropertyGroup>
<!--
============================================================================================================================================
<Import Project="Microsoft.NET.Sdk.Shared.targets">
C:\Program Files\dotnet\sdk\6.0.100-preview.5.21302.13\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.Shared.targets
============================================================================================================================================
-->
<!--
***********************************************************************************************
Microsoft.NET.Sdk.Shared.targets: The properties and targets shared by the WAP project system.
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
created a backup copy. Incorrect changes to this file will make it
impossible to load or build your projects from the command-line or the IDE.
Copyright (c) .NET Foundation. All rights reserved.
***********************************************************************************************
-->
<PropertyGroup Condition="'$(UsingNETSdkDefaults)' != 'true'" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- Skip import of Microsoft.NuGet.props and Microsoft.NuGet.targets -->
<SkipImportNuGetProps>true</SkipImportNuGetProps>
<SkipImportNuGetBuildTargets>true</SkipImportNuGetBuildTargets>
</PropertyGroup>
<!-- Workaround: https://github.com/Microsoft/msbuild/issues/1293 -->
<PropertyGroup Condition="'$(MSBuildRuntimeType)' == 'Core' Or '$(TargetFrameworkIdentifier)' != '.NETFramework'" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<GenerateResourceMSBuildArchitecture Condition=" '$(GenerateResourceMSBuildArchitecture)' == '' ">CurrentArchitecture</GenerateResourceMSBuildArchitecture>
<GenerateResourceMSBuildRuntime Condition=" '$(GenerateResourceMSBuildRuntime)' == '' ">CurrentRuntime</GenerateResourceMSBuildRuntime>
</PropertyGroup>
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<_NativeLibraryPrefix Condition="'$(_NativeLibraryPrefix)' == '' and !$(RuntimeIdentifier.StartsWith('win'))">lib</_NativeLibraryPrefix>
<_NativeLibraryExtension Condition="'$(_NativeLibraryExtension)' == '' and $(RuntimeIdentifier.StartsWith('win'))">.dll</_NativeLibraryExtension>
<_NativeLibraryExtension Condition="'$(_NativeLibraryExtension)' == '' and $(RuntimeIdentifier.StartsWith('osx'))">.dylib</_NativeLibraryExtension>
<_NativeLibraryExtension Condition="'$(_NativeLibraryExtension)' == ''">.so</_NativeLibraryExtension>
<_NativeExecutableExtension Condition="'$(_NativeExecutableExtension)' == '' and ($(RuntimeIdentifier.StartsWith('win')) or $(DefaultAppHostRuntimeIdentifier.StartsWith('win')))">.exe</_NativeExecutableExtension>
<_ComHostLibraryExtension Condition="'$(_ComHostLibraryExtension)' == '' and ($(RuntimeIdentifier.StartsWith('win')) or $(DefaultAppHostRuntimeIdentifier.StartsWith('win')))">.dll</_ComHostLibraryExtension>
<_IjwHostLibraryExtension Condition="'$(_IjwHostLibraryExtension)' == '' and ($(RuntimeIdentifier.StartsWith('win')) or $(DefaultAppHostRuntimeIdentifier.StartsWith('win')))">.dll</_IjwHostLibraryExtension>
<_DotNetHostExecutableName>dotnet$(_NativeExecutableExtension)</_DotNetHostExecutableName>
<_DotNetAppHostExecutableNameWithoutExtension>apphost</_DotNetAppHostExecutableNameWithoutExtension>
<_DotNetAppHostExecutableName>$(_DotNetAppHostExecutableNameWithoutExtension)$(_NativeExecutableExtension)</_DotNetAppHostExecutableName>
<_DotNetSingleFileHostExecutableNameWithoutExtension>singlefilehost</_DotNetSingleFileHostExecutableNameWithoutExtension>
<_DotNetComHostLibraryNameWithoutExtension>comhost</_DotNetComHostLibraryNameWithoutExtension>
<_DotNetComHostLibraryName>$(_DotNetComHostLibraryNameWithoutExtension)$(_ComHostLibraryExtension)</_DotNetComHostLibraryName>
<_DotNetIjwHostLibraryNameWithoutExtension>Ijwhost</_DotNetIjwHostLibraryNameWithoutExtension>
<_DotNetIjwHostLibraryName>$(_DotNetIjwHostLibraryNameWithoutExtension)$(_IjwHostLibraryExtension)</_DotNetIjwHostLibraryName>
<_DotNetHostPolicyLibraryName>$(_NativeLibraryPrefix)hostpolicy$(_NativeLibraryExtension)</_DotNetHostPolicyLibraryName>
<_DotNetHostFxrLibraryName>$(_NativeLibraryPrefix)hostfxr$(_NativeLibraryExtension)</_DotNetHostFxrLibraryName>
</PropertyGroup>
<Target Name="_ComputePackageReferencePublish" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<!-- PrivateAssets="All" means exclude from publish, unless Publish metadata is specified separately -->
<PackageReference Publish="false" Condition="('%(PackageReference.PrivateAssets)' == 'All') And ('%(PackageReference.Publish)' == '')" />
<_ExcludeFromPublishPackageReference Include="@(PackageReference)" Condition="('%(PackageReference.Publish)' == 'false')" />
</ItemGroup>
</Target>
<!--
============================================================
_DefaultMicrosoftNETPlatformLibrary
.NET Core apps can have shared frameworks that are pre-installed on the target machine, thus the app is "portable"
to any machine that already has the shared framework installed. For .NET Core 1.x and 2.x, a "platform" library
is declared. The platform library and its dependencies will be excluded from the publish output.
For .NET Core 3 and up, targeting packs and runtime packs are used for shared framework assets instead of PackageReference
============================================================
-->
<Target Name="_DefaultMicrosoftNETPlatformLibrary" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition="'$(MicrosoftNETPlatformLibrary)' == ''">
<MicrosoftNETPlatformLibrary Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp' And '$(_TargetFrameworkVersionWithoutV)' &lt; '3.0'">Microsoft.NETCore.App</MicrosoftNETPlatformLibrary>
</PropertyGroup>
</Target>
<!--
============================================================================================================================================
</Import>
C:\Program Files\dotnet\sdk\6.0.100-preview.5.21302.13\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.targets
============================================================================================================================================
-->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<_DefaultUserProfileRuntimeStorePath>$(HOME)</_DefaultUserProfileRuntimeStorePath>
<_DefaultUserProfileRuntimeStorePath Condition="$([MSBuild]::IsOSPlatform(`Windows`))">$(USERPROFILE)</_DefaultUserProfileRuntimeStorePath>
<_DefaultUserProfileRuntimeStorePath>$([System.IO.Path]::Combine($(_DefaultUserProfileRuntimeStorePath), '.dotnet', 'store'))</_DefaultUserProfileRuntimeStorePath>
<UserProfileRuntimeStorePath Condition="'$(UserProfileRuntimeStorePath)' == ''">$(_DefaultUserProfileRuntimeStorePath)</UserProfileRuntimeStorePath>
</PropertyGroup>
<!-- Opt into .NET Core resource-serialization strategy by default when targeting frameworks
that support it by default.
-->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<GenerateResourceUsePreserializedResources Condition="'$(GenerateResourceUsePreserializedResources)' == '' and&#xD;&#xA; ('$(TargetFrameworkIdentifier)' == '.NETCoreApp' and '$(_TargetFrameworkVersionWithoutV)' &gt;= '3.0')">true</GenerateResourceUsePreserializedResources>
</PropertyGroup>
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<EmbeddedResourceUseDependentUponConvention Condition="'$(EmbeddedResourceUseDependentUponConvention)' == '' and&#xD;&#xA; (('$(TargetFrameworkIdentifier)' == '.NETCoreApp' and '$(_TargetFrameworkVersionWithoutV)' &gt;= '3.0') or&#xD;&#xA; ('$(TargetFrameworkIdentifier)' == '.NETStandard' and '$(_TargetFrameworkVersionWithoutV)' &gt;= '2.1'))">true</EmbeddedResourceUseDependentUponConvention>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp' and $([MSBuild]::VersionGreaterThanOrEquals($(TargetFrameworkVersion), '2.1'))" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<AvailablePlatforms>$(AvailablePlatforms),ARM32</AvailablePlatforms>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp' and $([MSBuild]::VersionGreaterThanOrEquals($(TargetFrameworkVersion), '3.1'))" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<AvailablePlatforms>$(AvailablePlatforms),ARM64</AvailablePlatforms>
</PropertyGroup>
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<CoreBuildDependsOn>
_CheckForBuildWithNoBuild;
$(CoreBuildDependsOn);
GenerateBuildDependencyFile;
GenerateBuildRuntimeConfigurationFiles
</CoreBuildDependsOn>
</PropertyGroup>
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<CoreCleanDependsOn>
_SdkBeforeClean;
$(CoreCleanDependsOn)
</CoreCleanDependsOn>
</PropertyGroup>
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<RebuildDependsOn>
_SdkBeforeRebuild;
$(RebuildDependsOn)
</RebuildDependsOn>
</PropertyGroup>
<!-- TODO: this target should not check GeneratePackageOnBuild.
remove when https://github.com/NuGet/Home/issues/7801 is fixed.
-->
<Target Name="_CheckForBuildWithNoBuild" Condition="'$(NoBuild)' == 'true' and '$(GeneratePackageOnBuild)' != 'true'" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<NETSdkError ResourceName="NoBuildRequested" />
</Target>
<!--
============================================================
GenerateBuildDependencyFile
Generates the $(project).deps.json file during Build
============================================================
-->
<Target Name="GenerateBuildDependencyFile" DependsOnTargets="_DefaultMicrosoftNETPlatformLibrary;&#xD;&#xA; _HandlePackageFileConflicts;&#xD;&#xA; _ComputeReferenceAssemblies;&#xD;&#xA; _ComputeUserRuntimeAssemblies;&#xD;&#xA; ResolveRuntimePackAssets;&#xD;&#xA; _ComputePackageReferencePublish" BeforeTargets="CopyFilesToOutputDirectory" Condition="'$(GenerateDependencyFile)' == 'true'" Inputs="$(ProjectAssetsFile);$(ProjectAssetsCacheFile);$(MSBuildAllProjects)" Outputs="$(ProjectDepsFilePath)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- Set a dummy Version if it hasn't been set by DefaultAssemblyInfo.targets -->
<PropertyGroup Condition="'$(UsingNETSdkDefaults)' != 'true'">
<Version Condition="'$(Version)' == ''">1.0.0</Version>
</PropertyGroup>
<ItemGroup>
<ResolvedCompileFileDefinitions Remove="@(_ConflictPackageFiles)" Condition="'%(_ConflictPackageFiles.ConflictItemType)' == 'Reference'" />
<NativeCopyLocalItems Remove="@(_ConflictPackageFiles)" Condition="'%(_ConflictPackageFiles.ConflictItemType)' != 'Reference'" />
<ResourceCopyLocalItems Remove="@(_ConflictPackageFiles)" Condition="'%(_ConflictPackageFiles.ConflictItemType)' != 'Reference'" />
<RuntimeCopyLocalItems Remove="@(_ConflictPackageFiles)" Condition="'%(_ConflictPackageFiles.ConflictItemType)' != 'Reference'" />
<RuntimeTargetsCopyLocalItems Remove="@(_ConflictPackageFiles)" Condition="'%(_ConflictPackageFiles.ConflictItemType)' != 'Reference'" />
<RuntimePackAsset Remove="@(_ConflictPackageFiles)" Condition="'%(_ConflictPackageFiles.ConflictItemType)' != 'Reference'" />
</ItemGroup>
<GenerateDepsFile ProjectPath="$(MSBuildProjectFullPath)" AssetsFilePath="$(ProjectAssetsFile)" DepsFilePath="$(ProjectDepsFilePath)" TargetFramework="$(TargetFramework)" AssemblyName="$(AssemblyName)" AssemblyExtension="$(TargetExt)" AssemblyVersion="$(Version)" AssemblySatelliteAssemblies="@(IntermediateSatelliteAssembliesWithTargetPath)" ReferencePaths="@(ReferencePath)" ReferenceDependencyPaths="@(ReferenceDependencyPaths)" ReferenceSatellitePaths="@(ReferenceSatellitePaths)" ReferenceAssemblies="@(_ReferenceAssemblies)" RuntimePackAssets="@(RuntimePackAsset)" IncludeMainProject="$(IncludeMainProjectInDepsFile)" RuntimeIdentifier="$(RuntimeIdentifier)" PlatformLibraryName="$(MicrosoftNETPlatformLibrary)" RuntimeFrameworks="@(RuntimeFramework)" CompilerOptions="@(DependencyFileCompilerOptions)" CompileReferences="@(ResolvedCompileFileDefinitions)" ResolvedNuGetFiles="@(NativeCopyLocalItems);@(ResourceCopyLocalItems);@(RuntimeCopyLocalItems)" UserRuntimeAssemblies="@(UserRuntimeAssembly)" ResolvedRuntimeTargetsFiles="@(RuntimeTargetsCopyLocalItems)" IsSelfContained="$(SelfContained)" IncludeRuntimeFileVersions="$(IncludeFileVersionsInDependencyFile)" RuntimeGraphPath="$(BundledRuntimeIdentifierGraphFile)" />
<ItemGroup>
<!-- Do this in an ItemGroup instead of as an output parameter of the GenerateDepsFile task so that it still gets added to the item set
during incremental builds when the task is skipped -->
<FileWrites Include="$(ProjectDepsFilePath)" Condition="Exists('$(ProjectDepsFilePath)')" />
</ItemGroup>
</Target>
<!-- To achieve incremental build with property change. When any property changes, WriteOnlyWhenDifferent will be triggered to write cache file.
And the cache file's timestamp will be later, and it then triggers the incremental build.-->
<Target Name="_GenerateRuntimeConfigurationFilesInputCache" DependsOnTargets="_DefaultMicrosoftNETPlatformLibrary" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<GenerateRuntimeConfigurationFilesInputs Include="$(_GenerateRuntimeConfigurationPropertyInputsCache)" />
<_GenerateRuntimeConfigurationPropertyInputsCacheToHash Include="@(AdditionalProbingPath->'%(Identity)')" />
<_GenerateRuntimeConfigurationPropertyInputsCacheToHash Include="$(EnableDynamicLoading)" />
<_GenerateRuntimeConfigurationPropertyInputsCacheToHash Include="$(RollForward)" />
<_GenerateRuntimeConfigurationPropertyInputsCacheToHash Include="@(RuntimeHostConfigurationOption->'%(Identity)%(Value)')" />
<_GenerateRuntimeConfigurationPropertyInputsCacheToHash Include="$(RuntimeIdentifier)" />
<_GenerateRuntimeConfigurationPropertyInputsCacheToHash Include="$(SelfContained)" />
<_GenerateRuntimeConfigurationPropertyInputsCacheToHash Include="$(TargetFramework)" />
<_GenerateRuntimeConfigurationPropertyInputsCacheToHash Include="$(UserRuntimeConfig)" />
<_GenerateRuntimeConfigurationPropertyInputsCacheToHash Include="$(_WriteIncludedFrameworks)" />
</ItemGroup>
<Hash ItemsToHash="@(_GenerateRuntimeConfigurationPropertyInputsCacheToHash)">
<Output TaskParameter="HashResult" PropertyName="_GenerateRuntimeConfigurationPropertyInputsCacheHash" />
</Hash>
<WriteLinesToFile Lines="$(_GenerateRuntimeConfigurationPropertyInputsCacheHash)" File="$(_GenerateRuntimeConfigurationPropertyInputsCache)" Overwrite="True" WriteOnlyWhenDifferent="True" />
<ItemGroup>
<FileWrites Include="$(_GenerateRuntimeConfigurationPropertyInputsCache)" />
</ItemGroup>
</Target>
<!--
============================================================
GenerateBuildRuntimeConfigurationFiles
Generates the $(project).runtimeconfig.json and $(project).runtimeconfig.dev.json files during Build
============================================================
-->
<Target Name="GenerateBuildRuntimeConfigurationFiles" DependsOnTargets="_GenerateRuntimeConfigurationFilesInputCache" BeforeTargets="CopyFilesToOutputDirectory" Condition=" '$(GenerateRuntimeConfigurationFiles)' == 'true'" Inputs="@(GenerateRuntimeConfigurationFilesInputs)" Outputs="$(ProjectRuntimeConfigFilePath);$(ProjectRuntimeConfigDevFilePath)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<_IsRollForwardSupported Condition="'$(_TargetFrameworkVersionWithoutV)' &gt;= '3.0'">true</_IsRollForwardSupported>
<RollForward Condition="'$(RollForward)' == '' and '$(EnableDynamicLoading)' == 'true' and '$(_IsRollForwardSupported)' == 'true'">LatestMinor</RollForward>
</PropertyGroup>
<!-- RollForward is only supported since .NET Core 3.0, but we should allow limited usage when the app is targeting even lower versions
This is to let 2.* apps specify that they are OK to run on 3.0 and above. So explicitly allow just Major and LatestMajor
other values should still keep failing as they won't have any effect when run on 2.*. -->
<NETSdkError Condition="'$(RollForward)' != '' and '$(RollForward)' != 'Major' and '$(RollForward)' != 'LatestMajor' and '$(_IsRollForwardSupported)' != 'true'" ResourceName="RollForwardRequiresVersion30" />
<PropertyGroup>
<_WriteIncludedFrameworks Condition="'$(SelfContained)' == 'true' and '$(_TargetFrameworkVersionWithoutV)' &gt;= '3.1'">true</_WriteIncludedFrameworks>
</PropertyGroup>
<GenerateRuntimeConfigurationFiles AssetsFilePath="$(ProjectAssetsFile)" TargetFramework="$(TargetFramework)" TargetFrameworkMoniker="$(TargetFrameworkMoniker)" RuntimeConfigPath="$(ProjectRuntimeConfigFilePath)" RuntimeConfigDevPath="$(ProjectRuntimeConfigDevFilePath)" RuntimeIdentifier="$(RuntimeIdentifier)" PlatformLibraryName="$(MicrosoftNETPlatformLibrary)" RuntimeFrameworks="@(RuntimeFramework)" RollForward="$(RollForward)" UserRuntimeConfig="$(UserRuntimeConfig)" HostConfigurationOptions="@(RuntimeHostConfigurationOption)" AdditionalProbingPaths="@(AdditionalProbingPath)" IsSelfContained="$(SelfContained)" WriteIncludedFrameworks="$(_WriteIncludedFrameworks)" GenerateRuntimeConfigDevFile="$(GenerateRuntimeConfigDevFile)" />
<ItemGroup>
<!-- Do this in an ItemGroup instead of as an output parameter of the GenerateDepsFile task so that it still gets added to the item set
during incremental builds when the task is skipped -->
<FileWrites Include="$(ProjectRuntimeConfigFilePath)" Condition="Exists('$(ProjectRuntimeConfigFilePath)')" />
<FileWrites Include="$(ProjectRuntimeConfigDevFilePath)" Condition="Exists('$(ProjectRuntimeConfigDevFilePath)')" />
</ItemGroup>
</Target>
<!-- Add runtimeconfig.json file to BuiltProjectOutputGroupOutput, so that it will get included in the NuGet package by the Pack target -->
<Target Name="AddRuntimeConfigFileToBuiltProjectOutputGroupOutput" Condition=" '$(GenerateRuntimeConfigurationFiles)' == 'true'" BeforeTargets="BuiltProjectOutputGroup" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<BuiltProjectOutputGroupOutput Include="$(ProjectRuntimeConfigFilePath)" TargetPath="$(ProjectRuntimeConfigFileName)" FinalOutputPath="$(ProjectRuntimeConfigFilePath)" />
</ItemGroup>
</Target>
<Target Name="AddDepsJsonAndRuntimeConfigToCopyItemsForReferencingProjects" BeforeTargets="GetCopyToOutputDirectoryItems;_GetCopyToOutputDirectoryItemsFromThisProject" Condition="'$(HasRuntimeOutput)' == 'true'" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Condition="'$(GenerateDependencyFile)' == 'true'">
<AllItemsFullPathWithTargetPath Include="$(ProjectDepsFilePath)" TargetPath="$([System.IO.Path]::GetFileName($(ProjectDepsFilePath)))" CopyToOutputDirectory="PreserveNewest" />
</ItemGroup>
<ItemGroup Condition=" '$(GenerateRuntimeConfigurationFiles)' == 'true'">
<AllItemsFullPathWithTargetPath Include="$(ProjectRuntimeConfigFilePath)" TargetPath="$([System.IO.Path]::GetFileName($(ProjectRuntimeConfigFilePath)))" CopyToOutputDirectory="PreserveNewest" />
<AllItemsFullPathWithTargetPath Include="$(ProjectRuntimeConfigDevFilePath)" TargetPath="$([System.IO.Path]::GetFileName($(ProjectRuntimeConfigDevFilePath)))" CopyToOutputDirectory="PreserveNewest" />
</ItemGroup>
</Target>
<Target Name="AddDepsJsonAndRuntimeConfigToPublishItemsForReferencingProjects" DependsOnTargets="_ComputeUseBuildDependencyFile" BeforeTargets="GetCopyToPublishDirectoryItems" Condition="'$(HasRuntimeOutput)' == 'true'" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Condition="'$(GenerateDependencyFile)' == 'true'">
<AllPublishItemsFullPathWithTargetPath Include="$(ProjectDepsFilePath)" TargetPath="$([System.IO.Path]::GetFileName($(ProjectDepsFilePath)))" CopyToPublishDirectory="PreserveNewest" Condition="'$(_UseBuildDependencyFile)' == 'true'" />
<AllPublishItemsFullPathWithTargetPath Include="$(PublishDepsFilePath)" TargetPath="$([System.IO.Path]::GetFileName($(PublishDepsFilePath)))" CopyToPublishDirectory="PreserveNewest" Condition="'$(PublishDepsFilePath)' != '' and '$(_UseBuildDependencyFile)' != 'true'" />
</ItemGroup>
<ItemGroup Condition=" '$(GenerateRuntimeConfigurationFiles)' == 'true'">
<AllPublishItemsFullPathWithTargetPath Include="$(ProjectRuntimeConfigFilePath)" TargetPath="$([System.IO.Path]::GetFileName($(ProjectRuntimeConfigFilePath)))" CopyToPublishDirectory="PreserveNewest" />
</ItemGroup>
</Target>
<Target Name="_SdkBeforeClean" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition="'$(_CleaningWithoutRebuilding)' == ''">
<_CleaningWithoutRebuilding>true</_CleaningWithoutRebuilding>
<EmitAssetsLogMessages>false</EmitAssetsLogMessages>
</PropertyGroup>
</Target>
<Target Name="_SdkBeforeRebuild" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<_CleaningWithoutRebuilding>false</_CleaningWithoutRebuilding>
</PropertyGroup>
</Target>
<!--
============================================================
DefaultRuntimeHostConfigurationOptions
Defaults @(RuntimeHostConfigurationOption) items based on MSBuild properties.
============================================================
-->
<ItemGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<RuntimeHostConfigurationOption Include="Internal.Runtime.InteropServices.ComponentActivator.IsSupported" Condition="'$(_EnableCallingManagedFunctionFromNativeHosting)' != ''" Value="$(_EnableCallingManagedFunctionFromNativeHosting)" Trim="true" />
<RuntimeHostConfigurationOption Include="Internal.Runtime.InteropServices.InMemoryAssemblyLoader.IsSupported" Condition="'$(EnableCPlusPlusCLIHostActivation)' != ''" Value="$(EnableCPlusPlusCLIHostActivation)" Trim="true" />
<RuntimeHostConfigurationOption Include="System.ComponentModel.TypeConverter.EnableUnsafeBinaryFormatterInDesigntimeLicenseContextSerialization" Condition="'$(EnableUnsafeBinaryFormatterInDesigntimeLicenseContextSerialization)' != ''" Value="$(EnableUnsafeBinaryFormatterInDesigntimeLicenseContextSerialization)" Trim="true" />
<RuntimeHostConfigurationOption Include="System.Diagnostics.Debugger.IsSupported" Condition="'$(DebuggerSupport)' != ''" Value="$(DebuggerSupport)" Trim="true" />
<RuntimeHostConfigurationOption Include="System.Diagnostics.Tracing.EventSource.IsSupported" Condition="'$(EventSourceSupport)' != ''" Value="$(EventSourceSupport)" Trim="true" />
<RuntimeHostConfigurationOption Include="System.GC.Concurrent" Condition="'$(ConcurrentGarbageCollection)' != ''" Value="$(ConcurrentGarbageCollection)" />
<RuntimeHostConfigurationOption Include="System.GC.Server" Condition="'$(ServerGarbageCollection)' != ''" Value="$(ServerGarbageCollection)" />
<RuntimeHostConfigurationOption Include="System.GC.RetainVM" Condition="'$(RetainVMGarbageCollection)' != ''" Value="$(RetainVMGarbageCollection)" />
<RuntimeHostConfigurationOption Include="System.Globalization.Invariant" Condition="'$(InvariantGlobalization)' != ''" Value="$(InvariantGlobalization)" Trim="true" />
<RuntimeHostConfigurationOption Include="System.Net.Http.EnableActivityPropagation" Condition="'$(HttpActivityPropagationSupport)' != ''" Value="$(HttpActivityPropagationSupport)" Trim="true" />
<RuntimeHostConfigurationOption Include="System.Net.Http.UseNativeHttpHandler" Condition="'$(UseNativeHttpHandler)' != ''" Value="$(UseNativeHttpHandler)" Trim="true" />
<RuntimeHostConfigurationOption Include="System.Resources.ResourceManager.AllowCustomResourceTypes" Condition="'$(CustomResourceTypesSupport)' != ''" Value="$(CustomResourceTypesSupport)" Trim="true" />
<RuntimeHostConfigurationOption Include="System.Resources.UseSystemResourceKeys" Condition="'$(UseSystemResourceKeys)' != ''" Value="$(UseSystemResourceKeys)" Trim="true" />
<RuntimeHostConfigurationOption Include="System.Runtime.InteropServices.BuiltInComInterop.IsSupported" Condition="'$(BuiltInComInteropSupport)' != ''" Value="$(BuiltInComInteropSupport)" Trim="true" />
<RuntimeHostConfigurationOption Include="System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization" Condition="'$(EnableUnsafeBinaryFormatterSerialization)' != ''" Value="$(EnableUnsafeBinaryFormatterSerialization)" Trim="true" />
<RuntimeHostConfigurationOption Include="System.Runtime.TieredCompilation" Condition="'$(TieredCompilation)' != ''" Value="$(TieredCompilation)" />
<RuntimeHostConfigurationOption Include="System.Runtime.TieredCompilation.QuickJit" Condition="'$(TieredCompilationQuickJit)' != ''" Value="$(TieredCompilationQuickJit)" />
<RuntimeHostConfigurationOption Include="System.Runtime.TieredCompilation.QuickJitForLoops" Condition="'$(TieredCompilationQuickJitForLoops)' != ''" Value="$(TieredCompilationQuickJitForLoops)" />
<RuntimeHostConfigurationOption Include="System.StartupHookProvider.IsSupported" Condition="'$(StartupHookSupport)' != ''" Value="$(StartupHookSupport)" Trim="true" />
<RuntimeHostConfigurationOption Include="System.Text.Encoding.EnableUnsafeUTF7Encoding" Condition="'$(EnableUnsafeUTF7Encoding)' != ''" Value="$(EnableUnsafeUTF7Encoding)" Trim="true" />
<RuntimeHostConfigurationOption Include="System.Threading.ThreadPool.MinThreads" Condition="'$(ThreadPoolMinThreads)' != ''" Value="$(ThreadPoolMinThreads)" />
<RuntimeHostConfigurationOption Include="System.Threading.ThreadPool.MaxThreads" Condition="'$(ThreadPoolMaxThreads)' != ''" Value="$(ThreadPoolMaxThreads)" />
</ItemGroup>
<!--
============================================================
DefaultAdditionalProbingPaths
Adds the default @(AdditionalProbingPath) items.
============================================================
-->
<ItemGroup Condition="'$(GenerateRuntimeConfigurationFiles)' == 'true' and '$(SkipDefaultAdditionalProbingPaths)' != 'true'" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- Note: can't use Path.Combine here since `|` is an illegal path character -->
<AdditionalProbingPath Include="$(UserProfileRuntimeStorePath)$([System.IO.Path]::DirectorySeparatorChar)|arch|$([System.IO.Path]::DirectorySeparatorChar)|tfm|" />
</ItemGroup>
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<CompileDependsOn>
$(CompileDependsOn);
_CreateAppHost;
_CreateComHost;
_GetIjwHostPaths;
</CompileDependsOn>
</PropertyGroup>
<!--
============================================================
_CreateAppHost
If we found a restored apphost, create the modified destination apphost
with options from the project.
============================================================
-->
<UsingTask TaskName="CreateAppHost" AssemblyFile="$(MicrosoftNETBuildTasksAssembly)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<Target Name="_CreateAppHost" Inputs="@(IntermediateAssembly);$(AppHostSourcePath)" Outputs="$(AppHostIntermediatePath)" DependsOnTargets="_ChooseAppHost;CoreCompile" Condition="'$(ComputeNETCoreBuildOutputFiles)' == 'true' and&#xD;&#xA; '$(AppHostSourcePath)' != '' and&#xD;&#xA; Exists('@(IntermediateAssembly)') and&#xD;&#xA; Exists('$(AppHostSourcePath)')" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<_UseWindowsGraphicalUserInterface Condition="($(RuntimeIdentifier.StartsWith('win')) or $(DefaultAppHostRuntimeIdentifier.StartsWith('win'))) and '$(OutputType)'=='WinExe'">true</_UseWindowsGraphicalUserInterface>
</PropertyGroup>
<CreateAppHost AppHostSourcePath="$(AppHostSourcePath)" AppHostDestinationPath="$(AppHostIntermediatePath)" AppBinaryName="$(AssemblyName)$(TargetExt)" IntermediateAssembly="@(IntermediateAssembly->'%(FullPath)')" WindowsGraphicalUserInterface="$(_UseWindowsGraphicalUserInterface)" Retries="$(CopyRetryCount)" RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)" />
</Target>
<!--
============================================================
_ChooseAppHost
Choose the correct app-host for the build scenario:
* SingleFileHost if an app being published as a self-contained single-file .net5+ app
* AppHost otherwise
============================================================
-->
<Target Name="_ChooseAppHost" DependsOnTargets="_GetAppHostPaths" Condition="'$(UseAppHost)' == 'true' and '$(_IsExecutable)' == 'true'" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition="'$(PublishSingleFile)' == 'true' and&#xD;&#xA; '$(SelfContained)' == 'true' and&#xD;&#xA; '$(_TargetFrameworkVersionWithoutV)' &gt;= '5.0' and&#xD;&#xA; '$(SingleFileHostSourcePath)' != ''">
<AppHostSourcePath>$(SingleFileHostSourcePath)</AppHostSourcePath>
<AppHostIntermediatePath>$([System.IO.Path]::GetFullPath('$(IntermediateOutputPath)singlefilehost$(_NativeExecutableExtension)'))</AppHostIntermediatePath>
</PropertyGroup>
</Target>
<!--
============================================================
_GetAppHostPaths
Gets the path to apphost (restored via packages or in an apphost pack),
and computes the path for the destination apphost.
============================================================
-->
<Target Name="_GetAppHostPaths" DependsOnTargets="ResolvePackageAssets;ResolveFrameworkReferences" Condition="'$(UseAppHost)' == 'true' and '$(_IsExecutable)' == 'true'" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<NETSdkError Condition="'@(_NativeRestoredAppHostNETCore-&gt;Count())' &gt; 1" ResourceName="MultipleFilesResolved" FormatArguments="$(_DotNetAppHostExecutableName)" />
<PropertyGroup>
<!-- AppHostSourcePath will be set from ProcessFrameworkReferences if not using the apphost from the assets file -->
<AppHostSourcePath Condition="'$(UseAppHostFromAssetsFile)' == 'true'">@(_NativeRestoredAppHostNETCore)</AppHostSourcePath>
</PropertyGroup>
<PropertyGroup Condition="'$(UseAppHostFromAssetsFile)' == 'false' Or '@(_NativeRestoredAppHostNETCore)' != ''">
<AppHostIntermediatePath>$([System.IO.Path]::GetFullPath('$(IntermediateOutputPath)apphost$(_NativeExecutableExtension)'))</AppHostIntermediatePath>
</PropertyGroup>
</Target>
<ItemGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ClsidMap Include="$(IntermediateOutputPath)$(AssemblyName).clsidmap" />
<RegFreeComManifest Include="$(IntermediateOutputPath)$(AssemblyName).X.manifest" />
</ItemGroup>
<!--
============================================================
_GenerateClsidMap
Generates a *.clsidmap file from the built assembly.
============================================================
-->
<UsingTask TaskName="GenerateClsidMap" AssemblyFile="$(MicrosoftNETBuildTasksAssembly)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<Target Name="_GenerateClsidMap" Inputs="@(IntermediateAssembly)" Outputs="@(ClsidMap)" DependsOnTargets="CoreCompile" Condition="'$(ComputeNETCoreBuildOutputFiles)' == 'true' and&#xD;&#xA; '$(EnableComHosting)' == 'true'" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<GenerateClsidMap IntermediateAssembly="@(IntermediateAssembly->'%(FullPath)')" CLsidMapDestinationPath="@(ClsidMap->'%(FullPath)')" />
</Target>
<UsingTask TaskName="CreateComHost" AssemblyFile="$(MicrosoftNETBuildTasksAssembly)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<!--
============================================================
_CreateComHost
If we found a restored comhost, create the modified destination apphost
with options from the project.
============================================================
-->
<Target Name="_CreateComHost" Inputs="@(IntermediateAssembly);$(ComHostSourcePath)" Outputs="$(ComHostIntermediatePath)" DependsOnTargets="_GetComHostPaths;CoreCompile;_GenerateClsidMap;_GenerateRegFreeComManifest" Condition="'$(ComputeNETCoreBuildOutputFiles)' == 'true' and&#xD;&#xA; '$(ComHostIntermediatePath)' != '' and&#xD;&#xA; Exists('@(IntermediateAssembly)') and&#xD;&#xA; Exists('$(ComHostSourcePath)')" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<CreateComHost ComHostSourcePath="$(ComHostSourcePath)" ComHostDestinationPath="$(ComHostIntermediatePath)" ClsidMapPath="@(ClsidMap)" TypeLibraries="@(ComHostTypeLibrary)" />
</Target>
<UsingTask TaskName="GenerateRegFreeComManifest" AssemblyFile="$(MicrosoftNETBuildTasksAssembly)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<!--
============================================================
_GenerateRegFreeComManifest
Gets the path to the restored comhost, and if the restored comhost
was present, computes the path for the destination comhost.
============================================================
-->
<Target Name="_GenerateRegFreeComManifest" DependsOnTargets="_GenerateClsidMap;_GetComHostPaths" Inputs="@(ClsidMap);@(IntermediateAssembly)" Outputs="@(RegFreeComManifest)" Condition="'$(ComputeNETCoreBuildOutputFiles)' == 'true' and&#xD;&#xA; '$(EnableComHosting)' == 'true' and&#xD;&#xA; '$(EnableRegFreeCom)' == 'true'" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<GenerateRegFreeComManifest IntermediateAssembly="@(IntermediateAssembly)" ComHostName="$(ComHostFileName)" ClsidMapPath="@(ClsidMap)" TypeLibraries="@(ComHostTypeLibrary)" ComManifestPath="@(RegFreeComManifest)" />
</Target>
<!--
============================================================
_GetComHostPaths
Gets the path to the restored comhost, and if the restored comhost
was present, computes the path for the destination comhost.
============================================================
-->
<Target Name="_GetComHostPaths" DependsOnTargets="ResolvePackageAssets;ResolveFrameworkReferences" Condition="'$(EnableComHosting)' == 'true' and '$(_IsExecutable)' != 'true'" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ComHostFileName>$(AssemblyName).comhost$(_ComHostLibraryExtension)</ComHostFileName>
<ComHostIntermediatePath>$([System.IO.Path]::GetFullPath('$(IntermediateOutputPath)$(ComHostFileName)'))</ComHostIntermediatePath>
</PropertyGroup>
<NETSdkError Condition="'$(ComHostSourcePath)' == '' or !Exists('$(ComHostSourcePath)')" ResourceName="CannotFindComhost" />
</Target>
<!--
============================================================
_GetIjwHostPaths
Gets the path to the restored Ijwhost, and if the restored Ijwhost
was present, Computes the path for the destination Ijwhost.
============================================================
-->
<Target Name="_GetIjwHostPaths" DependsOnTargets="ResolvePackageAssets;ResolveFrameworkReferences" Condition="'$(UseIJWHost)' == 'true'" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<NETSdkError Condition="'$(IjwHostSourcePath)' == '' or !Exists('$(IjwHostSourcePath)')" ResourceName="CannotFindIjwhost" />
</Target>
<!--
============================================================
_ComputeNETCoreBuildOutputFiles
Computes any files that need to be copied to the build output folder for .NET Core.
============================================================
-->
<Target Name="_ComputeNETCoreBuildOutputFiles" DependsOnTargets="_ChooseAppHost;_GetComHostPaths;_GetIjwHostPaths" BeforeTargets="AssignTargetPaths" Condition="'$(ComputeNETCoreBuildOutputFiles)' == 'true'" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- Fallback to renaming the dotnet host if there is no apphost for self-contained builds. -->
<PropertyGroup Condition="'$(AppHostIntermediatePath)' == '' and '$(SelfContained)' == 'true'">
<_CopyAndRenameDotnetHost Condition="'$(_CopyAndRenameDotnetHost)' == ''">true</_CopyAndRenameDotnetHost>
</PropertyGroup>
<ItemGroup Condition="'$(_CopyAndRenameDotnetHost)' == 'true'">
<None Include="@(NativeCopyLocalItems)" Condition="'%(NativeCopyLocalItems.FileName)%(NativeCopyLocalItems.Extension)' == '$(_DotNetHostExecutableName)'">
<Link>$(AssemblyName)$(_NativeExecutableExtension)</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
</None>
</ItemGroup>
<ItemGroup Condition="'$(AppHostIntermediatePath)' != '' or '$(_CopyAndRenameDotnetHost)' == 'true'">
<!--
If not copying local lock file assemblies, copy the host policy and host fxr libraries for self-contained builds.
This is required to allow the host to activate in self-contained mode.
-->
<None Include="@(NativeCopyLocalItems)" Condition="'$(SelfContained)' == 'true' and&#xD;&#xA; '$(CopyLocalLockFileAssemblies)' != 'true' and&#xD;&#xA; ('%(NativeCopyLocalItems.FileName)%(NativeCopyLocalItems.Extension)' == '$(_DotNetHostPolicyLibraryName)' or&#xD;&#xA; '%(NativeCopyLocalItems.FileName)%(NativeCopyLocalItems.Extension)' == '$(_DotNetHostFxrLibraryName)')">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToPublishDirectory>Never</CopyToPublishDirectory>
</None>
</ItemGroup>
<ItemGroup Condition="'$(AppHostIntermediatePath)' != ''">
<None Include="$(AppHostIntermediatePath)">
<Link>$(AssemblyName)$(_NativeExecutableExtension)</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<!-- Always copy the AppHost because the contents of the apphost binary can change during the publish step (due to single-file bundling).
Always copying the apphost ensures that that the sequence
dotnet publish /p:PublishSingleFile=true
dotnet publish /p:PublishSingleFile=false
places the correct unbundled apphost in the publish directory. -->
<CopyToPublishDirectory>Always</CopyToPublishDirectory>
</None>
</ItemGroup>
<ItemGroup Condition="'$(ComHostIntermediatePath)' != ''">
<None Include="$(ComHostIntermediatePath)">
<Link>$(AssemblyName).$(_DotNetComHostLibraryName)</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
</None>
<None Include="@(RegFreeComManifest)" Condition="'$(EnableRegFreeCom)' == 'true'">
<Link>%(FileName)%(Extension)</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
</None>
</ItemGroup>
<ItemGroup Condition="'$(IjwHostSourcePath)' != '' and '$(UseIJWHost)' == 'true'">
<None Include="$(IjwHostSourcePath)">
<Link>$(_DotNetIjwHostLibraryName)</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
</None>
</ItemGroup>
</Target>
<!--
============================================================
_ComputeReferenceAssemblies
Computes references that are only used at compile-time.
============================================================
-->
<Target Name="_ComputeReferenceAssemblies" DependsOnTargets="ResolveAssemblyReferences" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<_FrameworkReferenceAssemblies Include="@(ReferencePath)" Condition="(%(ReferencePath.FrameworkFile) == 'true' or&#xD;&#xA; %(ReferencePath.ResolvedFrom) == 'ImplicitlyExpandDesignTimeFacades')&#xD;&#xA; and ('%(ReferencePath.NuGetSourceType)' == '' or&#xD;&#xA; '%(ReferencePath.NuGetIsFrameworkReference)' == 'true')" />
<!--
"ReferenceOnly" assemblies are assemblies that are only used at compile-time, and they can't be resolved
by the normal compile-assembly resolvers at runtime:
1. App local
2. NuGet/Package layout
3. ProgramFiles\Reference Assemblies
These assemblies need to be copied to the 'refs' folder for both build and publish.
-->
<_ReferenceOnlyAssemblies Include="@(ReferencePath)" Exclude="@(_FrameworkReferenceAssemblies)" Condition="%(ReferencePath.CopyLocal) != 'true' and&#xD;&#xA; %(ReferencePath.NuGetSourceType) == ''" />
<_ReferenceAssemblies Include="@(_FrameworkReferenceAssemblies)" />
<_ReferenceAssemblies Include="@(_ReferenceOnlyAssemblies)" />
</ItemGroup>
</Target>
<!--
============================================================
_ComputeUserRuntimeAssemblies
Computes references or reference dependencies that are copy local.
NOTE: NuGet and framework references are never copy local so those are not included here.
These will be project references and direct references and their copy local dependencies.
============================================================
-->
<Target Name="_ComputeUserRuntimeAssemblies" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<!-- IncludeRuntimeDependency=true metadata is escape hatch to include a non-copy local reference in deps file as a runtime dependency -->
<ReferencePath>
<IncludeRuntimeDependency Condition="'%(ReferencePath.IncludeRuntimeDependency)' == '' and '%(ReferencePath.CopyLocal)' == 'true'">true</IncludeRuntimeDependency>
</ReferencePath>
<ReferenceDependencyPaths>
<IncludeRuntimeDependency Condition="'%(ReferenceDependencyPaths.IncludeRuntimeDependency)' == '' and '%(ReferenceDependencyPaths.CopyLocal)' == 'true'">true</IncludeRuntimeDependency>
</ReferenceDependencyPaths>
<UserRuntimeAssembly Include="@(ReferencePath-&gt;WithMetadataValue('IncludeRuntimeDependency', 'true'))" />
<UserRuntimeAssembly Include="@(ReferenceDependencyPaths-&gt;WithMetadataValue('IncludeRuntimeDependency', 'true'))" />
</ItemGroup>
</Target>
<!--
============================================================
Run Information
The ProcessStart information that can be used to run this project.
============================================================
-->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<RunWorkingDirectory Condition="'$(RunWorkingDirectory)' == ''">$(StartWorkingDirectory)</RunWorkingDirectory>
</PropertyGroup>
<Choose xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<When Condition="'$(StartAction)' == 'Program'">
<PropertyGroup>
<RunCommand Condition="'$(RunCommand)' == ''">$(StartProgram)</RunCommand>
<RunArguments Condition="'$(RunArguments)' == ''">$(StartArguments)</RunArguments>
</PropertyGroup>
</When>
<When Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp' and '$(_IsExecutable)' == 'true'">
<PropertyGroup Condition="'$(UseAppHost)' != 'true'">
<!-- TODO: https://github.com/dotnet/sdk/issues/20 Need to get the DotNetHost path from MSBuild -->
<RunCommand Condition="'$(RunCommand)' == ''">dotnet</RunCommand>
<_NetCoreRunArguments>exec "$(TargetPath)"</_NetCoreRunArguments>
<RunArguments Condition="'$(RunArguments)' == '' and '$(StartArguments)' != ''">$(_NetCoreRunArguments) $(StartArguments)</RunArguments>
<RunArguments Condition="'$(RunArguments)' == ''">$(_NetCoreRunArguments)</RunArguments>
</PropertyGroup>
<PropertyGroup Condition="'$(UseAppHost)' == 'true'">
<RunCommand Condition="'$(RunCommand)' == ''">$(TargetDir)$(AssemblyName)$(_NativeExecutableExtension)</RunCommand>
<RunArguments Condition="'$(RunArguments)' == ''">$(StartArguments)</RunArguments>
</PropertyGroup>
</When>
<When Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework' and '$(_IsExecutable)' == 'true'">
<PropertyGroup Condition="$([MSBuild]::IsOSPlatform(`Windows`))">
<RunCommand Condition="'$(RunCommand)' == ''">$(TargetPath)</RunCommand>
<RunArguments Condition="'$(RunArguments)' == ''">$(StartArguments)</RunArguments>
</PropertyGroup>
<PropertyGroup Condition="$([MSBuild]::IsOSUnixLike())">
<RunCommand Condition="'$(RunCommand)' == ''">mono</RunCommand>
<RunArguments Condition="'$(RunArguments)' == ''">"$(TargetPath)" $(StartArguments)</RunArguments>
</PropertyGroup>
</When>
</Choose>
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- Ensure $(RunWorkingDirectory) is a full path -->
<RunWorkingDirectory Condition="'$(RunWorkingDirectory)' != '' and '$([System.IO.Path]::IsPathRooted($(RunWorkingDirectory)))' != 'true'">$([System.IO.Path]::GetFullPath($([System.IO.Path]::Combine('$(MSBuildProjectDirectory)', '$(RunWorkingDirectory)'))))</RunWorkingDirectory>
</PropertyGroup>
<!-- Override MSBuild Run Target -->
<Target Name="Run" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Exec Command="$(RunCommand) $(RunArguments)" WorkingDirectory="$(RunWorkingDirectory)" />
</Target>
<!--
============================================================
CoreGenerateSatelliteAssemblies
============================================================
-->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<CreateSatelliteAssembliesDependsOn>
$(CreateSatelliteAssembliesDependsOn);
CoreGenerateSatelliteAssemblies
</CreateSatelliteAssembliesDependsOn>
</PropertyGroup>
<UsingTask TaskName="GetAssemblyAttributes" AssemblyFile="$(MicrosoftNETBuildTasksAssembly)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<Target Name="CoreGenerateSatelliteAssemblies" DependsOnTargets="ResolveAssemblyReferences;_GetAssemblyInfoFromTemplateFile" Inputs="$(MSBuildAllProjects);@(_SatelliteAssemblyResourceInputs);$(IntermediateOutputPath)$(TargetName)$(TargetExt)" Outputs="$(IntermediateOutputPath)%(Culture)\$(TargetName).resources.dll" Condition="'@(_SatelliteAssemblyResourceInputs)' != '' and '$(GenerateSatelliteAssembliesForCore)' == 'true' " xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<MakeDir Directories="@(_SatelliteAssemblyResourceInputs->'$(IntermediateOutputPath)%(Culture)')" />
<PropertyGroup>
<_AssemblyInfoFile>$(IntermediateOutputPath)%(_SatelliteAssemblyResourceInputs.Culture)\$(TargetName).resources.cs</_AssemblyInfoFile>
<_OutputAssembly>$(IntermediateOutputPath)%(_SatelliteAssemblyResourceInputs.Culture)\$(TargetName).resources.dll</_OutputAssembly>
</PropertyGroup>
<ItemGroup>
<SatelliteAssemblyAttribute Include="System.Reflection.AssemblyCultureAttribute" Condition="'%(_SatelliteAssemblyResourceInputs.Culture)' != ''">
<_Parameter1>%(_SatelliteAssemblyResourceInputs.Culture)</_Parameter1>
</SatelliteAssemblyAttribute>
</ItemGroup>
<WriteCodeFragment AssemblyAttributes="@(SatelliteAssemblyAttribute)" Language="C#" OutputFile="$(_AssemblyInfoFile)">
<Output TaskParameter="OutputFile" ItemName="FileWrites" />
</WriteCodeFragment>
<PropertyGroup Condition="'$(UseSharedCompilation)' == ''">
<UseSharedCompilation>true</UseSharedCompilation>
</PropertyGroup>
<Csc Resources="@(_SatelliteAssemblyResourceInputs)" Sources="$(_AssemblyInfoFile)" OutputAssembly="$(_OutputAssembly)" References="@(ReferencePath)" KeyContainer="$(KeyContainerName)" KeyFile="$(KeyOriginatorFile)" NoConfig="true" NoLogo="$(NoLogo)" NoStandardLib="$(NoCompilerStandardLib)" Optimize="$(Optimize)" PublicSign="$(PublicSign)" DelaySign="$(DelaySign)" Deterministic="$(Deterministic)" DisabledWarnings="$(DisabledWarnings)" WarningLevel="$(WarningLevel)" WarningsAsErrors="$(WarningsAsErrors)" WarningsNotAsErrors="$(WarningsNotAsErrors)" TargetType="Library" ToolExe="$(CscToolExe)" ToolPath="$(CscToolPath)" UseSharedCompilation="$(UseSharedCompilation)">
<Output TaskParameter="OutputAssembly" ItemName="FileWrites" />
</Csc>
</Target>
<Target Name="_GetAssemblyInfoFromTemplateFile" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<GetAssemblyAttributes PathToTemplateFile="$(IntermediateOutputPath)$(TargetName)$(TargetExt)">
<Output TaskParameter="AssemblyAttributes" ItemName="_AssemblyAttributesFromTemplateFile" />
</GetAssemblyAttributes>
<ItemGroup>
<SatelliteAssemblyAttribute Include="@(_AssemblyAttributesFromTemplateFile)" />
</ItemGroup>
</Target>
<!--
============================================================
GetAllRuntimeIdentifiers
============================================================
-->
<Target Name="GetAllRuntimeIdentifiers" Returns="$(RuntimeIdentifiers);$(RuntimeIdentifier)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<!--
============================================================
_BlockWinMDsOnUnsupportedTFMs
Block referencing or producing
Windows Metadata files (.winmd) for target frameworks
that do not support loading winmds directly
into the runtime as assemblies
============================================================
-->
<UsingTask TaskName="CheckForUnsupportedWinMDReferences" AssemblyFile="$(MicrosoftNETBuildTasksAssembly)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<Target Name="_BlockWinMDsOnUnsupportedTFMs" AfterTargets="PreBuildEvent" DependsOnTargets="ResolveReferences" Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp' and $([MSBuild]::VersionGreaterThanOrEquals($(TargetFrameworkVersion), '5.0'))" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<CheckForUnsupportedWinMDReferences TargetFrameworkMoniker="$(TargetFrameworkMoniker)" ReferencePaths="@(ReferencePath)" />
<NETSdkError Condition="'$(OutputType)' == 'winmdobj'" ResourceName="WinMDObjNotSupportedOnTargetFramework" FormatArguments="$(TargetFrameworkMoniker)" />
</Target>
<!--
============================================================
InjectTargetPathMetadata
Update TargetPathWithTargetPlatformMoniker with target framework
identifier and version metadata. This is so that the
ImplicitlyExpandNETStandardFacades target can determine if a
referenced project needs the .NET Standard facades even if
the project hasn't been compiled to disk yet.
See https://github.com/dotnet/sdk/issues/1403 for more context
============================================================
-->
<ItemDefinitionGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<TargetPathWithTargetPlatformMoniker>
<TargetFrameworkIdentifier>$(TargetFrameworkIdentifier)</TargetFrameworkIdentifier>
<TargetFrameworkVersion>$(_TargetFrameworkVersionWithoutV)</TargetFrameworkVersion>
</TargetPathWithTargetPlatformMoniker>
</ItemDefinitionGroup>
<!--
============================================================
GenerateSupportedTargetFrameworkAlias
Generate a list of valid TargetFramework aliases for the project
system to consume for the target framework properties page drop down
============================================================
-->
<UsingTask TaskName="GenerateSupportedTargetFrameworkAlias" AssemblyFile="$(MicrosoftNETBuildTasksAssembly)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<Target Name="GenerateSupportedTargetFrameworkAlias" Returns="@(SupportedTargetFrameworkAlias)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<GenerateSupportedTargetFrameworkAlias SupportedTargetFramework="@(SupportedTargetFramework)" TargetFrameworkMoniker="$(TargetFrameworkMoniker)" TargetPlatformMoniker="$(TargetPlatformMoniker)" UseWpf="$(UseWpf)" UseWindowsForms="$(UseWindowsForms)">
<Output TaskParameter="SupportedTargetFrameworkAlias" ItemName="SupportedTargetFrameworkAlias" />
</GenerateSupportedTargetFrameworkAlias>
</Target>
<!--
============================================================
ValidateExecutableReferences
============================================================
-->
<ItemGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<AdditionalTargetFrameworkInfoProperty Include="SelfContained" />
<AdditionalTargetFrameworkInfoProperty Include="_IsExecutable" />
<AdditionalTargetFrameworkInfoProperty Include="ShouldBeValidatedAsExecutableReference" />
</ItemGroup>
<UsingTask TaskName="ValidateExecutableReferences" AssemblyFile="$(MicrosoftNETBuildTasksAssembly)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<Target Name="ValidateExecutableReferences" AfterTargets="_GetProjectReferenceTargetFrameworkProperties" Condition="'$(ValidateExecutableReferencesMatchSelfContained)' != 'false'" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ValidateExecutableReferences SelfContained="$(SelfContained)" IsExecutable="$(_IsExecutable)" ReferencedProjects="@(_MSBuildProjectReferenceExistent)" />
</Target>
<!--
============================================================
Project Capabilities
============================================================
-->
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp' and '$(_IsExecutable)' == 'true'" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ProjectCapability Include="CrossPlatformExecutable" />
</ItemGroup>
<!-- Reference Manager capabilities -->
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp'" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ProjectCapability Remove="ReferenceManagerAssemblies" />
</ItemGroup>
<!-- Enable hot reload in 6.0 and newer apps by default -->
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp' AND $([MSBuild]::VersionGreaterThanOrEquals($(TargetFrameworkVersion), '6.0'))" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ProjectCapability Include="SupportsHotReload" />
</ItemGroup>
<!--
============================================================================================================================================
<Import Project="$(MSBuildThisFileDirectory)Microsoft.NET.DisableStandardFrameworkResolution.targets" Condition="'$(DisableStandardFrameworkResolution)' == 'true'">
C:\Program Files\dotnet\sdk\6.0.100-preview.5.21302.13\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.DisableStandardFrameworkResolution.targets
============================================================================================================================================
-->
<!--
***********************************************************************************************
Microsoft.NET.DisableStandardFrameworkResolution.targets
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
created a backup copy. Incorrect changes to this file will make it
impossible to load or build your projects from the command-line or the IDE.
Copyright (c) .NET Foundation. All rights reserved.
***********************************************************************************************
-->
<Target Name="GetReferenceAssemblyPaths" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<Target Name="GetFrameworkPaths" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<_TargetFrameworkDirectories />
<FrameworkPathOverride />
<TargetFrameworkDirectory />
<!-- all references (even the StdLib) come from packages -->
<NoStdLib>true</NoStdLib>
</PropertyGroup>
<!--
============================================================================================================================================
</Import>
C:\Program Files\dotnet\sdk\6.0.100-preview.5.21302.13\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.targets
============================================================================================================================================
-->
<!--
============================================================================================================================================
<Import Project="$(MSBuildThisFileDirectory)Microsoft.NET.DesignerSupport.targets">
C:\Program Files\dotnet\sdk\6.0.100-preview.5.21302.13\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.DesignerSupport.targets
============================================================================================================================================
-->
<!--
***********************************************************************************************
Microsoft.NET.DesignerSupport.targets
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
created a backup copy. Incorrect changes to this file will make it
impossible to load or build your projects from the command-line or the IDE.
Copyright (c) .NET Foundation. All rights reserved.
***********************************************************************************************
-->
<PropertyGroup Condition="'$(DesignerRuntimeImplementationProjectOutputGroupDependsOn)' == ''" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<DesignerRuntimeImplementationProjectOutputGroupDependsOn>
$(CommonOutputGroupsDependsOn);
</DesignerRuntimeImplementationProjectOutputGroupDependsOn>
</PropertyGroup>
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<DesignerRuntimeImplementationProjectOutputGroupDependsOn>
$(DesignerRuntimeImplementationProjectOutputGroupDependsOn);
_GenerateDesignerDepsFile;
_GenerateDesignerRuntimeConfigFile;
_GatherDesignerShadowCopyFiles;
</DesignerRuntimeImplementationProjectOutputGroupDependsOn>
<_DesignerDepsFileName>$(AssemblyName).designer.deps.json</_DesignerDepsFileName>
<_DesignerRuntimeConfigFileName>$(AssemblyName).designer.runtimeconfig.json</_DesignerRuntimeConfigFileName>
<_DesignerDepsFilePath>$(IntermediateOutputPath)$(_DesignerDepsFileName)</_DesignerDepsFilePath>
<_DesignerRuntimeConfigFilePath>$(IntermediateOutputPath)$(_DesignerRuntimeConfigFileName)</_DesignerRuntimeConfigFilePath>
</PropertyGroup>
<Target Name="DesignerRuntimeImplementationProjectOutputGroup" DependsOnTargets="$(DesignerRuntimeImplementationProjectOutputGroupDependsOn)" Returns="@(DesignerRuntimeImplementationProjectOutputGroupOutput)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<Target Name="_GenerateDesignerDepsFile" Inputs="$(MSBuildAllProjectFiles);$(ProjectAssetsFile)" Outputs="$(_DesignerDepsFilePath)" Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp'" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!--
NOTE: We do not include the main assembly info or non-NuGet dependencies
in designer deps file as these files may not be built yet at design time.
Instead, we rely on SetAppPaths in runtimeconfig to allow loading of
non-NuGet assets from shadow copied app base directory. This further
allows loading of designer dll(s) that are not seen by the build.
-->
<GenerateDepsFile AssemblyName="_" AssemblyExtension="_" AssemblyVersion="_" AssetsFilePath="$(ProjectAssetsFile)" DepsFilePath="$(_DesignerDepsFilePath)" IncludeMainProject="false" IncludeRuntimeFileVersions="$(IncludeFileVersionsInDependencyFile)" IsSelfContained="false" PlatformLibraryName="$(MicrosoftNETPlatformLibrary)" ProjectPath="$(MSBuildProjectFullPath)" RuntimeFrameworks="@(RuntimeFramework)" CompileReferences="@(ResolvedCompileFileDefinitions)" ResolvedNuGetFiles="@(NativeCopyLocalItems);@(ResourceCopyLocalItems);@(RuntimeCopyLocalItems)" ResolvedRuntimeTargetsFiles="@(RuntimeTargetsCopyLocalItems)" TargetFramework="$(TargetFramework)" RuntimeGraphPath="$(BundledRuntimeIdentifierGraphFile)" />
<ItemGroup>
<!-- Designer will rename to <surface process name>.deps.json -->
<DesignerRuntimeImplementationProjectOutputGroupOutput Include="$([MSBuild]::NormalizePath($(_DesignerDepsFilePath)))" TargetPath="$(_DesignerDepsFileName)" />
<FileWrites Include="$(_DesignerDepsFilePath)" />
</ItemGroup>
</Target>
<Target Name="_GenerateDesignerRuntimeConfigFile" Inputs="$(MSBuildAllProjectFiles);$(ProjectAssetsFile)" Outputs="$(_DesignerRuntimeConfigFilePath)" Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp'" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<_DesignerHostConfigurationOption Include="Microsoft.NETCore.DotNetHostPolicy.SetAppPaths" Value="true" />
</ItemGroup>
<GenerateRuntimeConfigurationFiles AdditionalProbingPaths="@(AdditionalProbingPath)" AssetsFilePath="$(ProjectAssetsFile)" HostConfigurationOptions="@(RuntimeHostConfigurationOption);@(_DesignerHostConfigurationOption)" IsSelfContained="false" PlatformLibraryName="$(MicrosoftNETPlatformLibrary)" RuntimeConfigPath="$(_DesignerRuntimeConfigFilePath)" RuntimeFrameworks="@(RuntimeFramework)" TargetFramework="$(TargetFramework)" TargetFrameworkMoniker="$(TargetFrameworkMoniker)" UserRuntimeConfig="$(UserRuntimeConfig)" WriteAdditionalProbingPathsToMainConfig="true" />
<ItemGroup>
<!-- Designer will rename to <surface process name>.runtimeconfig.json -->
<DesignerRuntimeImplementationProjectOutputGroupOutput Include="$([MSBuild]::NormalizePath($(_DesignerRuntimeConfigFilePath)))" TargetPath="$(_DesignerRuntimeConfigFileName)" />
<FileWrites Include="$(_DesignerRuntimeConfigFilePath)" />
</ItemGroup>
</Target>
<Target Name="_GatherDesignerShadowCopyFiles" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<_DesignerShadowCopy Include="@(ReferenceCopyLocalPaths)" />
<!--
For .NET Core, we do not include NuGet package assets or runtime pack
assets, irrespective of self-contained / copy-local settings. Designer
will load these from the NuGet cache or shared framework always.
-->
<_DesignerShadowCopy Remove="@(_ResolvedCopyLocalBuildAssets);@(RuntimePackAsset)" Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp'" />
<DesignerRuntimeImplementationProjectOutputGroupOutput Include="@(_DesignerShadowCopy->'%(FullPath)')" TargetPath="%(_DesignerShadowCopy.DestinationSubDirectory)%(_DesignerShadowCopy.Filename)%(_DesignerShadowCopy.Extension)" />
</ItemGroup>
</Target>
<!--
============================================================================================================================================
</Import>
C:\Program Files\dotnet\sdk\6.0.100-preview.5.21302.13\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.targets
============================================================================================================================================
-->
<!--
============================================================================================================================================
<Import Project="$(MSBuildThisFileDirectory)Microsoft.NET.GenerateAssemblyInfo.targets" Condition="'$(UsingNETSdkDefaults)' == 'true'">
C:\Program Files\dotnet\sdk\6.0.100-preview.5.21302.13\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.GenerateAssemblyInfo.targets
============================================================================================================================================
-->
<!--
***********************************************************************************************
Microsoft.NET.GenerateAssemblyInfo.targets
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
created a backup copy. Incorrect changes to this file will make it
impossible to load or build your projects from the command-line or the IDE.
Copyright (c) .NET Foundation. All rights reserved.
***********************************************************************************************
-->
<!--
============================================================
GenerateAssemblyInfo
Generates assembly info source to intermediate directory
============================================================
-->
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<GeneratedAssemblyInfoFile Condition="'$(GeneratedAssemblyInfoFile)' ==''">$(IntermediateOutputPath)$(MSBuildProjectName).AssemblyInfo$(DefaultLanguageSourceExtension)</GeneratedAssemblyInfoFile>
<GenerateAssemblyInfo Condition="'$(GenerateAssemblyInfo)' == ''">true</GenerateAssemblyInfo>
</PropertyGroup>
<PropertyGroup Condition="'$(GenerateAssemblyInfo)' == 'true'" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<GenerateAssemblyCompanyAttribute Condition="'$(GenerateAssemblyCompanyAttribute)' == ''">true</GenerateAssemblyCompanyAttribute>
<GenerateAssemblyConfigurationAttribute Condition="'$(GenerateAssemblyConfigurationAttribute)' == ''">true</GenerateAssemblyConfigurationAttribute>
<GenerateAssemblyCopyrightAttribute Condition="'$(GenerateAssemblyCopyrightAttribute)' == ''">true</GenerateAssemblyCopyrightAttribute>
<GenerateAssemblyDescriptionAttribute Condition="'$(GenerateAssemblyDescriptionAttribute)' == ''">true</GenerateAssemblyDescriptionAttribute>
<GenerateAssemblyFileVersionAttribute Condition="'$(GenerateAssemblyFileVersionAttribute)' == ''">true</GenerateAssemblyFileVersionAttribute>
<GenerateAssemblyInformationalVersionAttribute Condition="'$(GenerateAssemblyInformationalVersionAttribute)' == ''">true</GenerateAssemblyInformationalVersionAttribute>
<GenerateAssemblyProductAttribute Condition="'$(GenerateAssemblyProductAttribute)' == ''">true</GenerateAssemblyProductAttribute>
<GenerateAssemblyTitleAttribute Condition="'$(GenerateAssemblyTitleAttribute)' == ''">true</GenerateAssemblyTitleAttribute>
<GenerateAssemblyVersionAttribute Condition="'$(GenerateAssemblyVersionAttribute)' == ''">true</GenerateAssemblyVersionAttribute>
<GenerateRepositoryUrlAttribute Condition="'$(GenerateRepositoryUrlAttribute)' == '' and !('$(TargetFrameworkIdentifier)' == '.NETFramework' and $([MSBuild]::VersionLessThan($(TargetFrameworkVersion), 4.5)))">true</GenerateRepositoryUrlAttribute>
<GenerateNeutralResourcesLanguageAttribute Condition="'$(GenerateNeutralResourcesLanguageAttribute)' == ''">true</GenerateNeutralResourcesLanguageAttribute>
<GenerateAssemblyMetadataAttributes Condition="'$(GenerateAssemblyMetadataAttributes)' == ''">true</GenerateAssemblyMetadataAttributes>
<IncludeSourceRevisionInInformationalVersion Condition="'$(IncludeSourceRevisionInInformationalVersion)' == ''">true</IncludeSourceRevisionInInformationalVersion>
<GenerateInternalsVisibleToAttributes Condition="'$(GenerateInternalsVisibleToAttributes)' == ''">true</GenerateInternalsVisibleToAttributes>
</PropertyGroup>
<!--
Note that this must run before every invocation of CoreCompile to ensure that all compiler
runs see the generated assembly info. There is at least one scenario involving Xaml
where CoreCompile is invoked without other potential hooks such as Compile or CoreBuild,
etc., so we hook directly on to CoreCompile. Furthermore, we must run *after*
PrepareForBuild to ensure that the intermediate directory has been created.
Targets that generate Compile items are also expected to run before
BeforeCompile targets (common targets convention).
-->
<Target Name="GenerateAssemblyInfo" BeforeTargets="BeforeCompile;CoreCompile" DependsOnTargets="PrepareForBuild;CoreGenerateAssemblyInfo" Condition="'$(GenerateAssemblyInfo)' == 'true'" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<Target Name="AddSourceRevisionToInformationalVersion" DependsOnTargets="GetAssemblyVersion;InitializeSourceControlInformation" Condition="'$(SourceControlInformationFeatureSupported)' == 'true' and '$(IncludeSourceRevisionInInformationalVersion)' == 'true'" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition="'$(SourceRevisionId)' != ''">
<!-- Follow SemVer 2.0 rules -->
<_InformationalVersionContainsPlus>false</_InformationalVersionContainsPlus>
<_InformationalVersionContainsPlus Condition="$(InformationalVersion.Contains('+'))">true</_InformationalVersionContainsPlus>
<InformationalVersion Condition="!$(_InformationalVersionContainsPlus)">$(InformationalVersion)+$(SourceRevisionId)</InformationalVersion>
<InformationalVersion Condition="$(_InformationalVersionContainsPlus)">$(InformationalVersion).$(SourceRevisionId)</InformationalVersion>
</PropertyGroup>
</Target>
<Target Name="GetAssemblyAttributes" DependsOnTargets="GetAssemblyVersion;AddSourceRevisionToInformationalVersion" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<AssemblyAttribute Include="System.Reflection.AssemblyCompanyAttribute" Condition="'$(Company)' != '' and '$(GenerateAssemblyCompanyAttribute)' == 'true'">
<_Parameter1>$(Company)</_Parameter1>
</AssemblyAttribute>
<AssemblyAttribute Include="System.Reflection.AssemblyConfigurationAttribute" Condition="'$(Configuration)' != '' and '$(GenerateAssemblyConfigurationAttribute)' == 'true'">
<_Parameter1>$(Configuration)</_Parameter1>
</AssemblyAttribute>
<AssemblyAttribute Include="System.Reflection.AssemblyCopyrightAttribute" Condition="'$(Copyright)' != '' and '$(GenerateAssemblyCopyrightAttribute)' == 'true'">
<_Parameter1>$(Copyright)</_Parameter1>
</AssemblyAttribute>
<AssemblyAttribute Include="System.Reflection.AssemblyDescriptionAttribute" Condition="'$(Description)' != '' and '$(GenerateAssemblyDescriptionAttribute)' == 'true'">
<_Parameter1>$(Description)</_Parameter1>
</AssemblyAttribute>
<AssemblyAttribute Include="System.Reflection.AssemblyFileVersionAttribute" Condition="'$(FileVersion)' != '' and '$(GenerateAssemblyFileVersionAttribute)' == 'true'">
<_Parameter1>$(FileVersion)</_Parameter1>
</AssemblyAttribute>
<AssemblyAttribute Include="System.Reflection.AssemblyInformationalVersionAttribute" Condition="'$(InformationalVersion)' != '' and '$(GenerateAssemblyInformationalVersionAttribute)' == 'true'">
<_Parameter1>$(InformationalVersion)</_Parameter1>
</AssemblyAttribute>
<AssemblyAttribute Include="System.Reflection.AssemblyProductAttribute" Condition="'$(Product)' != '' and '$(GenerateAssemblyProductAttribute)' == 'true'">
<_Parameter1>$(Product)</_Parameter1>
</AssemblyAttribute>
<AssemblyAttribute Include="System.Reflection.AssemblyTitleAttribute" Condition="'$(AssemblyTitle)' != '' and '$(GenerateAssemblyTitleAttribute)' == 'true'">
<_Parameter1>$(AssemblyTitle)</_Parameter1>
</AssemblyAttribute>
<AssemblyAttribute Include="System.Reflection.AssemblyVersionAttribute" Condition="'$(AssemblyVersion)' != '' and '$(GenerateAssemblyVersionAttribute)' == 'true'">
<_Parameter1>$(AssemblyVersion)</_Parameter1>
</AssemblyAttribute>
<AssemblyAttribute Include="System.Reflection.AssemblyMetadataAttribute" Condition="'$(GenerateRepositoryUrlAttribute)' == 'true' and ('$(RepositoryUrl)' != '' or '$(PublishRepositoryUrl)' == 'true')">
<_Parameter1>RepositoryUrl</_Parameter1>
<_Parameter2 Condition="'$(RepositoryUrl)' != ''">$(RepositoryUrl)</_Parameter2>
<_Parameter2 Condition="'$(RepositoryUrl)' == ''">$(PrivateRepositoryUrl)</_Parameter2>
</AssemblyAttribute>
<AssemblyAttribute Include="System.Resources.NeutralResourcesLanguageAttribute" Condition="'$(NeutralLanguage)' != '' and '$(GenerateNeutralResourcesLanguageAttribute)' == 'true'">
<_Parameter1>$(NeutralLanguage)</_Parameter1>
</AssemblyAttribute>
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo" Condition="%(InternalsVisibleTo.Identity) != '' and '$(GenerateInternalsVisibleToAttributes)' == 'true'">
<_Parameter1 Condition="'%(InternalsVisibleTo.Key)' != ''">%(InternalsVisibleTo.Identity), PublicKey=%(InternalsVisibleTo.Key)</_Parameter1>
<_Parameter1 Condition="'%(InternalsVisibleTo.Key)' == '' and '$(PublicKey)' != ''">%(InternalsVisibleTo.Identity), PublicKey=$(PublicKey)</_Parameter1>
<_Parameter1 Condition="'%(InternalsVisibleTo.Key)' == '' and '$(PublicKey)' == ''">%(InternalsVisibleTo.Identity)</_Parameter1>
</AssemblyAttribute>
<AssemblyAttribute Include="System.Reflection.AssemblyMetadata" Condition="%(AssemblyMetadata.Identity) != '' and '$(GenerateAssemblyMetadataAttributes)' == 'true'">
<_Parameter1>%(AssemblyMetadata.Identity)</_Parameter1>
<_Parameter2>%(AssemblyMetadata.Value)</_Parameter2>
</AssemblyAttribute>
</ItemGroup>
<ItemGroup Condition="'$(TargetPlatformIdentifier)' != ''&#xD;&#xA; and '$(TargetPlatformVersion)' != ''&#xD;&#xA; and '$(TargetFrameworkIdentifier)' == '.NETCoreApp'&#xD;&#xA; and $([MSBuild]::VersionGreaterThanOrEquals($(_TargetFrameworkVersionWithoutV), '5.0'))">
<AssemblyAttribute Include="System.Runtime.Versioning.TargetPlatformAttribute">
<_Parameter1>$(TargetPlatformIdentifier)$(TargetPlatformVersion)</_Parameter1>
</AssemblyAttribute>
</ItemGroup>
<ItemGroup Condition="'$(TargetPlatformIdentifier)' != ''&#xD;&#xA; and '$(SupportedOSPlatformVersion)' != ''&#xD;&#xA; and '$(TargetFrameworkIdentifier)' == '.NETCoreApp'&#xD;&#xA; and $([MSBuild]::VersionGreaterThanOrEquals($(_TargetFrameworkVersionWithoutV), '5.0'))">
<AssemblyAttribute Include="System.Runtime.Versioning.SupportedOSPlatformAttribute" Condition="!$([MSBuild]::VersionEquals($(SupportedOSPlatformVersion), '0.0'))">
<_Parameter1>$(TargetPlatformIdentifier)$(SupportedOSPlatformVersion)</_Parameter1>
</AssemblyAttribute>
<AssemblyAttribute Include="System.Runtime.Versioning.SupportedOSPlatformAttribute" Condition="$([MSBuild]::VersionEquals($(SupportedOSPlatformVersion), '0.0'))">
<_Parameter1>$(TargetPlatformIdentifier)</_Parameter1>
</AssemblyAttribute>
</ItemGroup>
</Target>
<!--
To allow version changes to be respected on incremental builds (e.g. through CLI parameters),
create a hash of all assembly attributes so that the cache file will change with the calculated
assembly attribute values and msbuild will then execute CoreGenerateAssembly to generate a new file.
-->
<Target Name="CreateGeneratedAssemblyInfoInputsCacheFile" DependsOnTargets="GetAssemblyAttributes" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<GeneratedAssemblyInfoInputsCacheFile>$(IntermediateOutputPath)$(MSBuildProjectName).AssemblyInfoInputs.cache</GeneratedAssemblyInfoInputsCacheFile>
</PropertyGroup>
<!-- We only use up to _Parameter1 for most attributes, but other targets may add additional assembly attributes with multiple parameters. -->
<Hash ItemsToHash="@(AssemblyAttribute->'%(Identity)%(_Parameter1)%(_Parameter2)%(_Parameter3)%(_Parameter4)%(_Parameter5)%(_Parameter6)%(_Parameter7)%(_Parameter8)')">
<Output TaskParameter="HashResult" PropertyName="_AssemblyAttributesHash" />
</Hash>
<WriteLinesToFile Lines="$(_AssemblyAttributesHash)" File="$(GeneratedAssemblyInfoInputsCacheFile)" Overwrite="True" WriteOnlyWhenDifferent="True" />
<ItemGroup>
<FileWrites Include="$(GeneratedAssemblyInfoInputsCacheFile)" />
</ItemGroup>
</Target>
<Target Name="CoreGenerateAssemblyInfo" Condition="'$(Language)'=='VB' or '$(Language)'=='C#'" DependsOnTargets="CreateGeneratedAssemblyInfoInputsCacheFile" Inputs="$(GeneratedAssemblyInfoInputsCacheFile)" Outputs="$(GeneratedAssemblyInfoFile)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<!-- Ensure the generated assemblyinfo file is not already part of the Compile sources, as a workaround for https://github.com/dotnet/sdk/issues/114 -->
<Compile Remove="$(GeneratedAssemblyInfoFile)" />
</ItemGroup>
<WriteCodeFragment AssemblyAttributes="@(AssemblyAttribute)" Language="$(Language)" OutputFile="$(GeneratedAssemblyInfoFile)">
<Output TaskParameter="OutputFile" ItemName="Compile" />
<Output TaskParameter="OutputFile" ItemName="FileWrites" />
</WriteCodeFragment>
</Target>
<!--
==================================================================
GetAssemblyVersion
Parses the nuget package version set in $(Version) and returns
the implied $(AssemblyVersion) and $(FileVersion).
e.g.:
<Version>1.2.3-beta.4</Version>
implies:
<AssemblyVersion>1.2.3</AssemblyVersion>
<FileVersion>1.2.3</FileVersion>
Note that if $(AssemblyVersion) or $(FileVersion) are are already set, it
is considered an override of the default inference from $(Version) and they
are left unchanged by this target.
==================================================================
-->
<Target Name="GetAssemblyVersion" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<GetAssemblyVersion Condition="'$(AssemblyVersion)' == ''" NuGetVersion="$(Version)">
<Output TaskParameter="AssemblyVersion" PropertyName="AssemblyVersion" />
</GetAssemblyVersion>
<PropertyGroup>
<FileVersion Condition="'$(FileVersion)' == ''">$(AssemblyVersion)</FileVersion>
<InformationalVersion Condition="'$(InformationalVersion)' == ''">$(Version)</InformationalVersion>
</PropertyGroup>
</Target>
<!--
============================================================================================================================================
</Import>
C:\Program Files\dotnet\sdk\6.0.100-preview.5.21302.13\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.targets
============================================================================================================================================
-->
<!--
============================================================================================================================================
<Import Project="$(MSBuildThisFileDirectory)Microsoft.NET.GenerateSupportedRuntime.targets">
C:\Program Files\dotnet\sdk\6.0.100-preview.5.21302.13\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.GenerateSupportedRuntime.targets
============================================================================================================================================
-->
<!--
***********************************************************************************************
Microsoft.NET.GenerateSupportedRuntime.targets
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
created a backup copy. Incorrect changes to this file will make it
impossible to load or build your projects from the command-line or the IDE.
Copyright (c) .NET Foundation. All rights reserved.
***********************************************************************************************
-->
<UsingTask TaskName="WriteAppConfigWithSupportedRuntime" AssemblyFile="$(MicrosoftNETBuildTasksAssembly)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<UsingTask TaskName="SetGeneratedAppConfigMetadata" AssemblyFile="$(MicrosoftNETBuildTasksAssembly)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<_GenerateSupportedRuntimeIntermediateAppConfig>$(IntermediateOutputPath)$(TargetFileName).withSupportedRuntime.config</_GenerateSupportedRuntimeIntermediateAppConfig>
</PropertyGroup>
<Target Name="GenerateSupportedRuntime" Condition="'$(GenerateSupportedRuntime)' != 'false' and '$(TargetFrameworkIdentifier)' == '.NETFramework' and '$(HasRuntimeOutput)' == 'true'" DependsOnTargets="_WriteAppConfigWithSupportedRuntime" BeforeTargets="GenerateBindingRedirects" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<SetGeneratedAppConfigMetadata AppConfigFile="@(AppConfigWithTargetPath)" TargetName="$(TargetFileName).config" GeneratedAppConfigFile="$(_GenerateSupportedRuntimeIntermediateAppConfig)">
<Output TaskParameter="OutputAppConfigFileWithMetadata" ItemName="_GenerateSupportedRuntimeAppConfigWithTargetPath" />
</SetGeneratedAppConfigMetadata>
<!--Override the AppConfigWithTargetPath for downstream target-->
<ItemGroup>
<AppConfigWithTargetPath Remove="@(AppConfigWithTargetPath)" />
<AppConfigWithTargetPath Include="@(_GenerateSupportedRuntimeAppConfigWithTargetPath)" />
</ItemGroup>
</Target>
<Target Name="_WriteAppConfigWithSupportedRuntime" Inputs="$(MSBuildAllProjects);@(AppConfigWithTargetPath)" Outputs="$(_GenerateSupportedRuntimeIntermediateAppConfig)" DependsOnTargets="PrepareForBuild" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<WriteAppConfigWithSupportedRuntime AppConfigFile="@(AppConfigWithTargetPath)" TargetFrameworkIdentifier="$(TargetFrameworkIdentifier)" TargetFrameworkVersion="$(TargetFrameworkVersion)" TargetFrameworkProfile="$(TargetFrameworkProfile)" OutputAppConfigFile="$(_GenerateSupportedRuntimeIntermediateAppConfig)" />
<ItemGroup>
<FileWrites Include="@(_GenerateSupportedRuntimeAppConfigWithTargetPath)" />
</ItemGroup>
</Target>
<!--
============================================================================================================================================
</Import>
C:\Program Files\dotnet\sdk\6.0.100-preview.5.21302.13\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.targets
============================================================================================================================================
-->
<!--
============================================================================================================================================
<Import Project="$(MSBuildThisFileDirectory)Microsoft.NET.ComposeStore.targets" Condition="'$(UsingNETSdkDefaults)' == 'true'">
C:\Program Files\dotnet\sdk\6.0.100-preview.5.21302.13\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.ComposeStore.targets
============================================================================================================================================
-->
<!--
***********************************************************************************************
Microsoft.NET.ComposeStore.targets
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
created a backup copy. Incorrect changes to this file will make it
impossible to load or build your projects from the command-line or the IDE.
Copyright (c) .NET Foundation. All rights reserved.
***********************************************************************************************
-->
<!--
============================================================
ComposeStore
The main store entry point.
============================================================
-->
<Target Name="ComposeStore" DependsOnTargets="PrepareForComposeStore;&#xD;&#xA; PrepOptimizer;&#xD;&#xA; StoreWorkerMain;&#xD;&#xA; _CopyResolvedUnOptimizedFiles;&#xD;&#xA; StoreFinalizer;" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<!--
============================================================
StoreWorkerMain
Processes the store project files
============================================================
-->
<Target Name="StoreWorkerMain" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<_AllProjects Include="$(AdditionalProjects.Split('%3B'))" />
<_AllProjects Include="$(MSBuildProjectFullPath)" />
</ItemGroup>
<MSBuild Projects="%(_AllProjects.Identity)" Targets="StoreWorkerMapper" BuildinParallel="$(BuildinParallel)" Properties="ComposeWorkingDir=$(ComposeWorkingDir);&#xD;&#xA; PublishDir=$(PublishDir);&#xD;&#xA; StoreStagingDir=$(StoreStagingDir);&#xD;&#xA; TargetFramework=$(_TFM);&#xD;&#xA; JitPath=$(JitPath);&#xD;&#xA; Crossgen=$(Crossgen);&#xD;&#xA; DisableImplicitFrameworkReferences=true;&#xD;&#xA; SkipUnchangedFiles=$(SkipUnchangedFiles);&#xD;&#xA; PreserveStoreLayout=$(PreserveStoreLayout);&#xD;&#xA; CreateProfilingSymbols=$(CreateProfilingSymbols);&#xD;&#xA; StoreSymbolsStagingDir=$(StoreSymbolsStagingDir)">
<Output ItemName="AllResolvedPackagesPublished" TaskParameter="TargetOutputs" />
</MSBuild>
</Target>
<!--
============================================================
StoreWorkerMapper
Processes each package specified in a store project file
============================================================
-->
<Target Name="StoreWorkerMapper" Returns="@(ResolvedPackagesFromMapper)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<PackageReferencesToStore Include="$(MSBuildProjectFullPath)">
<PackageName>%(PackageReference.Identity)</PackageName>
<PackageVersion>%(PackageReference.Version)</PackageVersion>
<AdditionalProperties>
StorePackageName=%(PackageReference.Identity);
StorePackageVersion=%(PackageReference.Version);
ComposeWorkingDir=$(ComposeWorkingDir);
PublishDir=$(PublishDir);
StoreStagingDir=$(StoreStagingDir);
TargetFramework=$(TargetFramework);
RuntimeIdentifier=$(RuntimeIdentifier);
JitPath=$(JitPath);
Crossgen=$(Crossgen);
SkipUnchangedFiles=$(SkipUnchangedFiles);
PreserveStoreLayout=$(PreserveStoreLayout);
CreateProfilingSymbols=$(CreateProfilingSymbols);
StoreSymbolsStagingDir=$(StoreSymbolsStagingDir);
DisableImplicitFrameworkReferences=false;
</AdditionalProperties>
</PackageReferencesToStore>
</ItemGroup>
<!-- Restore phase -->
<MSBuild Projects="@(PackageReferencesToStore)" Targets="RestoreForComposeStore" BuildInParallel="$(BuildInParallel)" />
<!-- Resolve phase-->
<MSBuild Projects="@(PackageReferencesToStore)" Targets="StoreResolver" Properties="SelfContained=false;UseAppHost=false;MSBuildProjectExtensionsPath=$(ComposeWorkingDir)\%(PackageReferencesToStore.PackageName)_$([System.String]::Copy('%(PackageReferencesToStore.PackageVersion)').Replace('*','-'))\;" BuildInParallel="$(BuildInParallel)">
<Output ItemName="ResolvedPackagesFromMapper" TaskParameter="TargetOutputs" />
</MSBuild>
</Target>
<Target Name="StoreResolver" Returns="@(ResolvedPackagesPublished)" DependsOnTargets="PrepforRestoreForComposeStore;&#xD;&#xA; StoreWorkerPerformWork" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<Target Name="StoreWorkerPerformWork" DependsOnTargets="ComputeAndCopyFilesToStoreDirectory;" Condition="Exists($(StoreWorkerWorkingDir))" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<!--
============================================================
StoreFinalizer
Cleans up and produces artifacts after completion of store
============================================================
-->
<UsingTask TaskName="RemoveDuplicatePackageReferences" AssemblyFile="$(MicrosoftNETBuildTasksAssembly)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<Target Name="StoreFinalizer" DependsOnTargets="StoreWorkerMain;&#xD;&#xA; _CopyResolvedOptimizedFiles" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<RemoveDuplicatePackageReferences InputPackageReferences="@(AllResolvedPackagesPublished)">
<Output TaskParameter="UniquePackageReferences" ItemName="AllResolvedPackagesPublishedAfterFilter" />
</RemoveDuplicatePackageReferences>
<ItemGroup>
<ListOfPackageReference Include="@(AllResolvedPackagesPublishedAfterFilter -> '%20%20&lt;Package Id=&quot;%(Identity)&quot; Version=&quot;%(Version)&quot; /&gt;')" />
</ItemGroup>
<PropertyGroup>
<_StoreArtifactContent><![CDATA[
<StoreArtifacts>
@(ListOfPackageReference)
</StoreArtifacts>
]]></_StoreArtifactContent>
</PropertyGroup>
<WriteLinesToFile File="$(StoreArtifactXml)" Lines="$(_StoreArtifactContent)" Overwrite="true" />
<Message Text="Files were composed in $(PublishDir)" Importance="high" />
<Message Text="The list of packages stored is in $(StoreArtifactXml) " Importance="high" />
<RemoveDir Condition="'$(PreserveComposeWorkingDir)' != 'true'" Directories="$(ComposeWorkingDir)" />
</Target>
<!--
============================================================
_CopyResolvedUnOptimizedFiles
Copy OptimizedResolvedFileToPublish items to the publish directory.
============================================================
-->
<Target Name="_CopyResolvedOptimizedFiles" DependsOnTargets="StoreWorkerMain;" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<_OptimizedResolvedFileToPublish Include="$(StoreStagingDir)\**\*.*" />
<_OptimizedSymbolFileToPublish Include="$(StoreSymbolsStagingDir)\**\*.*" />
</ItemGroup>
<Copy SourceFiles="@(_OptimizedResolvedFileToPublish)" DestinationFolder="$(PublishDir)%(_OptimizedResolvedFileToPublish.RecursiveDir)" OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)" Retries="$(CopyRetryCount)" RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)" Condition="'@(_OptimizedResolvedFileToPublish)' != ''" SkipUnchangedFiles="$(SkipUnchangedFiles)">
<Output TaskParameter="DestinationFiles" ItemName="FileWrites" />
</Copy>
<Copy SourceFiles="@(_OptimizedSymbolFileToPublish)" DestinationFolder="$(ProfilingSymbolsDir)%(_OptimizedSymbolFileToPublish.RecursiveDir)" OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)" Retries="$(CopyRetryCount)" RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)" Condition="'@(_OptimizedSymbolFileToPublish)' != ''" SkipUnchangedFiles="$(SkipUnchangedFiles)">
<Output TaskParameter="DestinationFiles" ItemName="FileWrites" />
</Copy>
</Target>
<!--
============================================================
PrepareForComposeStore
Prepare the prerequisites for ComposeStore.
============================================================
-->
<Target Name="PrepareForComposeStore" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<PreserveStoreLayout Condition="'$(PreserveStoreLayout)' == ''">true</PreserveStoreLayout>
<SkipOptimization Condition="'$(RuntimeIdentifier)' == ''">true</SkipOptimization>
<_TFM Condition="'$(_TFM)' == ''">$(TargetFramework)</_TFM>
<SkipUnchangedFiles Condition="'$(SkipUnchangedFiles)' == ''">true</SkipUnchangedFiles>
</PropertyGroup>
<NETSdkError Condition="'2.0' &gt; '$(_TargetFrameworkVersionWithoutV)'" ResourceName="UnuspportedFramework" FormatArguments="$(TargetFrameworkMoniker)" />
<NETSdkError Condition="'$(RuntimeIdentifier)' =='' and '$(_PureManagedAssets)' == ''" ResourceName="RuntimeIdentifierWasNotSpecified" />
<NETSdkError Condition="'$(_TFM)' ==''" ResourceName="AtLeastOneTargetFrameworkMustBeSpecified" />
<PropertyGroup>
<DefaultComposeDir>$(UserProfileRuntimeStorePath)</DefaultComposeDir>
<_ProfilingSymbolsDirectoryName>symbols</_ProfilingSymbolsDirectoryName>
<DefaultProfilingSymbolsDir>$([System.IO.Path]::Combine($(DefaultComposeDir), $(_ProfilingSymbolsDirectoryName)))</DefaultProfilingSymbolsDir>
<ProfilingSymbolsDir Condition="'$(ProfilingSymbolsDir)' == '' and '$(ComposeDir)' != ''">$([System.IO.Path]::Combine($(ComposeDir), $(_ProfilingSymbolsDirectoryName)))</ProfilingSymbolsDir>
<ProfilingSymbolsDir Condition="'$(ProfilingSymbolsDir)' != '' and '$(DoNotDecorateComposeDir)' != 'true'">$([System.IO.Path]::Combine($(ProfilingSymbolsDir), $(PlatformTarget)))</ProfilingSymbolsDir>
<ProfilingSymbolsDir Condition="'$(ProfilingSymbolsDir)' == ''">$(DefaultProfilingSymbolsDir)</ProfilingSymbolsDir>
<ProfilingSymbolsDir Condition="'$(DoNotDecorateComposeDir)' != 'true'">$([System.IO.Path]::Combine($(ProfilingSymbolsDir), $(_TFM)))</ProfilingSymbolsDir>
<ProfilingSymbolsDir Condition="!HasTrailingSlash('$(ProfilingSymbolsDir)')">$(ProfilingSymbolsDir)\</ProfilingSymbolsDir>
<ComposeDir Condition="'$(ComposeDir)' == ''">$(DefaultComposeDir)</ComposeDir>
<ComposeDir Condition="'$(DoNotDecorateComposeDir)' != 'true'">$([System.IO.Path]::Combine($(ComposeDir), $(PlatformTarget)))</ComposeDir>
<ComposeDir Condition="'$(DoNotDecorateComposeDir)' != 'true'">$([System.IO.Path]::Combine($(ComposeDir), $(_TFM)))</ComposeDir>
<StoreArtifactXml>$([System.IO.Path]::Combine($(ComposeDir),"artifact.xml"))</StoreArtifactXml>
<PublishDir>$([System.IO.Path]::GetFullPath($(ComposeDir)))</PublishDir>
<_RandomFileName>$([System.IO.Path]::GetRandomFileName())</_RandomFileName>
<TEMP Condition="'$(TEMP)' == ''">$([System.IO.Path]::GetTempPath())</TEMP>
<ComposeWorkingDir Condition="'$(ComposeWorkingDir)' == ''">$([System.IO.Path]::Combine($(TEMP), $(_RandomFileName)))</ComposeWorkingDir>
<ComposeWorkingDir>$([System.IO.Path]::GetFullPath($(ComposeWorkingDir)))</ComposeWorkingDir>
<StoreStagingDir>$([System.IO.Path]::Combine($(ComposeWorkingDir),"StagingDir"))</StoreStagingDir>
<!-- Will contain optimized managed assemblies in nuget cache layout -->
<StoreSymbolsStagingDir>$([System.IO.Path]::Combine($(ComposeWorkingDir),"SymbolsStagingDir"))</StoreSymbolsStagingDir>
<!-- Ensure any PublishDir has a trailing slash, so it can be concatenated -->
<PublishDir Condition="!HasTrailingSlash('$(PublishDir)')">$(PublishDir)\</PublishDir>
</PropertyGroup>
<PropertyGroup Condition="'$(CreateProfilingSymbols)' == ''">
<!-- There is no support for profiling symbols on OSX -->
<CreateProfilingSymbols Condition="$(RuntimeIdentifier.StartsWith('osx'))">false</CreateProfilingSymbols>
<CreateProfilingSymbols Condition="'$(CreateProfilingSymbols)' == ''">true</CreateProfilingSymbols>
</PropertyGroup>
<NETSdkError Condition="Exists($(ComposeWorkingDir))" ResourceName="FolderAlreadyExists" FormatArguments="$(ComposeWorkingDir)" />
<MakeDir Directories="$(PublishDir)" />
<MakeDir Directories="$(StoreStagingDir)" />
</Target>
<Target Name="PrepforRestoreForComposeStore" DependsOnTargets="_DefaultMicrosoftNETPlatformLibrary" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<StorePackageVersionForFolderName>$(StorePackageVersion.Replace('*','-'))</StorePackageVersionForFolderName>
<StoreWorkerWorkingDir>$([System.IO.Path]::Combine($(ComposeWorkingDir),"$(StorePackageName)_$(StorePackageVersionForFolderName)"))</StoreWorkerWorkingDir>
<_PackageProjFile>$([System.IO.Path]::Combine($(StoreWorkerWorkingDir), "Restore.csproj"))</_PackageProjFile>
<BaseIntermediateOutputPath>$(StoreWorkerWorkingDir)\</BaseIntermediateOutputPath>
<ProjectAssetsFile>$(BaseIntermediateOutputPath)\project.assets.json</ProjectAssetsFile>
</PropertyGroup>
<PropertyGroup>
<PackagesToPrune>$(MicrosoftNETPlatformLibrary)</PackagesToPrune>
<SelfContained Condition="'$(SelfContained)' == ''">true</SelfContained>
</PropertyGroup>
</Target>
<!--
============================================================
RestoreForComposeStore
Restores the package
============================================================
-->
<Target Name="RestoreForComposeStore" DependsOnTargets="PrepforRestoreForComposeStore;" Condition="!Exists($(StoreWorkerWorkingDir))" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<MakeDir Directories="$(StoreWorkerWorkingDir)" />
<MSBuild Projects="$(MSBuildProjectFullPath)" Targets="Restore" Properties="RestoreGraphProjectInput=$(MSBuildProjectFullPath);&#xD;&#xA; RestoreOutputPath=$(BaseIntermediateOutputPath);&#xD;&#xA; StorePackageName=$(StorePackageName);&#xD;&#xA; StorePackageVersion=$(StorePackageVersion);&#xD;&#xA; RuntimeIdentifier=$(RuntimeIdentifier);&#xD;&#xA; TargetFramework=$(TargetFramework);" />
</Target>
<!--
============================================================
ComputeAndCopyFilesToStoreDirectory
Computes the list of all files to copy to the publish directory and then publishes them.
============================================================
-->
<Target Name="ComputeAndCopyFilesToStoreDirectory" DependsOnTargets="ComputeFilesToStore;&#xD;&#xA; CopyFilesToStoreDirectory" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<!--
============================================================
CopyFilesToStoreDirectory
Copy all build outputs, satellites and other necessary files to the publish directory.
============================================================
-->
<Target Name="CopyFilesToStoreDirectory" DependsOnTargets="_CopyResolvedUnOptimizedFiles" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<!--
============================================================
_CopyResolvedUnOptimizedFiles
Copy _UnOptimizedResolvedFileToPublish items to the publish directory.
============================================================
-->
<Target Name="_CopyResolvedUnOptimizedFiles" DependsOnTargets="_ComputeResolvedFilesToStoreTypes;&#xD;&#xA; _RunOptimizer" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Copy SourceFiles="@(_UnOptimizedResolvedFileToPublish)" DestinationFiles="$(PublishDir)%(_UnOptimizedResolvedFileToPublish.DestinationSubPath)" OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)" Retries="$(CopyRetryCount)" RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)" SkipUnchangedFiles="$(SkipUnchangedFiles)">
<Output TaskParameter="DestinationFiles" ItemName="FileWrites" />
</Copy>
</Target>
<!--
============================================================
_ComputeResolvedFilesToStoreTypes
============================================================
-->
<Target Name="_ComputeResolvedFilesToStoreTypes" DependsOnTargets="_GetResolvedFilesToStore;_SplitResolvedFiles;" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<!--
============================================================
_SplitResolvedFiles
Splits ResolvedFileToPublish items into 'managed' and 'unmanaged' buckets.
============================================================
-->
<Target Name="_SplitResolvedFiles" Condition="$(SkipOptimization) !='true' " DependsOnTargets="_GetResolvedFilesToStore" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<_ManagedResolvedFileToPublishCandidates Include="@(ResolvedFileToPublish)" Condition="'%(ResolvedFileToPublish.AssetType)'=='runtime'" />
<_UnOptimizedResolvedFileToPublish Include="@(ResolvedFileToPublish)" Condition="'%(ResolvedFileToPublish.AssetType)'!='runtime'" />
</ItemGroup>
<PropertyGroup>
<SkipOptimization Condition="'@(_ManagedResolvedFileToPublishCandidates)'==''">true</SkipOptimization>
</PropertyGroup>
</Target>
<!--
============================================================
_GetResolvedFilesToStore
============================================================
-->
<Target Name="_GetResolvedFilesToStore" Condition="$(SkipOptimization) == 'true' " xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<_UnOptimizedResolvedFileToPublish Include="@(ResolvedFileToPublish)" />
</ItemGroup>
</Target>
<!--
============================================================
ComputeFilesToStore
Gathers all the files that need to be copied to the publish directory.
============================================================
-->
<UsingTask TaskName="FilterResolvedFiles" AssemblyFile="$(MicrosoftNETBuildTasksAssembly)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<Target Name="ComputeFilesToStore" DependsOnTargets="_ComputeResolvedCopyLocalPublishAssets;&#xD;&#xA; _ComputeCopyToPublishDirectoryItems" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<CopyBuildOutputToPublishDirectory Condition="'$(CopyBuildOutputToPublishDirectory)'==''">true</CopyBuildOutputToPublishDirectory>
<CopyOutputSymbolsToPublishDirectory Condition="'$(CopyOutputSymbolsToPublishDirectory)'==''">true</CopyOutputSymbolsToPublishDirectory>
</PropertyGroup>
<FilterResolvedFiles AssetsFilePath="$(ProjectAssetsFile)" ResolvedFiles="@(_ResolvedCopyLocalPublishAssets)" PackagesToPrune="$(PackagesToPrune)" TargetFramework="$(TargetFramework)" RuntimeIdentifier="$(RuntimeIdentifier)" IsSelfContained="$(SelfContained)">
<Output TaskParameter="AssembliesToPublish" ItemName="ResolvedFileToPublish" />
<Output TaskParameter="PublishedPackages" ItemName="PackagesThatWereResolved" />
</FilterResolvedFiles>
<ItemGroup>
<ResolvedPackagesPublished Include="@(PackagesThatWereResolved)" Condition="$(DoNotTrackPackageAsResolved) !='true'" />
</ItemGroup>
</Target>
<!--
============================================================
PrepRestoreForStoreProjects
Removes specified PackageReference for store and inserts the specified StorePackageName
============================================================
-->
<Target Name="PrepRestoreForStoreProjects" BeforeTargets="_GenerateProjectRestoreGraphPerFramework;" Condition="'$(StorePackageName)' != ''" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<PackageReference Remove="@(PackageReference)" Condition="'%(PackageReference.IsImplicitlyDefined)' != 'true'" />
<PackageReference Include="$(StorePackageName)" Version="$(StorePackageVersion)" />
</ItemGroup>
</Target>
<!--
============================================================================================================================================
</Import>
C:\Program Files\dotnet\sdk\6.0.100-preview.5.21302.13\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.targets
============================================================================================================================================
-->
<!--
============================================================================================================================================
<Import Project="$(MSBuildThisFileDirectory)Microsoft.NET.CrossGen.targets">
C:\Program Files\dotnet\sdk\6.0.100-preview.5.21302.13\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets
============================================================================================================================================
-->
<!--
***********************************************************************************************
Microsoft.NET.CrossGen.targets
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
created a backup copy. Incorrect changes to this file will make it
impossible to load or build your projects from the command-line or the IDE.
Copyright (c) .NET Foundation. All rights reserved.
***********************************************************************************************
-->
<PropertyGroup Condition="'$(PublishReadyToRun)' == 'true' and '$(TargetFrameworkIdentifier)' == '.NETCoreApp' and '$(_TargetFrameworkVersionWithoutV)' &gt;= '3.0'" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- For .NET 6 and higher, default to using Crossgen2 in non-composite mode -->
<PublishReadyToRunUseCrossgen2 Condition="'$(PublishReadyToRunUseCrossgen2)' == '' and '$(_TargetFrameworkVersionWithoutV)' &gt;= '6.0'">true</PublishReadyToRunUseCrossgen2>
<PublishReadyToRunComposite Condition="'$(PublishReadyToRunComposite)' == '' and '$(_TargetFrameworkVersionWithoutV)' &gt;= '6.0'">false</PublishReadyToRunComposite>
<PublishReadyToRunComposite Condition="'$(PublishReadyToRunComposite)' == ''">true</PublishReadyToRunComposite>
<PublishReadyToRunComposite Condition="'$(PublishReadyToRunUseCrossgen2)' != 'true' or '$(SelfContained)' != 'true'">false</PublishReadyToRunComposite>
<PublishReadyToRunUseRuntimePackOptimizationData Condition="'$(PublishReadyToRunUseRuntimePackOptimizationData)' == ''">true</PublishReadyToRunUseRuntimePackOptimizationData>
</PropertyGroup>
<!--
============================================================
PrepOptimizer
Sets up the common infrastructure for the optimization phase
Outputs:
JitPath
Crossgen
============================================================
-->
<Target Name="PrepOptimizer" DependsOnTargets="_RestoreCrossgen;" Condition="$(SkipOptimization) != 'true' " xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- Get the coreclr path -->
<ItemGroup>
<_CoreclrResolvedPath Include="@(CrossgenResolvedAssembliesToPublish)" Condition="'%(CrossgenResolvedAssembliesToPublish.Filename)'=='coreclr'" />
<_CoreclrResolvedPath Include="@(CrossgenResolvedAssembliesToPublish)" Condition="'%(CrossgenResolvedAssembliesToPublish.Filename)'=='libcoreclr'" />
<_JitResolvedPath Include="@(CrossgenResolvedAssembliesToPublish)" Condition="'%(CrossgenResolvedAssembliesToPublish.Filename)'=='clrjit'" />
<_JitResolvedPath Include="@(CrossgenResolvedAssembliesToPublish)" Condition="'%(CrossgenResolvedAssembliesToPublish.Filename)'=='libclrjit'" />
</ItemGroup>
<NETSdkError Condition="'@(_CoreclrResolvedPath-&gt;Count())' &gt; 1" ResourceName="MultipleFilesResolved" FormatArguments="coreclr" />
<NETSdkError Condition="'@(_CoreclrResolvedPath)'== ''" ResourceName="UnableToFindResolvedPath" FormatArguments="coreclr" />
<NETSdkError Condition="'@(_JitResolvedPath-&gt;Count())' &gt; 1" ResourceName="MultipleFilesResolved" FormatArguments="jit" />
<NETSdkError Condition="'@(_JitResolvedPath)'== ''" ResourceName="UnableToFindResolvedPath" FormatArguments="jit" />
<!-- Get the crossgen and jit path-->
<PropertyGroup>
<_CoreclrPath>@(_CoreclrResolvedPath)</_CoreclrPath>
<JitPath>@(_JitResolvedPath)</JitPath>
<_CoreclrDir>$([System.IO.Path]::GetDirectoryName($(_CoreclrPath)))</_CoreclrDir>
<_CoreclrPkgDir>$([System.IO.Path]::Combine($(_CoreclrDir),"..\..\..\"))</_CoreclrPkgDir>
<CrossgenDir>$([System.IO.Path]::Combine($(_CoreclrPkgDir),"tools"))</CrossgenDir>
<!-- TODO override with rid specific tools path for x-arch -->
<Crossgen>$([System.IO.Path]::Combine($(CrossgenDir),"crossgen"))</Crossgen>
<Crossgen Condition="$([MSBuild]::IsOSPlatform(`Windows`))">$([System.IO.Path]::Combine($(CrossgenDir),"crossgen.exe"))</Crossgen>
</PropertyGroup>
<NETSdkError Condition="!Exists($(Crossgen))" ResourceName="UnableToFindResolvedPath" FormatArguments="$(Crossgen)" />
<!-- Copy crossgen into the netcoreapp folder to ensure it can load Microsoft.DiaSymReader.Native when creating PDBs -->
<Copy SourceFiles="$(Crossgen)" DestinationFolder="$(_NetCoreRefDir)" OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)" Retries="$(CopyRetryCount)" RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)" UseHardlinksIfPossible="$(CreateHardLinksForPublishFilesIfPossible)" UseSymboliclinksIfPossible="$(CreateSymbolicLinksForPublishFilesIfPossible)">
<Output TaskParameter="DestinationFiles" ItemName="FileWrites" />
</Copy>
<PropertyGroup>
<Crossgen>$([System.IO.Path]::GetFullPath($([System.IO.Path]::Combine($(_NetCoreRefDir), $([System.IO.Path]::GetFileName($(Crossgen)))))))</Crossgen>
</PropertyGroup>
</Target>
<!--
============================================================
_RunOptimizer
Start the optimization phase
============================================================
-->
<Target Name="_RunOptimizer" DependsOnTargets="_InitializeBasicProps;&#xD;&#xA; _ComputeResolvedFilesToStoreTypes;&#xD;&#xA; _SetupStageForCrossgen" Condition="$(SkipOptimization) != 'true' " xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<AssembliestoCrossgen Include="$(MSBuildProjectFullPath)">
<Properties>
CrossgenExe=$(Crossgen);
CrossgenJit=$(JitPath);
CrossgenInputAssembly=%(_ManagedResolvedFilesToOptimize.Fullpath);
CrossgenOutputAssembly=$(_RuntimeOptimizedDir)$(DirectorySeparatorChar)%(_ManagedResolvedFilesToOptimize.FileName)%(_ManagedResolvedFilesToOptimize.Extension);
CrossgenSubOutputPath=%(_ManagedResolvedFilesToOptimize.DestinationSubPath);
_RuntimeOptimizedDir=$(_RuntimeOptimizedDir);
PublishDir=$(StoreStagingDir);
CrossgenPlatformAssembliesPath=$(_RuntimeRefDir)$(PathSeparator)$(_NetCoreRefDir);
CreateProfilingSymbols=$(CreateProfilingSymbols);
StoreSymbolsStagingDir=$(StoreSymbolsStagingDir);
_RuntimeSymbolsDir=$(_RuntimeSymbolsDir)
</Properties>
</AssembliestoCrossgen>
</ItemGroup>
<!-- CrossGen the assemblies -->
<MSBuild Projects="@(AssembliestoCrossgen)" Targets="RunCrossGen" BuildInParallel="$(BuildInParallel)" Condition="'@(_ManagedResolvedFilesToOptimize)' != ''" />
</Target>
<!--
============================================================
RunCrossGen
Target Encapsulating the crossgen command
============================================================
-->
<Target Name="RunCrossGen" DependsOnTargets="_InitializeBasicProps;" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<CrossgenProfilingSymbolsOutputDirectory>$([System.IO.Path]::GetDirectoryName($(_RuntimeSymbolsDir)\$(CrossgenSubOutputPath)))</CrossgenProfilingSymbolsOutputDirectory>
<CrossgenSymbolsStagingDirectory>$([System.IO.Path]::GetDirectoryName($(StoreSymbolsStagingDir)\$(CrossgenSubOutputPath)))</CrossgenSymbolsStagingDirectory>
<CrossgenCommandline>$(CrossgenExe) -nologo -readytorun -in "$(CrossgenInputAssembly)" -out "$(CrossgenOutputAssembly)" -jitpath "$(CrossgenJit)" -platform_assemblies_paths "$(CrossgenPlatformAssembliesPath)"</CrossgenCommandline>
<CreateProfilingSymbolsOptionName Condition="$([MSBuild]::IsOSPlatform(`Windows`))">CreatePDB</CreateProfilingSymbolsOptionName>
<CreateProfilingSymbolsOptionName Condition="'$(CreateProfilingSymbolsOptionName)' == ''">CreatePerfMap</CreateProfilingSymbolsOptionName>
</PropertyGroup>
<Message Text="CrossgenCommandline: $(CrossgenCommandline)" />
<!--Optimization skip if the assembly is already present in the final output directory-->
<Exec Command="$(CrossgenCommandline)" Condition="!Exists($([System.IO.Path]::Combine($(PublishDir),$(CrossgenSubOutputPath))))" IgnoreStandardErrorWarningFormat="true" />
<Copy SourceFiles="$(CrossgenOutputAssembly)" DestinationFiles="$(PublishDir)\$(CrossgenSubOutputPath)" OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)" Retries="$(CopyRetryCount)" RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)" Condition="!Exists($([System.IO.Path]::Combine($(PublishDir),$(CrossgenSubOutputPath))))">
<Output TaskParameter="DestinationFiles" ItemName="FileWrites" />
</Copy>
<!-- Create profiling symbols if requested -->
<MakeDir Directories="$(CrossgenProfilingSymbolsOutputDirectory)" Condition="'$(CreateProfilingSymbols)' == 'true' and Exists($(CrossgenOutputAssembly))" />
<Exec Command="$(CrossgenExe) -nologo -readytorun -platform_assemblies_paths $(CrossgenPlatformAssembliesPath) -$(CreateProfilingSymbolsOptionName) $(CrossgenProfilingSymbolsOutputDirectory) $(CrossgenOutputAssembly)" Condition="'$(CreateProfilingSymbols)' == 'true' and Exists($(CrossgenOutputAssembly))" IgnoreStandardErrorWarningFormat="true" />
<ItemGroup>
<_ProfilingSymbols Include="$(CrossgenProfilingSymbolsOutputDirectory)\*" Condition="'$(CreateProfilingSymbols)' == 'true'" />
</ItemGroup>
<Copy SourceFiles="@(_ProfilingSymbols)" DestinationFolder="$(CrossgenSymbolsStagingDirectory)" Condition="'$(CreateProfilingSymbols)' == 'true'" OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)" Retries="$(CopyRetryCount)" RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)">
<Output TaskParameter="DestinationFiles" ItemName="FileWrites" />
</Copy>
</Target>
<Target Name="_InitializeBasicProps" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<PathSeparator>$([System.IO.Path]::PathSeparator)</PathSeparator>
<DirectorySeparatorChar>$([System.IO.Path]::DirectorySeparatorChar)</DirectorySeparatorChar>
</PropertyGroup>
</Target>
<!--
============================================================
_GetCrossgenProps
Generates props used by Crossgen
============================================================
-->
<Target Name="_GetCrossgenProps" Condition="$(SkipOptimization) != 'true' " xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<_CrossProjFileDir>$([System.IO.Path]::Combine($(ComposeWorkingDir),"Optimize"))</_CrossProjFileDir>
<_NetCoreRefDir>$([System.IO.Path]::Combine($(_CrossProjFileDir), "netcoreapp"))</_NetCoreRefDir>
<!-- flat netcore app assemblies-->
</PropertyGroup>
<MakeDir Directories="$(_CrossProjFileDir)" />
<PropertyGroup>
<_CrossProjAssetsFile>$([System.IO.Path]::Combine($(_CrossProjFileDir), project.assets.json))</_CrossProjAssetsFile>
</PropertyGroup>
</Target>
<!--
============================================================
_SetupStageForCrossgen
============================================================
-->
<Target Name="_SetupStageForCrossgen" DependsOnTargets="_GetCrossgenProps;" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<_RuntimeRefDir>$([System.IO.Path]::Combine($(StoreWorkerWorkingDir), "runtimeref"))</_RuntimeRefDir>
<!-- flat app managed assemblies -->
<_RuntimeOptimizedDir>$([System.IO.Path]::Combine($(StoreWorkerWorkingDir), "runtimopt"))</_RuntimeOptimizedDir>
<!-- optimized app managed assemblies in nuget cache layout -->
<_RuntimeSymbolsDir>$([System.IO.Path]::Combine($(StoreWorkerWorkingDir), "runtimesymbols"))</_RuntimeSymbolsDir>
</PropertyGroup>
<ItemGroup>
<_ManagedResolvedFilesToOptimize Include="@(_ManagedResolvedFileToPublishCandidates)" />
</ItemGroup>
<MakeDir Directories="$(_RuntimeOptimizedDir)" />
<MakeDir Directories="$(_RuntimeSymbolsDir)" Condition="'$(CreateProfilingSymbols)' == 'true'" />
<!-- Copy managed files to a flat temp directory for passing it as ref -->
<Copy SourceFiles="@(_ManagedResolvedFilesToOptimize)" DestinationFolder="$(_RuntimeRefDir)" OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)" Retries="$(CopyRetryCount)" RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)" UseHardlinksIfPossible="$(CreateHardLinksForPublishFilesIfPossible)" UseSymboliclinksIfPossible="$(CreateSymbolicLinksForPublishFilesIfPossible)">
<Output TaskParameter="DestinationFiles" ItemName="FileWrites" />
</Copy>
</Target>
<!--
============================================================
_RestoreCrossgen
Restores netcoreapp and publishes it to a temp directory
============================================================
-->
<Target Name="_RestoreCrossgen" DependsOnTargets="PrepforRestoreForComposeStore;&#xD;&#xA; _SetupStageForCrossgen;&#xD;&#xA; ProcessFrameworkReferences;&#xD;&#xA; ApplyImplicitVersions;&#xD;&#xA; _ComputePackageReferencePublish" Condition="$(SkipOptimization) != 'true' " xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<!-- Filter package references to the one for the platform library, in order to find the right version -->
<PackageReferenceForCrossGen Include="@(PackageReference)" Condition="'%(Identity)' == '$(MicrosoftNETPlatformLibrary)'" />
</ItemGroup>
<MSBuild Projects="$(MSBuildProjectFullPath)" Targets="Restore" Properties="RuntimeIdentifiers=$(RuntimeIdentifier);&#xD;&#xA; RestoreGraphProjectInput=$(MSBuildProjectFullPath);&#xD;&#xA; RestoreOutputPath=$(_CrossProjFileDir);&#xD;&#xA; StorePackageName=$(MicrosoftNETPlatformLibrary);&#xD;&#xA; StorePackageVersion=%(PackageReferenceForCrossGen.Version);" />
<!-- For future: Use ResolvePackageAssets instead of ResolveCopyLocalAssets, delete ResolveCopyLocalAssets task -->
<ResolveCopyLocalAssets Condition="'$(_TargetFrameworkVersionWithoutV)' &lt; '3.0'" AssetsFilePath="$(_CrossProjAssetsFile)" TargetFramework="$(_TFM)" RuntimeIdentifier="$(RuntimeIdentifier)" PlatformLibraryName="$(MicrosoftNETPlatformLibrary)" RuntimeFrameworks="@(RuntimeFramework)" ExcludedPackageReferences="@(_ExcludeFromPublishPackageReference)" IsSelfContained="$(SelfContained)" PreserveStoreLayout="false">
<Output TaskParameter="ResolvedAssets" ItemName="CrossgenResolvedAssembliesToPublish" />
</ResolveCopyLocalAssets>
<GetPackageDirectory Condition="'$(_TargetFrameworkVersionWithoutV)' &gt;= '3.0'" Items="@(RuntimePack)" AssetsFileWithAdditionalPackageFolders="$(_CrossProjAssetsFile)">
<Output TaskParameter="Output" ItemName="_CrossgenRuntimePack" />
</GetPackageDirectory>
<ResolveRuntimePackAssets Condition="'$(_TargetFrameworkVersionWithoutV)' &gt;= '3.0'" FrameworkReferences="@(FrameworkReference)" ResolvedRuntimePacks="@(_CrossgenRuntimePack)">
<Output TaskParameter="RuntimePackAssets" ItemName="CrossgenResolvedAssembliesToPublish" />
</ResolveRuntimePackAssets>
<!-- Copy managed files to a flat temp directory for passing it as ref for crossgen -->
<Copy SourceFiles="@(CrossgenResolvedAssembliesToPublish)" DestinationFolder="$(_NetCoreRefDir)" OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)" Retries="$(CopyRetryCount)" RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)" UseHardlinksIfPossible="$(CreateHardLinksForPublishFilesIfPossible)" UseSymboliclinksIfPossible="$(CreateSymbolicLinksForPublishFilesIfPossible)">
<Output TaskParameter="DestinationFiles" ItemName="FileWrites" />
</Copy>
</Target>
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<MicrosoftNETCrossgenBuildTasksAssembly Condition="'$(MSBuildRuntimeType)' == 'Core'">$(MSBuildThisFileDirectory)..\tasks\net6.0\Microsoft.NET.Sdk.Crossgen.dll</MicrosoftNETCrossgenBuildTasksAssembly>
<MicrosoftNETCrossgenBuildTasksAssembly Condition="'$(MSBuildRuntimeType)' != 'Core'">$(MSBuildThisFileDirectory)..\tasks\net472\Microsoft.NET.Sdk.Crossgen.dll</MicrosoftNETCrossgenBuildTasksAssembly>
</PropertyGroup>
<!--
============================================================
CreateReadyToRunImages
Create ReadyToRun images for managed assemblies in _ResolvedFileToPublishAlways and _ResolvedFileToPublishPreserveNewest.
============================================================
-->
<Target Name="CreateReadyToRunImages" Condition="'$(_TargetFrameworkVersionWithoutV)' &gt;= '3.0' And '$(PublishReadyToRun)' == 'true' And '$(TargetFrameworkIdentifier)' == '.NETCoreApp'" DependsOnTargets="_PrepareForReadyToRunCompilation;&#xD;&#xA; _CreateR2RImages;&#xD;&#xA; _CreateR2RSymbols" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<AllowEmptyTelemetry EventName="ReadyToRun" EventData="PublishReadyToRunUseCrossgen2=$(PublishReadyToRunUseCrossgen2);Crossgen2PackVersion=%(ResolvedCrossgen2Pack.NuGetPackageVersion);CompileListCount=@(_ReadyToRunCompileList-&gt;Count());FailedCount=@(_ReadyToRunCompilationFailures-&gt;Count())" />
<NETSdkError Condition="'@(_ReadyToRunCompilationFailures)' != ''" ResourceName="ReadyToRunCompilationFailed" />
<NETSdkInformation Condition="'$(_ReadyToRunCompilerHasWarnings)' != ''" ResourceName="ReadyToRunCompilationHasWarnings_Info" />
<ItemGroup>
<!--
Note: we only remove the entries for the IL images and replace them with the entries for the R2R images.
We do not do the same for PDBs, because the native PDBs created by the R2R compiler complement the IL PDBs
and do not replace them. IL PDBs are still required for debugging. Native PDBs emitted by the R2R compiler are
only used for profiling purposes.
-->
<ResolvedFileToPublish Remove="@(_ReadyToRunCompositeBuildInput)" />
<ResolvedFileToPublish Remove="@(_ReadyToRunCompileList)" />
<ResolvedFileToPublish Include="@(_ReadyToRunFilesToPublish)" />
</ItemGroup>
</Target>
<!--
============================================================
_PrepareForReadyToRunCompilation
Prepare build for ReadyToRun compilations. Builds list of assemblies to compile, and computes paths to ReadyToRun compiler bits
============================================================
-->
<UsingTask Condition="'$(Crossgen2TasksOverriden)' != 'true'" TaskName="PrepareForReadyToRunCompilation" AssemblyFile="$(MicrosoftNETBuildTasksAssembly)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<Target Name="_PrepareForReadyToRunCompilation" DependsOnTargets="ResolveReadyToRunCompilers;_ComputeManagedRuntimePackAssemblies;_ComputeAssembliesToPostprocessOnPublish" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<_ReadyToRunOutputPath>$(IntermediateOutputPath)R2R</_ReadyToRunOutputPath>
</PropertyGroup>
<MakeDir Directories="$(_ReadyToRunOutputPath)" />
<ItemGroup>
<_ReadyToRunImplementationAssemblies Include="@(ResolvedFileToPublish-&gt;WithMetadataValue('PostprocessAssembly', 'true'))" />
</ItemGroup>
<!-- Even if app is not self-contained, crossgen requires closure of implementation assemblies. Resolve conflicts
of the runtime pack assets as though we were copying them locally, and add them to the R2R implementation
assembly list. -->
<ItemGroup Condition="'$(SelfContained)' != 'true'">
<_ReadyToRunImplementationAssemblies Include="@(_ManagedRuntimePackAssembly)" ReferenceOnly="true" />
</ItemGroup>
<ResolvePackageFileConflicts Condition="'$(SelfContained)' != 'true'" ReferenceCopyLocalPaths="@(_ReadyToRunImplementationAssemblies)">
<Output TaskParameter="ReferenceCopyLocalPathsWithoutConflicts" ItemName="_ReadyToRunImplementationAssembliesWithoutConflicts" />
</ResolvePackageFileConflicts>
<ItemGroup Condition="'$(SelfContained)' != 'true'">
<_ReadyToRunImplementationAssemblies Remove="@(_ReadyToRunImplementationAssemblies)" />
<_ReadyToRunImplementationAssemblies Include="@(_ReadyToRunImplementationAssembliesWithoutConflicts)" />
</ItemGroup>
<ItemGroup>
<_ReadyToRunPgoFiles Include="@(PublishReadyToRunPgoFiles)" />
<_ReadyToRunPgoFiles Include="@(RuntimePackAsset)" Condition="'%(RuntimePackAsset.AssetType)' == 'pgodata' and '%(RuntimePackAsset.Extension)' == '.mibc' and '$(PublishReadyToRunUseRuntimePackOptimizationData)' == 'true'" />
</ItemGroup>
<PrepareForReadyToRunCompilation CrossgenTool="@(CrossgenTool)" Crossgen2Tool="@(Crossgen2Tool)" OutputPath="$(_ReadyToRunOutputPath)" MainAssembly="@(IntermediateAssembly)" Assemblies="@(_ReadyToRunImplementationAssemblies)" ExcludeList="@(PublishReadyToRunExclude)" EmitSymbols="$(PublishReadyToRunEmitSymbols)" IncludeSymbolsInSingleFile="$(IncludeSymbolsInSingleFile)" ReadyToRunUseCrossgen2="$(PublishReadyToRunUseCrossgen2)" Crossgen2Composite="$(PublishReadyToRunComposite)" PublishReadyToRunCompositeExclusions="@(PublishReadyToRunCompositeExclusions)">
<Output TaskParameter="ReadyToRunCompileList" ItemName="_ReadyToRunCompileList" />
<Output TaskParameter="ReadyToRunSymbolsCompileList" ItemName="_ReadyToRunSymbolsCompileList" />
<Output TaskParameter="ReadyToRunFilesToPublish" ItemName="_ReadyToRunFilesToPublish" />
<Output TaskParameter="ReadyToRunAssembliesToReference" ItemName="_ReadyToRunAssembliesToReference" />
<Output TaskParameter="ReadyToRunCompositeBuildReferences" ItemName="_ReadyToRunCompositeBuildReferences" />
<Output TaskParameter="ReadyToRunCompositeBuildInput" ItemName="_ReadyToRunCompositeBuildInput" />
</PrepareForReadyToRunCompilation>
</Target>
<UsingTask Condition="'$(Crossgen2TasksOverriden)' != 'true'" TaskName="ResolveReadyToRunCompilers" AssemblyFile="$(MicrosoftNETBuildTasksAssembly)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<Target Name="ResolveReadyToRunCompilers" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ResolveReadyToRunCompilers RuntimePacks="@(ResolvedRuntimePack)" Crossgen2Packs="@(ResolvedCrossgen2Pack)" TargetingPacks="@(ResolvedTargetingPack)" RuntimeGraphPath="$(BundledRuntimeIdentifierGraphFile)" NETCoreSdkRuntimeIdentifier="$(NETCoreSdkRuntimeIdentifier)" EmitSymbols="$(PublishReadyToRunEmitSymbols)" ReadyToRunUseCrossgen2="$(PublishReadyToRunUseCrossgen2)">
<Output TaskParameter="CrossgenTool" ItemName="CrossgenTool" />
<Output TaskParameter="Crossgen2Tool" ItemName="Crossgen2Tool" />
</ResolveReadyToRunCompilers>
</Target>
<!--
============================================================
_CreateR2RImages
Compiles assemblies in the _ReadyToRunCompileList list into ReadyToRun images
============================================================
-->
<UsingTask Condition="'$(Crossgen2TasksOverriden)' != 'true'" TaskName="RunReadyToRunCompiler" AssemblyFile="$(MicrosoftNETBuildTasksAssembly)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
<Target Name="_CreateR2RImages" Inputs="@(_ReadyToRunCompileList);@(_ReadyToRunCompositeBuildInput);@(_ReadyToRunPgoFiles)" Outputs="%(_ReadyToRunCompileList.OutputR2RImage);%(_ReadyToRunCompileList.OutputPDBImage)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<RunReadyToRunCompiler CrossgenTool="@(CrossgenTool)" Crossgen2Tool="@(Crossgen2Tool)" UseCrossgen2="$(PublishReadyToRunUseCrossgen2)" Crossgen2PgoFiles="@(_ReadyToRunPgoFiles)" Crossgen2ExtraCommandLineArgs="$(PublishReadyToRunCrossgen2ExtraArgs)" ImplementationAssemblyReferences="@(_ReadyToRunAssembliesToReference)" ShowCompilerWarnings="$(PublishReadyToRunShowWarnings)" CompilationEntry="@(_ReadyToRunCompileList)" ContinueOnError="ErrorAndContinue" ReadyToRunCompositeBuildReferences="@(_ReadyToRunCompositeBuildReferences)" ReadyToRunCompositeBuildInput="@(_ReadyToRunCompositeBuildInput)">
<Output TaskParameter="ExitCode" PropertyName="_ReadyToRunCompilerExitCode" />
<Output TaskParameter="WarningsDetected" PropertyName="_ReadyToRunWarningsDetected" />
</RunReadyToRunCompiler>
<PropertyGroup>
<!-- Use distinct property here as any of the invocations can set it -->
<_ReadyToRunCompilerHasWarnings Condition="'$(_ReadyToRunWarningsDetected)' == 'true'">true</_ReadyToRunCompilerHasWarnings>
</PropertyGroup>
<ItemGroup>
<_ReadyToRunCompilationFailures Condition="'$(_ReadyToRunCompilerExitCode)' != '' And $(_ReadyToRunCompilerExitCode) != 0" Include="@(_ReadyToRunCompileList)" />
</ItemGroup>
</Target>
<!--
============================================================
_CreateR2RSymbols
Emit native symbols for ReadyToRun images in th
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment