Created
November 28, 2024 08:16
-
-
Save gnerkus/5edabc05191119a2ebc6af6172ee845e to your computer and use it in GitHub Desktop.
Minimal API expanded MSBuild
This file has been truncated, but you can view the full file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
============================================================================================================================================ | |
D:\Projects\App-Workspace\Csharp\minimalref\minimalref.csproj | |
============================================================================================================================================ | |
--> | |
<Project DefaultTargets="Build"> | |
<!-- | |
============================================================================================================================================ | |
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk.Web"> | |
This import was added implicitly because the Project element's Sdk attribute specified "Microsoft.NET.Sdk.Web". | |
C:\Program Files\dotnet\sdk\8.0.404\Sdks\Microsoft.NET.Sdk.Web\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. | |
*********************************************************************************************** | |
--> | |
<!-- Imports the .NET, Razor, and other web related SDKs on projects that target server scenarios. --> | |
<!-- | |
============================================================================================================================================ | |
<Import Project="..\Targets\Sdk.Server.props" Condition="'$([MSBuild]::GetTargetPlatformIdentifier($(TargetFramework)))' != 'browser'"> | |
C:\Program Files\dotnet\sdk\8.0.404\Sdks\Microsoft.NET.Sdk.Web\Targets\Sdk.Server.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. | |
*********************************************************************************************** | |
--> | |
<!-- | |
Indicate to other targets that Microsoft.NET.Sdk.Web is being used. | |
--> | |
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<UsingMicrosoftNETSdkWeb>true</UsingMicrosoftNETSdkWeb> | |
<EnableRazorSdkContent>true</EnableRazorSdkContent> | |
</PropertyGroup> | |
<!-- Default properties that shouldn't be replaced by the microsoft.net.sdk.props --> | |
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<DebugSymbols Condition="'$(DebugSymbols)' == ''">true</DebugSymbols> | |
</PropertyGroup> | |
<!-- | |
============================================================================================================================================ | |
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk"> | |
C:\Program Files\dotnet\sdk\8.0.404\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"> | |
<_AfterSdkPublishDependsOn Condition="'$(_IsAspNetCoreProject)' == 'true'">AfterPublish</_AfterSdkPublishDependsOn> | |
<_AfterSdkPublishDependsOn Condition="'$(_IsAspNetCoreProject)' != 'true'">Publish</_AfterSdkPublishDependsOn> | |
</PropertyGroup> | |
<Target Name="AfterSdkPublish" AfterTargets="$(_AfterSdkPublishDependsOn)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" /> | |
<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> | |
<CustomAfterDirectoryBuildProps>$(CustomAfterDirectoryBuildProps);$(MSBuildThisFileDirectory)UseArtifactsOutputPath.props</CustomAfterDirectoryBuildProps> | |
</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\8.0.404\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> | |
<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)' == ''"> | |
<_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="$(CustomBeforeDirectoryBuildProps)" Condition="'$(CustomBeforeDirectoryBuildProps)' != ''" />--> | |
<!--<Import Project="$(DirectoryBuildPropsPath)" Condition="'$(ImportDirectoryBuildProps)' == 'true' and exists('$(DirectoryBuildPropsPath)')" />--> | |
<!-- | |
============================================================================================================================================ | |
<Import Project="$(CustomAfterDirectoryBuildProps)" Condition="'$(CustomAfterDirectoryBuildProps)' != ''"> | |
C:\Program Files\dotnet\sdk\8.0.404\Sdks\Microsoft.NET.Sdk\Sdk\UseArtifactsOutputPath.props | |
============================================================================================================================================ | |
--> | |
<!-- | |
*********************************************************************************************** | |
UseArtifactsOutputPath.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. | |
*********************************************************************************************** | |
--> | |
<!-- If ArtifactsPath or UseArtifactsOutput are set, then import .props to set ArtifactsPath here, so that BaseIntermediateOutputPath can be | |
set in the ArtifactsPath. | |
If the .props file is not imported here, it will be imported from Microsoft.NET.DefaultOutputPaths.targets, so that artifacts output | |
properties can be set directly in the project file too (only in that case they won't affect the intermediate output). --> | |
<!--<Import Project="$(MSBuildThisFileDirectory)..\targets\Microsoft.NET.DefaultArtifactsPath.props" Condition="'$(UseArtifactsOutput)' == 'true' Or '$(ArtifactsPath)' != ''" />--> | |
<PropertyGroup Condition="'$(UseArtifactsOutput)' == 'true'" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<UseArtifactsIntermediateOutput Condition="'$(UseArtifactsIntermediateOutput)' == ''">true</UseArtifactsIntermediateOutput> | |
<ArtifactsProjectName Condition="'$(ArtifactsProjectName)' == ''">$(MSBuildProjectName)</ArtifactsProjectName> | |
</PropertyGroup> | |
<PropertyGroup Condition="'$(UseArtifactsOutput)' == 'true' And '$(BaseIntermediateOutputPath)' == '' And '$(UseArtifactsIntermediateOutput)' == 'true'" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<BaseIntermediateOutputPath Condition="'$(IncludeProjectNameInArtifactsPaths)' == 'true'">$(ArtifactsPath)\obj\$(ArtifactsProjectName)\</BaseIntermediateOutputPath> | |
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)' == ''">$(ArtifactsPath)\obj\</BaseIntermediateOutputPath> | |
</PropertyGroup> | |
<!-- Record whether ArtifactsPath / UseArtifactsOutput was set at this point in evaluation. We will generate an error if these properties are set | |
after this point (ie in the project file). --> | |
<PropertyGroup Condition="'$(UseArtifactsOutput)' == 'true'" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<_ArtifactsPathSetEarly>true</_ArtifactsPathSetEarly> | |
</PropertyGroup> | |
<!-- | |
============================================================================================================================================ | |
</Import> | |
C:\Program Files\dotnet\sdk\8.0.404\Current\Microsoft.Common.props | |
============================================================================================================================================ | |
--> | |
<!-- | |
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> | |
<!-- | |
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> | |
<!-- | |
Don't import project extensions during restore because NuGet restore generates them. Importing them during restore will embed | |
the pre-restore files in the binary log and then NuGet won't be able to embed the generated one after restore. If some other | |
project extension mechanism wants to import project extensions during restore, they need to explicitly set ImportProjectExtensionProps | |
--> | |
<ImportProjectExtensionProps Condition="$([MSBuild]::AreFeaturesEnabled('17.10')) And '$(ImportProjectExtensionProps)' == '' And '$(MSBuildIsRestoring)' == 'true'">false</ImportProjectExtensionProps> | |
<ImportProjectExtensionProps Condition="'$(ImportProjectExtensionProps)' == ''">true</ImportProjectExtensionProps> | |
<_InitialMSBuildProjectExtensionsPath Condition=" '$(ImportProjectExtensionProps)' == 'true' ">$(MSBuildProjectExtensionsPath)</_InitialMSBuildProjectExtensionsPath> | |
</PropertyGroup> | |
<!-- | |
============================================================================================================================================ | |
<Import Project="$(MSBuildProjectExtensionsPath)$(MSBuildProjectFile).*.props" Condition="'$(ImportProjectExtensionProps)' == 'true' and exists('$(MSBuildProjectExtensionsPath)')"> | |
D:\Projects\App-Workspace\Csharp\minimalref\obj\minimalref.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\you\.nuget\packages\;C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages</NuGetPackageFolders> | |
<NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle> | |
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">6.12.0</NuGetToolVersion> | |
</PropertyGroup> | |
<ItemGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' " xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<SourceRoot Include="C:\Users\you\.nuget\packages\" /> | |
<SourceRoot Include="C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages\" /> | |
</ItemGroup> | |
<!--<ImportGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">--> | |
<!-- | |
============================================================================================================================================ | |
<Import Project="$(NuGetPackageRoot)microsoft.extensions.apidescription.server\6.0.5\build\Microsoft.Extensions.ApiDescription.Server.props" Condition="Exists('$(NuGetPackageRoot)microsoft.extensions.apidescription.server\6.0.5\build\Microsoft.Extensions.ApiDescription.Server.props')"> | |
C:\Users\you\.nuget\packages\microsoft.extensions.apidescription.server\6.0.5\build\Microsoft.Extensions.ApiDescription.Server.props | |
============================================================================================================================================ | |
--> | |
<!-- | |
Settings users may update as they see fit. | |
--> | |
<PropertyGroup> | |
<!-- | |
Options added to the OpenAPI document generation tool ('dotnet-getdocument') command line. For example, the | |
'prefix-output', 'quiet' and 'verbose' options control console output and the 'help' and 'version' options show | |
information. Long form options require a double-dash prefix. | |
--> | |
<OpenApiGenerateDocumentsOptions Condition=" '$(OpenApiGenerateDocumentsOptions)' == '' " /> | |
<!-- | |
If 'true' (the default when targeting .NET Framework or .NET Core 2.1 and later), enable generation of OpenAPI | |
documents. Otherwise, this feature is completely disabled. This controls whether the 'OpenApiGenerateDocuments' | |
project capability is visible, enables / disables the 'GenerateOpenApiDocuments' target and provides the | |
$(OpenApiGenerateDocumentsOnBuild) default. | |
--> | |
<OpenApiGenerateDocuments Condition=" '$(OpenApiGenerateDocuments)' == '' " /> | |
<!-- | |
If 'true' (the default if $(OpenApiGenerateDocuments) is 'true'), will generate OpenAPI documents after every | |
build. Set to 'false' when targets are invoked from the command line or tied to another target. | |
--> | |
<OpenApiGenerateDocumentsOnBuild Condition=" '$(OpenApiGenerateDocumentsOnBuild)' == '' " /> | |
<!-- | |
Where to place OpenAPI documents generated from the application. Value is interpreted relative to the project | |
folder, unless already an absolute path. | |
--> | |
<OpenApiDocumentsDirectory Condition=" '$(OpenApiDocumentsDirectory)' == '' ">$(BaseIntermediateOutputPath)</OpenApiDocumentsDirectory> | |
</PropertyGroup> | |
<!-- | |
============================================================================================================================================ | |
</Import> | |
D:\Projects\App-Workspace\Csharp\minimalref\obj\minimalref.csproj.nuget.g.props | |
============================================================================================================================================ | |
--> | |
<!-- | |
============================================================================================================================================ | |
<Import Project="$(NuGetPackageRoot)swashbuckle.aspnetcore\6.6.2\build\Swashbuckle.AspNetCore.props" Condition="Exists('$(NuGetPackageRoot)swashbuckle.aspnetcore\6.6.2\build\Swashbuckle.AspNetCore.props')"> | |
C:\Users\you\.nuget\packages\swashbuckle.aspnetcore\6.6.2\build\Swashbuckle.AspNetCore.props | |
============================================================================================================================================ | |
--> | |
<PropertyGroup> | |
<OpenApiGenerateDocumentsOnBuild Condition=" '$(OpenApiGenerateDocumentsOnBuild)' == '' ">false</OpenApiGenerateDocumentsOnBuild> | |
</PropertyGroup> | |
<!-- | |
============================================================================================================================================ | |
</Import> | |
D:\Projects\App-Workspace\Csharp\minimalref\obj\minimalref.csproj.nuget.g.props | |
============================================================================================================================================ | |
--> | |
<!--</ImportGroup>--> | |
<PropertyGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' " xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<PkgMicrosoft_Extensions_ApiDescription_Server Condition=" '$(PkgMicrosoft_Extensions_ApiDescription_Server)' == '' ">C:\Users\you\.nuget\packages\microsoft.extensions.apidescription.server\6.0.5</PkgMicrosoft_Extensions_ApiDescription_Server> | |
</PropertyGroup> | |
<!-- | |
============================================================================================================================================ | |
</Import> | |
C:\Program Files\dotnet\sdk\8.0.404\Current\Microsoft.Common.props | |
============================================================================================================================================ | |
--> | |
<!-- | |
Wildcard imports come from $(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Imports\Microsoft.Common.props\ directory. | |
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')" />--> | |
<PropertyGroup> | |
<CustomBeforeMicrosoftCommonProps Condition="'$(CustomBeforeMicrosoftCommonProps)'==''">$(MSBuildExtensionsPath)\v$(MSBuildToolsVersion)\Custom.Before.$(MSBuildThisFile)</CustomBeforeMicrosoftCommonProps> | |
<CustomAfterMicrosoftCommonProps Condition="'$(CustomAfterMicrosoftCommonProps)'==''">$(MSBuildExtensionsPath)\v$(MSBuildToolsVersion)\Custom.After.$(MSBuildThisFile)</CustomAfterMicrosoftCommonProps> | |
</PropertyGroup> | |
<!--<Import Project="$(CustomBeforeMicrosoftCommonProps)" Condition="'$(CustomBeforeMicrosoftCommonProps)' != '' and Exists('$(CustomBeforeMicrosoftCommonProps)')" />--> | |
<!-- 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> | |
<MicrosoftCommonPropsHasBeenImported>true</MicrosoftCommonPropsHasBeenImported> | |
</PropertyGroup> | |
<PropertyGroup> | |
<Configuration Condition=" '$(Configuration)' == '' and '$(DefaultProjectConfiguration)' != '' ">$(DefaultProjectConfiguration)</Configuration> | |
<Platform Condition=" '$(Platform)' == '' and '$(DefaultProjectPlatform)' != '' ">$(DefaultProjectPlatform)</Platform> | |
</PropertyGroup> | |
<PropertyGroup> | |
<WMSJSProject Condition="'$(WMSJSProject)' == ''">WJProject</WMSJSProject> | |
<WMSJSProjectDirectory Condition="'$(WMSJSProjectDirectory)' == ''">JavaScript</WMSJSProjectDirectory> | |
</PropertyGroup> | |
<!--<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.VisualStudioVersion.v*.Common.props" Condition="'$(VisualStudioVersion)' == ''" />--> | |
<!--<Import Project="$(CustomAfterMicrosoftCommonProps)" Condition="'$(CustomAfterMicrosoftCommonProps)' != '' and Exists('$(CustomAfterMicrosoftCommonProps)')" />--> | |
<!--<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')" />--> | |
<!-- | |
Import NuGet.props file. | |
--> | |
<PropertyGroup> | |
<MSBuildUseVisualStudioDirectoryLayout Condition="'$(MSBuildUseVisualStudioDirectoryLayout)'==''">$([MSBuild]::IsRunningFromVisualStudio())</MSBuildUseVisualStudioDirectoryLayout> | |
<NuGetPropsFile Condition="'$(NuGetPropsFile)'=='' and '$(MSBuildUseVisualStudioDirectoryLayout)'=='true'">$([MSBuild]::GetToolsDirectory32())\..\..\..\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\8.0.404\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\8.0.404\Current\Microsoft.Common.props | |
============================================================================================================================================ | |
--> | |
<PropertyGroup Condition=" '$(MSBuildLogVerboseTaskParameters)' != 'true' "> | |
<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\8.0.404\Sdks\Microsoft.NET.Sdk\Sdk\Sdk.props | |
============================================================================================================================================ | |
--> | |
<!-- | |
============================================================================================================================================ | |
<Import Project="$(MSBuildThisFileDirectory)..\targets\Microsoft.NET.Sdk.props"> | |
C:\Program Files\dotnet\sdk\8.0.404\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> | |
<!-- Default the value of PackRelease for every project. Note that this is pre-evaluated by the CLI in an evaluation before evaluation (see ReleasePropertyProjectLocator.cs). | |
Multitargeting pack splits a single 2 TFM project into 9 separate evaluations, with different target imports. Microsoft.NET.SDK.DefaultItems.Targets ... | |
is where PublishRelease is defaulted because it depends on _TargetFrameworkVersionWithoutV. Some targets do not run in some instances of dotnet pack. | |
So, we must set PackRelease here. Even though this occurs before project import, the project import can override PackRelease later, before the pre-evaluation, so this is fine.--> | |
<PropertyGroup Condition="'$(PackRelease)' == ''" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<!-- Do not depend on this value being correct until after project evaluation.--> | |
<PackRelease>true</PackRelease> | |
</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> | |
<PropertyGroup Condition=" '$(_PlatformWithoutConfigurationInference)' == 'arm64' " xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<PlatformTarget Condition=" '$(PlatformTarget)' == '' ">arm64</PlatformTarget> | |
</PropertyGroup> | |
<!-- Default settings for all projects built with this Sdk package --> | |
<PropertyGroup Condition=" '$(AssemblySearchPaths)' == '' " xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<!-- By default exclude GAC, registry, output directory from search paths. --> | |
<AssemblySearchPaths Condition="'$(AssemblySearchPath_UseCandidateAssemblyFiles)' != 'false'">{CandidateAssemblyFiles}</AssemblySearchPaths> | |
<AssemblySearchPaths Condition="'$(AssemblySearchPath_UseHintPathFromItem)' != 'false'">$(AssemblySearchPaths);{HintPathFromItem}</AssemblySearchPaths> | |
<AssemblySearchPaths Condition="'$(AssemblySearchPath_UseTargetFrameworkDirectory)' != 'false'">$(AssemblySearchPaths);{TargetFrameworkDirectory}</AssemblySearchPaths> | |
<AssemblySearchPaths Condition="'$(AssemblySearchPath_UseRawFileName)' != 'false'">$(AssemblySearchPaths);{RawFileName}</AssemblySearchPaths> | |
</PropertyGroup> | |
<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> | |
<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.3</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\8.0.404\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\8.0.404\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> | |
<_NetFrameworkHostedCompilersVersion>4.11.0-3.24510.3</_NetFrameworkHostedCompilersVersion> | |
<NETCoreAppMaximumVersion>8.0</NETCoreAppMaximumVersion> | |
<BundledNETCoreAppTargetFrameworkVersion>8.0</BundledNETCoreAppTargetFrameworkVersion> | |
<BundledNETCoreAppPackageVersion>8.0.11</BundledNETCoreAppPackageVersion> | |
<BundledNETStandardTargetFrameworkVersion>2.1</BundledNETStandardTargetFrameworkVersion> | |
<BundledNETStandardPackageVersion>2.1.0</BundledNETStandardPackageVersion> | |
<BundledNETCorePlatformsPackageVersion>8.0.11-servicing.24517.7</BundledNETCorePlatformsPackageVersion> | |
<BundledRuntimeIdentifierGraphFile>$(MSBuildThisFileDirectory)RuntimeIdentifierGraph.json</BundledRuntimeIdentifierGraphFile> | |
<NETCoreSdkVersion>8.0.404</NETCoreSdkVersion> | |
<NETCoreSdkRuntimeIdentifier>win-x64</NETCoreSdkRuntimeIdentifier> | |
<NETCoreSdkPortableRuntimeIdentifier>win-x64</NETCoreSdkPortableRuntimeIdentifier> | |
<_NETCoreSdkIsPreview>false</_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.30" /> | |
<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.30" /> | |
<ImplicitPackageReferenceVersion Include="Microsoft.AspNetCore.All" TargetFrameworkVersion="2.1" DefaultVersion="2.1.1" LatestVersion="2.1.30" /> | |
<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 8.0 --> | |
<KnownFrameworkReference Include="Microsoft.NETCore.App" TargetFramework="net8.0" RuntimeFrameworkName="Microsoft.NETCore.App" DefaultRuntimeFrameworkVersion="8.0.0" LatestRuntimeFrameworkVersion="8.0.11" TargetingPackName="Microsoft.NETCore.App.Ref" TargetingPackVersion="8.0.11" 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-arm64;win-x64;win-x86;linux-musl-arm;osx-arm64;linux-s390x;linux-bionic-arm;linux-bionic-arm64;linux-bionic-x64;linux-bionic-x86;linux-ppc64le" /> | |
<KnownAppHostPack Include="Microsoft.NETCore.App" TargetFramework="net8.0" AppHostPackNamePattern="Microsoft.NETCore.App.Host.**RID**" AppHostPackVersion="8.0.11" 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-arm64;win-x64;win-x86;linux-musl-arm;osx-arm64;linux-s390x;linux-bionic-arm;linux-bionic-arm64;linux-bionic-x64;linux-bionic-x86;linux-ppc64le" ExcludedRuntimeIdentifiers="android" /> | |
<KnownCrossgen2Pack Include="Microsoft.NETCore.App.Crossgen2" TargetFramework="net8.0" Crossgen2PackNamePattern="Microsoft.NETCore.App.Crossgen2.**RID**" Crossgen2PackVersion="8.0.11" Crossgen2RuntimeIdentifiers="linux-musl-x64;linux-x64;win-x64;linux-arm;linux-arm64;linux-musl-arm;linux-musl-arm64;osx-arm64;osx-x64;win-arm64;win-x86" /> | |
<KnownILCompilerPack Include="Microsoft.DotNet.ILCompiler" TargetFramework="net8.0" ILCompilerPackNamePattern="runtime.**RID**.Microsoft.DotNet.ILCompiler" ILCompilerPackVersion="8.0.11" ILCompilerRuntimeIdentifiers="linux-arm64;linux-musl-arm64;linux-musl-x64;linux-x64;win-arm64;win-x64;osx-x64;osx-arm64" /> | |
<KnownRuntimePack Include="Microsoft.NETCore.App" TargetFramework="net8.0" RuntimeFrameworkName="Microsoft.NETCore.App" LatestRuntimeFrameworkVersion="8.0.11" RuntimePackNamePatterns="Microsoft.NETCore.App.Runtime.NativeAOT.**RID**" RuntimePackRuntimeIdentifiers="ios-arm64;iossimulator-arm64;iossimulator-x64;tvos-arm64;tvossimulator-arm64;tvossimulator-x64;maccatalyst-arm64;maccatalyst-x64;linux-bionic-arm64;linux-bionic-x64;osx-arm64;osx-x64" RuntimePackLabels="NativeAOT" /> | |
<KnownILLinkPack Include="Microsoft.NET.ILLink.Tasks" TargetFramework="net8.0" ILLinkPackVersion="8.0.11" /> | |
<KnownWebAssemblySdkPack Include="Microsoft.NET.Sdk.WebAssembly.Pack" TargetFramework="net8.0" WebAssemblySdkPackVersion="8.0.11" /> | |
<KnownRuntimePack Include="Microsoft.NETCore.App" TargetFramework="net8.0" RuntimeFrameworkName="Microsoft.NETCore.App" LatestRuntimeFrameworkVersion="8.0.11" 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-arm64;win-x64;win-x86;linux-musl-arm;osx-arm64;linux-s390x;browser-wasm;ios-arm64;ios-arm;iossimulator-arm64;iossimulator-x64;iossimulator-x86;tvos-arm64;tvossimulator-arm64;tvossimulator-x64;maccatalyst-x64;maccatalyst-arm64;android-arm64;android-arm;android-x64;android-x86" RuntimePackLabels="Mono" /> | |
<KnownFrameworkReference Include="Microsoft.WindowsDesktop.App" TargetFramework="net8.0" RuntimeFrameworkName="Microsoft.WindowsDesktop.App" DefaultRuntimeFrameworkVersion="8.0.0" LatestRuntimeFrameworkVersion="8.0.11" TargetingPackName="Microsoft.WindowsDesktop.App.Ref" TargetingPackVersion="8.0.11" RuntimePackNamePatterns="Microsoft.WindowsDesktop.App.Runtime.**RID**" RuntimePackRuntimeIdentifiers="win-x64;win-x86;win-arm64" IsWindowsOnly="true" /> | |
<KnownFrameworkReference Include="Microsoft.WindowsDesktop.App.WPF" TargetFramework="net8.0" RuntimeFrameworkName="Microsoft.WindowsDesktop.App" DefaultRuntimeFrameworkVersion="8.0.0" LatestRuntimeFrameworkVersion="8.0.11" TargetingPackName="Microsoft.WindowsDesktop.App.Ref" TargetingPackVersion="8.0.11" RuntimePackNamePatterns="Microsoft.WindowsDesktop.App.Runtime.**RID**" RuntimePackRuntimeIdentifiers="win-x64;win-x86;win-arm64" IsWindowsOnly="true" Profile="WPF" /> | |
<KnownFrameworkReference Include="Microsoft.WindowsDesktop.App.WindowsForms" TargetFramework="net8.0" RuntimeFrameworkName="Microsoft.WindowsDesktop.App" DefaultRuntimeFrameworkVersion="8.0.0" LatestRuntimeFrameworkVersion="8.0.11" TargetingPackName="Microsoft.WindowsDesktop.App.Ref" TargetingPackVersion="8.0.11" RuntimePackNamePatterns="Microsoft.WindowsDesktop.App.Runtime.**RID**" RuntimePackRuntimeIdentifiers="win-x64;win-x86;win-arm64" IsWindowsOnly="true" Profile="WindowsForms" /> | |
<KnownFrameworkReference Include="Microsoft.AspNetCore.App" TargetFramework="net8.0" RuntimeFrameworkName="Microsoft.AspNetCore.App" DefaultRuntimeFrameworkVersion="8.0.0" LatestRuntimeFrameworkVersion="8.0.11" TargetingPackName="Microsoft.AspNetCore.App.Ref" TargetingPackVersion="8.0.11" 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;linux-s390x;linux-ppc64le" RuntimePackExcludedRuntimeIdentifiers="android;linux-bionic" /> | |
<KnownFrameworkReference Include="Microsoft.Windows.SDK.NET.Ref" TargetFramework="net8.0-windows10.0.17763.0" RuntimeFrameworkName="Microsoft.Windows.SDK.NET.Ref" DefaultRuntimeFrameworkVersion="10.0.17763.53" LatestRuntimeFrameworkVersion="10.0.17763.53" TargetingPackName="Microsoft.Windows.SDK.NET.Ref" TargetingPackVersion="10.0.17763.53" RuntimePackAlwaysCopyLocal="true" RuntimePackNamePatterns="Microsoft.Windows.SDK.NET.Ref" RuntimePackRuntimeIdentifiers="any" IsWindowsOnly="true" /> | |
<KnownFrameworkReference Include="Microsoft.Windows.SDK.NET.Ref" TargetFramework="net8.0-windows10.0.18362.0" RuntimeFrameworkName="Microsoft.Windows.SDK.NET.Ref" DefaultRuntimeFrameworkVersion="10.0.18362.53" LatestRuntimeFrameworkVersion="10.0.18362.53" TargetingPackName="Microsoft.Windows.SDK.NET.Ref" TargetingPackVersion="10.0.18362.53" RuntimePackAlwaysCopyLocal="true" RuntimePackNamePatterns="Microsoft.Windows.SDK.NET.Ref" RuntimePackRuntimeIdentifiers="any" IsWindowsOnly="true" /> | |
<KnownFrameworkReference Include="Microsoft.Windows.SDK.NET.Ref" TargetFramework="net8.0-windows10.0.19041.0" RuntimeFrameworkName="Microsoft.Windows.SDK.NET.Ref" DefaultRuntimeFrameworkVersion="10.0.19041.53" LatestRuntimeFrameworkVersion="10.0.19041.53" TargetingPackName="Microsoft.Windows.SDK.NET.Ref" TargetingPackVersion="10.0.19041.53" RuntimePackAlwaysCopyLocal="true" RuntimePackNamePatterns="Microsoft.Windows.SDK.NET.Ref" RuntimePackRuntimeIdentifiers="any" IsWindowsOnly="true" /> | |
<!-- .NET 7.0 --> | |
<KnownFrameworkReference Include="Microsoft.NETCore.App" TargetFramework="net7.0" RuntimeFrameworkName="Microsoft.NETCore.App" DefaultRuntimeFrameworkVersion="7.0.0" LatestRuntimeFrameworkVersion="7.0.20" TargetingPackName="Microsoft.NETCore.App.Ref" TargetingPackVersion="7.0.20" 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;linux-s390x;linux-bionic-arm;linux-bionic-arm64;linux-bionic-x64;linux-bionic-x86;linux-ppc64le" /> | |
<KnownAppHostPack Include="Microsoft.NETCore.App" TargetFramework="net7.0" AppHostPackNamePattern="Microsoft.NETCore.App.Host.**RID**" AppHostPackVersion="7.0.20" 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;linux-s390x;linux-bionic-arm;linux-bionic-arm64;linux-bionic-x64;linux-bionic-x86;linux-ppc64le" ExcludedRuntimeIdentifiers="android" /> | |
<KnownCrossgen2Pack Include="Microsoft.NETCore.App.Crossgen2" TargetFramework="net7.0" Crossgen2PackNamePattern="Microsoft.NETCore.App.Crossgen2.**RID**" Crossgen2PackVersion="7.0.20" 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" /> | |
<KnownILCompilerPack Include="Microsoft.DotNet.ILCompiler" TargetFramework="net7.0" ILCompilerPackNamePattern="runtime.**RID**.Microsoft.DotNet.ILCompiler" ILCompilerPackVersion="7.0.20" ILCompilerRuntimeIdentifiers="linux-arm64;linux-musl-arm64;linux-musl-x64;linux-x64;win-arm64;win-x64" /> | |
<KnownILLinkPack Include="Microsoft.NET.ILLink.Tasks" TargetFramework="net7.0" ILLinkPackVersion="7.0.100-1.23401.1" /> | |
<KnownWebAssemblySdkPack Include="Microsoft.NET.Sdk.WebAssembly.Pack" TargetFramework="net7.0" WebAssemblySdkPackVersion="8.0.11" /> | |
<KnownRuntimePack Include="Microsoft.NETCore.App" TargetFramework="net7.0" RuntimeFrameworkName="Microsoft.NETCore.App" LatestRuntimeFrameworkVersion="7.0.20" 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;linux-s390x;browser-wasm;ios-arm64;ios-arm;iossimulator-arm64;iossimulator-x64;iossimulator-x86;tvos-arm64;tvossimulator-arm64;tvossimulator-x64;maccatalyst-x64;maccatalyst-arm64;android-arm64;android-arm;android-x64;android-x86" RuntimePackLabels="Mono" /> | |
<KnownFrameworkReference Include="Microsoft.WindowsDesktop.App" TargetFramework="net7.0" RuntimeFrameworkName="Microsoft.WindowsDesktop.App" DefaultRuntimeFrameworkVersion="7.0.0" LatestRuntimeFrameworkVersion="7.0.20" TargetingPackName="Microsoft.WindowsDesktop.App.Ref" TargetingPackVersion="7.0.20" RuntimePackNamePatterns="Microsoft.WindowsDesktop.App.Runtime.**RID**" RuntimePackRuntimeIdentifiers="win-x64;win-x86;win-arm64" IsWindowsOnly="true" /> | |
<KnownFrameworkReference Include="Microsoft.WindowsDesktop.App.WPF" TargetFramework="net7.0" RuntimeFrameworkName="Microsoft.WindowsDesktop.App" DefaultRuntimeFrameworkVersion="7.0.0" LatestRuntimeFrameworkVersion="7.0.20" TargetingPackName="Microsoft.WindowsDesktop.App.Ref" TargetingPackVersion="7.0.20" RuntimePackNamePatterns="Microsoft.WindowsDesktop.App.Runtime.**RID**" RuntimePackRuntimeIdentifiers="win-x64;win-x86;win-arm64" IsWindowsOnly="true" Profile="WPF" /> | |
<KnownFrameworkReference Include="Microsoft.WindowsDesktop.App.WindowsForms" TargetFramework="net7.0" RuntimeFrameworkName="Microsoft.WindowsDesktop.App" DefaultRuntimeFrameworkVersion="7.0.0" LatestRuntimeFrameworkVersion="7.0.20" TargetingPackName="Microsoft.WindowsDesktop.App.Ref" TargetingPackVersion="7.0.20" RuntimePackNamePatterns="Microsoft.WindowsDesktop.App.Runtime.**RID**" RuntimePackRuntimeIdentifiers="win-x64;win-x86;win-arm64" IsWindowsOnly="true" Profile="WindowsForms" /> | |
<KnownFrameworkReference Include="Microsoft.AspNetCore.App" TargetFramework="net7.0" RuntimeFrameworkName="Microsoft.AspNetCore.App" DefaultRuntimeFrameworkVersion="7.0.0" LatestRuntimeFrameworkVersion="7.0.20" TargetingPackName="Microsoft.AspNetCore.App.Ref" TargetingPackVersion="7.0.20" 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;linux-s390x;linux-ppc64le" RuntimePackExcludedRuntimeIdentifiers="android" /> | |
<KnownFrameworkReference Include="Microsoft.Windows.SDK.NET.Ref" TargetFramework="net7.0-windows10.0.17763.0" RuntimeFrameworkName="Microsoft.Windows.SDK.NET.Ref" DefaultRuntimeFrameworkVersion="10.0.17763.53" LatestRuntimeFrameworkVersion="10.0.17763.53" TargetingPackName="Microsoft.Windows.SDK.NET.Ref" TargetingPackVersion="10.0.17763.53" RuntimePackAlwaysCopyLocal="true" RuntimePackNamePatterns="Microsoft.Windows.SDK.NET.Ref" RuntimePackRuntimeIdentifiers="any" IsWindowsOnly="true" /> | |
<KnownFrameworkReference Include="Microsoft.Windows.SDK.NET.Ref" TargetFramework="net7.0-windows10.0.18362.0" RuntimeFrameworkName="Microsoft.Windows.SDK.NET.Ref" DefaultRuntimeFrameworkVersion="10.0.18362.53" LatestRuntimeFrameworkVersion="10.0.18362.53" TargetingPackName="Microsoft.Windows.SDK.NET.Ref" TargetingPackVersion="10.0.18362.53" RuntimePackAlwaysCopyLocal="true" RuntimePackNamePatterns="Microsoft.Windows.SDK.NET.Ref" RuntimePackRuntimeIdentifiers="any" IsWindowsOnly="true" /> | |
<KnownFrameworkReference Include="Microsoft.Windows.SDK.NET.Ref" TargetFramework="net7.0-windows10.0.19041.0" RuntimeFrameworkName="Microsoft.Windows.SDK.NET.Ref" DefaultRuntimeFrameworkVersion="10.0.19041.53" LatestRuntimeFrameworkVersion="10.0.19041.53" TargetingPackName="Microsoft.Windows.SDK.NET.Ref" TargetingPackVersion="10.0.19041.53" RuntimePackAlwaysCopyLocal="true" RuntimePackNamePatterns="Microsoft.Windows.SDK.NET.Ref" RuntimePackRuntimeIdentifiers="any" IsWindowsOnly="true" /> | |
<!-- .NET 6.0 --> | |
<KnownFrameworkReference Include="Microsoft.NETCore.App" TargetFramework="net6.0" RuntimeFrameworkName="Microsoft.NETCore.App" DefaultRuntimeFrameworkVersion="6.0.0" LatestRuntimeFrameworkVersion="6.0.36" TargetingPackName="Microsoft.NETCore.App.Ref" TargetingPackVersion="6.0.36" 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;linux-s390x" /> | |
<KnownAppHostPack Include="Microsoft.NETCore.App" TargetFramework="net6.0" AppHostPackNamePattern="Microsoft.NETCore.App.Host.**RID**" AppHostPackVersion="6.0.36" 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;linux-s390x" ExcludedRuntimeIdentifiers="android" /> | |
<KnownCrossgen2Pack Include="Microsoft.NETCore.App.Crossgen2" TargetFramework="net6.0" Crossgen2PackNamePattern="Microsoft.NETCore.App.Crossgen2.**RID**" Crossgen2PackVersion="6.0.36" 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" /> | |
<KnownILLinkPack Include="Microsoft.NET.ILLink.Tasks" TargetFramework="net6.0" ILLinkPackVersion="7.0.100-1.23401.1" /> | |
<KnownWebAssemblySdkPack Include="Microsoft.NET.Sdk.WebAssembly.Pack" TargetFramework="net6.0" WebAssemblySdkPackVersion="8.0.11" /> | |
<KnownRuntimePack Include="Microsoft.NETCore.App" TargetFramework="net6.0" RuntimeFrameworkName="Microsoft.NETCore.App" LatestRuntimeFrameworkVersion="6.0.36" 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;linux-s390x;browser-wasm;ios-arm64;ios-arm;iossimulator-arm64;iossimulator-x64;iossimulator-x86;tvos-arm64;tvossimulator-arm64;tvossimulator-x64;maccatalyst-x64;maccatalyst-arm64;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" LatestRuntimeFrameworkVersion="6.0.36" TargetingPackName="Microsoft.WindowsDesktop.App.Ref" TargetingPackVersion="6.0.36" 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" LatestRuntimeFrameworkVersion="6.0.36" TargetingPackName="Microsoft.WindowsDesktop.App.Ref" TargetingPackVersion="6.0.36" 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" LatestRuntimeFrameworkVersion="6.0.36" TargetingPackName="Microsoft.WindowsDesktop.App.Ref" TargetingPackVersion="6.0.36" 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" LatestRuntimeFrameworkVersion="6.0.36" TargetingPackName="Microsoft.AspNetCore.App.Ref" TargetingPackVersion="6.0.36" 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;linux-s390x" /> | |
<KnownFrameworkReference Include="Microsoft.Windows.SDK.NET.Ref" TargetFramework="net6.0-windows10.0.17763.0" RuntimeFrameworkName="Microsoft.Windows.SDK.NET.Ref" DefaultRuntimeFrameworkVersion="10.0.17763.53" LatestRuntimeFrameworkVersion="10.0.17763.53" TargetingPackName="Microsoft.Windows.SDK.NET.Ref" TargetingPackVersion="10.0.17763.53" 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.53" LatestRuntimeFrameworkVersion="10.0.18362.53" TargetingPackName="Microsoft.Windows.SDK.NET.Ref" TargetingPackVersion="10.0.18362.53" 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.53" LatestRuntimeFrameworkVersion="10.0.19041.53" TargetingPackName="Microsoft.Windows.SDK.NET.Ref" TargetingPackVersion="10.0.19041.53" 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.17" 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.17" 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.17" Crossgen2RuntimeIdentifiers="linux-musl-x64;linux-x64;win-x64" /> | |
<KnownILLinkPack Include="Microsoft.NET.ILLink.Tasks" TargetFramework="net5.0" ILLinkPackVersion="7.0.100-1.23401.1" /> | |
<KnownFrameworkReference Include="Microsoft.WindowsDesktop.App" TargetFramework="net5.0" RuntimeFrameworkName="Microsoft.WindowsDesktop.App" DefaultRuntimeFrameworkVersion="5.0.0" LatestRuntimeFrameworkVersion="5.0.17" TargetingPackName="Microsoft.WindowsDesktop.App.Ref" TargetingPackVersion="5.0.0" RuntimePackNamePatterns="Microsoft.WindowsDesktop.App.Runtime.**RID**" RuntimePackRuntimeIdentifiers="win-x64;win-x86;win-arm64" IsWindowsOnly="true" /> | |
<KnownFrameworkReference Include="Microsoft.WindowsDesktop.App.WPF" TargetFramework="net5.0" RuntimeFrameworkName="Microsoft.WindowsDesktop.App" DefaultRuntimeFrameworkVersion="5.0.0" LatestRuntimeFrameworkVersion="5.0.17" TargetingPackName="Microsoft.WindowsDesktop.App.Ref" TargetingPackVersion="5.0.0" RuntimePackNamePatterns="Microsoft.WindowsDesktop.App.Runtime.**RID**" RuntimePackRuntimeIdentifiers="win-x64;win-x86;win-arm64" IsWindowsOnly="true" Profile="WPF" /> | |
<KnownFrameworkReference Include="Microsoft.WindowsDesktop.App.WindowsForms" TargetFramework="net5.0" RuntimeFrameworkName="Microsoft.WindowsDesktop.App" DefaultRuntimeFrameworkVersion="5.0.0" LatestRuntimeFrameworkVersion="5.0.17" TargetingPackName="Microsoft.WindowsDesktop.App.Ref" TargetingPackVersion="5.0.0" RuntimePackNamePatterns="Microsoft.WindowsDesktop.App.Runtime.**RID**" RuntimePackRuntimeIdentifiers="win-x64;win-x86;win-arm64" IsWindowsOnly="true" Profile="WindowsForms" /> | |
<KnownFrameworkReference Include="Microsoft.AspNetCore.App" TargetFramework="net5.0" RuntimeFrameworkName="Microsoft.AspNetCore.App" DefaultRuntimeFrameworkVersion="5.0.0" LatestRuntimeFrameworkVersion="5.0.17" 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.53" LatestRuntimeFrameworkVersion="10.0.17763.53" TargetingPackName="Microsoft.Windows.SDK.NET.Ref" TargetingPackVersion="10.0.17763.53" 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.53" LatestRuntimeFrameworkVersion="10.0.18362.53" TargetingPackName="Microsoft.Windows.SDK.NET.Ref" TargetingPackVersion="10.0.18362.53" 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.53" LatestRuntimeFrameworkVersion="10.0.19041.53" TargetingPackName="Microsoft.Windows.SDK.NET.Ref" TargetingPackVersion="10.0.19041.53" 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.32" 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.32" 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" /> | |
<KnownILLinkPack Include="Microsoft.NET.ILLink.Tasks" TargetFramework="netcoreapp3.1" ILLinkPackVersion="7.0.100-1.23401.1" /> | |
<KnownFrameworkReference Include="Microsoft.WindowsDesktop.App" TargetFramework="netcoreapp3.1" RuntimeFrameworkName="Microsoft.WindowsDesktop.App" DefaultRuntimeFrameworkVersion="3.1.0" LatestRuntimeFrameworkVersion="3.1.32" 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.32" 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.32" 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.32" 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" /> | |
<KnownILLinkPack Include="Microsoft.NET.ILLink.Tasks" TargetFramework="netcoreapp3.0" ILLinkPackVersion="7.0.100-1.23401.1" /> | |
<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" /> | |
<!-- Supported Windows versions --> | |
<WindowsSdkSupportedTargetPlatformVersion Include="10.0.26100.0" WindowsSdkPackageVersion="10.0.26100.53" MinimumNETVersion="8.0" /> | |
<WindowsSdkSupportedTargetPlatformVersion Include="10.0.22621.0" WindowsSdkPackageVersion="10.0.22621.53" MinimumNETVersion="8.0" /> | |
<WindowsSdkSupportedTargetPlatformVersion Include="10.0.22000.0" WindowsSdkPackageVersion="10.0.22000.53" MinimumNETVersion="8.0" /> | |
<WindowsSdkSupportedTargetPlatformVersion Include="10.0.20348.0" WindowsSdkPackageVersion="10.0.20348.53" MinimumNETVersion="8.0" /> | |
<WindowsSdkSupportedTargetPlatformVersion Include="10.0.19041.0" WindowsSdkPackageVersion="10.0.19041.53" MinimumNETVersion="8.0" /> | |
<WindowsSdkSupportedTargetPlatformVersion Include="10.0.18362.0" WindowsSdkPackageVersion="10.0.18362.53" MinimumNETVersion="8.0" /> | |
<WindowsSdkSupportedTargetPlatformVersion Include="10.0.17763.0" WindowsSdkPackageVersion="10.0.17763.53" MinimumNETVersion="8.0" /> | |
<WindowsSdkSupportedTargetPlatformVersion Include="10.0.26100.0" WindowsSdkPackageVersion="10.0.26100.52" MinimumNETVersion="6.0" /> | |
<WindowsSdkSupportedTargetPlatformVersion Include="10.0.22621.0" WindowsSdkPackageVersion="10.0.22621.52" MinimumNETVersion="6.0" /> | |
<WindowsSdkSupportedTargetPlatformVersion Include="10.0.22000.0" WindowsSdkPackageVersion="10.0.22000.52" MinimumNETVersion="6.0" /> | |
<WindowsSdkSupportedTargetPlatformVersion Include="10.0.20348.0" WindowsSdkPackageVersion="10.0.20348.52" MinimumNETVersion="6.0" /> | |
<WindowsSdkSupportedTargetPlatformVersion Include="10.0.19041.0" WindowsSdkPackageVersion="10.0.19041.52" MinimumNETVersion="6.0" /> | |
<WindowsSdkSupportedTargetPlatformVersion Include="10.0.18362.0" WindowsSdkPackageVersion="10.0.18362.52" MinimumNETVersion="6.0" /> | |
<WindowsSdkSupportedTargetPlatformVersion Include="10.0.17763.0" WindowsSdkPackageVersion="10.0.17763.52" MinimumNETVersion="6.0" /> | |
<WindowsSdkSupportedTargetPlatformVersion Include="10.0.22000.0" WindowsSdkPackageVersion="10.0.22000.26" MinimumNETVersion="5.0" /> | |
<WindowsSdkSupportedTargetPlatformVersion Include="10.0.20348.0" WindowsSdkPackageVersion="10.0.20348.26" MinimumNETVersion="5.0" /> | |
<WindowsSdkSupportedTargetPlatformVersion Include="10.0.19041.0" WindowsSdkPackageVersion="10.0.19041.26" MinimumNETVersion="5.0" /> | |
<WindowsSdkSupportedTargetPlatformVersion Include="10.0.18362.0" WindowsSdkPackageVersion="10.0.18362.26" MinimumNETVersion="5.0" /> | |
<WindowsSdkSupportedTargetPlatformVersion Include="10.0.17763.0" WindowsSdkPackageVersion="10.0.17763.26" MinimumNETVersion="5.0" /> | |
<WindowsSdkSupportedTargetPlatformVersion Include="8.0" /> | |
<WindowsSdkSupportedTargetPlatformVersion Include="7.0" /> | |
<_KnownRuntimeIdentiferPlatforms Include="any;aot;freebsd;illumos;solaris;unix;any;aot;freebsd;illumos;solaris;unix;any;aot;freebsd;illumos;solaris;unix;any;aot;freebsd;illumos;solaris;unix;any;aot;freebsd;illumos;solaris;unix;any;aot;freebsd;illumos;solaris;unix;any;aot;freebsd;illumos;solaris;unix;any;aot;freebsd;illumos;solaris;unix" /> | |
<_ExcludedKnownRuntimeIdentiferPlatforms Include="rhel.6;tizen.4.0.0;tizen.5.0.0;rhel.6;tizen.4.0.0;tizen.5.0.0;rhel.6;tizen.4.0.0;tizen.5.0.0;rhel.6;tizen.4.0.0;tizen.5.0.0;rhel.6;tizen.4.0.0;tizen.5.0.0;rhel.6;tizen.4.0.0;tizen.5.0.0;rhel.6;tizen.4.0.0;tizen.5.0.0;rhel.6;tizen.4.0.0;tizen.5.0.0" /> | |
</ItemGroup> | |
<!-- | |
============================================================================================================================================ | |
</Import> | |
C:\Program Files\dotnet\sdk\8.0.404\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.DefaultItems.props | |
============================================================================================================================================ | |
--> | |
<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> | |
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<__WindowsAppSdkDefaultImageIncludes>**/*.png;**/*.bmp;**/*.jpg;**/*.dds;**/*.tif;**/*.tga;**/*.gif</__WindowsAppSdkDefaultImageIncludes> | |
</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' " /> | |
<!-- Microsoft.WindowsAppSDK is a NuGet delivered SDK. EnableDefaultWindowsAppSdkContentItems and EnableDefaultWindowsAppSdkPRIResourceItems are overridable properties that the SDK will set to true by default. --> | |
<Content Include="$(__WindowsAppSdkDefaultImageIncludes)" Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder)" Condition=" '$(EnableDefaultContentItems)' != 'false' And '$(EnableDefaultWindowsAppSdkContentItems)' == 'true' " /> | |
<PRIResource Include="**/*.resw" Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder)" Condition=" '$(EnableDefaultPRIResourceItems)' != 'false' And '$(EnableDefaultWindowsAppSdkPRIResourceItems)' == '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" /> | |
<!-- Microsoft.WindowsAppSDK is a NuGet delivered SDK. EnableDefaultWindowsAppSdkContentItems and EnableDefaultWindowsAppSdkPRIResourceItems are overridable properties that the SDK will set to true by default. --> | |
<None Remove="$(__WindowsAppSdkDefaultImageIncludes)" Condition=" '$(EnableDefaultWindowsAppSdkContentItems)' == 'true' " /> | |
<None Remove="**/*.resw" Condition=" '$(EnableDefaultWindowsAppSdkPRIResourceItems)' == 'true' " /> | |
</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)' < '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)' >= '2.0') " PrivateAssets="All" Publish="true" /> | |
</ItemGroup> | |
<ItemGroup Condition=" '$(DisableImplicitFrameworkReferences)' != 'true' and '$(TargetFrameworkIdentifier)' == '.NETStandard' And '$(_TargetFrameworkVersionWithoutV)' >= '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)' < '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)' >= '2.0') And ('$(PackageType)' != 'DotnetCliTool')" PrivateAssets="All" Publish="true" /> | |
<FrameworkReference Include="Microsoft.NETCore.App" IsImplicitlyDefined="true" Pack="false" PrivateAssets="All" Condition="('$(_TargetFrameworkVersionWithoutV)' != '') And ('$(_TargetFrameworkVersionWithoutV)' >= '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)' >= '6.0')" /> | |
<!-- Allow opt-in to NativeAOT runtime pack for .NET 8.0 or higher --> | |
<FrameworkReference Update="Microsoft.NETCore.App" RuntimePackLabels="NativeAOT" Condition="'$(_IsPublishing)' == 'true' and '$(PublishAotUsingRuntimePack)' == 'true' And ('$(_TargetFrameworkVersionWithoutV)' != '') And ('$(_TargetFrameworkVersionWithoutV)' >= '8.0')" /> | |
</ItemGroup> | |
<!-- | |
============================================================================================================================================ | |
</Import> | |
C:\Program Files\dotnet\sdk\8.0.404\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\8.0.404\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\8.0.404\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\8.0.404\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" Alias="netcoreapp1.0" /> | |
<SupportedNETCoreAppTargetFramework Include=".NETCoreApp,Version=v1.1" DisplayName=".NET Core 1.1" Alias="netcoreapp1.1" /> | |
<SupportedNETCoreAppTargetFramework Include=".NETCoreApp,Version=v2.0" DisplayName=".NET Core 2.0" Alias="netcoreapp2.0" /> | |
<SupportedNETCoreAppTargetFramework Include=".NETCoreApp,Version=v2.1" DisplayName=".NET Core 2.1" Alias="netcoreapp2.1" /> | |
<SupportedNETCoreAppTargetFramework Include=".NETCoreApp,Version=v2.2" DisplayName=".NET Core 2.2" Alias="netcoreapp2.2" /> | |
<SupportedNETCoreAppTargetFramework Include=".NETCoreApp,Version=v3.0" DisplayName=".NET Core 3.0" Alias="netcoreapp3.0" /> | |
<SupportedNETCoreAppTargetFramework Include=".NETCoreApp,Version=v3.1" DisplayName=".NET Core 3.1" Alias="netcoreapp3.1" /> | |
<SupportedNETCoreAppTargetFramework Include=".NETCoreApp,Version=v5.0" DisplayName=".NET 5.0" Alias="net5.0" /> | |
<SupportedNETCoreAppTargetFramework Include=".NETCoreApp,Version=v6.0" DisplayName=".NET 6.0" Alias="net6.0" /> | |
<SupportedNETCoreAppTargetFramework Include=".NETCoreApp,Version=v7.0" DisplayName=".NET 7.0" Alias="net7.0" /> | |
<SupportedNETCoreAppTargetFramework Include=".NETCoreApp,Version=v8.0" DisplayName=".NET 8.0" Alias="net8.0" Condition="$([MSBuild]::VersionGreaterThanOrEquals($(MSBuildVersion), '17.8.0'))" /> | |
</ItemGroup> | |
<PropertyGroup> | |
<UnsupportedTargetFrameworkVersion>9.0</UnsupportedTargetFrameworkVersion> | |
<MinimumVisualStudioVersionForUnsupportedTargetFrameworkVersion>17.12</MinimumVisualStudioVersionForUnsupportedTargetFrameworkVersion> | |
</PropertyGroup> | |
<!-- .NET Standard --> | |
<ItemGroup> | |
<SupportedNETStandardTargetFramework Include=".NETStandard,Version=v1.0" DisplayName=".NET Standard 1.0" Alias="netstandard1.0" /> | |
<SupportedNETStandardTargetFramework Include=".NETStandard,Version=v1.1" DisplayName=".NET Standard 1.1" Alias="netstandard1.1" /> | |
<SupportedNETStandardTargetFramework Include=".NETStandard,Version=v1.2" DisplayName=".NET Standard 1.2" Alias="netstandard1.2" /> | |
<SupportedNETStandardTargetFramework Include=".NETStandard,Version=v1.3" DisplayName=".NET Standard 1.3" Alias="netstandard1.3" /> | |
<SupportedNETStandardTargetFramework Include=".NETStandard,Version=v1.4" DisplayName=".NET Standard 1.4" Alias="netstandard1.4" /> | |
<SupportedNETStandardTargetFramework Include=".NETStandard,Version=v1.5" DisplayName=".NET Standard 1.5" Alias="netstandard1.5" /> | |
<SupportedNETStandardTargetFramework Include=".NETStandard,Version=v1.6" DisplayName=".NET Standard 1.6" Alias="netstandard1.6" /> | |
<SupportedNETStandardTargetFramework Include=".NETStandard,Version=v2.0" DisplayName=".NET Standard 2.0" Alias="netstandard2.0" /> | |
<SupportedNETStandardTargetFramework Include=".NETStandard,Version=v2.1" DisplayName=".NET Standard 2.1" Alias="netstandard2.1" /> | |
</ItemGroup> | |
<!-- .NET Framework --> | |
<ItemGroup> | |
<SupportedNETFrameworkTargetFramework Include=".NETFramework,Version=v2.0" DisplayName=".NET Framework 2.0" Alias="net20" /> | |
<SupportedNETFrameworkTargetFramework Include=".NETFramework,Version=v3.0" DisplayName=".NET Framework 3.0" Alias="net30" /> | |
<SupportedNETFrameworkTargetFramework Include=".NETFramework,Version=v3.5" DisplayName=".NET Framework 3.5" Alias="net35" /> | |
<SupportedNETFrameworkTargetFramework Include=".NETFramework,Version=v4.0" DisplayName=".NET Framework 4.0" Alias="net40" /> | |
<SupportedNETFrameworkTargetFramework Include=".NETFramework,Version=v4.5" DisplayName=".NET Framework 4.5" Alias="net45" /> | |
<SupportedNETFrameworkTargetFramework Include=".NETFramework,Version=v4.5.1" DisplayName=".NET Framework 4.5.1" Alias="net451" /> | |
<SupportedNETFrameworkTargetFramework Include=".NETFramework,Version=v4.5.2" DisplayName=".NET Framework 4.5.2" Alias="net452" /> | |
<SupportedNETFrameworkTargetFramework Include=".NETFramework,Version=v4.6" DisplayName=".NET Framework 4.6" Alias="net46" /> | |
<SupportedNETFrameworkTargetFramework Include=".NETFramework,Version=v4.6.1" DisplayName=".NET Framework 4.6.1" Alias="net461" /> | |
<SupportedNETFrameworkTargetFramework Include=".NETFramework,Version=v4.6.2" DisplayName=".NET Framework 4.6.2" Alias="net462" /> | |
<SupportedNETFrameworkTargetFramework Include=".NETFramework,Version=v4.7" DisplayName=".NET Framework 4.7" Alias="net47" /> | |
<SupportedNETFrameworkTargetFramework Include=".NETFramework,Version=v4.7.1" DisplayName=".NET Framework 4.7.1" Alias="net471" /> | |
<SupportedNETFrameworkTargetFramework Include=".NETFramework,Version=v4.7.2" DisplayName=".NET Framework 4.7.2" Alias="net472" /> | |
<SupportedNETFrameworkTargetFramework Include=".NETFramework,Version=v4.8" DisplayName=".NET Framework 4.8" Alias="net48" /> | |
<SupportedNETFrameworkTargetFramework Include=".NETFramework,Version=v4.8.1" DisplayName=".NET Framework 4.8.1" Alias="net481" /> | |
</ItemGroup> | |
<!-- All supported target frameworks --> | |
<ItemGroup> | |
<SupportedTargetFramework Include="@(SupportedNETCoreAppTargetFramework);@(SupportedNETStandardTargetFramework);@(SupportedNETFrameworkTargetFramework)" /> | |
</ItemGroup> | |
<!-- | |
============================================================================================================================================ | |
</Import> | |
C:\Program Files\dotnet\sdk\8.0.404\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\8.0.404\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\8.0.404\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\8.0.404\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 --> | |
<!-- These will be added to the BundledVersions.props that's generated in dotnet/installer. So only add them here if we don't have that change yet --> | |
<ItemGroup Condition="'@(WindowsSdkSupportedTargetPlatformVersion)' == ''"> | |
<WindowsSdkSupportedTargetPlatformVersion Include="10.0.19041.0" WindowsSdkPackageVersion="10.0.19041.16" MinimumNETVersion="5.0" /> | |
<WindowsSdkSupportedTargetPlatformVersion Include="10.0.18362.0" WindowsSdkPackageVersion="10.0.18362.16" MinimumNETVersion="5.0" /> | |
<WindowsSdkSupportedTargetPlatformVersion Include="10.0.17763.0" WindowsSdkPackageVersion="10.0.17763.16" MinimumNETVersion="5.0" /> | |
<WindowsSdkSupportedTargetPlatformVersion Include="8.0" /> | |
<WindowsSdkSupportedTargetPlatformVersion Include="7.0" /> | |
</ItemGroup> | |
<ItemGroup> | |
<SdkSupportedTargetPlatformVersion Condition="'$(TargetPlatformIdentifier)' == 'Windows'" Include="@(WindowsSdkSupportedTargetPlatformVersion)" /> | |
</ItemGroup> | |
<!-- | |
============================================================================================================================================ | |
</Import> | |
C:\Program Files\dotnet\sdk\8.0.404\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.props | |
============================================================================================================================================ | |
--> | |
<!-- | |
============================================================================================================================================ | |
<Import Project="$(MSBuildThisFileDirectory)Microsoft.NET.Sdk.SourceLink.props"> | |
C:\Program Files\dotnet\sdk\8.0.404\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.SourceLink.props | |
============================================================================================================================================ | |
--> | |
<!-- | |
*********************************************************************************************** | |
Microsoft.NET.Sdk.SourceLink.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"> | |
<!-- Suppress implicit SourceLink inclusion if any Microsoft.SourceLink package is referenced. --> | |
<SuppressImplicitGitSourceLink Condition="'$(PkgMicrosoft_SourceLink_Common)' != ''">true</SuppressImplicitGitSourceLink> | |
<_SourceLinkPropsImported>true</_SourceLinkPropsImported> | |
</PropertyGroup> | |
<!--<ImportGroup Condition="'$(SuppressImplicitGitSourceLink)' != 'true'">--> | |
<!-- | |
============================================================================================================================================ | |
<Import Project="$(MSBuildThisFileDirectory)..\..\Microsoft.Build.Tasks.Git\build\Microsoft.Build.Tasks.Git.props"> | |
C:\Program Files\dotnet\sdk\8.0.404\Sdks\Microsoft.Build.Tasks.Git\build\Microsoft.Build.Tasks.Git.props | |
============================================================================================================================================ | |
--> | |
<!-- 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.txt file in the project root for more information. --> | |
<PropertyGroup> | |
<MicrosoftBuildTasksGitAssemblyFile Condition="'$(MSBuildRuntimeType)' != 'Core'">$(MSBuildThisFileDirectory)..\tools\net472\Microsoft.Build.Tasks.Git.dll</MicrosoftBuildTasksGitAssemblyFile> | |
<MicrosoftBuildTasksGitAssemblyFile Condition="'$(MSBuildRuntimeType)' == 'Core'">$(MSBuildThisFileDirectory)..\tools\core\Microsoft.Build.Tasks.Git.dll</MicrosoftBuildTasksGitAssemblyFile> | |
</PropertyGroup> | |
<!-- | |
============================================================================================================================================ | |
</Import> | |
C:\Program Files\dotnet\sdk\8.0.404\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.SourceLink.props | |
============================================================================================================================================ | |
--> | |
<!-- | |
============================================================================================================================================ | |
<Import Project="$(MSBuildThisFileDirectory)..\..\Microsoft.SourceLink.Common\build\Microsoft.SourceLink.Common.props"> | |
C:\Program Files\dotnet\sdk\8.0.404\Sdks\Microsoft.SourceLink.Common\build\Microsoft.SourceLink.Common.props | |
============================================================================================================================================ | |
--> | |
<!-- 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.txt file in the project root for more information. --> | |
<PropertyGroup> | |
<_MicrosoftSourceLinkCommonAssemblyFile Condition="'$(MSBuildRuntimeType)' != 'Core'">$(MSBuildThisFileDirectory)..\tools\net472\Microsoft.SourceLink.Common.dll</_MicrosoftSourceLinkCommonAssemblyFile> | |
<_MicrosoftSourceLinkCommonAssemblyFile Condition="'$(MSBuildRuntimeType)' == 'Core'">$(MSBuildThisFileDirectory)..\tools\core\Microsoft.SourceLink.Common.dll</_MicrosoftSourceLinkCommonAssemblyFile> | |
</PropertyGroup> | |
<PropertyGroup> | |
<!-- | |
Used to suppress querying source control and features that use the information (e.g. git commit SHA). | |
--> | |
<EnableSourceControlManagerQueries Condition="'$(EnableSourceControlManagerQueries)' == ''">true</EnableSourceControlManagerQueries> | |
<!-- | |
Do not generate SourceLink when building in the IDE or for Live Unit Testing. | |
--> | |
<EnableSourceLink Condition="'$(EnableSourceLink)' == '' and '$(DesignTimeBuild)' != 'true' and '$(BuildingForLiveUnitTesting)' != 'true'">true</EnableSourceLink> | |
</PropertyGroup> | |
<!-- | |
============================================================================================================================================ | |
</Import> | |
C:\Program Files\dotnet\sdk\8.0.404\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.SourceLink.props | |
============================================================================================================================================ | |
--> | |
<!-- | |
============================================================================================================================================ | |
<Import Project="$(MSBuildThisFileDirectory)..\..\Microsoft.SourceLink.GitHub\build\Microsoft.SourceLink.GitHub.props"> | |
C:\Program Files\dotnet\sdk\8.0.404\Sdks\Microsoft.SourceLink.GitHub\build\Microsoft.SourceLink.GitHub.props | |
============================================================================================================================================ | |
--> | |
<!-- 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.txt file in the project root for more information. --> | |
<ItemGroup> | |
<SourceLinkGitHubHost Include="github.com" ContentUrl="https://raw.githubusercontent.com" /> | |
</ItemGroup> | |
<!-- | |
============================================================================================================================================ | |
</Import> | |
C:\Program Files\dotnet\sdk\8.0.404\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.SourceLink.props | |
============================================================================================================================================ | |
--> | |
<!-- | |
============================================================================================================================================ | |
<Import Project="$(MSBuildThisFileDirectory)..\..\Microsoft.SourceLink.GitLab\build\Microsoft.SourceLink.GitLab.props"> | |
C:\Program Files\dotnet\sdk\8.0.404\Sdks\Microsoft.SourceLink.GitLab\build\Microsoft.SourceLink.GitLab.props | |
============================================================================================================================================ | |
--> | |
<!-- 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.txt file in the project root for more information. --> | |
<ItemGroup> | |
<SourceLinkGitLabHost Include="gitlab.com" /> | |
</ItemGroup> | |
<!-- | |
============================================================================================================================================ | |
</Import> | |
C:\Program Files\dotnet\sdk\8.0.404\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.SourceLink.props | |
============================================================================================================================================ | |
--> | |
<!-- | |
============================================================================================================================================ | |
<Import Project="$(MSBuildThisFileDirectory)..\..\Microsoft.SourceLink.AzureRepos.Git\build\Microsoft.SourceLink.AzureRepos.Git.props"> | |
C:\Program Files\dotnet\sdk\8.0.404\Sdks\Microsoft.SourceLink.AzureRepos.Git\build\Microsoft.SourceLink.AzureRepos.Git.props | |
============================================================================================================================================ | |
--> | |
<!-- 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.txt file in the project root for more information. --> | |
<ItemGroup> | |
<SourceLinkAzureReposGitHost Include="visualstudio.com" /> | |
<SourceLinkAzureReposGitHost Include="vsts.me" /> | |
<SourceLinkAzureReposGitHost Include="dev.azure.com" /> | |
</ItemGroup> | |
<!-- | |
============================================================================================================================================ | |
</Import> | |
C:\Program Files\dotnet\sdk\8.0.404\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.SourceLink.props | |
============================================================================================================================================ | |
--> | |
<!-- | |
============================================================================================================================================ | |
<Import Project="$(MSBuildThisFileDirectory)..\..\Microsoft.SourceLink.Bitbucket.Git\build\Microsoft.SourceLink.Bitbucket.Git.props"> | |
C:\Program Files\dotnet\sdk\8.0.404\Sdks\Microsoft.SourceLink.Bitbucket.Git\build\Microsoft.SourceLink.Bitbucket.Git.props | |
============================================================================================================================================ | |
--> | |
<!-- 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.txt file in the project root for more information. --> | |
<ItemGroup> | |
<SourceLinkBitbucketGitHost Include="bitbucket.org" EnterpriseEdition="false" /> | |
</ItemGroup> | |
<!-- | |
============================================================================================================================================ | |
</Import> | |
C:\Program Files\dotnet\sdk\8.0.404\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.SourceLink.props | |
============================================================================================================================================ | |
--> | |
<!--</ImportGroup>--> | |
<!-- | |
============================================================================================================================================ | |
</Import> | |
C:\Program Files\dotnet\sdk\8.0.404\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\8.0.404\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"> | |
<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> | |
<!-- Implicit imports --> | |
<ItemGroup Condition="'$(ImplicitUsings)' == 'true' Or '$(ImplicitUsings)' == 'enable'" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<Using Include="System" /> | |
<Using Include="System.Collections.Generic" /> | |
<Using Include="System.IO" /> | |
<Using Include="System.Linq" /> | |
<Using Include="System.Net.Http" Condition="'$(TargetFrameworkIdentifier)' != '.NETFramework'" /> | |
<Using Include="System.Threading" /> | |
<Using Include="System.Threading.Tasks" /> | |
</ItemGroup> | |
<!-- | |
============================================================================================================================================ | |
</Import> | |
C:\Program Files\dotnet\sdk\8.0.404\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.PackTool.props"> | |
C:\Program Files\dotnet\sdk\8.0.404\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\8.0.404\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.props | |
============================================================================================================================================ | |
--> | |
<!-- | |
============================================================================================================================================ | |
<Import Project="$(MSBuildThisFileDirectory)Microsoft.NET.PackProjectTool.props"> | |
C:\Program Files\dotnet\sdk\8.0.404\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\8.0.404\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\8.0.404\Sdks\Microsoft.NET.Sdk.WindowsDesktop\targets\Microsoft.NET.Sdk.WindowsDesktop.props | |
============================================================================================================================================ | |
--> | |
<ItemDefinitionGroup Condition=" '$(_EnableWindowsDesktopGlobbing)' == 'true' "> | |
<ApplicationDefinition> | |
<Generator>MSBuild:Compile</Generator> | |
<XamlRuntime>$(DefaultXamlRuntime)</XamlRuntime> | |
<SubType>Designer</SubType> | |
</ApplicationDefinition> | |
<Page> | |
<Generator>MSBuild:Compile</Generator> | |
<XamlRuntime>$(DefaultXamlRuntime)</XamlRuntime> | |
<SubType>Designer</SubType> | |
</Page> | |
</ItemDefinitionGroup> | |
<ItemGroup Condition=" '$(_EnableWindowsDesktopGlobbing)' == 'true' "> | |
<ApplicationDefinition Include="App.xaml" Condition="'$(EnableDefaultApplicationDefinition)' != 'false' And Exists('$(MSBuildProjectDirectory)/App.xaml') And '$(MSBuildProjectExtension)' == '.csproj'" /> | |
<ApplicationDefinition Include="Application.xaml" Condition="'$(EnableDefaultApplicationDefinition)' != 'false' And Exists('$(MSBuildProjectDirectory)/Application.xaml') And '$(MSBuildProjectExtension)' == '.vbproj'" /> | |
<Page Include="**/*.xaml" Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder);@(ApplicationDefinition)" Condition="'$(EnableDefaultPageItems)' != 'false'" /> | |
<!-- | |
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)' >= '4.0'"> | |
<RequiredTargetFramework>4.0</RequiredTargetFramework> | |
</_WpfCommonNetFxReference> | |
<_WpfCommonNetFxReference Include="UIAutomationClient" Condition="'$(_TargetFrameworkVersionValue)' != '' And '$(_TargetFrameworkVersionValue)' >= '4.0'" /> | |
<_WpfCommonNetFxReference Include="UIAutomationClientSideProviders" Condition="'$(_TargetFrameworkVersionValue)' != '' And '$(_TargetFrameworkVersionValue)' >= '4.0'" /> | |
<_WpfCommonNetFxReference Include="UIAutomationProvider" Condition="'$(_TargetFrameworkVersionValue)' != '' And '$(_TargetFrameworkVersionValue)' >= '4.0'" /> | |
<_WpfCommonNetFxReference Include="UIAutomationTypes" Condition="'$(_TargetFrameworkVersionValue)' != '' And '$(_TargetFrameworkVersionValue)' >= '4.0'" /> | |
<_WpfCommonNetFxReference Include="System.Windows.Controls.Ribbon" Condition="'$(_TargetFrameworkVersionValue)' != '' And '$(_TargetFrameworkVersionValue)' >= '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> | |
<!-- | |
Import Windows Forms props. | |
These come via the Windows Forms transport package, that can be found under | |
https://github.com/dotnet/winforms/tree/main/pkg/Microsoft.Private.Winforms/sdk | |
--> | |
<!-- | |
============================================================================================================================================ | |
<Import Project="Microsoft.NET.Sdk.WindowsDesktop.WindowsForms.props"> | |
C:\Program Files\dotnet\sdk\8.0.404\Sdks\Microsoft.NET.Sdk.WindowsDesktop\targets\Microsoft.NET.Sdk.WindowsDesktop.WindowsForms.props | |
============================================================================================================================================ | |
--> | |
<!-- | |
This props file comes from dotnet/winforms. It gets ingested by dotnet/wpf and processed by | |
packaging/Microsoft.NET.Sdk.WindowsDesktop project. | |
It is referenced via Microsoft.NET.Sdk.WindowsDesktop/targets/Microsoft.NET.Sdk.WindowsDesktop.props. | |
--> | |
<!-- | |
============================================================ | |
GenerateImplicitNamespaceImports | |
Generates implicit namespace imports source to intermediate directory for Windows Forms projects | |
============================================================ | |
--> | |
<ItemGroup Condition="'$(UseWindowsForms)' == 'true' and ('$(ImplicitUsings)' == 'true' or '$(ImplicitUsings)' == 'enable')"> | |
<!-- | |
SDK defines the following global usings: | |
* System | |
* System.Collections.Generic | |
* System.Linq | |
* System.Threading.Tasks | |
--> | |
<Using Include="System.Drawing" /> | |
<Using Include="System.Windows.Forms" /> | |
</ItemGroup> | |
<!-- Windows Forms source generator and analyzers --> | |
<!-- | |
============================================================================================================================================ | |
<Import Project="System.Windows.Forms.Analyzers.props"> | |
C:\Program Files\dotnet\sdk\8.0.404\Sdks\Microsoft.NET.Sdk.WindowsDesktop\targets\System.Windows.Forms.Analyzers.props | |
============================================================================================================================================ | |
--> | |
<!-- | |
This props file comes from dotnet/winforms. It gets ingested by dotnet/wpf and processed by | |
packaging/Microsoft.NET.Sdk.WindowsDesktop project. | |
It is referenced via Microsoft.NET.Sdk.WindowsDesktop.WindowsForms.props. | |
--> | |
<!-- Import for Windows Forms applications or when developing/testing locally --> | |
<ItemGroup Condition="('$(UseWindowsForms)' == 'true') or ('$(ResolveWinFormsAnalyzersFromSdkRefPack)' == 'false')"> | |
<!-- Known Application properties --> | |
<CompilerVisibleProperty Include="ApplicationManifest" /> | |
<CompilerVisibleProperty Include="StartupObject" /> | |
<!-- | |
Custom Application properties | |
See for more details: https://github.com/dotnet/designs/blob/main/accepted/2021/winforms/streamline-application-bootstrap.md#msbuild-properties | |
--> | |
<CompilerVisibleProperty Include="ApplicationDefaultFont" /> | |
<CompilerVisibleProperty Include="ApplicationHighDpiMode" /> | |
<CompilerVisibleProperty Include="ApplicationUseCompatibleTextRendering" /> | |
<CompilerVisibleProperty Include="ApplicationVisualStyles" /> | |
<!-- If there is an app.manifest - let the generator explore it --> | |
<AdditionalFiles Include="$(ApplicationManifest)" Condition="'$(ApplicationManifest)' != ''" /> | |
</ItemGroup> | |
<!-- | |
============================================================================================================================================ | |
</Import> | |
C:\Program Files\dotnet\sdk\8.0.404\Sdks\Microsoft.NET.Sdk.WindowsDesktop\targets\Microsoft.NET.Sdk.WindowsDesktop.WindowsForms.props | |
============================================================================================================================================ | |
--> | |
<!-- | |
============================================================================================================================================ | |
</Import> | |
C:\Program Files\dotnet\sdk\8.0.404\Sdks\Microsoft.NET.Sdk.WindowsDesktop\targets\Microsoft.NET.Sdk.WindowsDesktop.props | |
============================================================================================================================================ | |
--> | |
<!-- | |
============================================================================================================================================ | |
<Import Project="Microsoft.NET.Sdk.WindowsDesktop.WPF.props"> | |
C:\Program Files\dotnet\sdk\8.0.404\Sdks\Microsoft.NET.Sdk.WindowsDesktop\targets\Microsoft.NET.Sdk.WindowsDesktop.WPF.props | |
============================================================================================================================================ | |
--> | |
<!-- | |
Generates implicit global namespace imports file <projectname>.ImplicitGlobalNamespaceImports.cs. | |
--> | |
<ItemGroup Condition="'$(UseWPF)' == 'true' and ('$(ImplicitUsings)' == 'true' or '$(ImplicitUsings)' == 'enable')"> | |
<Using Remove="System.IO" /> | |
<Using Remove="System.Net.Http" /> | |
</ItemGroup> | |
<!-- | |
============================================================================================================================================ | |
</Import> | |
C:\Program Files\dotnet\sdk\8.0.404\Sdks\Microsoft.NET.Sdk.WindowsDesktop\targets\Microsoft.NET.Sdk.WindowsDesktop.props | |
============================================================================================================================================ | |
--> | |
<!-- | |
============================================================================================================================================ | |
</Import> | |
C:\Program Files\dotnet\sdk\8.0.404\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.props | |
============================================================================================================================================ | |
--> | |
<!-- | |
============================================================================================================================================ | |
<Import Project="$(MSBuildThisFileDirectory)Microsoft.NET.Windows.props"> | |
C:\Program Files\dotnet\sdk\8.0.404\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\8.0.404\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.props | |
============================================================================================================================================ | |
--> | |
<!-- | |
============================================================================================================================================ | |
</Import> | |
C:\Program Files\dotnet\sdk\8.0.404\Sdks\Microsoft.NET.Sdk\Sdk\Sdk.props | |
============================================================================================================================================ | |
--> | |
<!-- | |
============================================================================================================================================ | |
</Import> | |
C:\Program Files\dotnet\sdk\8.0.404\Sdks\Microsoft.NET.Sdk.Web\Targets\Sdk.Server.props | |
============================================================================================================================================ | |
--> | |
<!-- | |
============================================================================================================================================ | |
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk.Razor"> | |
C:\Program Files\dotnet\sdk\8.0.404\Sdks\Microsoft.NET.Sdk.Razor\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> | |
<!-- Determines if the Razor Sdk is responsible for importing Microsoft.NET.Sdk. Microsoft.NET.Sdk.Web may have previously imported this. --> | |
<_RazorSdkImportsMicrosoftNetSdk Condition="'$(UsingMicrosoftNETSdk)' != 'true'">true</_RazorSdkImportsMicrosoftNetSdk> | |
<_RazorSdkImportsMicrosoftNetSdkStaticWebAssets Condition="'$(UsingMicrosoftNETSdkStaticWebAssets)' != 'true'">true</_RazorSdkImportsMicrosoftNetSdkStaticWebAssets> | |
</PropertyGroup> | |
<!--<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" Condition="'$(_RazorSdkImportsMicrosoftNetSdk)' == 'true'" />--> | |
<!-- | |
============================================================================================================================================ | |
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk.StaticWebAssets" Condition="'$(_RazorSdkImportsMicrosoftNetSdkStaticWebAssets)' == 'true'"> | |
C:\Program Files\dotnet\sdk\8.0.404\Sdks\Microsoft.NET.Sdk.StaticWebAssets\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> | |
<!-- Determines if the StaticWebAssets Sdk is responsible for importing Microsoft.NET.Sdk. Microsoft.NET.Sdk.Web may have previously imported this. --> | |
<_StaticWebAssetsSdkImportsMicrosoftNetSdk Condition="'$(UsingMicrosoftNETSdk)' != 'true'">true</_StaticWebAssetsSdkImportsMicrosoftNetSdk> | |
</PropertyGroup> | |
<!--<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" Condition="'$(_StaticWebAssetsSdkImportsMicrosoftNetSdk)' == 'true'" />--> | |
<PropertyGroup> | |
<StaticWebAssetsSdkCurrentVersionProps Condition="'$(StaticWebAssetsSdkCurrentVersionProps)' == ''">$(MSBuildThisFileDirectory)..\targets\Sdk.StaticWebAssets.CurrentVersion.props</StaticWebAssetsSdkCurrentVersionProps> | |
</PropertyGroup> | |
<!-- | |
============================================================================================================================================ | |
<Import Project="$(StaticWebAssetsSdkCurrentVersionProps)"> | |
C:\Program Files\dotnet\sdk\8.0.404\Sdks\Microsoft.NET.Sdk.StaticWebAssets\targets\Sdk.StaticWebAssets.CurrentVersion.props | |
============================================================================================================================================ | |
--> | |
<!-- | |
*********************************************************************************************** | |
Sdk.StaticWebAssets.CurrentVersion.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. | |
*********************************************************************************************** | |
--> | |
<!-- | |
Properties and tasks supporting StaticWebAssets MSBuild integration | |
--> | |
<!-- | |
Default properties for common StaticWebAssets SDK behavior. | |
--> | |
<PropertyGroup> | |
<UsingMicrosoftNETSdkStaticWebAssets>true</UsingMicrosoftNETSdkStaticWebAssets> | |
<!-- | |
Set to true to automatically include certain file types, such as .cshtml files, as content in the project. | |
When referenced via Microsoft.NET.Sdk.Web, this additionally includes all files under wwwroot, and any config files. | |
--> | |
<EnableDefaultContentItems Condition="'$(EnableDefaultContentItems)'==''">true</EnableDefaultContentItems> | |
<!-- | |
Set to true to automatically include Razor (.razor.cs) files in @(ScopedCssInput) from @(Content). | |
--> | |
<EnableDefaultScopedCssItems Condition="'$(EnableDefaultScopedCssItems)'==''">true</EnableDefaultScopedCssItems> | |
</PropertyGroup> | |
<!-- | |
============================================================================================================================================ | |
<Import Project="$(MSBuildThisFileDirectory)..\Sdk\Sdk.StaticWebAssets.StaticAssets.ProjectSystem.props"> | |
C:\Program Files\dotnet\sdk\8.0.404\Sdks\Microsoft.NET.Sdk.StaticWebAssets\Sdk\Sdk.StaticWebAssets.StaticAssets.ProjectSystem.props | |
============================================================================================================================================ | |
--> | |
<!-- | |
*********************************************************************************************** | |
Sdk.StaticWebAssets.StaticAssets.ProjectSystem.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. | |
*********************************************************************************************** | |
--> | |
<!-- Properties for supporting static content --> | |
<PropertyGroup> | |
<!-- This is a contract we have with the Web SDK to allow them in the future to import this file | |
instead of the whole SDK if needed. | |
--> | |
<_WebProjectSystemGlobsPropsDefined>true</_WebProjectSystemGlobsPropsDefined> | |
<DefaultItemExcludes>$(DefaultItemExcludes);**\node_modules\**;node_modules\**</DefaultItemExcludes> | |
<DefaultItemExcludes>$(DefaultItemExcludes);**\jspm_packages\**;jspm_packages\**</DefaultItemExcludes> | |
<DefaultItemExcludes>$(DefaultItemExcludes);**\bower_components\**;bower_components\**</DefaultItemExcludes> | |
<DefaultWebContentItemExcludes>$(DefaultWebContentItemExcludes);wwwroot\**</DefaultWebContentItemExcludes> | |
</PropertyGroup> | |
<ItemGroup Condition="'$(EnableDefaultItems)' == 'true' And '$(EnableDefaultContentItems)' == 'true' "> | |
<!-- Publish everything under wwwroot, all JSON files, all config files and all Razor files --> | |
<Content Include="wwwroot\**" ExcludeFromSingleFile="true" CopyToPublishDirectory="PreserveNewest" Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder)" /> | |
<!-- Specifically support the ~/.well-known directory as per IETF RFC5785 --> | |
<Content Include="wwwroot\.well-known\**" ExcludeFromSingleFile="true" CopyToPublishDirectory="PreserveNewest" Exclude="$(DefaultItemExcludes)" /> | |
<Content Include="**\*.config" ExcludeFromSingleFile="true" CopyToOutputDirectory="PreserveNewest" CopyToPublishDirectory="PreserveNewest" Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder);$(DefaultWebContentItemExcludes)" Condition="'$(ExcludeConfigFilesFromBuildOutput)'!='true'" /> | |
<Content Include="**\*.json" ExcludeFromSingleFile="true" CopyToOutputDirectory="PreserveNewest" CopyToPublishDirectory="PreserveNewest" Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder);$(DefaultWebContentItemExcludes)" Condition="'$(ExcludeConfigFilesFromBuildOutput)'!='true'" /> | |
<!-- When ExcludeConfigFilesFromBuildOutput is set, do not copy .,config, .json files to the build output directory. --> | |
<Content Include="**\*.config" ExcludeFromSingleFile="true" CopyToPublishDirectory="PreserveNewest" Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder);$(DefaultWebContentItemExcludes)" Condition="'$(ExcludeConfigFilesFromBuildOutput)'=='true'" /> | |
<Content Include="**\*.json" ExcludeFromSingleFile="true" CopyToPublishDirectory="PreserveNewest" Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder);$(DefaultWebContentItemExcludes)" Condition="'$(ExcludeConfigFilesFromBuildOutput)'=='true'" /> | |
<!-- Set CopyToPublishDirectory to Never for items under AppDesignerFolder ("Properties", by default) to avoid publishing launchSettings.json --> | |
<Content Update="$(AppDesignerFolder)\**" CopyToPublishDirectory="Never" Condition="'$(AppDesignerFolder)' != ''" /> | |
<!-- Remove Content items from other item types (in a way that CPS understands) --> | |
<None Remove="wwwroot\**;**\*.json;**\*.config" /> | |
<Compile Remove="wwwroot\**" /> | |
<EmbeddedResource Remove="wwwroot\**" /> | |
<!-- Keep track of the default content items for later to distinguish them from newly generated content items --> | |
<!-- It's important to keep this here so that it works well with the Web SDK --> | |
<_ContentIncludedByDefault Include="@(Content)" /> | |
</ItemGroup> | |
<ItemGroup Condition="'$([MSBuild]::GetTargetPlatformIdentifier($(TargetFramework)))' != 'browser'"> | |
<Content Remove="**\**\*.Browser.cs" /> | |
<!-- <None Include="**\**\*.Browser.cs" Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder)" /> --> | |
<Content Remove="**\Browser\**\*.cs" /> | |
<!-- <None Include="**\Browser\**\*.cs" Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder)" /> --> | |
</ItemGroup> | |
<ItemGroup Condition="'$([MSBuild]::GetTargetPlatformIdentifier($(TargetFramework)))' != ''"> | |
<Content Remove="**\**\*.Server.cs" /> | |
<!-- <None Include="**\**\*.Server.cs" Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder)" /> --> | |
<Content Remove="**\Server\**\*.cs" /> | |
<!-- <None Include="**\Server\**\*.cs" Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder)" /> --> | |
</ItemGroup> | |
<!-- | |
============================================================================================================================================ | |
</Import> | |
C:\Program Files\dotnet\sdk\8.0.404\Sdks\Microsoft.NET.Sdk.StaticWebAssets\targets\Sdk.StaticWebAssets.CurrentVersion.props | |
============================================================================================================================================ | |
--> | |
<!-- | |
============================================================================================================================================ | |
</Import> | |
C:\Program Files\dotnet\sdk\8.0.404\Sdks\Microsoft.NET.Sdk.StaticWebAssets\Sdk\Sdk.props | |
============================================================================================================================================ | |
--> | |
<!-- | |
============================================================================================================================================ | |
</Import> | |
C:\Program Files\dotnet\sdk\8.0.404\Sdks\Microsoft.NET.Sdk.Razor\Sdk\Sdk.props | |
============================================================================================================================================ | |
--> | |
<PropertyGroup> | |
<RazorSdkCurrentVersionProps Condition="'$(RazorSdkCurrentVersionProps)' == ''">$(MSBuildThisFileDirectory)..\targets\Sdk.Razor.CurrentVersion.props</RazorSdkCurrentVersionProps> | |
</PropertyGroup> | |
<!-- | |
============================================================================================================================================ | |
<Import Project="$(RazorSdkCurrentVersionProps)"> | |
C:\Program Files\dotnet\sdk\8.0.404\Sdks\Microsoft.NET.Sdk.Razor\targets\Sdk.Razor.CurrentVersion.props | |
============================================================================================================================================ | |
--> | |
<!-- | |
*********************************************************************************************** | |
Sdk.Razor.CurrentVersion.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. | |
*********************************************************************************************** | |
--> | |
<!-- | |
Properties and tasks supporting Razor MSBuild integration | |
--> | |
<!-- | |
Default properties for common Razor SDK behavior. | |
--> | |
<PropertyGroup> | |
<UsingMicrosoftNETSdkRazor>true</UsingMicrosoftNETSdkRazor> | |
<!-- | |
Set to true to automatically include certain file types, such as .cshtml files, as content in the project. | |
When referenced via Microsoft.NET.Sdk.Web, this additionally includes all files under wwwroot, and any config files. | |
--> | |
<EnableDefaultContentItems Condition="'$(EnableDefaultContentItems)'==''">true</EnableDefaultContentItems> | |
<!-- | |
Set to true to automatically include Razor (.cshtml) files in @(RazorGenerate) from @(Content). | |
--> | |
<EnableDefaultRazorGenerateItems Condition="'$(EnableDefaultRazorGenerateItems)'==''">true</EnableDefaultRazorGenerateItems> | |
<!-- | |
Set to true to automatically include Razor (.razor) files in @(RazorComponent) from @(Content). | |
--> | |
<EnableDefaultRazorComponentItems Condition="'$(EnableDefaultRazorComponentItems)'==''">true</EnableDefaultRazorComponentItems> | |
<!-- | |
Set to true to copy RazorGenerate items (.cshtml) to the publish directory. | |
Typically Razor files are not needed for a published application if they participate in compilation at build-time | |
or publish-time. By default, the Razor SDK will suppress the copying of RazorGenerate items to the publish directory. | |
--> | |
<CopyRazorGenerateFilesToPublishDirectory Condition="'$(CopyRazorGenerateFilesToPublishDirectory)'==''">false</CopyRazorGenerateFilesToPublishDirectory> | |
<!-- | |
Determines the toolset to use to compile Razor (.cshtml) files. Defaults to 'Implicit' to let the Razor Sdk determine the toolset to use. | |
Valid values include 'Implicit', 'RazorSdk', and 'PrecompilationTool'. | |
--> | |
<RazorCompileToolset>Implicit</RazorCompileToolset> | |
<!-- | |
Configures whether all Razor content items (.cshtml files) will be marked to be included in the produced NuGet package as content. | |
All Content items are included in a NuGet package as content files. This setting can be used to control this behavior for Razor content items. | |
--> | |
<IncludeRazorContentInPack Condition="'$(IncludeRazorContentInPack)'==''">false</IncludeRazorContentInPack> | |
<!-- | |
Configures the file extension used for generated C# files. | |
--> | |
<RazorGenerateOutputFileExtension>.g.cs</RazorGenerateOutputFileExtension> | |
<!-- | |
List of file extensions that will cause VS to restart the application when RazorSDK is effective. | |
This property affects C# projects targeting 3.0 or later. | |
--> | |
<RazorUpToDateReloadFileTypes>.cs;.razor;.resx;.cshtml</RazorUpToDateReloadFileTypes> | |
<!-- | |
Target used by dotnet-watch to resolve additional items. | |
--> | |
<CustomCollectWatchItems>$(CustomCollectWatchItems);_RazorSdkCustomCollectWatchItems</CustomCollectWatchItems> | |
</PropertyGroup> | |
<ItemGroup Condition="'$(EnableDefaultItems)' == 'true' And '$(EnableDefaultContentItems)' == 'true'"> | |
<Content Include="**\*.cshtml" ExcludeFromSingleFile="true" CopyToPublishDirectory="PreserveNewest" Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder);$(DefaultWebContentItemExcludes)" /> | |
<Content Include="**\*.razor" ExcludeFromSingleFile="true" Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder);$(DefaultWebContentItemExcludes)" /> | |
<None Remove="**\*.cshtml" /> | |
<None Remove="**\*.razor" /> | |
</ItemGroup> | |
<!-- | |
============================================================================================================================================ | |
</Import> | |
C:\Program Files\dotnet\sdk\8.0.404\Sdks\Microsoft.NET.Sdk.Razor\Sdk\Sdk.props | |
============================================================================================================================================ | |
--> | |
<!-- | |
============================================================================================================================================ | |
</Import> | |
C:\Program Files\dotnet\sdk\8.0.404\Sdks\Microsoft.NET.Sdk.Web\Targets\Sdk.Server.props | |
============================================================================================================================================ | |
--> | |
<!-- | |
============================================================================================================================================ | |
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk.Web.ProjectSystem"> | |
C:\Program Files\dotnet\sdk\8.0.404\Sdks\Microsoft.NET.Sdk.Web.ProjectSystem\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"> | |
<UsingMicrosoftNETSdkWebProjectSystem>true</UsingMicrosoftNETSdkWebProjectSystem> | |
</PropertyGroup> | |
<!-- | |
============================================================================================================================================ | |
<Import Project="$(MSBuildThisFileDirectory)..\targets\Microsoft.NET.Sdk.Web.ProjectSystem.props" Condition="Exists('$(MSBuildThisFileDirectory)..\targets\Microsoft.NET.Sdk.Web.ProjectSystem.props')"> | |
C:\Program Files\dotnet\sdk\8.0.404\Sdks\Microsoft.NET.Sdk.Web.ProjectSystem\targets\Microsoft.NET.Sdk.Web.ProjectSystem.props | |
============================================================================================================================================ | |
--> | |
<!-- | |
*********************************************************************************************** | |
Microsoft.NET.Sdk.Web.ProjectSystem.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"> | |
<OutputType>Exe</OutputType> | |
<DebugSymbols Condition="'$(DebugSymbols)' == ''">true</DebugSymbols> | |
<DebugType Condition="'$(DebugType)' == ''">full</DebugType> | |
<GenerateDependencyFile Condition="'$(GenerateDependencyFile)' == ''">true</GenerateDependencyFile> | |
<ServerGarbageCollection Condition="'$(ServerGarbageCollection)' == ''">true</ServerGarbageCollection> | |
<IsPackable Condition="'$(IsPackable)' == ''">false</IsPackable> | |
<WarnOnPackingNonPackableProject Condition="'$(WarnOnPackingNonPackableProject)' == '' and '$(IsPackable)' == 'false'">true</WarnOnPackingNonPackableProject> | |
</PropertyGroup> | |
<!--<Import Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v$(VisualStudioVersion)\TypeScript\Microsoft.TypeScript.Default.props" Condition="Exists('$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v$(VisualStudioVersion)\TypeScript\Microsoft.TypeScript.Default.props')" />--> | |
<!-- | |
============================================================================================================================================ | |
<Import Project="$(MSBuildThisFileDirectory)Microsoft.NET.Sdk.Web.DefaultItems.props" Condition="Exists('$(MSBuildThisFileDirectory)Microsoft.NET.Sdk.Web.DefaultItems.props')"> | |
C:\Program Files\dotnet\sdk\8.0.404\Sdks\Microsoft.NET.Sdk.Web.ProjectSystem\targets\Microsoft.NET.Sdk.Web.DefaultItems.props | |
============================================================================================================================================ | |
--> | |
<!-- | |
*********************************************************************************************** | |
Microsoft.NET.Sdk.Web.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. | |
*********************************************************************************************** | |
--> | |
<ItemGroup Condition="'$(EnableDefaultItems)' == 'true'
 And '$(EnableDefaultContentItems)' == 'true'
 And '$(EnableDefaultNoneItems)' == 'true'
 And '$(AppDesignerFolder)' != ''"> | |
<_WebToolingArtifacts Include="$(AppDesignerFolder)\launchSettings*.json;
 $(AppDesignerFolder)\serviceDependencies*.json;
 $(AppDesignerFolder)\serviceDependencies.*.json;
 $(AppDesignerFolder)\ServiceDependencies\**;
 $(AppDesignerFolder)\PublishProfiles\**" Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder)" /> | |
<!-- Removing the tooling artifacts from all other globs and adding it to the none glob. This ensures that the | |
up-to-date check is unimpacted by the changes to the tooling artifacts --> | |
<None Remove="@(_WebToolingArtifacts)" /> | |
<None Include="@(_WebToolingArtifacts)" CopyToOutputDirectory="Never" CopyToPublishDirectory="Never" ExcludeFromSingleFile="true" /> | |
<Content Remove="@(_WebToolingArtifacts)" /> | |
<Compile Remove="@(_WebToolingArtifacts)" /> | |
<EmbeddedResource Remove="@(_WebToolingArtifacts)" /> | |
<!-- Keep track of the default content items for later to distinguish them from newly generated content items --> | |
<_ContentIncludedByDefault Remove="@(_ContentIncludedByDefault)" /> | |
<_ContentIncludedByDefault Include="@(Content)" /> | |
</ItemGroup> | |
<!-- | |
============================================================================================================================================ | |
</Import> | |
C:\Program Files\dotnet\sdk\8.0.404\Sdks\Microsoft.NET.Sdk.Web.ProjectSystem\targets\Microsoft.NET.Sdk.Web.ProjectSystem.props | |
============================================================================================================================================ | |
--> | |
<!-- | |
============================================================================================================================================ | |
</Import> | |
C:\Program Files\dotnet\sdk\8.0.404\Sdks\Microsoft.NET.Sdk.Web.ProjectSystem\Sdk\Sdk.props | |
============================================================================================================================================ | |
--> | |
<!-- | |
============================================================================================================================================ | |
</Import> | |
C:\Program Files\dotnet\sdk\8.0.404\Sdks\Microsoft.NET.Sdk.Web\Targets\Sdk.Server.props | |
============================================================================================================================================ | |
--> | |
<!-- | |
============================================================================================================================================ | |
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk.Publish"> | |
C:\Program Files\dotnet\sdk\8.0.404\Sdks\Microsoft.NET.Sdk.Publish\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"> | |
<UsingMicrosoftNETSdkPublish>true</UsingMicrosoftNETSdkPublish> | |
</PropertyGroup> | |
<!-- | |
============================================================================================================================================ | |
<Import Project="$(MSBuildThisFileDirectory)..\targets\Microsoft.NET.Sdk.Publish.props" Condition="Exists('$(MSBuildThisFileDirectory)..\targets\Microsoft.NET.Sdk.Publish.props')"> | |
C:\Program Files\dotnet\sdk\8.0.404\Sdks\Microsoft.NET.Sdk.Publish\targets\Microsoft.NET.Sdk.Publish.props | |
============================================================================================================================================ | |
--> | |
<!-- | |
*********************************************************************************************** | |
Microsoft.NET.Sdk.Publish.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"> | |
<EnableSdkContainerSupport Condition="'$(EnableSdkContainerSupport)' == ''">true</EnableSdkContainerSupport> | |
</PropertyGroup> | |
<!-- | |
============================================================================================================================================ | |
</Import> | |
C:\Program Files\dotnet\sdk\8.0.404\Sdks\Microsoft.NET.Sdk.Publish\Sdk\Sdk.props | |
============================================================================================================================================ | |
--> | |
<!-- | |
============================================================================================================================================ | |
</Import> | |
C:\Program Files\dotnet\sdk\8.0.404\Sdks\Microsoft.NET.Sdk.Web\Targets\Sdk.Server.props | |
============================================================================================================================================ | |
--> | |
<ItemGroup Condition="'$(DisableImplicitFrameworkReferences)' != 'true' And '$(TargetFrameworkIdentifier)' == '.NETCoreApp' And '$(_TargetFrameworkVersionWithoutV)' >= '3.0'" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<FrameworkReference Include="Microsoft.AspNetCore.App" IsImplicitlyDefined="true" /> | |
</ItemGroup> | |
<ItemGroup Condition="'$(DisableImplicitAspNetCoreAnalyzers)' != 'true' And '$(TargetFrameworkIdentifier)' == '.NETCoreApp' And '$(_TargetFrameworkVersionWithoutV)' >= '3.0'" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<Analyzer Include="$([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)..))\analyzers\cs\Microsoft.AspNetCore.Analyzers.dll" Condition="'$(Language)'=='C#'" IsImplicitlyDefined="true" /> | |
<Analyzer Include="$([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)..))\analyzers\cs\Microsoft.AspNetCore.Mvc.Analyzers.dll" Condition="'$(Language)'=='C#'" IsImplicitlyDefined="true" /> | |
<Analyzer Include="$([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)..))\analyzers\cs\Microsoft.AspNetCore.Mvc.Api.Analyzers.dll" Condition="'$(Language)'=='C#' AND '$(IncludeOpenAPIAnalyzers)' == 'true'" IsImplicitlyDefined="true" /> | |
</ItemGroup> | |
<ItemGroup Condition="'$(DisableImplicitComponentsAnalyzers)' != 'true' And '$(DisableImplicitAspNetCoreAnalyzers)' != 'true'
 And '$(TargetFrameworkIdentifier)' == '.NETCoreApp'
 And $([MSBuild]::VersionGreaterThanOrEquals('$(TargetFrameworkVersion)', '3.0'))
 And $([MSBuild]::VersionLessThanOrEquals('$(TargetFrameworkVersion)', '6.0'))" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<Analyzer Include="$([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)..))\analyzers\cs\Microsoft.AspNetCore.Components.SdkAnalyzers.dll" Condition="'$(Language)'=='C#'" IsImplicitlyDefined="true" /> | |
</ItemGroup> | |
<ItemGroup Condition="'$(Language)' == 'C#' AND ('$(ImplicitUsings)' == 'true' or '$(ImplicitUsings)' == 'enable')" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<Using Include="System.Net.Http.Json" /> | |
<Using Include="Microsoft.AspNetCore.Builder" /> | |
<Using Include="Microsoft.AspNetCore.Hosting" /> | |
<Using Include="Microsoft.AspNetCore.Http" /> | |
<Using Include="Microsoft.AspNetCore.Routing" /> | |
<Using Include="Microsoft.Extensions.Configuration" /> | |
<Using Include="Microsoft.Extensions.DependencyInjection" /> | |
<Using Include="Microsoft.Extensions.Hosting" /> | |
<Using Include="Microsoft.Extensions.Logging" /> | |
</ItemGroup> | |
<!-- | |
============================================================================================================================================ | |
</Import> | |
C:\Program Files\dotnet\sdk\8.0.404\Sdks\Microsoft.NET.Sdk.Web\Sdk\Sdk.props | |
============================================================================================================================================ | |
--> | |
<!-- Delegates to the Blazor Webassembly SDK on projects that target browser scenarios --> | |
<!--<Import Project="..\Targets\Sdk.Browser.props" Condition="'$([MSBuild]::GetTargetPlatformIdentifier($(TargetFramework)))' == 'browser'" />--> | |
<!-- | |
============================================================================================================================================ | |
</Import> | |
D:\Projects\App-Workspace\Csharp\minimalref\minimalref.csproj | |
============================================================================================================================================ | |
--> | |
<PropertyGroup> | |
<TargetFramework>net8.0</TargetFramework> | |
<Nullable>enable</Nullable> | |
<ImplicitUsings>enable</ImplicitUsings> | |
</PropertyGroup> | |
<ItemGroup> | |
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="8.0.11" /> | |
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.6.2" /> | |
</ItemGroup> | |
<!-- | |
============================================================================================================================================ | |
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk.Web"> | |
This import was added implicitly because the Project element's Sdk attribute specified "Microsoft.NET.Sdk.Web". | |
C:\Program Files\dotnet\sdk\8.0.404\Sdks\Microsoft.NET.Sdk.Web\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. | |
*********************************************************************************************** | |
--> | |
<!-- Imports the .NET, Razor, and other web related SDKs on projects that target server scenarios. --> | |
<!-- | |
============================================================================================================================================ | |
<Import Project="..\Targets\Sdk.Server.targets" Condition="'$([MSBuild]::GetTargetPlatformIdentifier($(TargetFramework)))' != 'browser'"> | |
C:\Program Files\dotnet\sdk\8.0.404\Sdks\Microsoft.NET.Sdk.Web\Targets\Sdk.Server.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. | |
*********************************************************************************************** | |
--> | |
<!-- We can't add it here because the OutputPath and other msbuild properties are not evaluated.--> | |
<!--<Import Sdk="Microsoft.NET.Sdk.Publish" Project="ImportPublishProfile.targets" />--> | |
<!-- | |
============================================================================================================================================ | |
<Import Project="..\targets\Microsoft.NET.Sdk.Web.BeforeCommon.targets" Sdk="Microsoft.NET.Sdk.Web.ProjectSystem"> | |
C:\Program Files\dotnet\sdk\8.0.404\Sdks\Microsoft.NET.Sdk.Web.ProjectSystem\targets\Microsoft.NET.Sdk.Web.BeforeCommon.targets | |
============================================================================================================================================ | |
--> | |
<!-- | |
*********************************************************************************************** | |
Microsoft.NET.Sdk.Web.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. | |
*********************************************************************************************** | |
--> | |
<!-- Default settings for aot'd apps that need to be defaulted before Microsoft.NET.Sdk.targets is imported. --> | |
<PropertyGroup Condition="'$(PublishAot)' == 'true'" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<!-- Enable EventSource support because it is disabled by default in aot'd apps. --> | |
<EventSourceSupport Condition="'$(EventSourceSupport)' == ''">true</EventSourceSupport> | |
</PropertyGroup> | |
<!-- | |
============================================================================================================================================ | |
</Import> | |
C:\Program Files\dotnet\sdk\8.0.404\Sdks\Microsoft.NET.Sdk.Web\Targets\Sdk.Server.targets | |
============================================================================================================================================ | |
--> | |
<!-- | |
============================================================================================================================================ | |
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk"> | |
C:\Program Files\dotnet\sdk\8.0.404\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\8.0.404\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\8.0.404\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\8.0.404\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.BeforeCommon.targets | |
============================================================================================================================================ | |
--> | |
<!-- | |
Apply these defaults from Microsoft.Common.CurrentVersion.targets now since we're running before them, | |
but need to adjust them and/or make decisions in terms of them. | |
--> | |
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<Configuration Condition="'$(Configuration)'==''">Debug</Configuration> | |
<Platform Condition="'$(Platform)'==''">AnyCPU</Platform> | |
<PlatformName Condition="'$(PlatformName)' == ''">$(Platform)</PlatformName> | |
</PropertyGroup> | |
<!-- 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\8.0.404\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
 '$(ProjectToOverrideProjectExtensionsPath)' != '$(MSBuildProjectFullPath)') or
 '$(WebPublishProfileFile)' == '' or
 !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\8.0.404\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\8.0.404\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> | |
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<_TargetFrameworkVersionWithoutV>$(TargetFrameworkVersion.TrimStart('vV'))</_TargetFrameworkVersionWithoutV> | |
</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> | |
<!-- Skip this target for design time builds when there are missing workload packs. | |
This will prevent design time builds from failing and therefore allow | |
Visual Studio to collect the workloads from the GetSuggestedWorkloads target --> | |
<Target Name="_CheckForUnsupportedTargetPlatformIdentifier" BeforeTargets="_CheckForInvalidConfigurationAndPlatform;RunResolvePackageDependencies;GetFrameworkPaths;GetReferenceAssemblyPaths;CollectPackageReferences" Condition="'$(TargetPlatformIdentifier)' != '' and '$(TargetFrameworkIdentifier)' == '.NETCoreApp' and $([MSBuild]::VersionGreaterThanOrEquals($(TargetFrameworkVersion), 5.0)) And ('$(DesignTimeBuild)' != 'true' Or '@(MissingWorkloadPack)' == '')" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<PropertyGroup> | |
<TargetPlatformSupported Condition="'$(TargetPlatformIdentifier)' == 'Windows'">true</TargetPlatformSupported> | |
<UseWorkloadsSpecificError Condition="($(TargetPlatformIdentifier) == 'ios' or $(TargetPlatformIdentifier) == 'tvos' or $(TargetPlatformIdentifier) == 'maccatalyst' or $(TargetPlatformIdentifier) == 'android' or $(TargetPlatformIdentifier.StartsWith('browser'))) and '$(MSBuildEnableWorkloadResolver)' != 'true'">true</UseWorkloadsSpecificError> | |
</PropertyGroup> | |
<NETSdkError Condition="'$(TargetPlatformSupported)' != 'true' and '$(UseWorkloadsSpecificError)' != 'true'" ResourceName="UnsupportedTargetPlatformIdentifier" FormatArguments="$(TargetPlatformIdentifier)" /> | |
<NETSdkError Condition="'$(TargetPlatformSupported)' != 'true' and '$(UseWorkloadsSpecificError)' == 'true'" ResourceName="UnsupportedTargetPlatformIdentifierWithWorkloadsDisabled" 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"> | |
<ItemGroup> | |
<TFTelemetry Include="TargetFrameworkVersion" Value="$([MSBuild]::Escape('$(TargetFrameworkMoniker)'))" /> | |
<TFTelemetry Include="RuntimeIdentifier" Value="$(RuntimeIdentifier)" /> | |
<TFTelemetry Include="SelfContained" Value="$(SelfContained)" /> | |
<TFTelemetry Include="UseApphost" Value="$(UseApphost)" /> | |
<TFTelemetry Include="OutputType" Value="$(OutputType)" /> | |
<TFTelemetry Include="UseArtifactsOutput" Value="$(UseArtifactsOutput)" /> | |
<TFTelemetry Include="ArtifactsPathLocationType" Value="$(_ArtifactsPathLocationType)" /> | |
</ItemGroup> | |
<AllowEmptyTelemetry EventName="targetframeworkeval" EventData="@(TFTelemetry)" /> | |
</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"> | |
<PropertyGroup> | |
<DisplayVSMessage Condition="$([MSBuild]::VersionLessThan($(MSBuildVersion), '$(MinimumVisualStudioVersionForUnsupportedTargetFrameworkVersion)')) and '$(BuildingInsideVisualStudio)' == 'true' and '$(_TargetFrameworkVersionWithoutV)' == '$(UnsupportedTargetFrameworkVersion)' and '$([MSBuild]::IsOSPlatform(`Windows`))' == 'true'">true</DisplayVSMessage> | |
</PropertyGroup> | |
<NETSdkError Condition="'$(_TargetFrameworkVersionWithoutV)' > '$(NETCoreAppMaximumVersion)' and '$(DisplayVSMessage)' != 'true'" ResourceName="UnsupportedTargetFrameworkVersion" FormatArguments=".NET;$(_TargetFrameworkVersionWithoutV);$(NETCoreAppMaximumVersion)" /> | |
<NETSdkError Condition="'$(DisplayVSMessage)' == 'true'" ResourceName="UnsupportedVisualStudioVersion" FormatArguments=".NET;$(_TargetFrameworkVersionWithoutV);$(NETCoreAppMaximumVersion);$(MinimumVisualStudioVersionForUnsupportedTargetFrameworkVersion)" /> | |
</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)' < '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)' > '$(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->Distinct()->Count())' == '1' and '@(_ValidTargetPlatformVersion)' != '$(TargetPlatformVersion)'">@(_ValidTargetPlatformVersion->Distinct())</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> | |
<!-- Hook for processing after target framework parsing (for example to customize output paths) --> | |
<!--<Import Project="$(AfterTargetFrameworkInferenceTargets)" Condition="$(AfterTargetFrameworkInferenceTargets) != ''" />--> | |
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<ProduceReferenceAssembly Condition="'$(ProduceReferenceAssembly)' == '' and '$(TargetFrameworkIdentifier)' == '.NETCoreApp' and $([MSBuild]::VersionGreaterThanOrEquals($(TargetFrameworkVersion), 5.0)) and ('$(ProduceOnlyReferenceAssembly)' != 'true') and '$(MSBuildProjectExtension)' != '.fsproj'">true</ProduceReferenceAssembly> | |
<ProduceReferenceAssembly Condition="'$(ProduceReferenceAssembly)' == '' and '$(TargetFrameworkIdentifier)' == '.NETCoreApp' and $([MSBuild]::VersionGreaterThanOrEquals($(TargetFrameworkVersion), 7.0)) and ('$(ProduceOnlyReferenceAssembly)' != 'true') and '$(MSBuildProjectExtension)' == '.fsproj'">true</ProduceReferenceAssembly> | |
</PropertyGroup> | |
<!-- | |
============================================================================================================================================ | |
</Import> | |
C:\Program Files\dotnet\sdk\8.0.404\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\8.0.404\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. | |
*********************************************************************************************** | |
--> | |
<!-- | |
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. | |
--> | |
<!-- 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> | |
<AppendPlatformToOutputPath Condition="'$(AppendPlatformToOutputPath)' == '' and '$(PlatformName)' == 'AnyCPU'">false</AppendPlatformToOutputPath> | |
<AppendPlatformToOutputPath Condition="'$(AppendPlatformToOutputPath)' == '' and '$(PlatformName)' != 'AnyCPU'">true</AppendPlatformToOutputPath> | |
<_PlatformToAppendToOutputPath Condition="'$(AppendPlatformToOutputPath)' == 'true'">$(PlatformName)\</_PlatformToAppendToOutputPath> | |
</PropertyGroup> | |
<!-- NOTE: If we want to default UseArtifactsOutput to true when targeting a given version of .NET or higher, this is where we would do it. | |
It would look something like this: | |
<PropertyGroup Condition="'$(UseArtifactsOutput)' == '' and | |
'$(TargetFrameworks)' == '' and | |
'$(TargetFrameworkIdentifier)' == '.NETCoreApp' and | |
$([MSBuild]::VersionGreaterThanOrEquals($(TargetFrameworkVersion), 8.0))"> | |
<UseArtifactsOutput>true</UseArtifactsOutput> | |
</PropertyGroup> | |
--> | |
<!-- Import .props file to set ArtifactsPath if it wasn't already imported from Sdk.props (this is for the case when artifacts | |
properties are set in the project file instead of Directory.Build.props --> | |
<!-- | |
============================================================================================================================================ | |
<Import Project="$(MSBuildThisFileDirectory)Microsoft.NET.DefaultArtifactsPath.props" Condition="'$(_DefaultArtifactsPathPropsImported)' != 'true'"> | |
C:\Program Files\dotnet\sdk\8.0.404\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.DefaultArtifactsPath.props | |
============================================================================================================================================ | |
--> | |
<!-- | |
*********************************************************************************************** | |
Microsoft.NET.DefaultArtifactsPath.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 .props file may be imported either from Sdk.props or from Microsoft.NET.DefaultOutputPaths.targets, depending | |
on whether artifacts output properties were set in Directory.Build.props or not. | |
Set a property to indicate it was imported, so we can avoid a duplicate import. --> | |
<PropertyGroup> | |
<_DefaultArtifactsPathPropsImported>true</_DefaultArtifactsPathPropsImported> | |
</PropertyGroup> | |
<!-- Setting ArtifactsPath automatically opts in to the artifacts output format --> | |
<PropertyGroup Condition="'$(ArtifactsPath)' != '' And '$(UsingMicrosoftArtifactsSdk)' != 'true'"> | |
<UseArtifactsOutput Condition="'$(UseArtifactsOutput)' == ''">true</UseArtifactsOutput> | |
<IncludeProjectNameInArtifactsPaths Condition="'$(IncludeProjectNameInArtifactsPaths)' == ''">true</IncludeProjectNameInArtifactsPaths> | |
<_ArtifactsPathLocationType>ExplicitlySpecified</_ArtifactsPathLocationType> | |
</PropertyGroup> | |
<!-- Set up base output folders if UseArtifactsOutput is set --> | |
<PropertyGroup Condition="'$(UseArtifactsOutput)' == 'true' And '$(ArtifactsPath)' == '' And '$(_DirectoryBuildPropsBasePath)' != ''"> | |
<!-- Default ArtifactsPath to be in the directory where Directory.Build.props is found | |
Note that we do not append a backslash to the ArtifactsPath as we do with most paths, because it may be a global property passed in on the command-line which we can't easily change --> | |
<ArtifactsPath>$(_DirectoryBuildPropsBasePath)\artifacts</ArtifactsPath> | |
<IncludeProjectNameInArtifactsPaths Condition="'$(IncludeProjectNameInArtifactsPaths)' == ''">true</IncludeProjectNameInArtifactsPaths> | |
<_ArtifactsPathLocationType>DirectoryBuildPropsFolder</_ArtifactsPathLocationType> | |
</PropertyGroup> | |
<PropertyGroup Condition="'$(UseArtifactsOutput)' == 'true' And '$(ArtifactsPath)' == ''"> | |
<!-- If there was no Directory.Build.props file, then put the artifacts path in the project folder --> | |
<ArtifactsPath>$(MSBuildProjectDirectory)\artifacts</ArtifactsPath> | |
<_ArtifactsPathLocationType>ProjectFolder</_ArtifactsPathLocationType> | |
</PropertyGroup> | |
<!-- | |
============================================================================================================================================ | |
</Import> | |
C:\Program Files\dotnet\sdk\8.0.404\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.DefaultOutputPaths.targets | |
============================================================================================================================================ | |
--> | |
<PropertyGroup Condition="'$(UseArtifactsOutput)' == 'true'" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<ArtifactsProjectName Condition="'$(ArtifactsProjectName)' == ''">$(MSBuildProjectName)</ArtifactsProjectName> | |
<ArtifactsBinOutputName Condition="'$(ArtifactsBinOutputName)' == ''">bin</ArtifactsBinOutputName> | |
<ArtifactsPublishOutputName Condition="'$(ArtifactsPublishOutputName)' == ''">publish</ArtifactsPublishOutputName> | |
<ArtifactsPackageOutputName Condition="'$(ArtifactsPackageOutputName)' == ''">package</ArtifactsPackageOutputName> | |
</PropertyGroup> | |
<PropertyGroup Condition="'$(UseArtifactsOutput)' == 'true' And '$(ArtifactsPivots)' == ''" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<ArtifactsPivots>$(Configuration.ToLowerInvariant())</ArtifactsPivots> | |
<!-- Include the TargetFramework in the pivots if the project is multi-targeted (ie TargetFrameworks) is defined --> | |
<ArtifactsPivots Condition="'$(TargetFrameworks)' != '' And '$(TargetFramework)' != ''">$(ArtifactsPivots)_$(TargetFramework.ToLowerInvariant())</ArtifactsPivots> | |
<!-- This targets file is evaluated before RuntimeIdentifierInference.targets, so this will only include the | |
RuntimeIdentifier in the path if it was explicitly specified, not if it was inferred. This is the | |
behavior we want. | |
The BlazorWebAssembly .props file sets the RuntimeIdentifier to browser-wasm, so treat that as a special case. | |
--> | |
<ArtifactsPivots Condition="'$(RuntimeIdentifier)' != '' And !('$(RuntimeIdentifier)' == 'browser-wasm' And '$(AppendRuntimeIdentifierToOutputPath)' == 'false')">$(ArtifactsPivots)_$(RuntimeIdentifier.ToLowerInvariant())</ArtifactsPivots> | |
</PropertyGroup> | |
<PropertyGroup Condition="'$(UseArtifactsOutput)' == 'true' And '$(IncludeProjectNameInArtifactsPaths)' == 'true'" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<!-- Set artifacts paths when project name should be included in the path --> | |
<BaseOutputPath Condition="'$(BaseOutputPath)' == ''">$(ArtifactsPath)\$(ArtifactsBinOutputName)\$(ArtifactsProjectName)\</BaseOutputPath> | |
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)' == '' And '$(UseArtifactsIntermediateOutput)' == 'true'">$(ArtifactsPath)\obj\$(ArtifactsProjectName)\</BaseIntermediateOutputPath> | |
<PublishDir Condition="'$(PublishDir)' == ''">$(ArtifactsPath)\$(ArtifactsPublishOutputName)\$(ArtifactsProjectName)\$(ArtifactsPivots)\</PublishDir> | |
</PropertyGroup> | |
<PropertyGroup Condition="'$(UseArtifactsOutput)' == 'true' And '$(IncludeProjectNameInArtifactsPaths)' != 'true'" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<!-- Set artifacts paths when project name should not be included in the path --> | |
<BaseOutputPath Condition="'$(BaseOutputPath)' == ''">$(ArtifactsPath)\$(ArtifactsBinOutputName)\</BaseOutputPath> | |
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)' == '' And '$(UseArtifactsIntermediateOutput)' == 'true'">$(ArtifactsPath)\obj\</BaseIntermediateOutputPath> | |
<PublishDir Condition="'$(PublishDir)' == ''">$(ArtifactsPath)\$(ArtifactsPublishOutputName)\$(ArtifactsPivots)\</PublishDir> | |
</PropertyGroup> | |
<PropertyGroup Condition="'$(UseArtifactsOutput)' == 'true'" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<OutputPath Condition="'$(OutputPath)' == ''">$(BaseOutputPath)$(ArtifactsPivots)\</OutputPath> | |
<IntermediateOutputPath Condition=" $(IntermediateOutputPath) == '' And '$(UseArtifactsIntermediateOutput)' == 'true'">$(BaseIntermediateOutputPath)$(ArtifactsPivots)\</IntermediateOutputPath> | |
<!-- The package output path does not include the project name, and only includes the Configuration as a pivot --> | |
<PackageOutputPath Condition="'$(PackageOutputPath)' == ''">$(ArtifactsPath)\$(ArtifactsPackageOutputName)\$(Configuration.ToLowerInvariant())\</PackageOutputPath> | |
</PropertyGroup> | |
<PropertyGroup Condition="'$(UseArtifactsOutput)' != 'true'" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<BaseOutputPath Condition="'$(BaseOutputPath)' == ''">bin\</BaseOutputPath> | |
<BaseOutputPath Condition="!HasTrailingSlash('$(BaseOutputPath)')">$(BaseOutputPath)\</BaseOutputPath> | |
<OutputPath Condition="'$(OutputPath)' == ''">$(BaseOutputPath)$(_PlatformToAppendToOutputPath)$(Configuration)\</OutputPath> | |
<OutputPath Condition="!HasTrailingSlash('$(OutputPath)')">$(OutputPath)\</OutputPath> | |
</PropertyGroup> | |
<!-- If "UseArtifactsOutput" wasn't set when the MSBuild project extensions .props files were imported, then use "obj" in the project folder for the intermediate output path | |
instead a folder under ArtifactsPath. To have the intermediate output path in the artifacts folder, "UseArtifactsOutput" should be set in Directory.Build.props--> | |
<PropertyGroup Condition="'$(UseArtifactsIntermediateOutput)' != 'true'" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)' == ''">obj\</BaseIntermediateOutputPath> | |
<BaseIntermediateOutputPath Condition="!HasTrailingSlash('$(BaseIntermediateOutputPath)')">$(BaseIntermediateOutputPath)\</BaseIntermediateOutputPath> | |
<IntermediateOutputPath Condition=" $(IntermediateOutputPath) == '' ">$(BaseIntermediateOutputPath)$(_PlatformToAppendToOutputPath)$(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 Condition="'$(PackageOutputPath)' == ''" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<PackageOutputPath Condition="'$(UseArtifactsOutput)' != 'true'">$(OutputPath)</PackageOutputPath> | |
</PropertyGroup> | |
<!-- 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 Condition="'$(UseArtifactsOutput)' != 'true'" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<DefaultItemExcludes>$(DefaultItemExcludes);$(OutputPath)/**</DefaultItemExcludes> | |
<DefaultItemExcludes>$(DefaultItemExcludes);$(IntermediateOutputPath)/**</DefaultItemExcludes> | |
</PropertyGroup> | |
<PropertyGroup Condition="'$(UseArtifactsOutput)' == 'true'" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<DefaultItemExcludes>$(DefaultItemExcludes);$(ArtifactsPath)/**</DefaultItemExcludes> | |
<!-- Exclude bin and obj folders to avoid issues with projects that switch to using artifacts output format --> | |
<DefaultItemExcludes>$(DefaultItemExcludes);bin/**;obj/**</DefaultItemExcludes> | |
</PropertyGroup> | |
<!-- | |
Append $(TargetFramework) directory to output and intermediate paths to prevent bin clashes between | |
targets. | |
--> | |
<PropertyGroup Condition="'$(UseArtifactsOutput)' != 'true' and
 '$(AppendTargetFrameworkToOutputPath)' == 'true' and '$(TargetFramework)' != '' and '$(_UnsupportedTargetFrameworkError)' != 'true'" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<OutputPath>$(OutputPath)$(TargetFramework.ToLowerInvariant())\</OutputPath> | |
</PropertyGroup> | |
<PropertyGroup Condition="'$(UseArtifactsOutput)' != 'true' and
 '$(AppendTargetFrameworkToOutputPath)' == 'true' and '$(TargetFramework)' != '' and '$(_UnsupportedTargetFrameworkError)' != 'true'" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<IntermediateOutputPath>$(IntermediateOutputPath)$(TargetFramework.ToLowerInvariant())\</IntermediateOutputPath> | |
</PropertyGroup> | |
<Target Name="_CheckForUnsupportedArtifactsPath" BeforeTargets="_CheckForInvalidConfigurationAndPlatform" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<!-- Generate an error if ArtifactsPath or UseArtifactsOutput are set in the project file. | |
We generate an error because if they are set in the project file, it is too late to change the intermediate output path, | |
and because it would be confusing to set the property in the project file and have the artifacts path depend on whether | |
there happened to be a Directory.Build.props file defined. | |
--> | |
<NetSdkError Condition="'$(UseArtifactsOutput)' == 'true' and '$(_ArtifactsPathSetEarly)' != 'true'" ResourceName="ArtifactsPathCannotBeSetInProject" /> | |
<NetSdkError Condition="'$(_ArtifactsPathLocationType)' == 'ProjectFolder'" ResourceName="UseArtifactsOutputRequiresDirectoryBuildProps" /> | |
</Target> | |
<!-- | |
============================================================================================================================================ | |
</Import> | |
C:\Program Files\dotnet\sdk\8.0.404\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> | |
<!-- | |
Import targets from RazorSDK if referenced | |
Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.BeforeCommon.targets | |
Sdks\Microsoft.NET.Sdk.Razor\targets\Microsoft.NET.Sdk.Razor.BeforeCommon.targets | |
--> | |
<!-- | |
============================================================================================================================================ | |
<Import Project="$(MSBuildThisFileDirectory)..\..\Microsoft.NET.Sdk.Razor\targets\Microsoft.NET.Sdk.Razor.BeforeCommon.targets" Condition="'$(UsingMicrosoftNETSdkRazor)' == 'true'"> | |
C:\Program Files\dotnet\sdk\8.0.404\Sdks\Microsoft.NET.Sdk.Razor\targets\Microsoft.NET.Sdk.Razor.BeforeCommon.targets | |
============================================================================================================================================ | |
--> | |
<!-- | |
*********************************************************************************************** | |
Microsoft.NET.Sdk.Razor.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. | |
*********************************************************************************************** | |
--> | |
<!-- Configure PreserveCompilationContext and PreserveCompilationReferences defaults for .NET Framework apps and .NET Core apps targets 5.0 and earlier. --> | |
<PropertyGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework' OR ('$(TargetFrameworkIdentifier)' == '.NETCoreApp' AND $([MSBuild]::VersionLessThan($(TargetFrameworkVersion), 6.0)))" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<!-- Determines if the deps file includes complication context --> | |
<PreserveCompilationContext Condition="'$(PreserveCompilationContext)' == ''">true</PreserveCompilationContext> | |
<!-- Determines if the refs folder is produced as part of build \ publish --> | |
<PreserveCompilationReferences Condition="'$(PreserveCompilationReferences)' == ''">false</PreserveCompilationReferences> | |
</PropertyGroup> | |
<!-- | |
============================================================================================================================================ | |
</Import> | |
C:\Program Files\dotnet\sdk\8.0.404\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.BeforeCommon.targets | |
============================================================================================================================================ | |
--> | |
<!-- Import workload targets --> | |
<!-- | |
============================================================================================================================================ | |
<Import Project="Microsoft.NET.Sdk.ImportWorkloads.targets" Condition="'$(MSBuildEnableWorkloadResolver)' == 'true'"> | |
C:\Program Files\dotnet\sdk\8.0.404\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\8.0.100\microsoft.net.sdk.android\34.0.43\WorkloadManifest.targets | |
============================================================================================================================================ | |
--> | |
<!--<ImportGroup Condition=" '$(TargetPlatformIdentifier)' == 'android' ">--> | |
<!--<Import Project="Sdk.targets" Sdk="Microsoft.Android.Sdk.net8" Condition=" $([MSBuild]::VersionEquals($(TargetFrameworkVersion), '8.0')) " />--> | |
<!--<Import Project="Sdk.targets" Sdk="Microsoft.Android.Sdk.net7" Condition=" $([MSBuild]::VersionEquals($(TargetFrameworkVersion), '7.0')) " />--> | |
<!--<Import Project="Eol.targets" Sdk="Microsoft.Android.Sdk.net8" Condition=" $([MSBuild]::VersionEquals($(TargetFrameworkVersion), '6.0')) " />--> | |
<!--</ImportGroup>--> | |
<ItemGroup Condition=" '$(TargetPlatformIdentifier)' == 'android' and $([MSBuild]::VersionEquals($(TargetFrameworkVersion), '7.0')) "> | |
<KnownFrameworkReference Update="Microsoft.Android" LatestRuntimeFrameworkVersion="33.0.95" TargetingPackVersion="33.0.95" /> | |
</ItemGroup> | |
<ItemGroup Condition=" '$(TargetFrameworkIdentifier)' == '.NETCoreApp' and $([MSBuild]::VersionGreaterThanOrEquals($(TargetFrameworkVersion), '7.0')) "> | |
<SdkSupportedTargetPlatformIdentifier Include="android" DisplayName="Android" /> | |
</ItemGroup> | |
<!-- | |
============================================================================================================================================ | |
</Import> | |
============================================================================================================================================ | |
--> | |
<!-- | |
============================================================================================================================================ | |
<Import Project="WorkloadManifest.targets" Sdk="Microsoft.NET.SDK.WorkloadManifestTargetsLocator"> | |
C:\Program Files\dotnet\sdk-manifests\8.0.100\microsoft.net.sdk.ios\17.0.8478\WorkloadManifest.targets | |
============================================================================================================================================ | |
--> | |
<!--<ImportGroup Condition=" '$(TargetPlatformIdentifier)' == 'iOS' ">--> | |
<!--<Import Project="Sdk.props" Sdk="Microsoft.$(TargetPlatformIdentifier).Sdk.net8" Condition=" $([MSBuild]::VersionEquals($(TargetFrameworkVersion), '8.0')) " />--> | |
<!--<Import Project="Sdk.props" Sdk="Microsoft.$(TargetPlatformIdentifier).Sdk.net7" Condition=" $([MSBuild]::VersionEquals($(TargetFrameworkVersion), '7.0')) " />--> | |
<!--<Import Project="Sdk.props" Sdk="Microsoft.$(TargetPlatformIdentifier).Windows.Sdk.Aliased.net8" Condition=" $([MSBuild]::VersionEquals($(TargetFrameworkVersion), '8.0')) And $([MSBuild]::IsOSPlatform('windows'))" />--> | |
<!--<Import Project="Sdk.props" Sdk="Microsoft.$(TargetPlatformIdentifier).Windows.Sdk.Aliased.net7" Condition=" $([MSBuild]::VersionEquals($(TargetFrameworkVersion), '7.0')) And $([MSBuild]::IsOSPlatform('windows'))" />--> | |
<!--</ImportGroup>--> | |
<ItemGroup Condition=" '$(TargetFrameworkIdentifier)' == '.NETCoreApp' and $([MSBuild]::VersionGreaterThanOrEquals($(TargetFrameworkVersion), '6.0')) "> | |
<SdkSupportedTargetPlatformIdentifier Include="ios" DisplayName="iOS" /> | |
</ItemGroup> | |
<!-- | |
============================================================================================================================================ | |
</Import> | |
============================================================================================================================================ | |
--> | |
<!-- | |
============================================================================================================================================ | |
<Import Project="WorkloadManifest.targets" Sdk="Microsoft.NET.SDK.WorkloadManifestTargetsLocator"> | |
C:\Program Files\dotnet\sdk-manifests\8.0.100\microsoft.net.sdk.maccatalyst\17.0.8478\WorkloadManifest.targets | |
============================================================================================================================================ | |
--> | |
<!--<ImportGroup Condition=" '$(TargetPlatformIdentifier)' == 'MacCatalyst' ">--> | |
<!--<Import Project="Sdk.props" Sdk="Microsoft.$(TargetPlatformIdentifier).Sdk.net8" Condition=" $([MSBuild]::VersionEquals($(TargetFrameworkVersion), '8.0')) " />--> | |
<!--<Import Project="Sdk.props" Sdk="Microsoft.$(TargetPlatformIdentifier).Sdk.net7" Condition=" $([MSBuild]::VersionEquals($(TargetFrameworkVersion), '7.0')) " />--> | |
<!--</ImportGroup>--> | |
<ItemGroup Condition=" '$(TargetFrameworkIdentifier)' == '.NETCoreApp' and $([MSBuild]::VersionGreaterThanOrEquals($(TargetFrameworkVersion), '6.0')) "> | |
<SdkSupportedTargetPlatformIdentifier Include="maccatalyst" DisplayName="Mac Catalyst" /> | |
</ItemGroup> | |
<!-- | |
============================================================================================================================================ | |
</Import> | |
============================================================================================================================================ | |
--> | |
<!-- | |
============================================================================================================================================ | |
<Import Project="WorkloadManifest.targets" Sdk="Microsoft.NET.SDK.WorkloadManifestTargetsLocator"> | |
C:\Program Files\dotnet\sdk-manifests\8.0.100\microsoft.net.sdk.macos\14.0.8478\WorkloadManifest.targets | |
============================================================================================================================================ | |
--> | |
<!--<ImportGroup Condition=" '$(TargetPlatformIdentifier)' == 'macOS' ">--> | |
<!--<Import Project="Sdk.props" Sdk="Microsoft.$(TargetPlatformIdentifier).Sdk.net8" Condition=" $([MSBuild]::VersionEquals($(TargetFrameworkVersion), '8.0')) " />--> | |
<!--<Import Project="Sdk.props" Sdk="Microsoft.$(TargetPlatformIdentifier).Sdk.net7" Condition=" $([MSBuild]::VersionEquals($(TargetFrameworkVersion), '7.0')) " />--> | |
<!--</ImportGroup>--> | |
<ItemGroup Condition=" '$(TargetFrameworkIdentifier)' == '.NETCoreApp' and $([MSBuild]::VersionGreaterThanOrEquals($(TargetFrameworkVersion), '6.0')) "> | |
<SdkSupportedTargetPlatformIdentifier Include="macos" DisplayName="macOS" /> | |
</ItemGroup> | |
<!-- | |
============================================================================================================================================ | |
</Import> | |
============================================================================================================================================ | |
--> | |
<!-- | |
============================================================================================================================================ | |
<Import Project="WorkloadManifest.targets" Sdk="Microsoft.NET.SDK.WorkloadManifestTargetsLocator"> | |
C:\Program Files\dotnet\sdk-manifests\8.0.100\microsoft.net.sdk.maui\8.0.3\WorkloadManifest.targets | |
============================================================================================================================================ | |
--> | |
<!-- | |
.NET MAUI telemetry and failure tracking. These are used to detect when the user specified one of the | |
various <UseMaui*> properties, but for some reason the workload was not installed correctly. | |
--> | |
<ItemGroup> | |
<ProjectCapability Condition=" '$(UseMaui)' == 'true' " Include="UseMaui" /> | |
<ProjectCapability Condition=" '$(UseMauiCore)' == 'true' " Include="UseMauiCore" /> | |
<ProjectCapability Condition=" '$(UseMauiNuGets)' == 'true' " Include="UseMauiNuGets" /> | |
<ProjectCapability Condition=" '$(UseMauiEssentials)' == 'true' " Include="UseMauiEssentials" /> | |
<ProjectCapability Condition=" '$(UseMauiAssets)' == 'true' " Include="UseMauiAssets" /> | |
</ItemGroup> | |
<!-- | |
Specifying any of the <UseMaui*> properties will enable the maui workload. BundledVersions.targets enables | |
the specific parts of .NET MAUI SDK. | |
--> | |
<!--<Import Project="Sdk.targets" Sdk="Microsoft.Maui.Sdk.net8" Condition=" ('$(UseMaui)' == 'true' or '$(UseMauiCore)' == 'true' or '$(UseMauiEssentials)' == 'true' or '$(UseMauiAssets)' == 'true') and ($([MSBuild]::VersionEquals($(TargetFrameworkVersion), '8.0'))) and ('$(SkipMauiWorkloadManifest)' != 'true') " />--> | |
<!--<Import Project="Sdk.targets" Sdk="Microsoft.Maui.Sdk.net7" Condition=" ('$(UseMaui)' == 'true' or '$(UseMauiCore)' == 'true' or '$(UseMauiEssentials)' == 'true' or '$(UseMauiAssets)' == 'true') and ($([MSBuild]::VersionEquals($(TargetFrameworkVersion), '7.0'))) and ('$(SkipMauiWorkloadManifest)' != 'true') " />--> | |
<!-- | |
Previous versions of the .NET MAUI SDK used Microsoft.Maui.Resizetizer.Sdk, but the new version uses a NuGet. | |
--> | |
<!--<Import Project="Sdk.targets" Sdk="Microsoft.Maui.Resizetizer.Sdk" Condition=" ('$(UseMaui)' == 'true' or '$(UseMauiAssets)' == 'true') and ($([MSBuild]::VersionEquals($(TargetFrameworkVersion), '7.0'))) and ('$(SkipMauiWorkloadManifest)' != 'true') " />--> | |
<!-- | |
Previous versions of the .NET MAUI SDK used **FromWorkload**, so replace with explicit versions. | |
The BundledVersions.targets that is imported is from the previous SDK, so all the other values are correct. | |
--> | |
<ItemGroup Condition=" $([MSBuild]::VersionEquals($(TargetFrameworkVersion), '7.0')) and ('$(SkipMauiWorkloadManifest)' != 'true') "> | |
<KnownFrameworkReference Update="Microsoft.Maui.Core" DefaultRuntimeFrameworkVersion="$(MauiVersion)" LatestRuntimeFrameworkVersion="$(MauiVersion)" TargetingPackVersion="$(MauiVersion)" /> | |
<KnownFrameworkReference Update="Microsoft.Maui.Controls" DefaultRuntimeFrameworkVersion="$(MauiVersion)" LatestRuntimeFrameworkVersion="$(MauiVersion)" TargetingPackVersion="$(MauiVersion)" /> | |
<KnownFrameworkReference Update="Microsoft.Maui.Essentials" DefaultRuntimeFrameworkVersion="$(MauiVersion)" LatestRuntimeFrameworkVersion="$(MauiVersion)" TargetingPackVersion="$(MauiVersion)" /> | |
</ItemGroup> | |
<!-- | |
============================================================================================================================================ | |
</Import> | |
============================================================================================================================================ | |
--> | |
<!-- | |
============================================================================================================================================ | |
<Import Project="WorkloadManifest.targets" Sdk="Microsoft.NET.SDK.WorkloadManifestTargetsLocator"> | |
C:\Program Files\dotnet\sdk-manifests\8.0.100\microsoft.net.sdk.tvos\17.0.8478\WorkloadManifest.targets | |
============================================================================================================================================ | |
--> | |
<!--<ImportGroup Condition=" '$(TargetPlatformIdentifier)' == 'tvOS' ">--> | |
<!--<Import Project="Sdk.props" Sdk="Microsoft.$(TargetPlatformIdentifier).Sdk.net8" Condition=" $([MSBuild]::VersionEquals($(TargetFrameworkVersion), '8.0')) " />--> | |
<!--<Import Project="Sdk.props" Sdk="Microsoft.$(TargetPlatformIdentifier).Sdk.net7" Condition=" $([MSBuild]::VersionEquals($(TargetFrameworkVersion), '7.0')) " />--> | |
<!--</ImportGroup>--> | |
<ItemGroup Condition=" '$(TargetFrameworkIdentifier)' == '.NETCoreApp' and $([MSBuild]::VersionGreaterThanOrEquals($(TargetFrameworkVersion), '6.0')) "> | |
<SdkSupportedTargetPlatformIdentifier Include="tvos" DisplayName="tvOS" /> | |
</ItemGroup> | |
<!-- | |
============================================================================================================================================ | |
</Import> | |
============================================================================================================================================ | |
--> | |
<!-- | |
============================================================================================================================================ | |
<Import Project="WorkloadManifest.targets" Sdk="Microsoft.NET.SDK.WorkloadManifestTargetsLocator"> | |
C:\Program Files\dotnet\sdk-manifests\8.0.100\microsoft.net.workload.mono.toolchain.current\8.0.11\WorkloadManifest.targets | |
============================================================================================================================================ | |
--> | |
<!-- Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. --> | |
<PropertyGroup> | |
<_RuntimePackInWorkloadVersionCurrent>8.0.11</_RuntimePackInWorkloadVersionCurrent> | |
<_RuntimePackInWorkloadVersion7>7.0.20</_RuntimePackInWorkloadVersion7> | |
<_RuntimePackInWorkloadVersion6>6.0.36</_RuntimePackInWorkloadVersion6> | |
<TargetsNet8 Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp' and $([MSBuild]::VersionEquals('$(TargetFrameworkVersion)', '8.0'))">true</TargetsNet8> | |
<TargetsNet6 Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp' and $([MSBuild]::VersionEquals('$(TargetFrameworkVersion)', '6.0'))">true</TargetsNet6> | |
<TargetsNet7 Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp' and $([MSBuild]::VersionEquals('$(TargetFrameworkVersion)', '7.0'))">true</TargetsNet7> | |
<TargetsCurrent Condition="'$(TargetsNet8)' == 'true'">true</TargetsCurrent> | |
<!-- override WorkloadDetectionWhen net7 == net8 --> | |
<WasmNativeWorkload7 Condition="'7.0.20' == '8.0.11'">$(WasmNativeWorkload8)</WasmNativeWorkload7> | |
</PropertyGroup> | |
<!-- | |
============================================================================================================================================ | |
<Import Project="$(MSBuildThisFileDirectory)WorkloadManifest.Wasi.targets"> | |
C:\Program Files\dotnet\sdk-manifests\8.0.100\microsoft.net.workload.mono.toolchain.current\8.0.11\WorkloadManifest.Wasi.targets | |
============================================================================================================================================ | |
--> | |
<!-- Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. --> | |
<PropertyGroup Condition="'$(RuntimeIdentifier)' == 'wasi-wasm'"> | |
<WasiNativeWorkloadAvailable Condition="'$(TargetsCurrent)' == 'true' and '$(WasiNativeWorkload)' == 'net8.0'">true</WasiNativeWorkloadAvailable> | |
</PropertyGroup> | |
<PropertyGroup Condition="'$(RuntimeIdentifier)' == 'wasi-wasm' and '$(TargetFrameworkIdentifier)' == '.NETCoreApp'"> | |
<UsingWasiRuntimeWorkload Condition="'$(UsingWasiRuntimeWorkload)' == ''">$(WasiNativeWorkloadAvailable)</UsingWasiRuntimeWorkload> | |
</PropertyGroup> | |
<!-- | |
============================================================================================================================================ | |
</Import> | |
C:\Program Files\dotnet\sdk-manifests\8.0.100\microsoft.net.workload.mono.toolchain.current\8.0.11\WorkloadManifest.targets | |
============================================================================================================================================ | |
--> | |
<PropertyGroup Condition="'$(RuntimeIdentifier)' == 'browser-wasm' and '$(TargetFrameworkIdentifier)' == '.NETCoreApp'"> | |
<_BrowserWorkloadNotSupportedForTFM Condition="$([MSBuild]::VersionLessThan($(TargetFrameworkVersion), '6.0'))">true</_BrowserWorkloadNotSupportedForTFM> | |
<_BrowserWorkloadDisabled>$(_BrowserWorkloadNotSupportedForTFM)</_BrowserWorkloadDisabled> | |
<_UsingBlazorOrWasmSdk Condition="'$(UsingMicrosoftNETSdkBlazorWebAssembly)' == 'true' or '$(UsingMicrosoftNETSdkWebAssembly)' == 'true'">true</_UsingBlazorOrWasmSdk> | |
<!-- Is the workload for the target framework available --> | |
<!--<WasmNativeWorkloadAvailable />--> | |
<!--<WasmNativeWorkloadAvailable Condition="'$(TargetsNet8)' == 'true' and $(WasmNativeWorkloadAvailableList.Contains('+net8.0+'))">true</WasmNativeWorkloadAvailable>--> | |
<!--<WasmNativeWorkloadAvailable Condition="'$(TargetsNet7)' == 'true' and $(WasmNativeWorkloadAvailableList.Contains('+net7.0+'))">true</WasmNativeWorkloadAvailable>--> | |
<!--<WasmNativeWorkloadAvailable Condition="'$(TargetsNet6)' == 'true' and $(WasmNativeWorkloadAvailableList.Contains('+net6.0+'))">true</WasmNativeWorkloadAvailable>--> | |
</PropertyGroup> | |
<PropertyGroup Condition="'$(RuntimeIdentifier)' == 'browser-wasm'"> | |
<SelfContained>true</SelfContained> | |
<WasmNativeWorkloadAvailable Condition="'$(TargetsNet7)' == 'true'">$(WasmNativeWorkload7)</WasmNativeWorkloadAvailable> | |
<WasmNativeWorkloadAvailable Condition="'$(TargetsNet8)' == 'true'">$(WasmNativeWorkload8)</WasmNativeWorkloadAvailable> | |
<WasmNativeWorkloadAvailable Condition="'$(TargetsNet6)' == 'true'">$(WasmNativeWorkload)</WasmNativeWorkloadAvailable> | |
<WasmNativeWorkloadAvailable Condition="'$(WasmNativeWorkloadAvailable)' == '' or '$(WasmNativeWorkload)' == 'false'">false</WasmNativeWorkloadAvailable> | |
<WasmNativeWorkload>$(WasmNativeWorkloadAvailable)</WasmNativeWorkload> | |
</PropertyGroup> | |
<PropertyGroup Condition="'$(RuntimeIdentifier)' == 'browser-wasm' and '$(TargetFrameworkIdentifier)' == '.NETCoreApp'"> | |
<!-- Keep in sync with WasmApp.Native.targets --> | |
<_WasmPropertiesDifferFromRuntimePackThusNativeBuildNeeded Condition="
 '$(WasmEnableLegacyJsInterop)' == 'false' or
 '$(WasmEnableSIMD)' == 'false' or
 '$(WasmEnableExceptionHandling)' == 'false' or
 '$(InvariantTimezone)' == 'true' or
 ('$(_UsingBlazorOrWasmSdk)' != 'true' and '$(InvariantGlobalization)' == 'true') or
 '$(WasmNativeStrip)' == 'false'">true</_WasmPropertiesDifferFromRuntimePackThusNativeBuildNeeded> | |
<!-- $(WasmBuildNative)==true is needed to enable workloads, when using native references, without AOT --> | |
<!-- FIXME: is the blazor condition here correct? --> | |
<_WasmNativeWorkloadNeeded Condition="
 '$(_WasmPropertiesDifferFromRuntimePackThusNativeBuildNeeded)' == 'true' or
 '$(RunAOTCompilation)' == 'true' or
 '$(WasmBuildNative)' == 'true' or
 '$(WasmGenerateAppBundle)' == 'true' or
 '$(_UsingBlazorOrWasmSdk)' != 'true'">true</_WasmNativeWorkloadNeeded> | |
<UsingBrowserRuntimeWorkload Condition="'$(_BrowserWorkloadNotSupportedForTFM)' == 'true'">false</UsingBrowserRuntimeWorkload> | |
<UsingBrowserRuntimeWorkload Condition="'$(UsingBrowserRuntimeWorkload)' == '' and '$(_WasmNativeWorkloadNeeded)' == 'true'">true</UsingBrowserRuntimeWorkload> | |
<UsingBrowserRuntimeWorkload Condition="'$(UsingBrowserRuntimeWorkload)' == ''">$(WasmNativeWorkloadAvailable)</UsingBrowserRuntimeWorkload> | |
</PropertyGroup> | |
<!-- Mono AOT library mode support --> | |
<PropertyGroup Condition="'$(PublishAot)' != 'true' and '$(NativeLib)' != ''"> | |
<_IsAndroidLibraryMode Condition="'$(RuntimeIdentifier)' == 'android-arm64' or '$(RuntimeIdentifier)' == 'android-arm' or '$(RuntimeIdentifier)' == 'android-x64' or '$(RuntimeIdentifier)' == 'android-x86'">true</_IsAndroidLibraryMode> | |
<_IsAppleMobileLibraryMode Condition="'$(RuntimeIdentifier)' == 'ios-arm64' or '$(RuntimeIdentifier)' == 'iossimulator-arm64' or '$(RuntimeIdentifier)' == 'iossimulator-x64' or '$(RuntimeIdentifier)' == 'maccatalyst-arm64' or '$(RuntimeIdentifier)' == 'maccatalyst-x64' or '$(RuntimeIdentifier)' == 'tvos-arm64'">true</_IsAppleMobileLibraryMode> | |
<_IsiOSLibraryMode Condition="'$(RuntimeIdentifier)' == 'ios-arm64' or '$(RuntimeIdentifier)' == 'iossimulator-arm64' or '$(RuntimeIdentifier)' == 'iossimulator-x64'">true</_IsiOSLibraryMode> | |
<_IsMacCatalystLibraryMode Condition="'$(RuntimeIdentifier)' == 'maccatalyst-arm64' or '$(RuntimeIdentifier)' == 'maccatalyst-x64'">true</_IsMacCatalystLibraryMode> | |
<_IstvOSLibraryMode Condition="'$(RuntimeIdentifier)' == 'tvos-arm64'">true</_IstvOSLibraryMode> | |
</PropertyGroup> | |
<PropertyGroup Condition="'$(TargetPlatformIdentifier)' == 'android' or '$(_IsAndroidLibraryMode)' == 'true' or '$(TargetPlatformIdentifier)' == 'macOS' or '$(TargetPlatformIdentifier)' == 'maccatalyst' or '$(TargetPlatformIdentifier)' == 'ios' or '$(TargetPlatformIdentifier)' == 'tvos' or '$(_IsAppleMobileLibraryMode)' == 'true'"> | |
<UsingMobileWorkload>true</UsingMobileWorkload> | |
</PropertyGroup> | |
<PropertyGroup Condition="'$(_UsingBlazorOrWasmSdk)' == 'true' and '$(UsingBrowserRuntimeWorkload)' == 'true'"> | |
<WasmGenerateAppBundle>false</WasmGenerateAppBundle> | |
<UsingBlazorAOTWorkloadManifest>true</UsingBlazorAOTWorkloadManifest> | |
</PropertyGroup> | |
<!-- TFM specific --> | |
<!--<Import Project="Sdk.props" Sdk="Microsoft.NET.Runtime.MonoAOTCompiler.Task.net8" Condition="'$(TargetsCurrent)' == 'true' and '$(RunAOTCompilation)' == 'true' and ('$(UsingBrowserRuntimeWorkload)' == 'true' or '$(UsingMobileWorkload)' == 'true')" />--> | |
<!--<ImportGroup Condition="'$(TargetsCurrent)' == 'true' and ('$(TargetPlatformIdentifier)' == 'android' or '$(_IsAndroidLibraryMode)' == 'true')">--> | |
<!--<Import Project="Sdk.props" Sdk="Microsoft.NET.Runtime.MonoTargets.Sdk.net8" />--> | |
<!--<Import Project="Sdk.targets" Sdk="Microsoft.NET.Runtime.MonoTargets.Sdk.net8" />--> | |
<!--</ImportGroup>--> | |
<!--<ImportGroup Condition="'$(_IsAndroidLibraryMode)' == 'true' or '$(_IsAppleMobileLibraryMode)' == 'true'">--> | |
<!--<Import Project="Sdk.props" Sdk="Microsoft.NET.Runtime.LibraryBuilder.Sdk.net8" />--> | |
<!--<Import Project="Sdk.targets" Sdk="Microsoft.NET.Runtime.LibraryBuilder.Sdk.net8" />--> | |
<!--</ImportGroup>--> | |
<!--<ImportGroup Condition="'$(TargetsCurrent)' == 'true' and '$(RunAOTCompilation)' == 'true' and ('$(TargetPlatformIdentifier)' == 'android' or '$(_IsAndroidLibraryMode)' == 'true')">--> | |
<!--<Import Project="Sdk.props" Sdk="Microsoft.NETCore.App.Runtime.AOT.Cross.net8.android-x86" />--> | |
<!--<Import Project="Sdk.props" Sdk="Microsoft.NETCore.App.Runtime.AOT.Cross.net8.android-x64" />--> | |
<!--<Import Project="Sdk.props" Sdk="Microsoft.NETCore.App.Runtime.AOT.Cross.net8.android-arm" />--> | |
<!--<Import Project="Sdk.props" Sdk="Microsoft.NETCore.App.Runtime.AOT.Cross.net8.android-arm64" />--> | |
<!--</ImportGroup>--> | |
<!--<ImportGroup Condition="'$(TargetsCurrent)' == 'true' and '$(TargetPlatformIdentifier)' == 'macOS'">--> | |
<!--<Import Project="Sdk.props" Sdk="Microsoft.NET.Runtime.MonoTargets.Sdk.net8" />--> | |
<!--<Import Project="Sdk.targets" Sdk="Microsoft.NET.Runtime.MonoTargets.Sdk.net8" />--> | |
<!--</ImportGroup>--> | |
<!--<ImportGroup Condition="'$(TargetsCurrent)' == 'true' and ('$(TargetPlatformIdentifier)' == 'ios' or '$(_IsiOSLibraryMode)' == 'true')">--> | |
<!--<Import Project="Sdk.props" Sdk="Microsoft.NET.Runtime.MonoTargets.Sdk.net8" />--> | |
<!--<Import Project="Sdk.targets" Sdk="Microsoft.NET.Runtime.MonoTargets.Sdk.net8" />--> | |
<!--</ImportGroup>--> | |
<!--<ImportGroup Condition="'$(TargetsCurrent)' == 'true' and $([MSBuild]::IsOSPlatform('osx')) and ('$(TargetPlatformIdentifier)' == 'ios' or '$(_IsiOSLibraryMode)' == 'true')">--> | |
<!--<Import Project="Sdk.props" Sdk="Microsoft.NETCore.App.Runtime.AOT.Cross.net8.ios-arm64" />--> | |
<!--<Import Project="Sdk.props" Sdk="Microsoft.NETCore.App.Runtime.AOT.Cross.net8.iossimulator-arm64" />--> | |
<!--<Import Project="Sdk.props" Sdk="Microsoft.NETCore.App.Runtime.AOT.Cross.net8.iossimulator-x64" />--> | |
<!--</ImportGroup>--> | |
<!--<ImportGroup Condition="'$(TargetsCurrent)' == 'true' and ('$(TargetPlatformIdentifier)' == 'maccatalyst' or '$(_IsMacCatalystLibraryMode)' == 'true')">--> | |
<!--<Import Project="Sdk.props" Sdk="Microsoft.NET.Runtime.MonoTargets.Sdk.net8" />--> | |
<!--<Import Project="Sdk.targets" Sdk="Microsoft.NET.Runtime.MonoTargets.Sdk.net8" />--> | |
<!--</ImportGroup>--> | |
<!--<ImportGroup Condition="'$(TargetsCurrent)' == 'true' and $([MSBuild]::IsOSPlatform('osx')) and ('$(TargetPlatformIdentifier)' == 'maccatalyst' or '$(_IsMacCatalystLibraryMode)' == 'true')">--> | |
<!--<Import Project="Sdk.props" Sdk="Microsoft.NETCore.App.Runtime.AOT.Cross.net8.maccatalyst-arm64" />--> | |
<!--<Import Project="Sdk.props" Sdk="Microsoft.NETCore.App.Runtime.AOT.Cross.net8.maccatalyst-x64" />--> | |
<!--</ImportGroup>--> | |
<!--<ImportGroup Condition="'$(TargetsCurrent)' == 'true' and ('$(TargetPlatformIdentifier)' == 'tvos' or '$(_IstvOSLibraryMode)' == 'true')">--> | |
<!--<Import Project="Sdk.props" Sdk="Microsoft.NET.Runtime.MonoTargets.Sdk.net8" />--> | |
<!--<Import Project="Sdk.targets" Sdk="Microsoft.NET.Runtime.MonoTargets.Sdk.net8" />--> | |
<!--</ImportGroup>--> | |
<!--<ImportGroup Condition="'$(TargetsCurrent)' == 'true' and $([MSBuild]::IsOSPlatform('osx')) and ('$(TargetPlatformIdentifier)' == 'tvos' or '$(_IstvOSLibraryMode)' == 'true')">--> | |
<!--<Import Project="Sdk.props" Sdk="Microsoft.NETCore.App.Runtime.AOT.Cross.net8.tvos-arm64" />--> | |
<!--<Import Project="Sdk.props" Sdk="Microsoft.NETCore.App.Runtime.AOT.Cross.net8.tvossimulator-arm64" />--> | |
<!--<Import Project="Sdk.props" Sdk="Microsoft.NETCore.App.Runtime.AOT.Cross.net8.tvossimulator-x64" />--> | |
<!--</ImportGroup>--> | |
<!--<ImportGroup Condition="'$(TargetsCurrent)' == 'true' and '$(RuntimeIdentifier)' == 'browser-wasm' and '$(UsingBrowserRuntimeWorkload)' == 'true'">--> | |
<!--<Import Project="Sdk.props" Sdk="Microsoft.NET.Runtime.MonoTargets.Sdk.net8" />--> | |
<!--<Import Project="Sdk.props" Sdk="Microsoft.NET.Runtime.WebAssembly.Sdk.net8" />--> | |
<!--<Import Project="Sdk.targets" Sdk="Microsoft.NET.Runtime.WebAssembly.Sdk.net8" />--> | |
<!--<Import Project="Sdk.props" Sdk="Microsoft.NETCore.App.Runtime.AOT.Cross.net8.browser-wasm" />--> | |
<!--<Import Project="Sdk.targets" Sdk="Microsoft.NET.Runtime.MonoTargets.Sdk.net8" />--> | |
<!--</ImportGroup>--> | |
<!--<ImportGroup Condition="'$(TargetsCurrent)' == 'true' and '$(RuntimeIdentifier)' == 'wasi-wasm' and '$(UsingWasiRuntimeWorkload)' == 'true'">--> | |
<!--<Import Project="Sdk.props" Sdk="Microsoft.NET.Runtime.MonoTargets.Sdk.net8" />--> | |
<!--<Import Project="Sdk.props" Sdk="Microsoft.NET.Runtime.WebAssembly.Wasi.Sdk.net8" />--> | |
<!--<Import Project="Sdk.targets" Sdk="Microsoft.NET.Runtime.WebAssembly.Wasi.Sdk.net8" />--> | |
<!--<Import Project="Sdk.targets" Sdk="Microsoft.NET.Runtime.MonoTargets.Sdk.net8" />--> | |
<!--</ImportGroup>--> | |
<PropertyGroup Condition="'$(TargetsCurrent)' == 'true' and ('$(UsingMobileWorkload)' == 'true' or '$(RuntimeIdentifier)' == 'browser-wasm' or '$(RuntimeIdentifier)' == 'wasi-wasm')"> | |
<_MonoWorkloadTargetsMobile>true</_MonoWorkloadTargetsMobile> | |
<_MonoWorkloadRuntimePackPackageVersion>$(_RuntimePackInWorkloadVersionCurrent)</_MonoWorkloadRuntimePackPackageVersion> | |
<_KnownWebAssemblySdkPackVersion>$(_RuntimePackInWorkloadVersionCurrent)</_KnownWebAssemblySdkPackVersion> | |
</PropertyGroup> | |
<!-- Support for "browser" target platform identifier --> | |
<PropertyGroup Condition="'$(TargetPlatformIdentifier)' == 'browser' and $([MSBuild]::VersionGreaterThanOrEquals('$(TargetFrameworkVersion)', '8.0'))"> | |
<TargetPlatformSupported>true</TargetPlatformSupported> | |
<TargetPlatformVersion Condition="'$(TargetPlatformVersion)' == ''">1.0</TargetPlatformVersion> | |
</PropertyGroup> | |
<ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'browser' and $([MSBuild]::VersionGreaterThanOrEquals('$(TargetFrameworkVersion)', '8.0'))"> | |
<SdkSupportedTargetPlatformVersion Include="1.0" /> | |
</ItemGroup> | |
<ItemGroup Condition="'$(TargetsCurrent)' == 'true' and '$(_MonoWorkloadTargetsMobile)' == 'true'"> | |
<KnownRuntimePack Update="@(KnownRuntimePack)"> | |
<!-- FIXMEWASI: workaround for now --> | |
<RuntimePackRuntimeIdentifiers Condition="'$(RuntimeIdentifier)' == 'wasi-wasm'">%(RuntimePackRuntimeIdentifiers);wasi-wasm</RuntimePackRuntimeIdentifiers> | |
<LatestRuntimeFrameworkVersion Condition="'%(KnownRuntimePack.TargetFramework)' == 'net8.0' and '%(KnownRuntimePack.RuntimePackLabels)' == 'Mono'">$(_MonoWorkloadRuntimePackPackageVersion)</LatestRuntimeFrameworkVersion> | |
<!-- Overrides for wasm threading support --> | |
<RuntimePackNamePatterns Condition="'$(RuntimeIdentifier)' == 'browser-wasm' and '$(WasmEnableThreads)' == 'true'">Microsoft.NETCore.App.Runtime.Mono.multithread.**RID**</RuntimePackNamePatterns> | |
</KnownRuntimePack> | |
<KnownWebAssemblySdkPack Update="@(KnownWebAssemblySdkPack)"> | |
<WebAssemblySdkPackVersion Condition="'%(KnownWebAssemblySdkPack.TargetFramework)' == 'net8.0'">$(_KnownWebAssemblySdkPackVersion)</WebAssemblySdkPackVersion> | |
</KnownWebAssemblySdkPack> | |
</ItemGroup> | |
<!-- we can't condition sdk imports on the item @(NativeFileReference). Instead, explicitly check before the build | |
and emit a warning --> | |
<Target Name="_CheckBrowserWorkloadNeededButNotAvailable" Condition="'$(RuntimeIdentifier)' == 'browser-wasm' and '$(_BrowserWorkloadDisabled)' != 'true' and '$(WasmNativeWorkloadAvailable)' != 'true'" BeforeTargets="Build"> | |
<Warning Condition="@(NativeFileReference->Count()) > 0" Text="%40(NativeFileReference) is not empty, but the native references won't be linked in, because neither %24(WasmBuildNative), nor %24(RunAOTCompilation) are 'true'. NativeFileReference=@(NativeFileReference)" /> | |
</Target> | |
<Target Name="_ErrorWorkloadDisabledForTFMLessThan6" Condition="'$(_BrowserWorkloadNotSupportedForTFM)' == 'true'" BeforeTargets="Build"> | |
<Error Condition="'$(RunAOTCompilation)' == 'true'" Text="WebAssembly workloads, required for AOT, are only supported for projects targeting net6.0+ . Set %24(RunAOTCompilation)=false to disable it." /> | |
<Error Condition="@(NativeFileReference->Count()) > 0" Text="WebAssembly workloads, required for linking native files (from %40(NativeFileReference)), are only supported for projects targeting net6.0+ ." /> | |
<Error Condition="'$(WasmBuildNative)' == 'true'" Text="WebAssembly workloads, required for native relinking, are only supported for projects targeting net6.0+ . Set %24(WasmBuildNative)=false to disable it." /> | |
</Target> | |
<Target Name="_ErrorDualWasmThreadPropsOn7" Condition="'$(TargetsNet7)' == 'true' and '$(RuntimeIdentifier)' == 'browser-wasm' and
 '$(BrowserWorkloadDisabled)' != 'true' and '$(WasmEnableThreads)' == 'true' and '$(WasmEnablePerfTrace)' == 'true'" BeforeTargets="Build"> | |
<Error Text="WebAssembly workloads can only support one active threading mode at a time. Either set WasmEnableThreads or WasmEnablePerfTracing to true, but not both." /> | |
</Target> | |
<Target Name="_SuggestWasmWorkloadForBlazor" BeforeTargets="Publish"> | |
<Message Condition="'$(_UsingBlazorOrWasmSdk)' == 'true' and '$(WasmNativeWorkloadAvailable)' != 'true'" Text="Publishing without optimizations. Although it's optional for Blazor, we strongly recommend using `wasm-tools` workload! You can install it by running `dotnet workload install wasm-tools` from the command line." Importance="High" /> | |
</Target> | |
<!--<Import Project="$(MSBuildThisFileDirectory)WorkloadTelemetry.targets" Condition="'$(TargetsCurrent)' == 'true' and ('$(UsingBrowserRuntimeWorkload)' == 'true' or '$(UsingMobileWorkload)' == 'true')" />--> | |
<!-- | |
============================================================================================================================================ | |
</Import> | |
============================================================================================================================================ | |
--> | |
<!-- | |
============================================================================================================================================ | |
<Import Project="WorkloadManifest.targets" Sdk="Microsoft.NET.SDK.WorkloadManifestTargetsLocator"> | |
C:\Program Files\dotnet\sdk-manifests\8.0.100\microsoft.net.workload.emscripten.current\8.0.11\WorkloadManifest.targets | |
============================================================================================================================================ | |
--> | |
<PropertyGroup Condition="'$(RuntimeIdentifier)' == 'browser-wasm'"> | |
<BrowserWorkloadDisabled Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp' and !$([MSBuild]::VersionGreaterThanOrEquals('$(TargetFrameworkVersion)', '6.0'))">true</BrowserWorkloadDisabled> | |
</PropertyGroup> | |
<PropertyGroup Condition="'$(RuntimeIdentifier)' == 'browser-wasm' and '$(BrowserWorkloadDisabled)' == 'true'"> | |
<_NativeBuildNeeded Condition="'$(RunAOTCompilation)' == 'true'">true</_NativeBuildNeeded> | |
<WorkloadDisabledWithReason Condition="'$(_NativeBuildNeeded)' == 'true'">WebAssembly workloads (required for AOT) are only supported for projects targeting net6.0+</WorkloadDisabledWithReason> | |
</PropertyGroup> | |
<PropertyGroup Condition="'$(RuntimeIdentifier)' == 'browser-wasm' and '$(BrowserWorkloadDisabled)' != 'true'"> | |
<UsingBrowserRuntimeWorkload Condition="'$(RunAOTCompilation)' == 'true' or '$(UsingMicrosoftNETSdkBlazorWebAssembly)' != 'true' or '$(UsingMicrosoftNETSdkWebAssembly)' != 'true'">true</UsingBrowserRuntimeWorkload> | |
<UsingBrowserRuntimeWorkload Condition="'$(UsingBrowserRuntimeWorkload)' == ''">$(WasmNativeWorkload)</UsingBrowserRuntimeWorkload> | |
</PropertyGroup> | |
<PropertyGroup Condition="'$(BrowserWorkloadDisabled)' == 'true'"> | |
<UsingBrowserRuntimeWorkload>false</UsingBrowserRuntimeWorkload> | |
<WasmNativeWorkload>false</WasmNativeWorkload> | |
</PropertyGroup> | |
<!--<ImportGroup Condition="'$(RuntimeIdentifier)' == 'browser-wasm' and '$(UsingBrowserRuntimeWorkload)' == 'true' and '$(TargetFrameworkIdentifier)' == '.NETCoreApp' and $([MSBuild]::VersionGreaterThanOrEquals('$(TargetFrameworkVersion)', '8.0'))">--> | |
<!--<Import Project="Sdk.props" Sdk="Microsoft.NET.Runtime.Emscripten.Python.net8" Condition="!$([MSBuild]::IsOsPlatform('Linux'))" />--> | |
<!--<Import Project="Sdk.props" Sdk="Microsoft.NET.Runtime.Emscripten.Node.net8" />--> | |
<!--<Import Project="Sdk.props" Sdk="Microsoft.NET.Runtime.Emscripten.Sdk.net8" />--> | |
<!--<Import Project="Sdk.props" Sdk="Microsoft.NET.Runtime.Emscripten.Cache.net8" />--> | |
<!--<Import Project="Sdk.targets" Sdk="Microsoft.NET.Runtime.Emscripten.Cache.net8" />--> | |
<!--</ImportGroup>--> | |
<!-- | |
============================================================================================================================================ | |
</Import> | |
============================================================================================================================================ | |
--> | |
<!-- | |
============================================================================================================================================ | |
<Import Project="WorkloadManifest.targets" Sdk="Microsoft.NET.SDK.WorkloadManifestTargetsLocator"> | |
C:\Program Files\dotnet\sdk-manifests\8.0.100\microsoft.net.workload.emscripten.net6\8.0.11\WorkloadManifest.targets | |
============================================================================================================================================ | |
--> | |
<!--<ImportGroup Condition="'$(RuntimeIdentifier)' == 'browser-wasm' and '$(UsingBrowserRuntimeWorkload)' == 'true' and '$(TargetFrameworkIdentifier)' == '.NETCoreApp' and $([MSBuild]::VersionEquals('$(TargetFrameworkVersion)', '6.0'))">--> | |
<!--<Import Project="Sdk.props" Sdk="Microsoft.NET.Runtime.Emscripten.Python.net6" Condition="!$([MSBuild]::IsOsPlatform('Linux'))" />--> | |
<!--<Import Project="Sdk.props" Sdk="Microsoft.NET.Runtime.Emscripten.Node.net6" />--> | |
<!--<Import Project="Sdk.props" Sdk="Microsoft.NET.Runtime.Emscripten.Sdk.net6" />--> | |
<!--</ImportGroup>--> | |
<!-- | |
============================================================================================================================================ | |
</Import> | |
============================================================================================================================================ | |
--> | |
<!-- | |
============================================================================================================================================ | |
<Import Project="WorkloadManifest.targets" Sdk="Microsoft.NET.SDK.WorkloadManifestTargetsLocator"> | |
C:\Program Files\dotnet\sdk-manifests\8.0.100\microsoft.net.workload.emscripten.net7\8.0.11\WorkloadManifest.targets | |
============================================================================================================================================ | |
--> | |
<PropertyGroup Condition="'$(RuntimeIdentifier)' == 'browser-wasm'"> | |
<BrowserWorkloadDisabled Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp' and !$([MSBuild]::VersionGreaterThanOrEquals('$(TargetFrameworkVersion)', '6.0'))">true</BrowserWorkloadDisabled> | |
</PropertyGroup> | |
<PropertyGroup Condition="'$(RuntimeIdentifier)' == 'browser-wasm' and '$(BrowserWorkloadDisabled)' == 'true'"> | |
<_NativeBuildNeeded Condition="'$(RunAOTCompilation)' == 'true'">true</_NativeBuildNeeded> | |
<WorkloadDisabledWithReason Condition="'$(_NativeBuildNeeded)' == 'true'">WebAssembly workloads (required for AOT) are only supported for projects targeting net6.0+</WorkloadDisabledWithReason> | |
</PropertyGroup> | |
<PropertyGroup Condition="'$(RuntimeIdentifier)' == 'browser-wasm' and '$(BrowserWorkloadDisabled)' != 'true'"> | |
<UsingBrowserRuntimeWorkload Condition="'$(RunAOTCompilation)' == 'true' or '$(UsingMicrosoftNETSdkBlazorWebAssembly)' != 'true'">true</UsingBrowserRuntimeWorkload> | |
<UsingBrowserRuntimeWorkload Condition="'$(UsingBrowserRuntimeWorkload)' == ''">$(WasmNativeWorkload)</UsingBrowserRuntimeWorkload> | |
</PropertyGroup> | |
<PropertyGroup Condition="'$(BrowserWorkloadDisabled)' == 'true'"> | |
<UsingBrowserRuntimeWorkload>false</UsingBrowserRuntimeWorkload> | |
<WasmNativeWorkload>false</WasmNativeWorkload> | |
</PropertyGroup> | |
<!--<ImportGroup Condition="'$(RuntimeIdentifier)' == 'browser-wasm' and '$(UsingBrowserRuntimeWorkload)' == 'true' and '$(TargetFrameworkIdentifier)' == '.NETCoreApp' and $([MSBuild]::VersionEquals('$(TargetFrameworkVersion)', '7.0'))">--> | |
<!--<Import Project="Sdk.props" Sdk="Microsoft.NET.Runtime.Emscripten.Python.net7" Condition="!$([MSBuild]::IsOsPlatform('Linux'))" />--> | |
<!--<Import Project="Sdk.props" Sdk="Microsoft.NET.Runtime.Emscripten.Node.net7" />--> | |
<!--<Import Project="Sdk.props" Sdk="Microsoft.NET.Runtime.Emscripten.Sdk.net7" />--> | |
<!--<Import Project="Sdk.props" Sdk="Microsoft.NET.Runtime.Emscripten.Cache.net7" />--> | |
<!--<Import Project="Sdk.targets" Sdk="Microsoft.NET.Runtime.Emscripten.Cache.net7" />--> | |
<!--</ImportGroup>--> | |
<!-- | |
============================================================================================================================================ | |
</Import> | |
============================================================================================================================================ | |
--> | |
<!-- | |
============================================================================================================================================ | |
<Import Project="WorkloadManifest.targets" Sdk="Microsoft.NET.SDK.WorkloadManifestTargetsLocator"> | |
C:\Program Files\dotnet\sdk-manifests\8.0.100\microsoft.net.workload.mono.toolchain.net6\8.0.11\WorkloadManifest.targets | |
============================================================================================================================================ | |
--> | |
<!-- Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. --> | |
<!--<Import Project="Sdk.props" Sdk="Microsoft.NET.Runtime.MonoAOTCompiler.Task.net6" Condition="'$(TargetsNet6)' == 'true' and '$(RunAOTCompilation)' == 'true' and ('$(UsingBrowserRuntimeWorkload)' == 'true' or '$(UsingMobileWorkload)' == 'true')" />--> | |
<!--<ImportGroup Condition="'$(TargetsNet6)' == 'true' and '$(TargetPlatformIdentifier)' == 'android'">--> | |
<!--<Import Project="Sdk.props" Sdk="Microsoft.NET.Runtime.MonoTargets.Sdk.net6" />--> | |
<!--<Import Project="Sdk.targets" Sdk="Microsoft.NET.Runtime.MonoTargets.Sdk.net6" />--> | |
<!--</ImportGroup>--> | |
<!--<ImportGroup Condition="'$(TargetsNet6)' == 'true' and '$(TargetPlatformIdentifier)' == 'android' and '$(RunAOTCompilation)' == 'true'">--> | |
<!--<Import Project="Sdk.props" Sdk="Microsoft.NETCore.App.Runtime.AOT.Cross.net6.android-x86" />--> | |
<!--<Import Project="Sdk.props" Sdk="Microsoft.NETCore.App.Runtime.AOT.Cross.net6.android-x64" />--> | |
<!--<Import Project="Sdk.props" Sdk="Microsoft.NETCore.App.Runtime.AOT.Cross.net6.android-arm" />--> | |
<!--<Import Project="Sdk.props" Sdk="Microsoft.NETCore.App.Runtime.AOT.Cross.net6.android-arm64" />--> | |
<!--</ImportGroup>--> | |
<!--<ImportGroup Condition="'$(TargetsNet6)' == 'true' and '$(TargetPlatformIdentifier)' == 'macOS'">--> | |
<!--<Import Project="Sdk.props" Sdk="Microsoft.NET.Runtime.MonoTargets.Sdk.net6" />--> | |
<!--<Import Project="Sdk.targets" Sdk="Microsoft.NET.Runtime.MonoTargets.Sdk.net6" />--> | |
<!--</ImportGroup>--> | |
<!-- | |
<ImportGroup Condition="'$(TargetsNet6)' == 'true' and '$(TargetPlatformIdentifier)' == 'macOS' and $([MSBuild]::IsOSPlatform('osx'))"> | |
<Import Project="Sdk.props" Sdk="Microsoft.NETCore.App.Runtime.AOT.Cross.net6.osx-arm64" /> | |
<Import Project="Sdk.props" Sdk="Microsoft.NETCore.App.Runtime.AOT.Cross.net6.osx-x64" /> | |
</ImportGroup> | |
--> | |
<!--<ImportGroup Condition="'$(TargetsNet6)' == 'true' and '$(TargetPlatformIdentifier)' == 'ios'">--> | |
<!--<Import Project="Sdk.props" Sdk="Microsoft.NET.Runtime.MonoTargets.Sdk.net6" />--> | |
<!--<Import Project="Sdk.targets" Sdk="Microsoft.NET.Runtime.MonoTargets.Sdk.net6" />--> | |
<!--</ImportGroup>--> | |
<!--<ImportGroup Condition="'$(TargetsNet6)' == 'true' and '$(TargetPlatformIdentifier)' == 'ios' and $([MSBuild]::IsOSPlatform('osx'))">--> | |
<!--<Import Project="Sdk.props" Sdk="Microsoft.NETCore.App.Runtime.AOT.Cross.net6.ios-arm" />--> | |
<!--<Import Project="Sdk.props" Sdk="Microsoft.NETCore.App.Runtime.AOT.Cross.net6.ios-arm64" />--> | |
<!--<Import Project="Sdk.props" Sdk="Microsoft.NETCore.App.Runtime.AOT.Cross.net6.iossimulator-arm64" />--> | |
<!--<Import Project="Sdk.props" Sdk="Microsoft.NETCore.App.Runtime.AOT.Cross.net6.iossimulator-x64" />--> | |
<!--<Import Project="Sdk.props" Sdk="Microsoft.NETCore.App.Runtime.AOT.Cross.net6.iossimulator-x86" />--> | |
<!--</ImportGroup>--> | |
<!--<ImportGroup Condition="'$(TargetsNet6)' == 'true' and '$(TargetPlatformIdentifier)' == 'maccatalyst'">--> | |
<!--<Import Project="Sdk.props" Sdk="Microsoft.NET.Runtime.MonoTargets.Sdk.net6" />--> | |
<!--<Import Project="Sdk.targets" Sdk="Microsoft.NET.Runtime.MonoTargets.Sdk.net6" />--> | |
<!--</ImportGroup>--> | |
<!--<ImportGroup Condition="'$(TargetsNet6)' == 'true' and '$(TargetPlatformIdentifier)' == 'maccatalyst' and $([MSBuild]::IsOSPlatform('osx'))">--> | |
<!--<Import Project="Sdk.props" Sdk="Microsoft.NETCore.App.Runtime.AOT.Cross.net6.maccatalyst-arm64" />--> | |
<!--<Import Project="Sdk.props" Sdk="Microsoft.NETCore.App.Runtime.AOT.Cross.net6.maccatalyst-x64" />--> | |
<!--</ImportGroup>--> | |
<!--<ImportGroup Condition="'$(TargetsNet6)' == 'true' and '$(TargetPlatformIdentifier)' == 'tvos'">--> | |
<!--<Import Project="Sdk.props" Sdk="Microsoft.NET.Runtime.MonoTargets.Sdk.net6" />--> | |
<!--<Import Project="Sdk.targets" Sdk="Microsoft.NET.Runtime.MonoTargets.Sdk.net6" />--> | |
<!--</ImportGroup>--> | |
<!--<ImportGroup Condition="'$(TargetsNet6)' == 'true' and '$(TargetPlatformIdentifier)' == 'tvos' and $([MSBuild]::IsOSPlatform('osx'))">--> | |
<!--<Import Project="Sdk.props" Sdk="Microsoft.NETCore.App.Runtime.AOT.Cross.net6.tvos-arm64" />--> | |
<!--<Import Project="Sdk.props" Sdk="Microsoft.NETCore.App.Runtime.AOT.Cross.net6.tvossimulator-arm64" />--> | |
<!--<Import Project="Sdk.props" Sdk="Microsoft.NETCore.App.Runtime.AOT.Cross.net6.tvossimulator-x64" />--> | |
<!--</ImportGroup>--> | |
<!--<ImportGroup Condition="'$(TargetsNet6)' == 'true' and '$(RuntimeIdentifier)' == 'browser-wasm' and '$(UsingBrowserRuntimeWorkload)' == 'true'">--> | |
<!--<Import Project="Sdk.props" Sdk="Microsoft.NET.Runtime.MonoTargets.Sdk.net6" />--> | |
<!--<Import Project="Sdk.targets" Sdk="Microsoft.NET.Runtime.WebAssembly.Sdk.net6" />--> | |
<!--<Import Project="Sdk.props" Sdk="Microsoft.NETCore.App.Runtime.AOT.Cross.net6.browser-wasm" />--> | |
<!--<Import Project="Sdk.targets" Sdk="Microsoft.NET.Runtime.MonoTargets.Sdk.net6" />--> | |
<!--</ImportGroup>--> | |
<PropertyGroup Condition="'$(TargetsNet6)' == 'true' and ('$(TargetPlatformIdentifier)' == 'android' or '$(TargetPlatformIdentifier)' == 'macOS' or '$(TargetPlatformIdentifier)' == 'ios' or '$(TargetPlatformIdentifier)' == 'maccatalyst' or '$(TargetPlatformIdentifier)' == 'tvos' or '$(RuntimeIdentifier)' == 'browser-wasm')"> | |
<_MonoWorkloadTargetsMobile>true</_MonoWorkloadTargetsMobile> | |
<_MonoWorkloadRuntimePackPackageVersion>$(_RuntimePackInWorkloadVersion6)</_MonoWorkloadRuntimePackPackageVersion> | |
</PropertyGroup> | |
<ItemGroup Condition="'$(TargetsNet6)' == 'true' and '$(_MonoWorkloadTargetsMobile)' == 'true'"> | |
<KnownRuntimePack Update="@(KnownRuntimePack)"> | |
<LatestRuntimeFrameworkVersion Condition="'%(KnownRuntimePack.TargetFramework)' == 'net6.0' and '%(KnownRuntimePack.RuntimePackLabels)' == 'Mono'">$(_MonoWorkloadRuntimePackPackageVersion)</LatestRuntimeFrameworkVersion> | |
</KnownRuntimePack> | |
</ItemGroup> | |
<!-- | |
============================================================================================================================================ | |
</Import> | |
============================================================================================================================================ | |
--> | |
<!-- | |
============================================================================================================================================ | |
<Import Project="WorkloadManifest.targets" Sdk="Microsoft.NET.SDK.WorkloadManifestTargetsLocator"> | |
C:\Program Files\dotnet\sdk-manifests\8.0.100\microsoft.net.workload.mono.toolchain.net7\8.0.11\WorkloadManifest.targets | |
============================================================================================================================================ | |
--> | |
<!-- Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. --> | |
<!--<Import Project="Sdk.props" Sdk="Microsoft.NET.Runtime.MonoAOTCompiler.Task.net7" Condition="'$(TargetsNet7)' == 'true' and '$(RunAOTCompilation)' == 'true' and ('$(UsingBrowserRuntimeWorkload)' == 'true' or '$(UsingMobileWorkload)' == 'true')" />--> | |
<!--<ImportGroup Condition="'$(TargetsNet7)' == 'true' and '$(TargetPlatformIdentifier)' == 'android'">--> | |
<!--<Import Project="Sdk.props" Sdk="Microsoft.NET.Runtime.MonoTargets.Sdk.net7" />--> | |
<!--<Import Project="Sdk.targets" Sdk="Microsoft.NET.Runtime.MonoTargets.Sdk.net7" />--> | |
<!--</ImportGroup>--> | |
<!--<ImportGroup Condition="'$(TargetsNet7)' == 'true' and '$(TargetPlatformIdentifier)' == 'android' and '$(RunAOTCompilation)' == 'true'">--> | |
<!--<Import Project="Sdk.props" Sdk="Microsoft.NETCore.App.Runtime.AOT.Cross.net7.android-x86" />--> | |
<!--<Import Project="Sdk.props" Sdk="Microsoft.NETCore.App.Runtime.AOT.Cross.net7.android-x64" />--> | |
<!--<Import Project="Sdk.props" Sdk="Microsoft.NETCore.App.Runtime.AOT.Cross.net7.android-arm" />--> | |
<!--<Import Project="Sdk.props" Sdk="Microsoft.NETCore.App.Runtime.AOT.Cross.net7.android-arm64" />--> | |
<!--</ImportGroup>--> | |
<!--<ImportGroup Condition="'$(TargetsNet7)' == 'true' and '$(TargetPlatformIdentifier)' == 'macOS'">--> | |
<!--<Import Project="Sdk.props" Sdk="Microsoft.NET.Runtime.MonoTargets.Sdk.net7" />--> | |
<!--<Import Project="Sdk.targets" Sdk="Microsoft.NET.Runtime.MonoTargets.Sdk.net7" />--> | |
<!--</ImportGroup>--> | |
<!--<ImportGroup Condition="'$(TargetsNet7)' == 'true' and '$(TargetPlatformIdentifier)' == 'ios'">--> | |
<!--<Import Project="Sdk.props" Sdk="Microsoft.NET.Runtime.MonoTargets.Sdk.net7" />--> | |
<!--<Import Project="Sdk.targets" Sdk="Microsoft.NET.Runtime.MonoTargets.Sdk.net7" />--> | |
<!--</ImportGroup>--> | |
<!--<ImportGroup Condition="'$(TargetsNet7)' == 'true' and '$(TargetPlatformIdentifier)' == 'ios' and $([MSBuild]::IsOSPlatform('osx'))">--> | |
<!--<Import Project="Sdk.props" Sdk="Microsoft.NETCore.App.Runtime.AOT.Cross.net7.ios-arm" />--> | |
<!--<Import Project="Sdk.props" Sdk="Microsoft.NETCore.App.Runtime.AOT.Cross.net7.ios-arm64" />--> | |
<!--<Import Project="Sdk.props" Sdk="Microsoft.NETCore.App.Runtime.AOT.Cross.net7.iossimulator-arm64" />--> | |
<!--<Import Project="Sdk.props" Sdk="Microsoft.NETCore.App.Runtime.AOT.Cross.net7.iossimulator-x64" />--> | |
<!--<Import Project="Sdk.props" Sdk="Microsoft.NETCore.App.Runtime.AOT.Cross.net7.iossimulator-x86" />--> | |
<!--</ImportGroup>--> | |
<!--<ImportGroup Condition="'$(TargetsNet7)' == 'true' and '$(TargetPlatformIdentifier)' == 'maccatalyst'">--> | |
<!--<Import Project="Sdk.props" Sdk="Microsoft.NET.Runtime.MonoTargets.Sdk.net7" />--> | |
<!--<Import Project="Sdk.targets" Sdk="Microsoft.NET.Runtime.MonoTargets.Sdk.net7" />--> | |
<!--</ImportGroup>--> | |
<!--<ImportGroup Condition="'$(TargetsNet7)' == 'true' and '$(TargetPlatformIdentifier)' == 'maccatalyst' and $([MSBuild]::IsOSPlatform('osx'))">--> | |
<!--<Import Project="Sdk.props" Sdk="Microsoft.NETCore.App.Runtime.AOT.Cross.net7.maccatalyst-arm64" />--> | |
<!--<Import Project="Sdk.props" Sdk="Microsoft.NETCore.App.Runtime.AOT.Cross.net7.maccatalyst-x64" />--> | |
<!--</ImportGroup>--> | |
<!--<ImportGroup Condition="'$(TargetsNet7)' == 'true' and '$(TargetPlatformIdentifier)' == 'tvos'">--> | |
<!--<Import Project="Sdk.props" Sdk="Microsoft.NET.Runtime.MonoTargets.Sdk.net7" />--> | |
<!--<Import Project="Sdk.targets" Sdk="Microsoft.NET.Runtime.MonoTargets.Sdk.net7" />--> | |
<!--</ImportGroup>--> | |
<!--<ImportGroup Condition="'$(TargetsNet7)' == 'true' and '$(TargetPlatformIdentifier)' == 'tvos' and $([MSBuild]::IsOSPlatform('osx'))">--> | |
<!--<Import Project="Sdk.props" Sdk="Microsoft.NETCore.App.Runtime.AOT.Cross.net7.tvos-arm64" />--> | |
<!--<Import Project="Sdk.props" Sdk="Microsoft.NETCore.App.Runtime.AOT.Cross.net7.tvossimulator-arm64" />--> | |
<!--<Import Project="Sdk.props" Sdk="Microsoft.NETCore.App.Runtime.AOT.Cross.net7.tvossimulator-x64" />--> | |
<!--</ImportGroup>--> | |
<!--<ImportGroup Condition="'$(TargetsNet7)' == 'true' and '$(RuntimeIdentifier)' == 'browser-wasm' and '$(UsingBrowserRuntimeWorkload)' == 'true'">--> | |
<!--<Import Project="Sdk.props" Sdk="Microsoft.NET.Runtime.MonoTargets.Sdk.net7" />--> | |
<!--<Import Project="Sdk.props" Sdk="Microsoft.NET.Runtime.WebAssembly.Sdk.net7" />--> | |
<!--<Import Project="Sdk.targets" Sdk="Microsoft.NET.Runtime.WebAssembly.Sdk.net7" />--> | |
<!--<Import Project="Sdk.props" Sdk="Microsoft.NETCore.App.Runtime.AOT.Cross.net7.browser-wasm" />--> | |
<!--<Import Project="Sdk.targets" Sdk="Microsoft.NET.Runtime.MonoTargets.Sdk.net7" />--> | |
<!--</ImportGroup>--> | |
<PropertyGroup Condition="'$(TargetsNet7)' == 'true' and ('$(TargetPlatformIdentifier)' == 'android' or '$(TargetPlatformIdentifier)' == 'macOS' or '$(TargetPlatformIdentifier)' == 'ios' or '$(TargetPlatformIdentifier)' == 'maccatalyst' or '$(TargetPlatformIdentifier)' == 'tvos' or '$(RuntimeIdentifier)' == 'browser-wasm')"> | |
<_MonoWorkloadTargetsMobile>true</_MonoWorkloadTargetsMobile> | |
<_MonoWorkloadRuntimePackPackageVersion>$(_RuntimePackInWorkloadVersion7)</_MonoWorkloadRuntimePackPackageVersion> | |
</PropertyGroup> | |
<ItemGroup Condition="'$(TargetsNet7)' == 'true' and '$(_MonoWorkloadTargetsMobile)' == 'true'"> | |
<KnownRuntimePack Update="@(KnownRuntimePack)"> | |
<LatestRuntimeFrameworkVersion Condition="'%(KnownRuntimePack.TargetFramework)' == 'net7.0' and '%(KnownRuntimePack.RuntimePackLabels)' == 'Mono'">$(_MonoWorkloadRuntimePackPackageVersion)</LatestRuntimeFrameworkVersion> | |
<!-- Overrides for wasm threads support --> | |
<RuntimePackNamePatterns Condition="'$(RuntimeIdentifier)' == 'browser-wasm' and '$(WasmEnablethreads)' == 'true'">Microsoft.NETCore.App.Runtime.Mono.multithread.**RID**</RuntimePackNamePatterns> | |
<RuntimePackNamePatterns Condition="'$(RuntimeIdentifier)' == 'browser-wasm' and '$(WasmEnablePerfTracing)' == 'true'">Microsoft.NETCore.App.Runtime.Mono.perftrace.**RID**</RuntimePackNamePatterns> | |
</KnownRuntimePack> | |
</ItemGroup> | |
<!-- | |
============================================================================================================================================ | |
</Import> | |
============================================================================================================================================ | |
--> | |
<!-- | |
============================================================================================================================================ | |
<Import Project="WorkloadManifest.targets" Sdk="Microsoft.NET.SDK.WorkloadManifestTargetsLocator"> | |
C:\Program Files\dotnet\sdk-manifests\8.0.100\microsoft.net.sdk.aspire\8.2.2\WorkloadManifest.targets | |
============================================================================================================================================ | |
--> | |
<!--<Import Project="WorkloadManifest.Aspire.targets" Condition=" '$(IsAspireHost)' == 'true' and '$(SkipAspireWorkloadManifest)' != 'true' " />--> | |
<!-- | |
============================================================================================================================================ | |
</Import> | |
C:\Program Files\dotnet\sdk\8.0.404\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)" Condition="@(MissingWorkloadPack) != ''" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<ShowMissingWorkloads MissingWorkloadPacks="@(MissingWorkloadPack)" NetCoreRoot="$(NetCoreRoot)" NETCoreSdkVersion="$(NETCoreSdkVersion)" GenerateErrorsForMissingWorkloads="false"> | |
<Output TaskParameter="SuggestedWorkloads" ItemName="SuggestedWorkload" /> | |
</ShowMissingWorkloads> | |
</Target> | |
<!-- Skip this target for design time builds when there are missing workload packs. | |
This will prevent design time builds from failing and therefore allow | |
Visual Studio to collect the workloads from the GetSuggestedWorkloads target --> | |
<Target Name="_CheckForMissingWorkload" BeforeTargets="_CheckForInvalidConfigurationAndPlatform;_CheckForUnsupportedTargetPlatformIdentifier" Condition="'@(MissingWorkloadPack)' != '' And '$(DesignTimeBuild)' != 'true'" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<ShowMissingWorkloads MissingWorkloadPacks="@(MissingWorkloadPack)" NetCoreRoot="$(NetCoreRoot)" NETCoreSdkVersion="$(NETCoreSdkVersion)" GenerateErrorsForMissingWorkloads="true" /> | |
</Target> | |
<!-- This target is not part of the build. Only used by dotnet workload restore command. Global property "SkipResolvePackageAssets" | |
need to be set to "true" to avoid requiring restore (which would likely fail if the required workloads aren't already installed).--> | |
<Target Name="_GetRequiredWorkloads" DependsOnTargets="GetSuggestedWorkloads;PrepareProjectReferences" Returns="@(_ResolvedSuggestedWorkload)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<MSBuild Projects="@(_MSBuildProjectReferenceExistent)" Targets="_GetRequiredWorkloads" BuildInParallel="$(BuildInParallel)" Condition="'%(_MSBuildProjectReferenceExistent.BuildReference)' == 'true' and '@(_MSBuildProjectReferenceExistent)' != ''" RemoveProperties="%(_MSBuildProjectReferenceExistent.GlobalPropertiesToRemove)$(_GlobalPropertiesToRemoveFromProjectReferences);TargetFramework;TargetFrameworks"> | |
<Output TaskParameter="TargetOutputs" ItemName="SuggestedWorkloadFromReference" /> | |
</MSBuild> | |
<ItemGroup> | |
<_ResolvedSuggestedWorkload Include="@(SuggestedWorkload)" /> | |
<_ResolvedSuggestedWorkload Include="@(SuggestedWorkloadFromReference)" /> | |
</ItemGroup> | |
</Target> | |
<!-- | |
============================================================================================================================================ | |
</Import> | |
C:\Program Files\dotnet\sdk\8.0.404\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.BeforeCommon.targets | |
============================================================================================================================================ | |
--> | |
<!-- | |
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\8.0.404\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
 '$(HasRuntimeOutput)' == 'true' and
 $([MSBuild]::IsOSPlatform(`Windows`))and
 '$(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> | |
<!-- Breaking change in .NET 8: Some publish properties used to imply SelfContained or require it at the time of this PR to work. We decided to infer SelfContained still in these situations. --> | |
<PropertyGroup Condition="'$(SelfContained)' == '' and
 '$(PublishSelfContained)' == '' and
 '$(_TargetFrameworkVersionWithoutV)' != '' and
 '$(TargetFrameworkIdentifier)' == '.NETCoreApp' and
 $([MSBuild]::VersionGreaterThanOrEquals($(_TargetFrameworkVersionWithoutV), '8.0')) and
 (
 '$(PublishTrimmed)' == 'true' or
 '$(PublishSingleFile)' == 'true' or
 '$(PublishAot)' == 'true'
 )" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<PublishSelfContained>true</PublishSelfContained> | |
</PropertyGroup> | |
<!-- Edit SelfContained to match the value of PublishSelfContained if we are publishing. | |
This Won't affect t:/Publish (because of _IsPublishing), and also won't override a global SelfContained property.--> | |
<PropertyGroup Condition="'$(_IsPublishing)' == 'true' and ('$(PublishSelfContained)' == 'true' or '$(PublishSelfContained)' == 'false')" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<SelfContained>$(PublishSelfContained)</SelfContained> | |
</PropertyGroup> | |
<!-- Automatically infer the RuntimeIdentifier for properties that require it. | |
SelfContained without a RID is a no-op and semantically hints towards the fact that it can change the behavior of build, publish, and friends. | |
... So, we infer the RID for SelfContained regardless of the context. | |
The other publish properties are specifically labelled Publish* and don't 'NEED' their RID unless we are doing a publish, so the RID inference | |
... for these properties is limited to publishing only scenarios. | |
Finally, library projects and non-executable projects have awkward interactions here so they are excluded.--> | |
<PropertyGroup Condition="'$(UseCurrentRuntimeIdentifier)' == ''" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<UseCurrentRuntimeIdentifier Condition="
 '$(RuntimeIdentifier)' == '' and
 '$(_IsExecutable)' == 'true' and '$(IsTestProject)' != 'true' and
 '$(IsRidAgnostic)' != 'true' and
 (
 '$(SelfContained)' == 'true' or
 ('$(_IsPublishing)' == 'true' and
 (
 '$(PublishReadyToRun)' == 'true' or
 '$(PublishSingleFile)' == 'true' or
 '$(PublishAot)' == 'true'
 )
 )
 )">true</UseCurrentRuntimeIdentifier> | |
</PropertyGroup> | |
<PropertyGroup Condition="'$(UseCurrentRuntimeIdentifier)' == 'true'" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<RuntimeIdentifier>$(NETCoreSdkPortableRuntimeIdentifier)</RuntimeIdentifier> | |
</PropertyGroup> | |
<PropertyGroup Condition="'$(_IsPublishing)' == 'true' and '$(PublishRuntimeIdentifier)' != ''" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<RuntimeIdentifier>$(PublishRuntimeIdentifier)</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. | |
--> | |
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<!-- Detecting property presence is not harmful and can be done in an unconditioned way --> | |
<_SelfContainedWasSpecified Condition="'$(SelfContained)' != ''">true</_SelfContainedWasSpecified> | |
</PropertyGroup> | |
<PropertyGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp' and '$(HasRuntimeOutput)' == 'true'" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<!-- Breaking change in .NET 8: Projects with 8.0+ TFMS will no longer have RuntimeIdentifier imply SelfContained. Note that PublishReadyToRun will imply SelfContained in these versions. --> | |
<SelfContained Condition="'$(SelfContained)' == '' and
 '$(RuntimeIdentifier)' != '' and
 '$(TargetFrameworkIdentifier)' == '.NETCoreApp' and
 '$(_TargetFrameworkVersionWithoutV)' != '' and
 $([MSBuild]::VersionLessThan($(_TargetFrameworkVersionWithoutV), '8.0'))">true</SelfContained> | |
<SelfContained Condition="'$(SelfContained)' == ''">false</SelfContained> | |
<_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
 '$(_RuntimeIdentifierUsesAppHost)' == 'true' and
 ('$(SelfContained)' == 'true' or
 ('$(RuntimeIdentifier)' != '' and '$(_TargetFrameworkVersionWithoutV)' >= '2.1') or
 '$(_TargetFrameworkVersionWithoutV)' >= '3.0')">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
 '$(RuntimeIdentifier)' == '' and
 (('$(UseAppHost)' == 'true' and '$(ProjectDepsFilePath)' == '') or
 ('$(EnableComHosting)' == 'true' and '$(_IsExecutable)' != 'true') or
 '$(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> | |
<!-- If we are running on an M1 with a native SDK and the TFM is < 6.0, we have to use a x64 apphost since there are no osx-arm64 apphosts previous to .NET 6.0. --> | |
<DefaultAppHostRuntimeIdentifier Condition="$(DefaultAppHostRuntimeIdentifier.EndsWith('arm64')) and
 $(DefaultAppHostRuntimeIdentifier.StartsWith('osx')) and
 $([MSBuild]::VersionLessThan('$(_TargetFrameworkVersionWithoutV)', '6.0'))">$(DefaultAppHostRuntimeIdentifier.Replace("arm64", "x64"))</DefaultAppHostRuntimeIdentifier> | |
<!-- If we are running on win-arm64 and the TFM is < 5.0, we have to use a x64 apphost since there are no win-arm64 apphosts previous to .NET 5.0. --> | |
<DefaultAppHostRuntimeIdentifier Condition="$(DefaultAppHostRuntimeIdentifier.EndsWith('arm64')) and
 $(DefaultAppHostRuntimeIdentifier.StartsWith('win')) and
 $([MSBuild]::VersionLessThan('$(_TargetFrameworkVersionWithoutV)', '5.0'))">$(DefaultAppHostRuntimeIdentifier.Replace("arm64", "x64"))</DefaultAppHostRuntimeIdentifier> | |
</PropertyGroup> | |
<Target Name="_CheckForUnsupportedAppHostUsage" BeforeTargets="_CheckForInvalidConfigurationAndPlatform" Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp' and '$(HasRuntimeOutput)' == 'true'" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<!-- The following RID errors are asserts, and we don't expect them to ever occur. The error message is added as a safeguard.--> | |
<NETSdkError Condition="'$(SelfContained)' == 'true' and '$(RuntimeIdentifier)' == '' and '$(AllowSelfContainedWithoutRuntimeIdentifier)' != 'true'" ResourceName="ImplicitRuntimeIdentifierResolutionForPublishPropertyFailed" FormatArguments="SelfContained" /> | |
<NETSdkError Condition="'$(PublishReadyToRun)' == 'true' and '$(RuntimeIdentifier)' == '' and '$(_IsPublishing)' == 'true'" ResourceName="ImplicitRuntimeIdentifierResolutionForPublishPropertyFailed" FormatArguments="PublishReadyToRun" /> | |
<NETSdkError Condition="'$(PublishSingleFile)' == 'true' and '$(RuntimeIdentifier)' == '' and '$(_IsPublishing)' == 'true'" ResourceName="ImplicitRuntimeIdentifierResolutionForPublishPropertyFailed" FormatArguments="PublishSingleFile" /> | |
<NETSdkError Condition="'$(PublishAot)' == 'true' and '$(RuntimeIdentifier)' == '' and '$(_IsPublishing)' == 'true' and '$(AllowPublishAotWithoutRuntimeIdentifier)' != 'true'" ResourceName="ImplicitRuntimeIdentifierResolutionForPublishPropertyFailed" FormatArguments="PublishAot" /> | |
<!-- End of implicit RID resolver checks.--> | |
<NETSdkError Condition="'$(PublishSelfContained)' != 'true' and '$(PublishSelfContained)' != 'false' and '$(PublishSelfContained)' != ''" ResourceName="PublishSelfContainedMustBeBool" FormatArguments="$(PublishSelfContained)" /> | |
<NETSdkError Condition="'$(SelfContained)' == 'true' and '$(UseAppHost)' != 'true' and '$(_RuntimeIdentifierUsesAppHost)' == 'true'" ResourceName="CannotUseSelfContainedWithoutAppHost" /> | |
<NETSdkError Condition="'$(SelfContained)' != 'true' and '$(UseAppHost)' == 'true' and '$(_TargetFrameworkVersionWithoutV)' < '2.1'" ResourceName="FrameworkDependentAppHostRequiresVersion21" /> | |
<NETSdkError Condition="'$(PublishSingleFile)' == 'true' and '$(_TargetFrameworkVersionWithoutV)' < '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)' < '3.0'" ResourceName="PublishReadyToRunRequiresVersion30" /> | |
<!-- Previously, RuntimeIdentifier (RID) implied SelfContained (SC). A breaking change in 8.0 made it so RID did not activate SC by default. | |
So we warn older TFM users before they upgrade to TFM 8.0 or above that they need to add <SelfContained>true</SelfContained> now to keep the same behavior.--> | |
<NETSdkWarning Condition="'$(RuntimeIdentifier)' != '' and '$(_TargetFrameworkVersionWithoutV)' != '' and $([MSBuild]::VersionLessThan($(_TargetFrameworkVersionWithoutV), '8.0')) and '$(_SelfContainedWasSpecified)' != 'true'" ResourceName="RuntimeIdentifierWillNoLongerImplySelfContained" /> | |
<!-- Generate Trimming warnings for WinForms and Wpf applications--> | |
<NetSdkError Condition="('$(UseWindowsForms)' == 'true') and ('$(PublishTrimmed)' == 'true') and ('$(_SuppressWinFormsTrimError)' != 'true')" ResourceName="TrimmingWindowsFormsIsNotSupported" /> | |
<NetSdkError Condition="('$(UseWpf)' == 'true') and ('$(PublishTrimmed)' == 'true') and ('$(_SuppressWpfTrimError)' != 'true')" ResourceName="TrimmingWpfIsNotSupported" /> | |
</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="_CheckAndUnsetUnsupportedPrefer32Bit" BeforeTargets="_CheckForInvalidConfigurationAndPlatform" Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp' and '$(_TargetFrameworkVersionWithoutV)' >= '7.0'" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<NETSdkWarning Condition="'$(Prefer32Bit)' == 'true'" ResourceName="Prefer32BitIgnoredForNetCoreApp" /> | |
<PropertyGroup> | |
<Prefer32Bit>false</Prefer32Bit> | |
</PropertyGroup> | |
</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 Condition="'$(UseArtifactsIntermediateOutput)' != 'true'">$(IntermediateOutputPath)$(RuntimeIdentifier)\</IntermediateOutputPath> | |
<OutputPath Condition="'$(UseArtifactsOutput)' != 'true'">$(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
 '$(_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\8.0.404\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\8.0.404\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)' == '' and '$(OutputType)' != 'Library'">true</CheckEolTargetFramework> | |
<CheckEolWorkloads Condition="'$(CheckEolWorkloads)' == ''">true</CheckEolWorkloads> | |
</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.1;2.2;3.0;3.1;5.0;7.0" /> | |
</ItemGroup> | |
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<_MinimumNonEolSupportedNetCoreTargetFramework>net6.0</_MinimumNonEolSupportedNetCoreTargetFramework> | |
</PropertyGroup> | |
<Target Name="_CheckForEolTargetFrameworks" AfterTargets="_CheckForUnsupportedNETCoreVersion" Condition="'@(_EolNetCoreTargetFrameworkVersions->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> | |
<Target Name="_CheckForEolWorkloads" AfterTargets="_CheckForUnsupportedNETCoreVersion" Condition="'@(EolWorkload)' != '' and '$(CheckEolWorkloads)' == 'true'" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<NETSdkWarning ResourceName="WorkloadIsEol" FormatArguments="%(EolWorkload.Identity);$([MSBuild]::ValueOrDefault('%(EolWorkload.Url)', 'https://aka.ms/dotnet-core-support'))" /> | |
</Target> | |
<!-- | |
============================================================================================================================================ | |
</Import> | |
C:\Program Files\dotnet\sdk\8.0.404\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. | |
If using artifacts output path format, PublishDir is already set in Microsoft.NET.DefaultOutputPaths.targets --> | |
<PropertyGroup Condition="'$(UseArtifactsOutput)' != 'true'" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<PublishDirName Condition="'$(PublishDirName)' == ''">publish</PublishDirName> | |
<!-- ensure the PublishDir is RID specific--> | |
<PublishDir Condition="'$(PublishDir)' == '' and
 '$(AppendRuntimeIdentifierToOutputPath)' != 'true' and
 '$(RuntimeIdentifier)' != '' and
 '$(_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\8.0.404\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)' < '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\8.0.404\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)' >= '3.5' " /> | |
<_SDKImplicitReference Include="System.Runtime.Serialization" Condition=" '$(_TargetFrameworkVersionWithoutV)' >= '3.5' " /> | |
<_SDKImplicitReference Include="System.Xml.Linq" Condition=" '$(_TargetFrameworkVersionWithoutV)' >= '3.5' " /> | |
<!-- Framework assemblies introduced in .NET 4.0 --> | |
<_SDKImplicitReference Include="System.Numerics" Condition=" '$(_TargetFrameworkVersionWithoutV)' >= '4.0' " /> | |
<!-- Framework assemblies introduced in .NET 4.5 --> | |
<_SDKImplicitReference Include="System.IO.Compression.FileSystem" 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)' >= '2.0'" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<AssetTargetFallback>$(AssetTargetFallback);net461;net462;net47;net471;net472;net48;net481</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->'%(Identity)'->TrimStart('.NETCoreApp,Version=v'))" Condition=" '$(TargetFrameworkIdentifier)' == '.NETCoreApp' " /> | |
<_SupportedFrameworkVersions Include="@(SupportedNETFrameworkTargetFramework->'%(Identity)'->TrimStart('.NETFramework,Version=v'))" Condition=" '$(TargetFrameworkIdentifier)' == '.NETFramework' " /> | |
<_SupportedFrameworkVersions Include="@(SupportedNETStandardTargetFramework->'%(Identity)'->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->'%(Identity)'->Replace('.', ''))" Condition=" '$(TargetFrameworkIdentifier)' == '.NETFramework' " /> | |
<_ImplicitDefineConstant Include="@(_FormattedCompatibleFrameworkVersions->'$(_FrameworkIdentifierForImplicitDefine)%(Identity)_OR_GREATER'->Replace('.', '_'))" Condition=" '$(TargetFrameworkIdentifier)' != '.NETCoreApp' or $([MSBuild]::VersionGreaterThanOrEquals(%(_FormattedCompatibleFrameworkVersions.Identity), 5.0)) " /> | |
<_ImplicitDefineConstant Include="@(_FormattedCompatibleFrameworkVersions->'NETCOREAPP%(Identity)_OR_GREATER'->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->Distinct()->'$(TargetPlatformIdentifier.ToUpper())%(Identity)_OR_GREATER'->Replace('.', '_'))" /> | |
</ItemGroup> | |
</Target> | |
<!-- Remove TRACE when DisableDiagnosticTracing is true --> | |
<Target Name="_DisableDiagnosticTracing" Condition="'$(DisableDiagnosticTracing)' == 'true'" DependsOnTargets="GenerateTargetPlatformDefineConstants;GenerateNETCompatibleDefineConstants;GeneratePlatformCompatibleDefineConstants" BeforeTargets="CoreCompile" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<ItemGroup> | |
<_DefineConstantsWithoutTrace Include="$(DefineConstants)" /> | |
<_DefineConstantsWithoutTrace Remove="TRACE" /> | |
</ItemGroup> | |
<PropertyGroup> | |
<DefineConstants>@(_DefineConstantsWithoutTrace)</DefineConstants> | |
</PropertyGroup> | |
</Target> | |
<!-- Add implicitly defined preprocessor symbols to DefineConstants --> | |
<Target Name="AddImplicitDefineConstants" Condition=" '$(DisableImplicitFrameworkDefines)' != 'true' " DependsOnTargets="GenerateTargetPlatformDefineConstants;GenerateNETCompatibleDefineConstants;GeneratePlatformCompatibleDefineConstants;_DisableDiagnosticTracing" 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> | |
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<IsNetCoreAppTargetingLatestTFM Condition="'$(IsNetCoreAppTargetingLatestTFM)' == '' and '$(TargetFrameworkIdentifier)' == '.NETCoreApp' and '$(_TargetFrameworkVersionWithoutV)' == '$(NETCoreAppMaximumVersion)'">true</IsNetCoreAppTargetingLatestTFM> | |
</PropertyGroup> | |
<!-- | |
============================================================================================================================================ | |
</Import> | |
C:\Program Files\dotnet\sdk\8.0.404\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\8.0.404\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. | |
*********************************************************************************************** | |
--> | |
<Choose> | |
<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> | |
<!-- | |
============================================================================================================================================ | |
<Import Project="$(MSBuildToolsPath)\Microsoft.Managed.Before.targets"> | |
C:\Program Files\dotnet\sdk\8.0.404\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\8.0.404\Microsoft.CSharp.targets | |
============================================================================================================================================ | |
--> | |
<!-- | |
============================================================================================================================================ | |
<Import Project="$(CSharpTargetsPath)"> | |
C:\Program Files\dotnet\sdk\8.0.404\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> | |
<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> | |
<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> | |
<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' "> | |
<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' "> | |
<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> | |
<CreateManifestResourceNamesDependsOn /> | |
</PropertyGroup> | |
<Target Name="CreateManifestResourceNames" Condition="'@(EmbeddedResource)' != ''" DependsOnTargets="$(CreateManifestResourceNamesDependsOn)"> | |
<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)' != ''"> | |
<ResolveCodeAnalysisRuleSet CodeAnalysisRuleSet="$(CodeAnalysisRuleSet)" CodeAnalysisRuleSetDirectories="$(CodeAnalysisRuleSetDirectories)" MSBuildProjectDirectory="$(MSBuildProjectDirectory)"> | |
<Output TaskParameter="ResolvedCodeAnalysisRuleSet" PropertyName="ResolvedCodeAnalysisRuleSet" /> | |
</ResolveCodeAnalysisRuleSet> | |
</Target> | |
<ItemGroup> | |
<!-- Activate CPS projects to track folder names in namespace. --> | |
<ProjectCapability Include="RelativePathDerivedDefaultNamespace" /> | |
</ItemGroup> | |
<PropertyGroup> | |
<!-- Provide a facility to override UseHostCompilerIfAvailable--> | |
<UseHostCompilerIfAvailable Condition=" '$(UseHostCompilerIfAvailable)' == ''">true</UseHostCompilerIfAvailable> | |
</PropertyGroup> | |
<ItemGroup> | |
<DocFileItem Include="$(DocumentationFile)" Condition="'$(DocumentationFile)'!=''" /> | |
</ItemGroup> | |
<ItemGroup Condition="'$(_DebugSymbolsProduced)' == 'true' and '$(PdbFile)' != ''"> | |
<_DebugSymbolsIntermediatePathTemporary Include="$(PdbFile)" /> | |
<!-- Add any missing .pdb extension, as the compiler does --> | |
<_DebugSymbolsIntermediatePath Include="@(_DebugSymbolsIntermediatePathTemporary->'%(RootDir)%(Directory)%(Filename).pdb')" /> | |
</ItemGroup> | |
<PropertyGroup> | |
<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);
 @(Compile);
 @(_CoreCompileResourceInputs);
 $(ApplicationIcon);
 $(AssemblyOriginatorKeyFile);
 @(ReferencePath);
 @(CompiledLicenseFile);
 @(LinkResource);
 @(EmbeddedDocumentation);
 $(Win32Resource);
 $(Win32Manifest);
 @(CustomAdditionalCompileInputs);
 @(Page);
 @(ApplicationDefinition);
 $(ResolvedCodeAnalysisRuleSet)" Outputs="@(DocFileItem);
 @(XamlIntermediateAssembly);
 @(_DebugSymbolsIntermediatePath);
 $(NonExistentFile);
 @(CustomAdditionalCompileOutputs)" Condition="'@(Page)' != '' Or '@(ApplicationDefinition)' != ''" Returns="" DependsOnTargets="$(CoreCompileDependsOn);GenerateMSBuildEditorConfigFile"> | |
<!-- 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)' > '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 --> | |
<!-- Don't run analyzers for Csc task on XamlPrecompile pass, we only want to run them on core compile. --> | |
<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="true" 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> | |
<!-- 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\8.0.404\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\8.0.404\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" /> | |
<!-- | |
============================================================================================================================================ | |
<Import Project="Microsoft.Managed.Core.CurrentVersions.targets"> | |
C:\Program Files\dotnet\sdk\8.0.404\Roslyn\Microsoft.Managed.Core.CurrentVersions.targets | |
============================================================================================================================================ | |
--> | |
<PropertyGroup> | |
<CompilerApiVersion>roslyn4.11</CompilerApiVersion> | |
</PropertyGroup> | |
<!-- | |
============================================================================================================================================ | |
</Import> | |
C:\Program Files\dotnet\sdk\8.0.404\Roslyn\Microsoft.Managed.Core.targets | |
============================================================================================================================================ | |
--> | |
<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> | |
<!-- | |
======================== | |
SkipAnalyzers Support | |
======================== | |
--> | |
<UsingTask TaskName="Microsoft.CodeAnalysis.BuildTasks.ShowMessageForImplicitlySkipAnalyzers" AssemblyFile="$(MSBuildThisFileDirectory)Microsoft.Build.Tasks.CodeAnalysis.dll" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" /> | |
<Target Name="_ComputeSkipAnalyzers" BeforeTargets="CoreCompile" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<!-- First, force clear non-user facing properties '_SkipAnalyzers' and '_ImplicitlySkipAnalyzers'. --> | |
<PropertyGroup> | |
<_SkipAnalyzers /> | |
<_ImplicitlySkipAnalyzers /> | |
</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
 ('$(RunAnalyzers)' == '' and '$(RunAnalyzersDuringBuild)' == 'false')"> | |
<_SkipAnalyzers>true</_SkipAnalyzers> | |
</PropertyGroup> | |
<!-- PERF: For builds which are indirectly triggered inside Visual Studio from commands | |
such as from 'Run Tests' or 'Start Debugging', we implicitly skip analyzers and nullable analysis to speed up the build. | |
We only do so by default when 'TreatWarningsAsErrors' is not 'true'. For the scenario where | |
'TreatWarningsAsErrors' is 'true', users can explicitly enable this functionality by setting | |
'OptimizeImplicitlyTriggeredBuild' to 'true'. | |
NOTE: This feature is currently supported only for SDK-style projects, i.e. UsingMicrosoftNETSdk = true. | |
--> | |
<PropertyGroup Condition="'$(_SkipAnalyzers)' == '' and
 '$(IsImplicitlyTriggeredBuild)' == 'true' and
 '$(UsingMicrosoftNETSdk)' == 'true' and
 '$(OptimizeImplicitlyTriggeredBuild)' != 'false' and
 ('$(TreatWarningsAsErrors)' != 'true' or '$(OptimizeImplicitlyTriggeredBuild)' == 'true')"> | |
<_ImplicitlySkipAnalyzers>true</_ImplicitlySkipAnalyzers> | |
<_SkipAnalyzers>true</_SkipAnalyzers> | |
<Features>run-nullable-analysis=never;$(Features)</Features> | |
</PropertyGroup> | |
<!-- Display a message to inform the users about us implicitly skipping analyzers for speeding up indirect builds. --> | |
<ShowMessageForImplicitlySkipAnalyzers Condition="'$(_ImplicitlySkipAnalyzers)' == 'true'" /> | |
<!-- Semaphore file to indicate the time stamp for last build with skipAnalyzers flag. --> | |
<PropertyGroup> | |
<_LastBuildWithSkipAnalyzers>$(IntermediateOutputPath)$(MSBuildProjectFile).BuildWithSkipAnalyzers</_LastBuildWithSkipAnalyzers> | |
</PropertyGroup> | |
<!-- '_LastBuildWithSkipAnalyzers' semaphore file, if exists, is passed as custom additional file input to builds without skipAnalyzers flag to ensure correct incremental builds. | |
Additionally, we need to pass this file as an 'UpToDateCheckInput' item with 'Kind = ImplicitBuild' for project system's fast-upto-date check to work correctly. | |
See https://github.com/dotnet/project-system/issues/7290 for details. | |
--> | |
<ItemGroup Condition="Exists('$(_LastBuildWithSkipAnalyzers)') and '$(_SkipAnalyzers)' != 'true'"> | |
<CustomAdditionalCompileInputs Include="$(_LastBuildWithSkipAnalyzers)" /> | |
<UpToDateCheckInput Include="$(_LastBuildWithSkipAnalyzers)" Kind="ImplicitBuild" /> | |
</ItemGroup> | |
</Target> | |
<!-- We touch and create a semaphore file after build to indicate the time stamp for last build with skipAnalyzers flag. --> | |
<Target Name="_TouchLastBuildWithSkipAnalyzers" Condition="'$(_SkipAnalyzers)' == 'true'" AfterTargets="CoreCompile" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<Touch AlwaysCreate="true" Files="$(_LastBuildWithSkipAnalyzers)" /> | |
</Target> | |
<!-- | |
======================== | |
.editorconfig Support | |
======================== | |
--> | |
<ItemGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<_AllDirectoriesAbove Include="@(Compile->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->'%(FullPath)'->Distinct()->Combine('.editorconfig'))" Condition="'$(DiscoverEditorConfigFiles)' != 'false'" /> | |
<EditorConfigFiles Include="@(PotentialEditorConfigFiles->Exists())" Condition="'$(DiscoverEditorConfigFiles)' != 'false'" /> | |
<GlobalAnalyzerConfigFiles Include="@(_AllDirectoriesAbove->'%(FullPath)'->Distinct()->Combine('.globalconfig'))" Condition="'$(DiscoverGlobalAnalyzerConfigFiles)' != 'false'" /> | |
<EditorConfigFiles Include="@(GlobalAnalyzerConfigFiles->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->Count())' != '0'">true</_GeneratedEditorConfigHasItems> | |
<_GeneratedEditorConfigShouldRun Condition="'$(GenerateMSBuildEditorConfigFile)' == 'true' and ('$(_GeneratedEditorConfigHasItems)' == 'true' or '@(CompilerVisibleProperty->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)" FileName="$(GeneratedMSBuildEditorConfigFile)" /> | |
</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\8.0.404\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)' < '3.0') AND
 ('$(TargetFrameworkIdentifier)' != '.NETStandard' OR '$(_TargetFrameworkVersionWithoutV)' < '2.1')">7.3</_MaxSupportedLangVersion> | |
<!-- .NETCoreApp < 5.0, .NETStandard == 2.1 --> | |
<_MaxSupportedLangVersion Condition="(('$(TargetFrameworkIdentifier)' == '.NETCoreApp' AND '$(_TargetFrameworkVersionWithoutV)' < '5.0') OR
 ('$(TargetFrameworkIdentifier)' == '.NETStandard' AND '$(_TargetFrameworkVersionWithoutV)' == '2.1')) AND
 '$(_MaxSupportedLangVersion)' == ''">8.0</_MaxSupportedLangVersion> | |
<!-- .NETCoreApp == 5.0 --> | |
<_MaxSupportedLangVersion Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp' AND '$(_TargetFrameworkVersionWithoutV)' == '5.0' AND
 '$(_MaxSupportedLangVersion)' == ''">9.0</_MaxSupportedLangVersion> | |
<!-- .NETCoreApp == 6.0 --> | |
<_MaxSupportedLangVersion Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp' AND '$(_TargetFrameworkVersionWithoutV)' == '6.0' AND
 '$(_MaxSupportedLangVersion)' == ''">10.0</_MaxSupportedLangVersion> | |
<!-- .NETCoreApp == 7.0 --> | |
<_MaxSupportedLangVersion Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp' AND '$(_TargetFrameworkVersionWithoutV)' == '7.0' AND
 '$(_MaxSupportedLangVersion)' == ''">11.0</_MaxSupportedLangVersion> | |
<!-- .NETCoreApp == 8.0 --> | |
<_MaxSupportedLangVersion Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp' AND '$(_TargetFrameworkVersionWithoutV)' == '8.0' AND
 '$(_MaxSupportedLangVersion)' == ''">12.0</_MaxSupportedLangVersion> | |
<MaxSupportedLangVersion>$(_MaxSupportedLangVersion)</MaxSupportedLangVersion> | |
<LangVersion Condition="'$(LangVersion)' == '' AND '$(_MaxSupportedLangVersion)' != ''">$(_MaxSupportedLangVersion)</LangVersion> | |
</PropertyGroup> | |
<Target Name="CoreCompile" Inputs="$(MSBuildAllProjects);
 @(Compile);
 @(_CoreCompileResourceInputs);
 $(ApplicationIcon);
 $(KeyOriginatorFile);
 @(ReferencePathWithRefAssemblies);
 @(CompiledLicenseFile);
 @(LinkResource);
 @(EmbeddedDocumentation);
 $(Win32Resource);
 $(Win32Manifest);
 @(CustomAdditionalCompileInputs);
 $(ResolvedCodeAnalysisRuleSet);
 @(AdditionalFiles);
 @(EmbeddedFiles);
 @(Analyzer);
 @(EditorConfigFiles);
 $(SourceLink)" Outputs="@(DocFileItem);
 @(IntermediateAssembly);
 @(IntermediateRefAssembly);
 @(_DebugSymbolsIntermediatePath);
 $(NonExistentFile);
 @(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)' > '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)" InterceptorsPreviewNamespaces="$(InterceptorsPreviewNamespaces)" 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)" ProjectName="$(MSBuildProjectName)" ProvideCommandLineArgs="$(ProvideCommandLineArgs)" References="@(ReferencePathWithRefAssemblies)" RefOnly="$(ProduceOnlyReferenceAssembly)" ReportAnalyzer="$(ReportAnalyzer)" ReportIVTs="$(ReportIVTs)" Resources="@(_CoreCompileResourceInputs);@(CompiledLicenseFile)" ResponseFiles="$(CompilerResponseFile)" RuntimeMetadataVersion="$(RuntimeMetadataVersion)" SharedCompilationId="$(SharedCompilationId)" SkipAnalyzers="$(_SkipAnalyzers)" SkipCompilerExecution="$(SkipCompilerExecution)" Sources="@(Compile)" SubsystemVersion="$(SubsystemVersion)" TargetType="$(OutputType)" TargetFramework="$(TargetFramework)" 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> | |
<!-- When we load a project in Visual Studio, the project system first does an evaluation pass of the | |
project, and hands the resulting list of <Compile> items to the language service. It then does an | |
execution pass executing CoreCompile passing SkipCompilerExecution=true and ProvideCommandLineArgs=true, | |
that resulting command line string is where we get our compiler switches. The execution pass is much | |
slower than the evaluation pass, so there's a window of time where we have a list of files, but not | |
any options yet. | |
Because there's a gap, that means there's a time where we are parsing source files with the default | |
parse options. We'll then have to reparse them a second time which isn't great. It also means any | |
cache lookups we do won't have the right options either, so the cache lookups might miss. | |
To help this, we'll have properties for the evaluation pass which is an "approximation" of the | |
options that would come out of CoreCompile, but only the ones that are required to be specified | |
and we don't expect them to change after evaluation phase or those that matter for parsing. | |
It's acceptable for the options that affect parsing to be imperfect: once the execution pass is complete we'll use those options instead, | |
so any behaviors here that don't match the real command line generation will only be temporary, and | |
probably won't be any worse than having no options at all. --> | |
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<CommandLineArgsForDesignTimeEvaluation>-langversion:$(LangVersion)</CommandLineArgsForDesignTimeEvaluation> | |
<CommandLineArgsForDesignTimeEvaluation Condition="'$(ChecksumAlgorithm)' != ''">$(CommandLineArgsForDesignTimeEvaluation) -checksumalgorithm:$(ChecksumAlgorithm)</CommandLineArgsForDesignTimeEvaluation> | |
<CommandLineArgsForDesignTimeEvaluation Condition="'$(DefineConstants)' != ''">$(CommandLineArgsForDesignTimeEvaluation) -define:$(DefineConstants)</CommandLineArgsForDesignTimeEvaluation> | |
</PropertyGroup> | |
<!-- | |
============================================================================================================================================ | |
</Import> | |
C:\Program Files\dotnet\sdk\8.0.404\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> | |
<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\8.0.404\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. | |
*********************************************************************************************** | |
--> | |
<PropertyGroup> | |
<CommonTargetsPath>$(MSBuildToolsPath)\Microsoft.Common.CurrentVersion.targets</CommonTargetsPath> | |
</PropertyGroup> | |
<!-- | |
============================================================================================================================================ | |
<Import Project="$(CommonTargetsPath)"> | |
C:\Program Files\dotnet\sdk\8.0.404\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> | |
<ImportByWildcardBeforeMicrosoftCommonTargets Condition="'$(ImportByWildcardBeforeMicrosoftCommonTargets)' == ''">true</ImportByWildcardBeforeMicrosoftCommonTargets> | |
<ImportByWildcardAfterMicrosoftCommonTargets Condition="'$(ImportByWildcardAfterMicrosoftCommonTargets)' == ''">true</ImportByWildcardAfterMicrosoftCommonTargets> | |
<ImportUserLocationsByWildcardBeforeMicrosoftCommonTargets Condition="'$(ImportUserLocationsByWildcardBeforeMicrosoftCommonTargets)' == ''">true</ImportUserLocationsByWildcardBeforeMicrosoftCommonTargets> | |
<ImportUserLocationsByWildcardAfterMicrosoftCommonTargets Condition="'$(ImportUserLocationsByWildcardAfterMicrosoftCommonTargets)' == ''">true</ImportUserLocationsByWildcardAfterMicrosoftCommonTargets> | |
</PropertyGroup> | |
<!--<Import Project="$(MSBuildUserExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.targets\ImportBefore\*" Condition="'$(ImportUserLocationsByWildcardBeforeMicrosoftCommonTargets)' == 'true' and exists('$(MSBuildUserExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.targets\ImportBefore')" />--> | |
<!--<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.targets\ImportBefore\*" Condition="'$(ImportByWildcardBeforeMicrosoftCommonTargets)' == 'true' and exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.targets\ImportBefore')" />--> | |
<!--<Import Project="$(MSBuildProjectFullPath).user" Condition="Exists('$(MSBuildProjectFullPath).user')" />--> | |
<!-- VS10 without SP1 and without VS11 will not have VisualStudioVersion set, so do that here --> | |
<PropertyGroup> | |
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion> | |
</PropertyGroup> | |
<PropertyGroup> | |
<CustomBeforeMicrosoftCommonTargets Condition="'$(CustomBeforeMicrosoftCommonTargets)'==''">$(MSBuildExtensionsPath)\v$(MSBuildToolsVersion)\Custom.Before.Microsoft.Common.targets</CustomBeforeMicrosoftCommonTargets> | |
<CustomAfterMicrosoftCommonTargets Condition="'$(CustomAfterMicrosoftCommonTargets)'==''">$(MSBuildExtensionsPath)\v$(MSBuildToolsVersion)\Custom.After.Microsoft.Common.targets</CustomAfterMicrosoftCommonTargets> | |
<ReportingServicesTargets Condition="'$(ReportingServicesTargets)'==''">$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v$(VisualStudioVersion)\ReportingServices\Microsoft.ReportingServices.targets</ReportingServicesTargets> | |
</PropertyGroup> | |
<!--<Import Project="$(CustomBeforeMicrosoftCommonTargets)" Condition="'$(CustomBeforeMicrosoftCommonTargets)' != '' and Exists('$(CustomBeforeMicrosoftCommonTargets)')" />--> | |
<!-- By default, we are creating a managed app because .NET 2.0 projects did not have this property. --> | |
<PropertyGroup Condition="'$(TargetRuntime)' == ''"> | |
<TargetRuntime>Managed</TargetRuntime> | |
</PropertyGroup> | |
<!-- Because .NET 2.0 apps did not set TargetFrameworkIdentifier, we need to set it for them here by default. If | |
the runtime is set to Managed, we also need to set these. Otherwise they should be blank (for instance Javascript or | |
Native apps) because they do not target a .NET Framework. --> | |
<PropertyGroup Condition="'$(TargetRuntime)' == 'Managed'"> | |
<TargetFrameworkIdentifier Condition="'$(TargetFrameworkIdentifier)' == ''">.NETFramework</TargetFrameworkIdentifier> | |
<TargetFrameworkVersion Condition=" '$(TargetFrameworkVersion)' == '' ">v4.0</TargetFrameworkVersion> | |
</PropertyGroup> | |
<!-- AvailablePlatforms is the list of platform targets available. --> | |
<PropertyGroup> | |
<AvailablePlatforms Condition="'$(VisualStudioVersion)' == '10.0' or '$(VisualStudioVersion)' == ''">Any CPU,x86,x64,Itanium</AvailablePlatforms> | |
<AvailablePlatforms Condition="'$(VisualStudioVersion)' != '' and '$(VisualStudioVersion)' > '10.0'">Any CPU,x86,x64</AvailablePlatforms> | |
</PropertyGroup> | |
<!-- Import 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\8.0.404\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> | |
<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'"> | |
<HighEntropyVA Condition="'$(HighEntropyVA)' == ''">true</HighEntropyVA> | |
</PropertyGroup> | |
<PropertyGroup> | |
<HighEntropyVA Condition="'$(HighEntropyVA)' == ''">false</HighEntropyVA> | |
</PropertyGroup> | |
<!-- | |
============================================================================================================================================ | |
</Import> | |
C:\Program Files\dotnet\sdk\8.0.404\Microsoft.Common.CurrentVersion.targets | |
============================================================================================================================================ | |
--> | |
<PropertyGroup> | |
<!-- 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)' != ''"> | |
<TargetFrameworkMoniker Condition="'$(TargetFrameworkMoniker)' == '' and '$([System.String]::IsNullOrWhitespace($(TargetFrameworkProfile)))' != 'true'">$(TargetFrameworkIdentifier),Version=$(TargetFrameworkVersion),Profile=$(TargetFrameworkProfile)</TargetFrameworkMoniker> | |
<TargetFrameworkMoniker Condition="'$(TargetFrameworkMoniker)' == ''">$(TargetFrameworkIdentifier),Version=$(TargetFrameworkVersion)</TargetFrameworkMoniker> | |
<!-- When working off a packaged reference assemblies, do not go to machine-global locations. This property is target-framework-specific, so it cannot be overridden in msbuild.exe.config once and for all. --> | |
<FrameworkPathOverride Condition="'$(EnableFrameworkPathOverride)' != 'false' And '$(FrameworkPathOverride)' == '' And Exists('$(TargetFrameworkRootPath)$(TargetFrameworkIdentifier)\$(TargetFrameworkVersion)')">$(TargetFrameworkRootPath)$(TargetFrameworkIdentifier)\$(TargetFrameworkVersion)</FrameworkPathOverride> | |
<!-- The FrameworkPathOverride is required for the inproc visual basic compiler to initialize when targeting target frameworks less than 4.0. If .net 2.0 is not installed then the property value above will not provide the location | |
of mscorlib. This is also true if the build author overrides this property to some other directory which does not contain mscorlib.dll. In the case we cannot find mscorlib.dll at the correct location | |
we need to find a directory which does contain mscorlib to allow the inproc compiler to initialize and give us the chance to show certain dialogs in the IDE (which only happen after initialization).--> | |
<FrameworkPathOverride Condition="'$(EnableFrameworkPathOverride)' != 'false' And '$(FrameworkPathOverride)' == ''">$([Microsoft.Build.Utilities.ToolLocationHelper]::GetPathToStandardLibraries($(TargetFrameworkIdentifier), $(TargetFrameworkVersion), $(TargetFrameworkProfile), $(PlatformTarget), $(TargetFrameworkRootPath), $(TargetFrameworkFallbackSearchPaths)))</FrameworkPathOverride> | |
<FrameworkPathOverride Condition="'$(EnableFrameworkPathOverride)' != 'false' And !Exists('$(FrameworkPathOverride)\mscorlib.dll')">$(MSBuildFrameworkToolsPath)</FrameworkPathOverride> | |
</PropertyGroup> | |
<PropertyGroup> | |
<TargetPlatformIdentifier Condition="'$(TargetPlatformIdentifier)' == '' 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)' > '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> | |
<!-- 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> | |
<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> | |
<!-- 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> | |
<_DebugSymbolsProduced Condition="'$(ProduceOnlyReferenceAssembly)'=='true'">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'"> | |
<!-- | |
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> | |
<TargetExt Condition="'$(TargetExt)' == '' and '$(OutputType)'=='exe'">.exe</TargetExt> | |
<TargetExt Condition="'$(TargetExt)' == '' and '$(OutputType)'=='winexe'">.exe</TargetExt> | |
<TargetExt Condition="'$(TargetExt)' == '' and '$(OutputType)'=='appcontainerexe'">.exe</TargetExt> | |
<TargetExt Condition="'$(TargetExt)' == '' and '$(OutputType)'=='library'">.dll</TargetExt> | |
<TargetExt Condition="'$(TargetExt)' == '' and '$(OutputType)'=='module'">.netmodule</TargetExt> | |
<TargetExt Condition="'$(TargetExt)' == '' and '$(OutputType)'=='winmdobj'">.winmdobj</TargetExt> | |
</PropertyGroup> | |
<PropertyGroup> | |
<!-- Required for enabling Team Build for packaging app package-generating projects --> | |
<OutDirWasSpecified Condition=" '$(OutDir)'!='' and '$(OutDirWasSpecified)'=='' ">true</OutDirWasSpecified> | |
<OutDir Condition=" '$(OutDir)' == '' ">$(OutputPath)</OutDir> | |
<!-- Example, bin\Debug\ --> | |
<!-- Ensure OutDir has a trailing slash, so it can be concatenated --> | |
<OutDir Condition="'$(OutDir)' != '' and !HasTrailingSlash('$(OutDir)')">$(OutDir)\</OutDir> | |
<ProjectName Condition=" '$(ProjectName)' == '' ">$(MSBuildProjectName)</ProjectName> | |
<!-- Example, MyProject --> | |
<!-- For projects that generate app packages or ones that want a per-project output directory, update OutDir to include the project name --> | |
<OutDir Condition="'$(OutDir)' != '' and '$(OutDirWasSpecified)' == 'true' and (('$(WindowsAppContainer)' == 'true' and '$(GenerateProjectSpecificOutputFolder)' != 'false') or '$(GenerateProjectSpecificOutputFolder)' == 'true')">$(OutDir)$(ProjectName)\</OutDir> | |
<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> | |
<!-- | |
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> | |
<!-- | |
By default, GenerateApplicationManifest puts all satellite assemblies to the manifest | |
record by default by setting TargetCulture to *. | |
--> | |
<TargetCulture Condition="'$(TargetCulture)'==''">*</TargetCulture> | |
<FallbackCulture Condition="'$(UICulture)'!='' and '$(FallbackCulture)'==''">$(UICulture)</FallbackCulture> | |
</PropertyGroup> | |
<ItemGroup> | |
<!-- Not used any more--> | |
<_OutputPathItem Include="$(OutDir)" /> | |
<_UnmanagedRegistrationCache Include="$(BaseIntermediateOutputPath)$(MSBuildProjectFile).UnmanagedRegistration.cache" /> | |
<_ResolveComReferenceCache Include="$(IntermediateOutputPath)$(MSBuildProjectFile).ResolveComReference.cache" /> | |
</ItemGroup> | |
<PropertyGroup> | |
<!-- Example, C:\MyProjects\MyProject\bin\Debug\ --> | |
<!-- | |
Condition intentionally omitted on this one, because it causes problems | |
when we pick up the value of an environment variable named TargetDir | |
--> | |
<TargetDir Condition="'$(OutDir)' != ''">$([MSBuild]::Escape($([System.IO.Path]::GetFullPath(`$([System.IO.Path]::Combine(`$(MSBuildProjectDirectory)`, `$(OutDir)`))`))))</TargetDir> | |
<!-- Example, C:\MyProjects\MyProject\bin\Debug\MyAssembly.dll --> | |
<TargetPath Condition=" '$(TargetPath)' == '' ">$(TargetDir)$(TargetFileName)</TargetPath> | |
<TargetRefPath Condition=" '$(TargetRefPath)' == '' and '$(ProduceReferenceAssembly)' == 'true' and '$(ProduceReferenceAssemblyInOutDir)' == 'true' ">$([MSBuild]::NormalizePath($(TargetDir), 'ref', $(TargetFileName)))</TargetRefPath> | |
<TargetRefPath Condition=" '$(TargetRefPath)' == '' and '$(ProduceReferenceAssembly)' == 'true' ">$([MSBuild]::NormalizePath($(MSBuildProjectDirectory), $(IntermediateOutputPath), '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> | |
<!-- This is not used here but remains for backwards compatibility --> | |
<AppConfigFileDestination Include="$(OutDir)$(TargetFileName).config" /> | |
</ItemGroup> | |
<!-- | |
IDE Macros available only from integrated builds. | |
The following properties are 'macros' that are available via IDE for | |
pre and post build steps. However, they are not defined when directly building | |
a project from the command line, only when building a solution. | |
--> | |
<PropertyGroup> | |
<DevEnvDir Condition="'$(DevEnvDir)'==''">*Undefined*</DevEnvDir> | |
<SolutionName Condition="'$(SolutionName)'==''">*Undefined*</SolutionName> | |
<!-- Example, MySolution --> | |
<SolutionFileName Condition="'$(SolutionFileName)'==''">*Undefined*</SolutionFileName> | |
<!-- Example, MySolution.sln --> | |
<SolutionPath Condition="'$(SolutionPath)'==''">*Undefined*</SolutionPath> | |
<!-- Example, f:\MySolutions\MySolution\MySolution.sln --> | |
<SolutionDir Condition="'$(SolutionDir)'==''">*Undefined*</SolutionDir> | |
<!-- Example, f:\MySolutions\MySolution\ --> | |
<SolutionExt Condition="'$(SolutionExt)'==''">*Undefined*</SolutionExt> | |
<!-- Example, .sln --> | |
</PropertyGroup> | |
<PropertyGroup> | |
<GenerateBindingRedirectsOutputType Condition="'$(OutputType)'=='exe' or '$(OutputType)'=='winexe'">true</GenerateBindingRedirectsOutputType> | |
<!-- It would be a breaking change to automatically turn on binding redirects for existing projects, so turn them on only when opting into a new framework. --> | |
<AutoGenerateBindingRedirects Condition="'$(AutoGenerateBindingRedirects)' == '' and '$(TargetFrameworkIdentifier)' == '.NETFramework' and '$(TargetFrameworkVersion.TrimStart(vV))' >= '4.7.2'">true</AutoGenerateBindingRedirects> | |
</PropertyGroup> | |
<PropertyGroup Condition="'$(AutoUnifyAssemblyReferences)' == ''"> | |
<AutoUnifyAssemblyReferences>true</AutoUnifyAssemblyReferences> | |
<AutoUnifyAssemblyReferences Condition="'$(GenerateBindingRedirectsOutputType)' == 'true' and '$(AutoGenerateBindingRedirects)' != 'true'">false</AutoUnifyAssemblyReferences> | |
</PropertyGroup> | |
<PropertyGroup> | |
<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> | |
<_GenerateBindingRedirectsIntermediateAppConfig>$(IntermediateOutputPath)$(TargetFileName).config</_GenerateBindingRedirectsIntermediateAppConfig> | |
</PropertyGroup> | |
<PropertyGroup Condition="'$(MSBuildCopyMarkerName)' == ''"> | |
<MSBuildCopyMarkerName>$(MSBuildProjectFile)</MSBuildCopyMarkerName> | |
<!-- For a long MSBuildProjectFile let's shorten this to 17 chars - using the first 8 codepoints of the filename and a filename hash. --> | |
<MSBuildCopyMarkerName Condition="'$(MSBuildCopyMarkerName.Length)' > '17'">$([MSBuild]::SubstringByAsciiChars($(MSBuildProjectFile), 0, 8)).$([MSBuild]::StableStringHash($(MSBuildProjectFile)).ToString("X8"))</MSBuildCopyMarkerName> | |
<MSBuildCopyMarkerName>$(MSBuildCopyMarkerName).Up2Date</MSBuildCopyMarkerName> | |
</PropertyGroup> | |
<ItemGroup> | |
<IntermediateAssembly Include="$(IntermediateOutputPath)$(TargetName)$(TargetExt)" /> | |
<FinalDocFile Include="@(DocFileItem->'$(OutDir)%(Filename)%(Extension)')" /> | |
<CopyUpToDateMarker Include="$([MSBuild]::NormalizePath('$(MSBuildProjectDirectory)', '$(IntermediateOutputPath)', '$(MSBuildCopyMarkerName)'))" /> | |
</ItemGroup> | |
<ItemGroup Condition="'$(ProduceReferenceAssembly)' == 'true'"> | |
<IntermediateRefAssembly Include="$(IntermediateOutputPath)refint\$(TargetName)$(TargetExt)" Condition="'@(IntermediateRefAssembly)' == ''" /> | |
<CreateDirectory Include="@(IntermediateRefAssembly->'%(RootDir)%(Directory)')" /> | |
<CreateDirectory Include="$(OutDir)ref" Condition=" '$(ProduceReferenceAssemblyInOutDir)' == 'true'" /> | |
<CreateDirectory Include="$(IntermediateOutputPath)ref" Condition=" '$(ProduceReferenceAssemblyInOutDir)' != 'true'" /> | |
</ItemGroup> | |
<ItemGroup Condition="'$(_DebugSymbolsProduced)' == 'true'"> | |
<_DebugSymbolsIntermediatePath Include="$(IntermediateOutputPath)$(TargetName).compile.pdb" Condition="'$(OutputType)' == 'winmdobj' and '@(_DebugSymbolsIntermediatePath)' == ''" /> | |
<_DebugSymbolsIntermediatePath Include="$(IntermediateOutputPath)$(TargetName).pdb" Condition="'$(OutputType)' != 'winmdobj' and '@(_DebugSymbolsIntermediatePath)' == ''" /> | |
<_DebugSymbolsOutputPath Include="@(_DebugSymbolsIntermediatePath->'$(OutDir)%(Filename)%(Extension)')" /> | |
</ItemGroup> | |
<PropertyGroup Condition="'$(_DebugSymbolsProduced)' == 'true' and '$(OutputType)' == 'winmdobj'"> | |
<WinMDExpOutputPdb Condition="'$(WinMDExpOutputPdb)' == ''">$(IntermediateOutputPath)$(TargetName).pdb</WinMDExpOutputPdb> | |
<_WinMDDebugSymbolsOutputPath>$([System.IO.Path]::Combine('$(OutDir)', $([System.IO.Path]::GetFileName('$(WinMDExpOutputPdb)'))))</_WinMDDebugSymbolsOutputPath> | |
</PropertyGroup> | |
<PropertyGroup Condition="'$(OutputType)' == 'winmdobj' and '$(DocumentationFile)'!=''"> | |
<WinMDOutputDocumentationFile Condition="'$(WinMDOutputDocumentationFile)' == ''">$(IntermediateOutputPath)$(TargetName).xml</WinMDOutputDocumentationFile> | |
<_WinMDDocFileOutputPath>$([System.IO.Path]::Combine('$(OutDir)', $([System.IO.Path]::GetFileName('$(WinMDOutputDocumentationFile)'))))</_WinMDDocFileOutputPath> | |
</PropertyGroup> | |
<PropertyGroup Condition="'$(WinMDExpOutputWindowsMetadataFilename)' != ''"> | |
<_IntermediateWindowsMetadataPath>$(IntermediateOutputPath)$(WinMDExpOutputWindowsMetadataFilename)</_IntermediateWindowsMetadataPath> | |
<_WindowsMetadataOutputPath>$(OutDir)$(WinMDExpOutputWindowsMetadataFilename)</_WindowsMetadataOutputPath> | |
</PropertyGroup> | |
<!-- ARM64-related properties --> | |
<PropertyGroup> | |
<_SupportedArchitectures>amd64 arm64</_SupportedArchitectures> | |
</PropertyGroup> | |
<ItemGroup> | |
<!-- Create an item for entry point of the ClickOnce application (Example: WindowsApplication1.exe) --> | |
<_DeploymentManifestEntryPoint Include="@(IntermediateAssembly)"> | |
<TargetPath>$(TargetFileName)</TargetPath> | |
</_DeploymentManifestEntryPoint> | |
<!-- Create an item for the application icon if one exists in the project (Example: app.ico) --> | |
<!-- NOTE: The item Include and the Exists function are operating relative to the PROJECT (.csproj, .vbproj etc.) directory in this case --> | |
<_DeploymentManifestIconFile Include="$(ApplicationIcon)" Condition="Exists('$(ApplicationIcon)')"> | |
<TargetPath>$(ApplicationIcon)</TargetPath> | |
</_DeploymentManifestIconFile> | |
<!-- Create an item for the output application manifest (Example: WindowsApplication1.exe.manifeset) --> | |
<ApplicationManifest Include="$(IntermediateOutputPath)$(_DeploymentTargetApplicationManifestFileName)"> | |
<TargetPath>$(_DeploymentTargetApplicationManifestFileName)</TargetPath> | |
</ApplicationManifest> | |
<!-- Create an item for the final application manifest (Example: WindowsApplication1.exe.manifeset) | |
This item represents the final output application manifest used for project-to-project | |
references and for copying to the publish output location. --> | |
<_ApplicationManifestFinal Include="$(OutDir)$(_DeploymentTargetApplicationManifestFileName)"> | |
<TargetPath>$(_DeploymentTargetApplicationManifestFileName)</TargetPath> | |
</_ApplicationManifestFinal> | |
<!-- Create an item for the output deploy manifest (Example: WindowsApplication1.application) --> | |
<DeployManifest Include="$(IntermediateOutputPath)$(TargetDeployManifestFileName)"> | |
<TargetPath>$(TargetDeployManifestFileName)</TargetPath> | |
</DeployManifest> | |
<!-- Create an item for the intermediate trust info file --> | |
<_DeploymentIntermediateTrustInfoFile Include="$(IntermediateOutputPath)$(TargetName).TrustInfo.xml" Condition="'$(TargetZone)'!=''" /> | |
</ItemGroup> | |
<!-- | |
Determine the <deploymentProvider> (_DeploymentUrl) for the ClickOnce deployment manifest. | |
Prefer the UpdateUrl, falling back to InstallUrl or PublishUrl if not specified. | |
If the UpdateUrl is specified then _DeploymentUrl is always set to the UpdateUrl. | |
Otherwise, only set the _DeploymentUrl if it's an installed app and updates are enabled. | |
--> | |
<PropertyGroup> | |
<_DeploymentUrl Condition="'$(_DeploymentUrl)'==''">$(UpdateUrl)</_DeploymentUrl> | |
<_DeploymentUrl Condition="'$(_DeploymentUrl)'==''">$(InstallUrl)</_DeploymentUrl> | |
<_DeploymentUrl Condition="'$(_DeploymentUrl)'==''">$(PublishUrl)</_DeploymentUrl> | |
<_DeploymentUrl Condition="!('$(UpdateUrl)'=='') and '$(Install)'=='false'" /> | |
<_DeploymentUrl 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> | |
<_DeploymentApplicationUrl Condition="'$(IsWebBootstrapper)'=='true'">$(InstallUrl)</_DeploymentApplicationUrl> | |
<_DeploymentApplicationUrl Condition="'$(IsWebBootstrapper)'=='true' and '$(InstallUrl)'==''">$(PublishUrl)</_DeploymentApplicationUrl> | |
<_DeploymentComponentsUrl Condition="'$(BootstrapperComponentsLocation)'=='Absolute'">$(BootstrapperComponentsUrl)</_DeploymentComponentsUrl> | |
</PropertyGroup> | |
<!-- Output location for publish target. --> | |
<PropertyGroup> | |
<PublishDir Condition="'$(PublishDir)' != '' and !HasTrailingSlash('$(PublishDir)')">$(PublishDir)\</PublishDir> | |
<PublishDir Condition="'$(PublishDir)'==''">$(OutputPath)app.publish\</PublishDir> | |
</PropertyGroup> | |
<!-- | |
ClickOncePublishDir property is the output location used by all ClickOnce publish targets. This should be same as PublishDir except | |
for a trailing slash. PublishDir when specified as a global property on the command line cannot be changed to add a trailing slash. | |
--> | |
<PropertyGroup> | |
<ClickOncePublishDir>$(PublishDir)</ClickOncePublishDir> | |
<ClickOncePublishDir Condition="!HasTrailingSlash('$(ClickOncePublishDir)')">$(ClickOncePublishDir)\</ClickOncePublishDir> | |
</PropertyGroup> | |
<!-- | |
ProcessorArchitecture is the target processor architecture. | |
--> | |
<PropertyGroup Condition="'$(ProcessorArchitecture)'==''"> | |
<!-- | |
If ProcessorArchitecture is not set, set it to PlatformTarget | |
Note: if $(PlatformTarget) is also blank resolve assembly reference defaults to msil which is the | |
desired behavior in this case | |
--> | |
<ProcessorArchitecture>$(PlatformTarget)</ProcessorArchitecture> | |
<!-- | |
If Processor architecture is not set and PlatformTarget is a known target translate the | |
PlatformTarget into something ResolveAssemblyReference knows about | |
--> | |
<ProcessorArchitecture Condition=" '$(PlatformTarget)' == 'AnyCpu' ">msil</ProcessorArchitecture> | |
<ProcessorArchitecture Condition=" '$(PlatformTarget)' == 'x64' ">amd64</ProcessorArchitecture> | |
<ProcessorArchitecture Condition=" '$(PlatformTarget)' == 'Itanium' ">ia64</ProcessorArchitecture> | |
<ProcessorArchitecture Condition=" '$(PlatformTarget)' == 'x86' ">x86</ProcessorArchitecture> | |
<ProcessorArchitecture Condition=" '$(PlatformTarget)' == 'ARM' ">arm</ProcessorArchitecture> | |
</PropertyGroup> | |
<PropertyGroup> | |
<ConsiderPlatformAsProcessorArchitecture Condition="'$(ConsiderPlatformAsProcessorArchitecture)' == ''">true</ConsiderPlatformAsProcessorArchitecture> | |
</PropertyGroup> | |
<PropertyGroup Condition="'$(ProcessorArchitecture)' == '' and '$(ConsiderPlatformAsProcessorArchitecture)' == 'true'"> | |
<!-- We need to do this here because if we were to just compare against platform visual would parse them out as available platforms which may not be the case --> | |
<ProcessorArchitectureAsPlatform>$(Platform)</ProcessorArchitectureAsPlatform> | |
<ProcessorArchitecture Condition=" '$(ProcessorArchitectureAsPlatform)' == 'AnyCpu' or '$(ProcessorArchitectureAsPlatform)' == 'Any Cpu'">msil</ProcessorArchitecture> | |
<ProcessorArchitecture Condition=" '$(ProcessorArchitectureAsPlatform)' == 'x64' or '$(ProcessorArchitectureAsPlatform)' == 'amd64'">amd64</ProcessorArchitecture> | |
<ProcessorArchitecture Condition=" '$(ProcessorArchitectureAsPlatform)' == 'Itanium' ">ia64</ProcessorArchitecture> | |
<ProcessorArchitecture Condition=" '$(ProcessorArchitectureAsPlatform)' == 'x86' or '$(ProcessorArchitectureAsPlatform)' == 'win32'">x86</ProcessorArchitecture> | |
<ProcessorArchitecture Condition=" '$(ProcessorArchitectureAsPlatform)' == 'ARM' ">arm</ProcessorArchitecture> | |
<!--For compatibility with the 4.0 behavior, if not set above, default to the environment. To override this, set ProcessorArchitecture explicitly. We also need to disable the warning since we do not know if what the environment is set to is correct--> | |
<ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch Condition="'$(ProcessorArchitecture)'==''">None</ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch> | |
<ProcessorArchitecture Condition="'$(ProcessorArchitecture)'==''">$(PROCESSOR_ARCHITECTURE)</ProcessorArchitecture> | |
</PropertyGroup> | |
<!-- Sensible defaults for the most-commonly-desired MSBuildRuntime and MSBuildArchitecture values. The Core runtime does 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'"> | |
<TargetFrameworkAsMSBuildRuntime Condition="'$(TargetFrameworkVersion)' == 'v2.0' or '$(TargetFrameworkVersion)' == 'v3.0' or '$(TargetFrameworkVersion)' == 'v3.5'">CLR2</TargetFrameworkAsMSBuildRuntime> | |
<TargetFrameworkAsMSBuildRuntime Condition="'$(TargetFrameworkVersion)' == 'v4.0' or '$(TargetFrameworkVersion)' == 'v4.5'">CLR4</TargetFrameworkAsMSBuildRuntime> | |
<TargetFrameworkAsMSBuildRuntime Condition="'$(TargetFrameworkAsMSBuildRuntime)' == ''">CurrentRuntime</TargetFrameworkAsMSBuildRuntime> | |
<PlatformTargetAsMSBuildArchitectureExplicitlySet Condition="'$(PlatformTargetAsMSBuildArchitecture)' != ''">true</PlatformTargetAsMSBuildArchitectureExplicitlySet> | |
<PlatformTargetAsMSBuildArchitectureExplicitlySet Condition="'$(PlatformTargetAsMSBuildArchitecture)' == ''">false</PlatformTargetAsMSBuildArchitectureExplicitlySet> | |
<PlatformTargetAsMSBuildArchitecture Condition="'$(PlatformTarget)' == 'x86' or ('$(PlatformTarget)' == 'x64' and '$(MSBuildExtensionsPath64)' != '')">$(PlatformTarget)</PlatformTargetAsMSBuildArchitecture> | |
<PlatformTargetAsMSBuildArchitecture Condition="'$(PlatformTarget)' == 'arm'">x86</PlatformTargetAsMSBuildArchitecture> | |
<PlatformTargetAsMSBuildArchitecture Condition="('$(PlatformTarget)' == 'ia64' and '$(MSBuildExtensionsPath64)' != '')">x64</PlatformTargetAsMSBuildArchitecture> | |
<PlatformTargetAsMSBuildArchitecture Condition="'$(PlatformTargetAsMSBuildArchitecture)' == ''">CurrentArchitecture</PlatformTargetAsMSBuildArchitecture> | |
</PropertyGroup> | |
<!-- Flavor is the project flavor. For example, Client, Smart Devices, SQL Server, etc. --> | |
<PropertyGroup> | |
<ProjectFlavor Condition="'$(ProjectFlavor)'==''">Client</ProjectFlavor> | |
</PropertyGroup> | |
<!-- | |
The default for compilers is to not delay-sign. If $(DelaySign) is false, let the compiler | |
use its default rather than forcing a no-delay-sign flag to be passed in. This is so that | |
attributes in the source code can override this decision. | |
--> | |
<PropertyGroup> | |
<DelaySign Condition="'$(SignAssembly)' != 'true'">false</DelaySign> | |
<DelaySign Condition="'$(DelaySign)'!='true'" /> | |
</PropertyGroup> | |
<!-- These properties control web reference proxy generation. --> | |
<PropertyGroup> | |
<WebReference_EnableProperties Condition=" '$(WebReference_EnableProperties)' == '' ">true</WebReference_EnableProperties> | |
<WebReference_EnableSQLTypes Condition=" '$(WebReference_EnableSQLTypes)' == '' ">true</WebReference_EnableSQLTypes> | |
<WebReference_EnableLegacyEventingModel Condition=" '$(WebReference_EnableLegacyEventingModel)' == '' ">false</WebReference_EnableLegacyEventingModel> | |
</PropertyGroup> | |
<!-- | |
These parameters control where to look in the registry for directories to search for | |
assemblies in the assembly resolution tasks. | |
--> | |
<PropertyGroup> | |
<AssemblyFoldersSuffix Condition=" '$(AssemblyFoldersSuffix)' == '' ">AssemblyFoldersEx</AssemblyFoldersSuffix> | |
<FrameworkRegistryBase Condition=" '$(FrameworkRegistryBase)' == '' ">Software\Microsoft\$(TargetFrameworkIdentifier)</FrameworkRegistryBase> | |
<TargetPlatformRegistryBase Condition="'$(TargetPlatformRegistryBase)' == ''">Software\Microsoft\Microsoft SDKs\$(TargetPlatformIdentifier)</TargetPlatformRegistryBase> | |
<AssemblyFoldersConfigFile Condition="'$(AssemblyFoldersConfigFile)' == ''">$([MSBuild]::GetToolsDirectory32())\AssemblyFolders.config</AssemblyFoldersConfigFile> | |
<AssemblyFoldersConfigFileSearchPath Condition="Exists('$(AssemblyFoldersConfigFile)')">{AssemblyFoldersFromConfig:$(AssemblyFoldersConfigFile),$(TargetFrameworkVersion)};</AssemblyFoldersConfigFileSearchPath> | |
<!-- | |
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> | |
<PropertyGroup Condition="$(AssemblySearchPaths) == ''"> | |
<!-- | |
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) Assembly folders from AssemblyFolders.config file (provided by Visual Studio Dev15+). | |
(6) Registered assembly folders, indicated by {Registry:*,*,*} | |
(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="'$(AssemblySearchPath_UseCandidateAssemblyFiles)' != 'false'">{CandidateAssemblyFiles}</AssemblySearchPaths> | |
<AssemblySearchPaths Condition="'$(AssemblySearchPath_UseReferencePath)' != 'false'">$(AssemblySearchPaths);$(ReferencePath)</AssemblySearchPaths> | |
<AssemblySearchPaths Condition="'$(AssemblySearchPath_UseHintPathFromItem)' != 'false'">$(AssemblySearchPaths);{HintPathFromItem}</AssemblySearchPaths> | |
<AssemblySearchPaths Condition="'$(AssemblySearchPath_UseTargetFrameworkDirectory)' != 'false'">$(AssemblySearchPaths);{TargetFrameworkDirectory}</AssemblySearchPaths> | |
<AssemblySearchPaths Condition="'$(AssemblySearchPath_UseAssemblyFoldersConfigFileSearchPath)' != 'false'">$(AssemblySearchPaths);$(AssemblyFoldersConfigFileSearchPath)</AssemblySearchPaths> | |
<AssemblySearchPaths Condition="'$(AssemblySearchPath_UseRegistry)' != 'false'">$(AssemblySearchPaths);{Registry:$(FrameworkRegistryBase),$(TargetFrameworkVersion),$(AssemblyFoldersSuffix)$(AssemblyFoldersExConditions)}</AssemblySearchPaths> | |
<AssemblySearchPaths Condition="'$(AssemblySearchPath_UseAssemblyFolders)' != 'false'">$(AssemblySearchPaths);{AssemblyFolders}</AssemblySearchPaths> | |
<AssemblySearchPaths Condition="'$(AssemblySearchPath_UseGAC)' != 'false'">$(AssemblySearchPaths);{GAC}</AssemblySearchPaths> | |
<AssemblySearchPaths Condition="'$(AssemblySearchPath_UseRawFileName)' != 'false'">$(AssemblySearchPaths);{RawFileName}</AssemblySearchPaths> | |
<AssemblySearchPaths Condition="'$(AssemblySearchPath_UseOutDir)' != 'false'">$(AssemblySearchPaths);$(OutDir)</AssemblySearchPaths> | |
</PropertyGroup> | |
<!-- ContinueOnError takes 3 values: WarnAndContinue (true), ErrorAndStop (false), and ErrorAndContinue. | |
Default to ErrorAndStop, since that matches the behaviour in previous versions, and what users | |
typically expect --> | |
<PropertyGroup> | |
<ContinueOnError Condition="'$(ContinueOnError)' == ''">false</ContinueOnError> | |
</PropertyGroup> | |
<!-- Users familiar with how some other repos work try to use NoWarn with MSBuild in place of MSBuildWarningsAsMessages. --> | |
<PropertyGroup> | |
<MSBuildWarningsAsMessages Condition="'$(MSBuildWarningsAsMessages)'==''">$(NoWarn)</MSBuildWarningsAsMessages> | |
<MSBuildWarningsAsErrors Condition="'$(MSBuildWarningsAsErrors)'==''">$(WarningsAsErrors)</MSBuildWarningsAsErrors> | |
<MSBuildWarningsNotAsErrors Condition="'$(MSBuildWarningsNotAsErrors)'==''">$(WarningsNotAsErrors)</MSBuildWarningsNotAsErrors> | |
</PropertyGroup> | |
<!-- Common Project System support --> | |
<PropertyGroup> | |
<CommonXamlResourcesDirectory Condition=" '$(CommonXamlResourcesDirectory)' == '' ">$(MSBuildThisFileDirectory)$(LangName)\</CommonXamlResourcesDirectory> | |
</PropertyGroup> | |
<!-- We need to fallback to en-US in case the xaml rules are not localized (possibly happen on community languages). --> | |
<PropertyGroup Condition="!Exists('$(CommonXamlResourcesDirectory)')"> | |
<CommonXamlResourcesDirectory>$(MSBuildThisFileDirectory)en-US\</CommonXamlResourcesDirectory> | |
</PropertyGroup> | |
<ItemGroup Condition=" '$(DefineCommonItemSchemas)' == 'true' "> | |
<PropertyPageSchema Include="$(CommonXamlResourcesDirectory)ProjectItemsSchema.xaml" /> | |
<PropertyPageSchema Include="
 $(CommonXamlResourcesDirectory)General.xaml;
 $(CommonXamlResourcesDirectory)Debugger_General.xaml"> | |
<Context>Project</Context> | |
</PropertyPageSchema> | |
<PropertyPageSchema Include="$(CommonXamlResourcesDirectory)General.BrowseObject.xaml"> | |
<Context>BrowseObject</Context> | |
</PropertyPageSchema> | |
<PropertyPageSchema Include="$(CommonXamlResourcesDirectory)General_File.xaml"> | |
<Context>File</Context> | |
</PropertyPageSchema> | |
<PropertyPageSchema Include="$(CommonXamlResourcesDirectory)SCC.xaml"> | |
<Context>Invisible</Context> | |
</PropertyPageSchema> | |
<PropertyPageSchema Include="
 $(CommonXamlResourcesDirectory)Folder.xaml;
 $(CommonXamlResourcesDirectory)None.xaml;
 $(CommonXamlResourcesDirectory)Content.xaml;
 $(CommonXamlResourcesDirectory)EmbeddedResource.xaml;
 "> | |
<Context>File;BrowseObject</Context> | |
</PropertyPageSchema> | |
<PropertyPageSchema Include="$(CommonXamlResourcesDirectory)SpecialFolder.xaml;"> | |
<Context>File;ProjectSubscriptionService</Context> | |
</PropertyPageSchema> | |
</ItemGroup> | |
<PropertyGroup> | |
<DefineCommonReferenceSchemas Condition=" '$(DefineCommonReferenceSchemas)' == '' ">$(DefineCommonItemSchemas)</DefineCommonReferenceSchemas> | |
</PropertyGroup> | |
<ItemGroup Condition=" '$(DefineCommonReferenceSchemas)' == 'true' "> | |
<!-- Assembly references --> | |
<PropertyPageSchema Include="$(CommonXamlResourcesDirectory)assemblyreference.xaml"> | |
<Context>;BrowseObject</Context> | |
</PropertyPageSchema> | |
<PropertyPageSchema Include="$(CommonXamlResourcesDirectory)ResolvedAssemblyReference.xaml"> | |
<Context>ProjectSubscriptionService;BrowseObject</Context> | |
</PropertyPageSchema> | |
<!-- COM references --> | |
<PropertyPageSchema Include="$(CommonXamlResourcesDirectory)COMReference.xaml"> | |
<Context>;BrowseObject</Context> | |
</PropertyPageSchema> | |
<PropertyPageSchema Include="$(CommonXamlResourcesDirectory)ResolvedCOMReference.xaml"> | |
<Context>ProjectSubscriptionService;BrowseObject</Context> | |
</PropertyPageSchema> | |
<!-- Project references --> | |
<PropertyPageSchema Include="$(CommonXamlResourcesDirectory)ProjectReference.xaml"> | |
<Context>;BrowseObject</Context> | |
</PropertyPageSchema> | |
<PropertyPageSchema Include="$(CommonXamlResourcesDirectory)ResolvedProjectReference.xaml"> | |
<Context>ProjectSubscriptionService;BrowseObject</Context> | |
</PropertyPageSchema> | |
</ItemGroup> | |
<ItemGroup Condition=" '$(DefineCommonCapabilities)' == 'true' "> | |
<ProjectCapability Include="
 AssemblyReferences;
 COMReferences;
 ProjectReferences;
 SharedProjectReferences;
 OutputGroups;
 AllTargetOutputGroups;
 VisualStudioWellKnownOutputGroups;
 SingleFileGenerators;
 DeclaredSourceItems;
 UserSourceItems;
 " /> | |
<ProjectCapability Condition=" '$(TargetPlatformIdentifier)' == 'Windows' and '$(TargetPlatformVersion)' < 8.0 " Include="BuildWindowsDesktopTarget" /> | |
</ItemGroup> | |
<ItemDefinitionGroup Condition=" '$(DefineExplicitDefaults)' == 'true' "> | |
<None> | |
<CopyToOutputDirectory>Never</CopyToOutputDirectory> | |
</None> | |
<Content> | |
<CopyToOutputDirectory>Never</CopyToOutputDirectory> | |
</Content> | |
<Compile> | |
<CopyToOutputDirectory>Never</CopyToOutputDirectory> | |
</Compile> | |
<EmbeddedResource> | |
<CopyToOutputDirectory>Never</CopyToOutputDirectory> | |
</EmbeddedResource> | |
</ItemDefinitionGroup> | |
<!-- | |
Target that allows targets consuming source control confirmation to establish a dependency on targets producing this information. | |
Any target that reads SourceRevisionId, PrivateRepositoryUrl, SourceRoot, and other source control properties and items | |
should depend on this target and be conditioned on '$(SourceControlInformationFeatureSupported)' == 'true'. | |
SourceRevisionId property uniquely identifies the source control revision of the repository the project belongs to. | |
For Git repositories this id is a commit hash, for TFVC repositories it's the changeset number, etc. | |
PrivateRepositoryUrl property stores the URL of the repository supplied by the CI server or retrieved from source control manager. | |
Targets consuming this property shall not publish its value implicitly as it might inadvertently reveal an internal URL. | |
Instead, they shall only do so if the project sets PublishRepositoryUrl property to true. For example, the NuGet Pack target | |
may include the repository URL in the nuspec file generated for NuGet package produced by the project if PublishRepositoryUrl is true. | |
SourceRoot item group lists all source roots that the project source files reside under and their mapping to source control server URLs, | |
if available. This includes both source files under source control as well as source files in source packages. SourceRoot items are | |
used by compilers to determine path map in deterministic build and by SourceLink provider, which maps local paths to URLs of source files | |
stored on the source control server. | |
Source control information provider that sets these properties and items shall execute before this target (by including | |
InitializeSourceControlInformation in its BeforeTargets) and set source control properties and items that haven't been initialized yet. | |
--> | |
<Target Name="InitializeSourceControlInformation" /> | |
<PropertyGroup> | |
<SourceControlInformationFeatureSupported>true</SourceControlInformationFeatureSupported> | |
</PropertyGroup> | |
<!-- | |
*********************************************************************************************** | |
*********************************************************************************************** | |
Build Section | |
*********************************************************************************************** | |
*********************************************************************************************** | |
--> | |
<Target Name="_AddOutputPathToGlobalPropertiesToRemove"> | |
<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"> | |
<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> | |
<MSBuildInternalMessage Condition=" '$(Prefer32Bit)' == 'true' and '$(PreferNativeArm64)' == 'true' " ResourceName="CommonTarget.Prefer32BitAndPreferNativeArm64Enabled" Severity="Error" /> | |
<MSBuildInternalMessage Condition=" '$(NoWin32Manifest)' == 'true' and '$(PreferNativeArm64)' == 'true' " ResourceName="CommonTarget.NoWin32ManifestAndPreferNativeArm64Enabled" Severity="Error" /> | |
<MSBuildInternalMessage Condition=" '$(PreferNativeArm64)' == 'true' and '$(Platform)' != 'AnyCPU' " ResourceName="CommonTarget.PlatformIsAnyCPUAndPreferNativeArm64Enabled" Severity="Warning" FormatArguments="$(Platform)" /> | |
<!-- | |
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 "MSBuildProjectExtensionsPath" 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 "BaseIntermediateOutputPath" 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 "MSBuildProjectExtensionsPath" instead. To set this property, you must do so before Microsoft.Common.props is imported, for example by using Directory.Build.props. For more information, please visit https://go.microsoft.com/fwlink/?linkid=869650" /> | |
</Target> | |
<!-- | |
============================================================ | |
Build | |
The main build entry point. | |
============================================================ | |
--> | |
<PropertyGroup> | |
<BuildDependsOn> | |
BeforeBuild; | |
CoreBuild; | |
AfterBuild | |
</BuildDependsOn> | |
</PropertyGroup> | |
<Target Name="Build" Condition=" '$(_InvalidConfigurationWarning)' != 'true' " DependsOnTargets="$(BuildDependsOn)" Returns="@(TargetPathWithTargetPlatformMoniker)" /> | |
<!-- | |
============================================================ | |
BeforeBuild | |
Redefine this target in your project in order to run tasks just before Build | |
============================================================ | |
--> | |
<Target Name="BeforeBuild" /> | |
<!-- | |
============================================================ | |
AfterBuild | |
Redefine this target in your project in order to run tasks just after Build | |
============================================================ | |
--> | |
<Target Name="AfterBuild" /> | |
<!-- | |
============================================================ | |
CoreBuild | |
The core build step calls each of the build targets. | |
============================================================ | |
--> | |
<PropertyGroup> | |
<CoreBuildDependsOn> | |
BuildOnlySettings; | |
PrepareForBuild; | |
PreBuildEvent; | |
ResolveReferences; | |
PrepareResources; | |
ResolveKeySource; | |
Compile; | |
ExportWindowsMDFile; | |
UnmanagedUnregistration; | |
GenerateSerializationAssemblies; | |
CreateSatelliteAssemblies; | |
GenerateManifests; | |
GetTargetPath; | |
PrepareForRun; | |
UnmanagedRegistration; | |
IncrementalClean; | |
PostBuildEvent | |
</CoreBuildDependsOn> | |
</PropertyGroup> | |
<Target Name="CoreBuild" DependsOnTargets="$(CoreBuildDependsOn)"> | |
<OnError ExecuteTargets="_TimeStampAfterCompile;PostBuildEvent" Condition="'$(RunPostBuildEvent)'=='Always' or '$(RunPostBuildEvent)'=='OnOutputUpdated'" /> | |
<OnError ExecuteTargets="_CleanRecordFileWrites" /> | |
</Target> | |
<!-- | |
============================================================ | |
Rebuild | |
Delete all intermediate and final build outputs, and then build the project from scratch. | |
============================================================ | |
--> | |
<PropertyGroup> | |
<_ProjectDefaultTargets Condition="'$(MSBuildProjectDefaultTargets)' != ''">$(MSBuildProjectDefaultTargets)</_ProjectDefaultTargets> | |
<_ProjectDefaultTargets Condition="'$(MSBuildProjectDefaultTargets)' == ''">Build</_ProjectDefaultTargets> | |
<RebuildDependsOn> | |
BeforeRebuild; | |
Clean; | |
$(_ProjectDefaultTargets); | |
AfterRebuild; | |
</RebuildDependsOn> | |
<RebuildDependsOn Condition=" '$(MSBuildProjectDefaultTargets)' == 'Rebuild' "> | |
BeforeRebuild; | |
Clean; | |
Build; | |
AfterRebuild; | |
</RebuildDependsOn> | |
</PropertyGroup> | |
<Target Name="Rebuild" Condition=" '$(_InvalidConfigurationWarning)' != 'true' " DependsOnTargets="$(RebuildDependsOn)" Returns="$(TargetPath)" /> | |
<!-- | |
============================================================ | |
BeforeRebuild | |
Redefine this target in your project in order to run tasks just before Rebuild | |
============================================================ | |
--> | |
<Target Name="BeforeRebuild" /> | |
<!-- | |
============================================================ | |
AfterRebuild | |
Redefine this target in your project in order to run tasks just after Rebuild | |
============================================================ | |
--> | |
<Target Name="AfterRebuild" /> | |
<!-- | |
============================================================ | |
BuildGenerateSources | |
Redefine this target in your project in order to run tasks for BuildGenerateSources | |
Set BuildPassReferences to enable P2P builds | |
============================================================ | |
--> | |
<PropertyGroup> | |
<BuildGenerateSourcesAction>Build</BuildGenerateSourcesAction> | |
</PropertyGroup> | |
<Target Name="BuildGenerateSources" DependsOnTargets="BuildGenerateSourcesTraverse;$(BuildGenerateSourcesAction)" /> | |
<Target Name="BuildGenerateSourcesTraverse" DependsOnTargets="PrepareProjectReferences"> | |
<MSBuild Projects="@(_MSBuildProjectReferenceExistent)" Targets="BuildGenerateSources" BuildInParallel="$(BuildInParallel)" Properties="%(_MSBuildProjectReferenceExistent.SetConfiguration); %(_MSBuildProjectReferenceExistent.SetPlatform); %(_MSBuildProjectReferenceExistent.SetTargetFramework);" Condition="'$(BuildPassReferences)' == 'true' and '@(ProjectReferenceWithConfiguration)' != '' and '@(_MSBuildProjectReferenceExistent)' != '' and '%(_MSBuildProjectReferenceExistent.BuildReference)' == 'true'" ContinueOnError="!$(BuildingProject)" RemoveProperties="%(_MSBuildProjectReferenceExistent.GlobalPropertiesToRemove)$(_GlobalPropertiesToRemoveFromProjectReferences)" /> | |
</Target> | |
<ItemGroup Condition="'$(IsGraphBuild)' == 'true' and '$(BuildPassReferences)' == 'true'"> | |
<ProjectReferenceTargets Include="BuildGenerateSources" Targets="BuildGenerateSources" /> | |
</ItemGroup> | |
<!-- | |
============================================================ | |
BuildCompile | |
Redefine this target in your project in order to run tasks for BuildCompile | |
============================================================ | |
--> | |
<PropertyGroup> | |
<BuildCompileAction>Build</BuildCompileAction> | |
</PropertyGroup> | |
<Target Name="BuildCompile" DependsOnTargets="BuildCompileTraverse;$(BuildCompileAction)" /> | |
<Target Name="BuildCompileTraverse" DependsOnTargets="PrepareProjectReferences"> | |
<MSBuild Projects="@(_MSBuildProjectReferenceExistent)" Targets="BuildCompile" BuildInParallel="$(BuildInParallel)" Properties="%(_MSBuildProjectReferenceExistent.SetConfiguration); %(_MSBuildProjectReferenceExistent.SetPlatform); %(_MSBuildProjectReferenceExistent.SetTargetFramework)" Condition="'$(BuildPassReferences)' == 'true' and '@(ProjectReferenceWithConfiguration)' != '' and '@(_MSBuildProjectReferenceExistent)' != '' and '%(_MSBuildProjectReferenceExistent.BuildReference)' == 'true'" ContinueOnError="!$(BuildingProject)" RemoveProperties="%(_MSBuildProjectReferenceExistent.GlobalPropertiesToRemove)$(_GlobalPropertiesToRemoveFromProjectReferences)" /> | |
</Target> | |
<ItemGroup Condition="'$(IsGraphBuild)' == 'true' and '$(BuildPassReferences)' == 'true'"> | |
<ProjectReferenceTargets Include="BuildCompile" Targets="BuildCompile" /> | |
</ItemGroup> | |
<!-- | |
============================================================ | |
BuildLink | |
Redefine this target in your project in order to run tasks for BuildLink | |
============================================================ | |
--> | |
<PropertyGroup> | |
<BuildLinkAction>Build</BuildLinkAction> | |
</PropertyGroup> | |
<Target Name="BuildLink" DependsOnTargets="BuildLinkTraverse;$(BuildLinkAction)" /> | |
<Target Name="BuildLinkTraverse" DependsOnTargets="PrepareProjectReferences"> | |
<MSBuild Projects="@(_MSBuildProjectReferenceExistent)" Targets="BuildLink" BuildInParallel="$(BuildInParallel)" Properties="%(_MSBuildProjectReferenceExistent.SetConfiguration); %(_MSBuildProjectReferenceExistent.SetPlatform); %(_MSBuildProjectReferenceExistent.SetTargetFramework)" Condition="'$(BuildPassReferences)' == 'true' and '@(ProjectReferenceWithConfiguration)' != '' and '@(_MSBuildProjectReferenceExistent)' != '' and '%(_MSBuildProjectReferenceExistent.BuildReference)' == 'true'" ContinueOnError="!$(BuildingProject)" RemoveProperties="%(_MSBuildProjectReferenceExistent.GlobalPropertiesToRemove)$(_GlobalPropertiesToRemoveFromProjectReferences)" /> | |
</Target> | |
<ItemGroup Condition="'$(IsGraphBuild)' == 'true' and '$(BuildPassReferences)' == 'true'"> | |
<ProjectReferenceTargets Include="BuildLink" Targets="BuildLink" /> | |
</ItemGroup> | |
<!-- | |
============================================================ | |
CopyRunEnvironmentFiles | |
Copy environment files necessary to run the user's app to the final directory. | |
This is a public target that can be invoked by an IDE. | |
This may be used by an IDE to make the app.config file available for running | |
the target app. | |
============================================================ | |
--> | |
<Target Name="CopyRunEnvironmentFiles" DependsOnTargets="PrepareForBuild;SetWin32ManifestProperties;_CopyAppConfigFile;_CleanRecordFileWrites" /> | |
<!-- | |
============================================================ | |
Run | |
Run the final build output if it is a .EXE | |
============================================================ | |
--> | |
<PropertyGroup> | |
<RunDependsOn /> | |
</PropertyGroup> | |
<Target Name="Run" DependsOnTargets="$(RunDependsOn)"> | |
<Error Text="Cannot run '$(TargetPath)' because project output type is not '.exe'" Condition="'$(TargetExt)'!='.exe'" /> | |
<Exec Command="$(TargetPath) $(StartArguments)" WorkingDirectory="$(OutDir)" Condition=" '$(StartWorkingDirectory)' == '' " /> | |
<Exec Command="$(TargetPath) $(StartArguments)" WorkingDirectory="$(StartWorkingDirectory)" Condition=" '$(StartWorkingDirectory)' != '' " /> | |
</Target> | |
<!-- | |
*********************************************************************************************** | |
*********************************************************************************************** | |
BuildOnlySettings Section | |
*********************************************************************************************** | |
*********************************************************************************************** | |
--> | |
<!-- | |
============================================================ | |
BuildOnlySettings | |
This target is called only when doing a real build. It is specifically not called during project load. | |
============================================================ | |
--> | |
<PropertyGroup> | |
<BuildingProject>false</BuildingProject> | |
</PropertyGroup> | |
<Target Name="BuildOnlySettings"> | |
<PropertyGroup> | |
<BuildingProject>true</BuildingProject> | |
</PropertyGroup> | |
</Target> | |
<!-- | |
*********************************************************************************************** | |
*********************************************************************************************** | |
PrepareForBuild Section | |
*********************************************************************************************** | |
*********************************************************************************************** | |
--> | |
<!-- | |
============================================================ | |
PrepareForBuild | |
Prepare the prerequisites for building. | |
============================================================ | |
--> | |
<PropertyGroup> | |
<PrepareForBuildDependsOn>$(PrepareForBuildDependsOn);GetFrameworkPaths;GetReferenceAssemblyPaths;AssignLinkMetadata</PrepareForBuildDependsOn> | |
</PropertyGroup> | |
<Target Name="PrepareForBuild" DependsOnTargets="$(PrepareForBuildDependsOn)"> | |
<ItemGroup> | |
<AppConfigWithTargetPath Include="$(AppConfig)" Condition="'$(AppConfig)'!=''"> | |
<TargetPath>$(TargetFileName).config</TargetPath> | |
</AppConfigWithTargetPath> | |
</ItemGroup> | |
<FindAppConfigFile PrimaryList="@(None)" SecondaryList="@(Content)" TargetPath="$(TargetFileName).config" Condition="'$(AppConfig)'==''"> | |
<Output TaskParameter="AppConfigFile" ItemName="AppConfigWithTargetPath" /> | |
<Output TaskParameter="AppConfigFile" PropertyName="AppConfig" /> | |
</FindAppConfigFile> | |
<!-- Create the directories for intermediate and final build products, and any other arbitrary directories. --> | |
<!-- We are going to continue on error here so that if the tree is read only we will still get intellisense --> | |
<MakeDir Directories="$(OutDir);$(IntermediateOutputPath);@(DocFileItem->'%(RelativeDir)');@(CreateDirectory)" ContinueOnError="true" /> | |
</Target> | |
<!-- | |
============================================================ | |
GetFrameworkPaths | |
Get the paths for the .NET Framework installation directory | |
These paths are not used directly by this .targets file but are available for pre and | |
post build steps. | |
============================================================ | |
--> | |
<PropertyGroup> | |
<Framework40Dir>@(_TargetFramework40DirectoryItem)</Framework40Dir> | |
<Framework35Dir>@(_TargetFramework35DirectoryItem)</Framework35Dir> | |
<Framework30Dir>@(_TargetFramework30DirectoryItem)</Framework30Dir> | |
<Framework20Dir>@(_TargetFramework20DirectoryItem)</Framework20Dir> | |
<!-- Note we need to make the 4.0 FrameworkDir point to the 2.0 location by default since we shipped msbuild 4.0 that way and to change it would be a breaking change.--> | |
<FrameworkDir Condition="'$(FrameworkDir)' == '' and ('$(TargetFrameworkVersion)' == 'v2.0' or '$(TargetFrameworkVersion)' == 'v3.5' or '$(TargetFrameworkVersion)' == 'v4.0')">@(_TargetFramework20DirectoryItem)</FrameworkDir> | |
<FrameworkDir Condition="'$(FrameworkDir)' == ''">@(_TargetFramework40DirectoryItem)</FrameworkDir> | |
<TargetedFrameworkDir Condition="'$(TargetedFrameworkDir)' == ''">@(_TargetedFrameworkDirectoryItem)</TargetedFrameworkDir> | |
<FrameworkSDKDir Condition="'$(FrameworkSDKDir)' == ''">@(_TargetFrameworkSDKDirectoryItem)</FrameworkSDKDir> | |
<GetFrameworkPathsDependsOn /> | |
</PropertyGroup> | |
<!-- This is a generally overriden target, for example it is overriden in the Microsoft.NETFramework.targets file --> | |
<Target Name="GetFrameworkPaths" /> | |
<!-- | |
============================================================ | |
GetReferenceAssemblyPaths | |
Get the paths for the Reference Assemblies for the known versions of the | |
.NET Framework. | |
These paths are used by the build process in order to resolve the correct | |
assemblies from the various directories, and to support multi-targeting | |
============================================================ | |
--> | |
<Target Name="GetReferenceAssemblyPaths" DependsOnTargets="$(GetReferenceAssemblyPathsDependsOn);GetFrameworkPaths"> | |
<!-- if TargetFrameworkDirectory doesn't have a custom value, clear it out; that way we can get reference paths and target framework directories all in the right order --> | |
<PropertyGroup> | |
<TargetFrameworkDirectory Condition="'@(_CombinedTargetFrameworkDirectoriesItem)' == '$(TargetFrameworkDirectory)'" /> | |
</PropertyGroup> | |
<!-- By default if there is no root path set then the task will assume it is Program Files\Reference Assemblies\Microsoft\Framework--> | |
<GetReferenceAssemblyPaths Condition="'$(TargetFrameworkMoniker)' != '' and ('$(_TargetFrameworkDirectories)' == '' or '$(_FullFrameworkReferenceAssemblyPaths)' == '')" TargetFrameworkMoniker="$(TargetFrameworkMoniker)" RootPath="$(TargetFrameworkRootPath)" TargetFrameworkFallbackSearchPaths="$(TargetFrameworkFallbackSearchPaths)" BypassFrameworkInstallChecks="$(BypassFrameworkInstallChecks)" ContinueOnError="!$(BuildingProject)"> | |
<Output TaskParameter="ReferenceAssemblyPaths" PropertyName="_TargetFrameworkDirectories" /> | |
<Output TaskParameter="FullFrameworkReferenceAssemblyPaths" PropertyName="_FullFrameworkReferenceAssemblyPaths" /> | |
<Output TaskParameter="TargetFrameworkMonikerDisplayName" PropertyName="TargetFrameworkMonikerDisplayName" Condition="'$(TargetFrameworkMonikerDisplayName)' == ''" /> | |
</GetReferenceAssemblyPaths> | |
<PropertyGroup> | |
<TargetFrameworkDirectory>$(_TargetFrameworkDirectories);$(TargetFrameworkDirectory);$(WinFXAssemblyDirectory)</TargetFrameworkDirectory> | |
<TargetFrameworkDirectory Condition="'$(TargetPlatformWinMDLocation)' != '' and Exists('$(TargetPlatformWinMDLocation)')">$(TargetFrameworkDirectory);$(TargetPlatformWinMDLocation)</TargetFrameworkDirectory> | |
</PropertyGroup> | |
<!-- Remove the AssemblyFolders if no target framework directories could be found. This is to prevent us from | |
resolving from the assemblyfolders global location if we are not acutally targeting a framework--> | |
<PropertyGroup> | |
<RemoveAssemblyFoldersIfNoTargetFramework Condition="'$(RemoveAssemblyFoldersIfNoTargetFramework)' == ''">true</RemoveAssemblyFoldersIfNoTargetFramework> | |
</PropertyGroup> | |
<PropertyGroup Condition="'$(_TargetFrameworkDirectories)' == '' and '$(AssemblySearchPaths)' != '' and '$(RemoveAssemblyFoldersIfNoTargetFramework)' == 'true'"> | |
<AssemblySearchPaths>$(AssemblySearchPaths.Replace('{AssemblyFolders}', '').Split(';'))</AssemblySearchPaths> | |
</PropertyGroup> | |
<ItemGroup Condition="'$(ImplicitlyExpandDesignTimeFacades)' == 'true'"> | |
<DesignTimeFacadeDirectoryRoots Include="$(TargetFrameworkDirectory)" /> | |
<DesignTimeFacadeDirectories Include="%(DesignTimeFacadeDirectoryRoots.Identity)Facades\" Condition="Exists('%(DesignTimeFacadeDirectoryRoots.Identity)Facades\')" /> | |
</ItemGroup> | |
<PropertyGroup Condition="'@(DesignTimeFacadeDirectories)' != ''"> | |
<TargetFrameworkDirectory>$(TargetFrameworkDirectory);@(DesignTimeFacadeDirectories)</TargetFrameworkDirectory> | |
</PropertyGroup> | |
<PropertyGroup Condition="'$(_TargetFrameworkDirectories)' == ''"> | |
<TargetFrameworkProfile /> | |
</PropertyGroup> | |
</Target> | |
<!-- Returns target framework moniker. E.g. ".NETFramework,Version=v4.0.1" --> | |
<Target Name="GetTargetFrameworkMoniker" Returns="$(TargetFrameworkMoniker)" /> | |
<!-- Returns target framework moniker display name. E.g. ".NET Framework 4 Platform Update 1 (KB2478063)" --> | |
<Target Name="GetTargetFrameworkMonikerDisplayName" DependsOnTargets="GetFrameworkPaths;GetReferenceAssemblyPaths" Returns="$(TargetFrameworkMonikerDisplayName)" /> | |
<!-- Returns semicolon separated list of target framework directories. | |
E.g "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0.1\;C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\" --> | |
<Target Name="GetTargetFrameworkDirectories" DependsOnTargets="GetFrameworkPaths;GetReferenceAssemblyPaths" Returns="$(TargetFrameworkDirectory)" /> | |
<!-- | |
============================================================ | |
AssignLinkMetadata | |
For items of a certain set of allowlisted types, make sure that | |
if they are defined in a file other than the project file, that | |
they have "Link" metadata set to an appropriate default. | |
============================================================ | |
--> | |
<Target Name="AssignLinkMetadata" Condition=" '$(SynthesizeLinkMetadata)' == 'true' "> | |
<!-- NONE ITEMS --> | |
<AssignLinkMetadata Items="@(None)" Condition="'@(None)' != '' and '%(None.DefiningProjectFullPath)' != '$(MSBuildProjectFullPath)'"> | |
<Output TaskParameter="OutputItems" ItemName="_Temp" /> | |
</AssignLinkMetadata> | |
<ItemGroup> | |
<None Remove="@(_Temp)" /> | |
<None Include="@(_Temp)" /> | |
<_Temp Remove="@(_Temp)" /> | |
</ItemGroup> | |
<!-- CONTENT ITEMS --> | |
<AssignLinkMetadata Items="@(Content)" Condition="'@(Content)' != '' and '%(Content.DefiningProjectFullPath)' != '$(MSBuildProjectFullPath)'"> | |
<Output TaskParameter="OutputItems" ItemName="_Temp" /> | |
</AssignLinkMetadata> | |
<ItemGroup> | |
<Content Remove="@(_Temp)" /> | |
<Content Include="@(_Temp)" /> | |
<_Temp Remove="@(_Temp)" /> | |
</ItemGroup> | |
<!-- PAGE ITEMS --> | |
<AssignLinkMetadata Items="@(Page)" Condition="'@(Page)' != '' and '%(Page.DefiningProjectFullPath)' != '$(MSBuildProjectFullPath)'"> | |
<Output TaskParameter="OutputItems" ItemName="_Temp" /> | |
</AssignLinkMetadata> | |
<ItemGroup> | |
<Page Remove="@(_Temp)" /> | |
<Page Include="@(_Temp)" /> | |
<_Temp Remove="@(_Temp)" /> | |
</ItemGroup> | |
<!-- APPLICATIONDEFINITION ITEMS --> | |
<AssignLinkMetadata Items="@(ApplicationDefinition)" Condition="'@(ApplicationDefinition)' != '' and '%(ApplicationDefinition.DefiningProjectFullPath)' != '$(MSBuildProjectFullPath)'"> | |
<Output TaskParameter="OutputItems" ItemName="_Temp" /> | |
</AssignLinkMetadata> | |
<ItemGroup> | |
<ApplicationDefinition Remove="@(_Temp)" /> | |
<ApplicationDefinition Include="@(_Temp)" /> | |
<_Temp Remove="@(_Temp)" /> | |
</ItemGroup> | |
<!-- EMBEDDEDRESOURCE ITEMS --> | |
<AssignLinkMetadata Items="@(EmbeddedResource)" Condition="'@(EmbeddedResource)' != '' and '%(EmbeddedResource.DefiningProjectFullPath)' != '$(MSBuildProjectFullPath)'"> | |
<Output TaskParameter="OutputItems" ItemName="_Temp" /> | |
</AssignLinkMetadata> | |
<ItemGroup> | |
<EmbeddedResource Remove="@(_Temp)" /> | |
<EmbeddedResource Include="@(_Temp)" /> | |
<_Temp Remove="@(_Temp)" /> | |
</ItemGroup> | |
<!-- RESOURCE ITEMS --> | |
<AssignLinkMetadata Items="@(Resource)" Condition="'@(Resource)' != '' and '%(Resource.DefiningProjectFullPath)' != '$(MSBuildProjectFullPath)' and $([MSBuild]::AreFeaturesEnabled('17.10'))"> | |
<Output TaskParameter="OutputItems" ItemName="_Temp" /> | |
</AssignLinkMetadata> | |
<ItemGroup Condition="$([MSBuild]::AreFeaturesEnabled('17.10'))"> | |
<Resource Remove="@(_Temp)" /> | |
<Resource Include="@(_Temp)" /> | |
<_Temp Remove="@(_Temp)" /> | |
</ItemGroup> | |
</Target> | |
<!-- | |
*********************************************************************************************** | |
*********************************************************************************************** | |
PreBuildEvent Section | |
*********************************************************************************************** | |
*********************************************************************************************** | |
--> | |
<!-- | |
============================================================ | |
PreBuildEvent | |
Run the pre-build event if there is one. | |
============================================================ | |
--> | |
<PropertyGroup> | |
<PreBuildEventDependsOn /> | |
</PropertyGroup> | |
<Target Name="PreBuildEvent" Condition="'$(PreBuildEvent)'!=''" DependsOnTargets="$(PreBuildEventDependsOn)"> | |
<Exec WorkingDirectory="$(OutDir)" Command="$(PreBuildEvent)" /> | |
</Target> | |
<!-- | |
*********************************************************************************************** | |
*********************************************************************************************** | |
UnmanagedUnregistration Section | |
*********************************************************************************************** | |
*********************************************************************************************** | |
--> | |
<!-- | |
============================================================ | |
UnmanagedUnregistration | |
If the main assembly had previously been registered for COM interop, unregister it now. | |
We will re-register the new version after it has been built. | |
============================================================ | |
--> | |
<PropertyGroup> | |
<UnmanagedUnregistrationDependsOn /> | |
</PropertyGroup> | |
<Target Name="UnmanagedUnregistration" Condition="(('$(_AssemblyTimestampBeforeCompile)' != '$(_AssemblyTimestampAfterCompile)' or '$(RegisterForComInterop)' != 'true' or '$(OutputType)' != 'library') or
 ('$(_AssemblyTimestampBeforeCompile)' == '')) and
 Exists('@(_UnmanagedRegistrationCache)')" DependsOnTargets="$(UnmanagedUnregistrationDependsOn)"> | |
<PropertyGroup> | |
<UnregisterAssemblyMSBuildArchitecture Condition="'$(UnregisterAssemblyMSBuildArchitecture)' == ''">$(PlatformTargetAsMSBuildArchitecture)</UnregisterAssemblyMSBuildArchitecture> | |
</PropertyGroup> | |
<PropertyGroup Condition="'$(TargetFrameworkAsMSBuildRuntime)' != '' and '$(UnregisterAssemblyMSBuildArchitecture)' != ''"> | |
<!-- Falling back to the current runtime if we are targeting CLR2 and the task host doesn't exist will lead to | |
incorrect behavior in some cases, but it's the same incorrect behavior as Visual Studio 2010, and thus better | |
than causing build breaks on upgrade to Win8 the way not doing so would. For more details, see the | |
corresponding comment in GenerateResource. --> | |
<UnregisterAssemblyMSBuildRuntime Condition="'$(UnregisterAssemblyMSBuildRuntime)' == '' and
 $([MSBuild]::DoesTaskHostExist(`$(TargetFrameworkAsMSBuildRuntime)`, `$(UnregisterAssemblyMSBuildArchitecture)`))">$(TargetFrameworkAsMSBuildRuntime)</UnregisterAssemblyMSBuildRuntime> | |
<!-- If the targeted runtime doesn't exist, fall back to current --> | |
<UnregisterAssemblyMSBuildRuntime Condition="'$(UnregisterAssemblyMSBuildRuntime)' == ''">CurrentRuntime</UnregisterAssemblyMSBuildRuntime> | |
</PropertyGroup> | |
<UnregisterAssembly AssemblyListFile="@(_UnmanagedRegistrationCache)" MSBuildArchitecture="$(UnregisterAssemblyMSBuildArchitecture)" MSBuildRuntime="$(UnregisterAssemblyMSBuildRuntime)" /> | |
</Target> | |
<!-- | |
*********************************************************************************************** | |
*********************************************************************************************** | |
ResolveReferences Section | |
*********************************************************************************************** | |
*********************************************************************************************** | |
--> | |
<!-- | |
============================================================ | |
GetTargetFrameworkVersion | |
This stand-alone target returns the target framework version (i.e. v3.5, v4.0, etc.) | |
that would be used if we built this project. | |
============================================================ | |
--> | |
<Target Name="GetTargetFrameworkVersion" Returns="$(TargetFrameworkVersion)" /> | |
<!-- | |
============================================================ | |
ResolveReferences | |
============================================================ | |
--> | |
<PropertyGroup> | |
<ResolveReferencesDependsOn> | |
BeforeResolveReferences; | |
AssignProjectConfiguration; | |
ResolveProjectReferences; | |
FindInvalidProjectReferences; | |
ResolveNativeReferences; | |
ResolveAssemblyReferences; | |
GenerateBindingRedirects; | |
GenerateBindingRedirectsUpdateAppConfig; | |
ResolveComReferences; | |
AfterResolveReferences | |
</ResolveReferencesDependsOn> | |
</PropertyGroup> | |
<Target Name="ResolveReferences" Returns="@(ReferencePath)" DependsOnTargets="$(ResolveReferencesDependsOn)" /> | |
<!-- | |
============================================================ | |
BeforeResolveReferences | |
Redefine this target in your project in order to run tasks just before ResolveReferences | |
============================================================ | |
--> | |
<Target Name="BeforeResolveReferences" /> | |
<!-- | |
============================================================ | |
AfterResolveReferences | |
Redefine this target in your project in order to run tasks just after ResolveReferences | |
============================================================ | |
--> | |
<Target Name="AfterResolveReferences" /> | |
<!-- | |
============================================================ | |
IgnoreJavaScriptOutputAssembly | |
esproj are JavaScript or TypeScript Projects that never produce an assembly. | |
Set ReferenceOutputAssembly to false in any reference to an esproj. | |
============================================================ | |
--> | |
<Target Name="IgnoreJavaScriptOutputAssembly" BeforeTargets="AssignProjectConfiguration" Condition="$([MSBuild]::AreFeaturesEnabled('17.8'))"> | |
<ItemGroup> | |
<ProjectReference Condition="'%(ProjectReference.Extension)' == '.esproj' and '%(ProjectReference.ReferenceOutputAssembly)' == ''"> | |
<ReferenceOutputAssembly>false</ReferenceOutputAssembly> | |
</ProjectReference> | |
</ItemGroup> | |
</Target> | |
<!-- | |
============================================================ | |
AssignProjectConfiguration | |
Assigns the appropriate configuration to each project in the list of project references passed in. | |
Adds to the project references passed in any project references implied by dependencies expressed in the solution file, if any. | |
[IN] | |
@(ProjectReference) - the list of all project references | |
[OUT] | |
@(ProjectReferenceWithConfiguration) - the list of project references (MSBuild and potentially VSIP projects) | |
with metadata values FullConfiguration, Configuration, Platform, | |
SetConfiguration, and SetPlatform | |
============================================================ | |
--> | |
<Target Name="AssignProjectConfiguration" Condition="'$(CurrentSolutionConfigurationContents)' != '' or '@(ProjectReference)'!=''"> | |
<PropertyGroup> | |
<OnlyReferenceAndBuildProjectsEnabledInSolutionConfiguration Condition="'$(OnlyReferenceAndBuildProjectsEnabledInSolutionConfiguration)' == ''">true</OnlyReferenceAndBuildProjectsEnabledInSolutionConfiguration> | |
<ShouldUnsetParentConfigurationAndPlatform Condition="'$(ShouldUnsetParentConfigurationAndPlatform)' == '' and ('$(BuildingInsideVisualStudio)' == 'true' or '$(BuildingSolutionFile)' == 'true')">true</ShouldUnsetParentConfigurationAndPlatform> | |
<ShouldUnsetParentConfigurationAndPlatform Condition="'$(ShouldUnsetParentConfigurationAndPlatform)' == ''">false</ShouldUnsetParentConfigurationAndPlatform> | |
<!-- Web Application projects can "secretly" reference Silverlight projects, which can take project dependencies on that same Web Application. If the project | |
dependencies are promoted to project references, this ends up creating a situation where we have a circular reference between the two projects. We don't | |
want this to happen, so just turn off synthetic project reference generation for Silverlight projects. --> | |
<AddSyntheticProjectReferencesForSolutionDependencies Condition="'$(AddSyntheticProjectReferencesForSolutionDependencies)' == '' and '$(TargetFrameworkIdentifier)' == 'Silverlight'">false</AddSyntheticProjectReferencesForSolutionDependencies> | |
<!-- Inside VS, we do not need to add synthetic references, as VS already organizes the build per any solution-level dependencies; we only do this on the command line--> | |
<AddSyntheticProjectReferencesForSolutionDependencies Condition="'$(AddSyntheticProjectReferencesForSolutionDependencies)' == '' and '$(BuildingInsideVisualStudio)' != 'true'">true</AddSyntheticProjectReferencesForSolutionDependencies> | |
</PropertyGroup> | |
<!-- Assign a project configuration to each project reference if we're building a solution file. --> | |
<AssignProjectConfiguration ProjectReferences="@(ProjectReference)" CurrentProject="$(MSBuildProjectFullPath)" CurrentProjectConfiguration="$(Configuration)" CurrentProjectPlatform="$(Platform)" DefaultToVcxPlatformMapping="$(DefaultToVcxPlatformMapping)" VcxToDefaultPlatformMapping="$(VcxToDefaultPlatformMapping)" OutputType="$(OutputType)" ResolveConfigurationPlatformUsingMappings="false" SolutionConfigurationContents="$(CurrentSolutionConfigurationContents)" AddSyntheticProjectReferencesForSolutionDependencies="$(AddSyntheticProjectReferencesForSolutionDependencies)" OnlyReferenceAndBuildProjectsEnabledInSolutionConfiguration="$(OnlyReferenceAndBuildProjectsEnabledInSolutionConfiguration)" ShouldUnsetParentConfigurationAndPlatform="$(ShouldUnsetParentConfigurationAndPlatform)"> | |
<!-- EMITTED FOR COMPATIBILITY REASONS ONLY. CONSUME PROJECTREFERENCEWITHCONFIGURATION INSTEAD --> | |
<Output TaskParameter="AssignedProjects" ItemName="_ProjectReferenceWithConfiguration" /> | |
<Output TaskParameter="UnassignedProjects" ItemName="_ProjectReferenceWithConfiguration" /> | |
<Output TaskParameter="AssignedProjects" ItemName="ProjectReferenceWithConfiguration" /> | |
<Output TaskParameter="UnassignedProjects" ItemName="ProjectReferenceWithConfiguration" /> | |
</AssignProjectConfiguration> | |
<ItemGroup> | |
<_ProjectReferenceWithConfiguration> | |
<BuildReference Condition="'%(_ProjectReferenceWithConfiguration.BuildReference)' == ''">true</BuildReference> | |
<ReferenceOutputAssembly Condition="'%(_ProjectReferenceWithConfiguration.ReferenceOutputAssembly)' == ''">true</ReferenceOutputAssembly> | |
</_ProjectReferenceWithConfiguration> | |
<ProjectReferenceWithConfiguration> | |
<BuildReference Condition="'%(ProjectReferenceWithConfiguration.BuildReference)' == ''">true</BuildReference> | |
<ReferenceOutputAssembly Condition="'%(ProjectReferenceWithConfiguration.ReferenceOutputAssembly)' == ''">true</ReferenceOutputAssembly> | |
</ProjectReferenceWithConfiguration> | |
</ItemGroup> | |
</Target> | |
<!-- | |
============================================================ | |
_SplitProjectReferencesByFileExistence | |
Split referenced projects into two lists: those that exist on | |
disk and those that don't. | |
============================================================ | |
--> | |
<Target Name="_SplitProjectReferencesByFileExistence"> | |
<!-- | |
Use this task for matching projects with pre-resolved project outputs set by the IDE | |
if building inside the IDE. The IDE only includes non-MSBuild projects in the output list. We'll | |
use MSBuild to resolve MSBuild projects. | |
This task will resolve VSIP (3rd party) project references and create a new item list with only project references | |
to projects in the MSBuild format. | |
--> | |
<ResolveNonMSBuildProjectOutput ProjectReferences="@(ProjectReferenceWithConfiguration)" PreresolvedProjectOutputs="$(VSIDEResolvedNonMSBuildProjectOutputs)" Condition="'$(BuildingInsideVisualStudio)'=='true' and '@(ProjectReferenceWithConfiguration)'!=''"> | |
<Output TaskParameter="ResolvedOutputPaths" ItemName="_ResolvedProjectReferencePaths" /> | |
<Output TaskParameter="UnresolvedProjectReferences" ItemName="_MSBuildProjectReference" /> | |
</ResolveNonMSBuildProjectOutput> | |
<!-- | |
If building from the command line, simply copy the ProjectReferenceWithConfiguration item list to _MSBuildProjectReference, | |
since we have to assume all projects are in the MSBuild format. We have no way of building | |
VSIP (3rd party) projects from the command line. | |
--> | |
<ItemGroup> | |
<_MSBuildProjectReference Include="@(ProjectReferenceWithConfiguration)" Condition="'$(BuildingInsideVisualStudio)'!='true' and '@(ProjectReferenceWithConfiguration)'!=''" /> | |
</ItemGroup> | |
<!-- Break the project list into two lists: those that exist on disk and those that don't. --> | |
<ItemGroup> | |
<_MSBuildProjectReferenceExistent Include="@(_MSBuildProjectReference)" Condition="Exists('%(Identity)')" /> | |
<_MSBuildProjectReferenceNonexistent Include="@(_MSBuildProjectReference)" Condition="!Exists('%(Identity)')" /> | |
</ItemGroup> | |
</Target> | |
<!-- | |
==================================================================================== | |
_GetProjectReferencePlatformProperties | |
If a project is opted in via $(EnableDynamicPlatformResolution), this target calls the | |
GetCompatiblePlatform task on all ProjectReference items to determine the most compatible | |
platform for each project. It then sets SetPlatform metadata on each ProjectReference. | |
This prevents overbuilding a project when 'AnyCPU' is available. | |
====================================================================================== | |
--> | |
<PropertyGroup> | |
<UseDefaultPlatformLookupTables Condition="'$(UseDefaultPlatformLookupTables)' == ''">true</UseDefaultPlatformLookupTables> | |
</PropertyGroup> | |
<!-- This target skips sln-based builds because they already supply Platform and | |
Configuration information. See AssignProjectConfiguration --> | |
<Target Name="_GetProjectReferencePlatformProperties" Condition="'$(EnableDynamicPlatformResolution)' == 'true'
 and '@(_MSBuildProjectReferenceExistent)' != ''"> | |
<!-- Allow preset SetPlatform to override this operation --> | |
<ItemGroup> | |
<_MSBuildProjectReferenceExistent Condition="'%(_MSBuildProjectReferenceExistent.SetPlatform)' != ''"> | |
<SkipGetPlatformProperties>true</SkipGetPlatformProperties> | |
</_MSBuildProjectReferenceExistent> | |
</ItemGroup> | |
<ItemGroup> | |
<_ProjectReferencePlatformPossibilities Include="@(_MSBuildProjectReferenceExistent)" Condition="'%(_MSBuildProjectReferenceExistent.SkipGetPlatformProperties)' != 'true'" /> | |
</ItemGroup> | |
<!-- Assign default PlatformLookupTables when doing Managed <-> Unmanaged hops --> | |
<ItemGroup> | |
<!-- If we're looking at a c++ project from a managed project, map managed platforms to native platforms. --> | |
<_ProjectReferencePlatformPossibilities Condition="'$(MSBuildProjectExtension)' != '.vcxproj' and '$(MSBuildProjectExtension)' != '.nativeproj' and '%(_ProjectReferencePlatformPossibilities.IsVcxOrNativeProj)' == 'true'"> | |
<!-- Taken from https://docs.microsoft.com/visualstudio/msbuild/assignprojectconfiguration-task --> | |
<PlatformLookupTable Condition="'$(UseDefaultPlatformLookupTables)' == 'true' and '$(PlatformLookupTable)' == ''">x86=Win32</PlatformLookupTable> | |
</_ProjectReferencePlatformPossibilities> | |
<!-- If we're looking at a managed project from a cpp project, map native to managed platforms. --> | |
<_ProjectReferencePlatformPossibilities Condition="('$(MSBuildProjectExtension)' == '.vcxproj' or '$(MSBuildProjectExtension)' == '.nativeproj') and '%(_ProjectReferencePlatformPossibilities.IsVcxOrNativeProj)' != 'true'"> | |
<PlatformLookupTable Condition="'$(UseDefaultPlatformLookupTables)' == 'true' and '$(PlatformLookupTable)' == ''">Win32=x86</PlatformLookupTable> | |
</_ProjectReferencePlatformPossibilities> | |
</ItemGroup> | |
<GetCompatiblePlatform AnnotatedProjects="@(_ProjectReferencePlatformPossibilities)" CurrentProjectPlatform="$(Platform)" PlatformLookupTable="$(PlatformLookupTable)" Condition="'@(_ProjectReferencePlatformPossibilities)' != ''"> | |
<Output ItemName="_ProjectsWithPlatformAssignment" TaskParameter="AssignedProjectsWithPlatform" /> | |
</GetCompatiblePlatform> | |
<!-- If GetCompatiblePlatform didn't run, @(ProjectsWithPlatformAssignment) will be empty. | |
Don't do anything in this case. Ex: A project references many projects | |
that can't multiplatform. --> | |
<ItemGroup Condition="'@(_ProjectsWithPlatformAssignment)' != ''"> | |
<ProjectsWithNearestPlatform Include="@(_ProjectsWithPlatformAssignment)" /> | |
<ProjectsWithNearestPlatform Condition="'@(ProjectsWithNearestPlatform)' == '%(Identity)' and '%(ProjectsWithNearestPlatform.NearestPlatform)' != ''"> | |
<SetPlatform>Platform=%(ProjectsWithNearestPlatform.NearestPlatform)</SetPlatform> | |
</ProjectsWithNearestPlatform> | |
<!-- When GetCompatiblePlatform fails to assign NearestPlatform (or determines it's identical to default for the referenced project), undefine Platform and let that project build "on its own" --> | |
<ProjectsWithNearestPlatform Condition="'@(ProjectsWithNearestPlatform)' == '%(Identity)' and '%(ProjectsWithNearestPlatform.NearestPlatform)' == ''"> | |
<UndefineProperties>%(ProjectsWithNearestPlatform.UndefineProperties);Platform</UndefineProperties> | |
</ProjectsWithNearestPlatform> | |
<_MSBuildProjectReferenceExistent Remove="@(_MSBuildProjectReferenceExistent)" Condition="'%(_MSBuildProjectReferenceExistent.SkipGetPlatformProperties)' != 'true'" /> | |
<_MSBuildProjectReferenceExistent Include="@(ProjectsWithNearestPlatform)" /> | |
</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"> | |
<!-- | |
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')"> | |
<!-- | |
Platform negotiation requires the MSBuild task call to GetTargetFrameworks. | |
Don't skip when opted into the feature. | |
--> | |
<SkipGetTargetFrameworkProperties Condition="'$(EnableDynamicPlatformResolution)' != 'true'">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)' != ''"> | |
<!-- | |
Platform negotiation requires the MSBuild task call to GetTargetFrameworks. | |
Don't skip when opted into the feature. | |
--> | |
<SkipGetTargetFrameworkProperties Condition="'$(EnableDynamicPlatformResolution)' != 'true'">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;SelfContained;$(_GlobalPropertiesToRemoveFromProjectReferences)" Condition="'%(_MSBuildProjectReferenceExistent.SkipGetTargetFrameworkProperties)' != 'true' and '$(EnableDynamicPlatformResolution)' != 'true'" SkipNonexistentTargets="true"> | |
<Output TaskParameter="TargetOutputs" ItemName="_ProjectReferenceTargetFrameworkPossibilities" /> | |
</MSBuild> | |
<!-- | |
SetPlatform negotiation requires the 'GetTargetFrameworks' MSBuild call to NOT pass global properties. This is to verify | |
whether or not the referenced project would build as the same platform as the current project by default. The above | |
MSBuild call is kept for legacy scenarios that may depend on passing %(SetConfiguration) and %(SetPlatform). | |
--> | |
<MSBuild Projects="@(_MSBuildProjectReferenceExistent)" Targets="GetTargetFrameworks" BuildInParallel="$(BuildInParallel)" ContinueOnError="!$(BuildingProject)" RemoveProperties="%(_MSBuildProjectReferenceExistent.GlobalPropertiesToRemove);TargetFramework;RuntimeIdentifier;SelfContained;Platform;Configuration;$(_GlobalPropertiesToRemoveFromProjectReferences)" Condition="'%(_MSBuildProjectReferenceExistent.SkipGetTargetFrameworkProperties)' != 'true' and '$(EnableDynamicPlatformResolution)' == '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)' != '' and '$(ReferringTargetFrameworkForProjectReferences)' != ''
 And '$(GetReferenceNearestTargetFrameworkTaskSupportsTargetPlatformParameter)' == 'true' and '%(_ProjectReferenceTargetFrameworkPossibilities.IsVcxOrNativeProj)' != 'true'"> | |
<Output ItemName="AnnotatedProjects" TaskParameter="AssignedProjects" /> | |
</GetReferenceNearestTargetFrameworkTask> | |
<GetReferenceNearestTargetFrameworkTask AnnotatedProjectReferences="@(_ProjectReferenceTargetFrameworkPossibilities)" CurrentProjectTargetFramework="$(ReferringTargetFrameworkForProjectReferences)" CurrentProjectName="$(MSBuildProjectName)" FallbackTargetFrameworks="$(AssetTargetFallback)" Condition="'@(_ProjectReferenceTargetFrameworkPossibilities)' != '' and '$(ReferringTargetFrameworkForProjectReferences)' != ''
 And '$(GetReferenceNearestTargetFrameworkTaskSupportsTargetPlatformParameter)' != 'true' and '%(_ProjectReferenceTargetFrameworkPossibilities.IsVcxOrNativeProj)' != '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 | |
Furthermore, if we're referencing a .vcxproj or .nativeproj, those items won't be populated into `AnnotatedProjects` | |
by `GetReferenceNearestTargetFrameworkTask`, so let them flow when `EnableDynamicPlatformResolution` is set. | |
--> | |
<AnnotatedProjects Include="@(_ProjectReferenceTargetFrameworkPossibilities)" Condition="'$(ReferringTargetFrameworkForProjectReferences)' == '' or
 ('$(EnableDynamicPlatformResolution)' == 'true' and '%(_ProjectReferenceTargetFrameworkPossibilities.IsVcxOrNativeProj)' == 'true')" /> | |
</ItemGroup> | |
<!-- IsRidAgnostic metadata is used to determine whether global properties such as RuntimeIdentifier and SelfContained flow to a referenced project. | |
However, for multi-targeted projects there may be a different IsRidAgnostic value for each TargetFramework. In that case, this task selects | |
the IsRidAgnostic value for the NearestTargetFramework for the project. --> | |
<SetRidAgnosticValueForProjects Projects="@(AnnotatedProjects)"> | |
<Output ItemName="UpdatedAnnotatedProjects" TaskParameter="UpdatedProjects" /> | |
</SetRidAgnosticValueForProjects> | |
<ItemGroup> | |
<AnnotatedProjects Remove="@(AnnotatedProjects)" /> | |
<AnnotatedProjects Include="@(UpdatedAnnotatedProjects)" /> | |
<UpdatedAnnotatedProjects Remove="@(UpdatedAnnotatedProjects)" /> | |
<!-- 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> | |
<!-- Add RuntimeIdentifier and SelfContained to the list of global properties that should not flow to the referenced project, | |
unless the project is expecting those properties to flow. --> | |
<AnnotatedProjects Condition="'@(AnnotatedProjects)' == '%(Identity)' and '%(AnnotatedProjects.IsRidAgnostic)' != 'false'"> | |
<UndefineProperties>%(AnnotatedProjects.UndefineProperties);RuntimeIdentifier;SelfContained</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)"> | |
<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> | |
<IsRidAgnostic>@(_TargetFrameworkInfo->'%(IsRidAgnostic)')</IsRidAgnostic> | |
<!-- Extract necessary information for SetPlatform negotiation --> | |
<IsVcxOrNativeProj Condition="'$(MSBuildProjectExtension)' == '.vcxproj' or '$(MSBuildProjectExtension)' == '.nativeproj'">true</IsVcxOrNativeProj> | |
<Platform Condition="$([MSBuild]::AreFeaturesEnabled('17.4'))">$(Platform)</Platform> | |
<Platforms>$(Platforms)</Platforms> | |
<!-- .vcxproj and .nativeproj contain a `ProjectConfiguration` item that have `Platform` metadata within. | |
Build the `Platforms` property from that. --> | |
<Platforms Condition="'$(UsePlatformFromProjectConfiguration)' != 'false' and '@(ProjectConfiguration)' != '' and ('$(MSBuildProjectExtension)' == '.vcxproj' or '$(MSBuildProjectExtension)' == '.nativeproj')">@(ProjectConfiguration->'%(Platform)'->Distinct())</Platforms> | |
</_ThisProjectBuildMetadata> | |
</ItemGroup> | |
</Target> | |
<Target Name="GetTargetFrameworksWithPlatformForSingleTargetFramework" Returns="@(_TargetFrameworkInfo)"> | |
<ItemGroup> | |
<_AdditionalTargetFrameworkInfoPropertyWithValue Include="@(AdditionalTargetFrameworkInfoProperty)"> | |
<Value>$(%(AdditionalTargetFrameworkInfoProperty.Identity))</Value> | |
</_AdditionalTargetFrameworkInfoPropertyWithValue> | |
</ItemGroup> | |
<PropertyGroup> | |
<_UseAttributeForTargetFrameworkInfoPropertyNames Condition="'$(_UseAttributeForTargetFrameworkInfoPropertyNames)' == ''">false</_UseAttributeForTargetFrameworkInfoPropertyNames> | |
</PropertyGroup> | |
<CombineTargetFrameworkInfoProperties RootElementName="$(TargetFramework)" PropertiesAndValues="@(_AdditionalTargetFrameworkInfoPropertyWithValue)" UseAttributeForTargetFrameworkInfoPropertyNames="$(_UseAttributeForTargetFrameworkInfoPropertyNames)"> | |
<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> | |
<!-- Determine whether a project is "RID agnostic" for each TargetFramework. "RID agnostic" means that global properties such as | |
SelfContained and RuntimeIdentifier should not flow across project references. The IsRidAgnostic metadata value is consumed in the | |
_GetProjectReferenceTargetFrameworkProperties target, where those properties are added to a project's UndefineProperties if | |
IsRidAgnostic is set. | |
Generally we set the IsRidAgnostic metadata based on the IsRidAgnostic property set by the .NET SDK. If that's not set, then the | |
fallback logic here will be that the project is RID agnostic if it doesn't have RuntimeIdentifier or RuntimeIdentifiers properties set. --> | |
<IsRidAgnostic>$(IsRidAgnostic)</IsRidAgnostic> | |
<IsRidAgnostic Condition=" '%(IsRidAgnostic)' == '' and '$(RuntimeIdentifier)' == '' and '$(RuntimeIdentifiers)' == '' ">true</IsRidAgnostic> | |
<IsRidAgnostic Condition=" '%(IsRidAgnostic)' == ''">false</IsRidAgnostic> | |
</_TargetFrameworkInfo> | |
</ItemGroup> | |
</Target> | |
<!-- | |
============================================================ | |
GetTargetFrameworkProperties | |
OBSOLETE: present only for theoretical backward compatibility. | |
--> | |
<Target Name="GetTargetFrameworkProperties" /> | |
<!-- | |
============================================================ | |
PrepareProjectReferences | |
Prepares project references for consumption by other targets. | |
[IN] | |
@(ProjectReference) - The list of project references. | |
[OUT] | |
@(ProjectReferenceWithConfiguration) - Project references with apporpriate metadata | |
@(_MSBuildProjectReferenceExistent) - Subset of @(ProjectReferenceWithConfiguration) that exist | |
with added SetTargetFramework metadata for cross-targeting | |
@(_MSBuildProjectReferenceNonExistent) - Subset of @(ProjectReferenceWithConfiguration) that do not exist | |
============================================================ | |
--> | |
<PropertyGroup> | |
<PrepareProjectReferencesDependsOn> | |
AssignProjectConfiguration; | |
_SplitProjectReferencesByFileExistence; | |
_GetProjectReferenceTargetFrameworkProperties; | |
_GetProjectReferencePlatformProperties | |
</PrepareProjectReferencesDependsOn> | |
</PropertyGroup> | |
<Target Name="PrepareProjectReferences" DependsOnTargets="$(PrepareProjectReferencesDependsOn)" /> | |
<!-- | |
============================================================ | |
ResolveProjectReferences | |
Build referenced projects: | |
[IN] | |
@(ProjectReferenceWithConfiguration) - The list of project references. | |
[OUT] | |
@(_ResolvedNativeProjectReferencePaths) - Paths to referenced native projects. | |
@(_ResolvedProjectReferencePaths) - Paths to referenced managed projects. | |
============================================================ | |
--> | |
<!-- By default, the outputs of project references are passed to the compiler --> | |
<ItemDefinitionGroup> | |
<ProjectReference> | |
<!-- Target to build in the project reference; by default, this property is blank, indicating the default targets--> | |
<Targets>$(ProjectReferenceBuildTargets)</Targets> | |
<!-- Extra item type to emit outputs of the destination into. Defaults to blank. To emit only into this list, set the ReferenceOutputAssembly metadata to false as well. --> | |
<OutputItemType /> | |
<ReferenceSourceTarget>ProjectReference</ReferenceSourceTarget> | |
</ProjectReference> | |
</ItemDefinitionGroup> | |
<Target Name="ResolveProjectReferences" DependsOnTargets="PrepareProjectReferences" Returns="@(_ResolvedNativeProjectReferencePaths);@(_ResolvedProjectReferencePaths)"> | |
<!-- | |
When building this project from the IDE, just gather the referenced build outputs. | |
The IDE will already have built the project, so there's no need to do it again here. | |
The ContinueOnError setting is here so that, during project load, as | |
much information as possible will be passed to the compilers. | |
--> | |
<MSBuild Projects="@(_MSBuildProjectReferenceExistent)" Targets="GetTargetPath" BuildInParallel="$(BuildInParallel)" Properties="%(_MSBuildProjectReferenceExistent.SetConfiguration); %(_MSBuildProjectReferenceExistent.SetPlatform); %(_MSBuildProjectReferenceExistent.SetTargetFramework)" Condition="'%(_MSBuildProjectReferenceExistent.BuildReference)' == 'true' and '@(ProjectReferenceWithConfiguration)' != '' and ('$(BuildingInsideVisualStudio)' == 'true' or '$(BuildProjectReferences)' != 'true') and '$(VisualStudioVersion)' != '10.0' and '@(_MSBuildProjectReferenceExistent)' != ''" ContinueOnError="!$(BuildingProject)" RemoveProperties="%(_MSBuildProjectReferenceExistent.GlobalPropertiesToRemove)$(_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"> | |
<!-- We need to do this here because we only want project references which have passed through rar and have not been unresolved due to violating some MT rule | |
which means we need to pull the project references out of the referencepath item because they will only exist there if they were correctly resolved. | |
--> | |
<ItemGroup> | |
<_ProjectReferencesFromRAR Include="@(ReferencePath->WithMetadataValue('ReferenceSourceTarget', 'ProjectReference'))"> | |
<OriginalItemSpec>%(ReferencePath.ProjectReferenceOriginalItemSpec)</OriginalItemSpec> | |
</_ProjectReferencesFromRAR> | |
</ItemGroup> | |
</Target> | |
<Target Name="ExpandSDKReferencesDesignTime" Returns="@(ReferencesFromSDK)" DependsOnTargets="ExpandSDKReferences" /> | |
<!-- | |
============================================================ | |
GetTargetPath | |
This target returns an item containing the build product (i.e. EXE, DLL) | |
that would be produced if we built this project, with some relevant | |
metadata. | |
============================================================ | |
--> | |
<PropertyGroup> | |
<GetTargetPathDependsOn>$(GetTargetPathDependsOn)</GetTargetPathDependsOn> | |
</PropertyGroup> | |
<Target Name="GetTargetPath" DependsOnTargets="$(GetTargetPathDependsOn)" Returns="@(TargetPathWithTargetPlatformMoniker)" /> | |
<!-- | |
============================================================ | |
GetTargetPathWithTargetPlatformMoniker | |
This stand-alone target returns the name and version of the target platform for this project. | |
NOTE: The ProjectReference protocol uses only GetTargetPath. Computing the item | |
in this target allows projects to override GetTargetPath without having to reimplement | |
the details of the metadata computation. | |
============================================================ | |
--> | |
<PropertyGroup> | |
<GetTargetPathWithTargetPlatformMonikerDependsOn>$(GetTargetPathDependsOn)</GetTargetPathWithTargetPlatformMonikerDependsOn> | |
</PropertyGroup> | |
<!--NOTE: since an overridden GetTargetPath might not include a DependsOn | |
for this target, it's safer to establish the dependency here with a | |
BeforeTargets. --> | |
<Target Name="GetTargetPathWithTargetPlatformMoniker" BeforeTargets="GetTargetPath" DependsOnTargets="$(GetTargetPathWithTargetPlatformMonikerDependsOn)" Returns="@(TargetPathWithTargetPlatformMoniker)"> | |
<ItemGroup> | |
<TargetPathWithTargetPlatformMoniker Include="$(TargetPath)"> | |
<TargetPlatformMoniker>$(TargetPlatformMoniker)</TargetPlatformMoniker> | |
<TargetPlatformIdentifier>$(TargetPlatformIdentifier)</TargetPlatformIdentifier> | |
<TargetFrameworkIdentifier>$(TargetFrameworkIdentifier)</TargetFrameworkIdentifier> | |
<TargetFrameworkVersion>$(TargetFrameworkVersion.TrimStart('vV'))</TargetFrameworkVersion> | |
<ReferenceAssembly Condition="'$(ProduceReferenceAssembly)' == 'true'">$(TargetRefPath)</ReferenceAssembly> | |
<CopyUpToDateMarker>@(CopyUpToDateMarker)</CopyUpToDateMarker> | |
</TargetPathWithTargetPlatformMoniker> | |
</ItemGroup> | |
</Target> | |
<!-- | |
============================================================ | |
GetNativeManifest | |
Compute the manifest item for this project. | |
[IN] | |
$(_DeploymentApplicationManifestIdentity) - the manifest identity | |
@(ApplicationManifest) - the original application manifest item | |
[OUT] | |
@(ComputedApplicationManifest) - application manifest item with full hint path, if generated | |
============================================================ | |
--> | |
<Target Name="GetNativeManifest" Returns="@(ComputedApplicationManifest)"> | |
<ItemGroup> | |
<ComputedApplicationManifest Include="$(_DeploymentApplicationManifestIdentity)" Condition="'$(OutputType)'!='winexe' and '$(OutputType)'!='exe' and '$(OutputType)'!='appcontainerexe' and Exists('%(_ApplicationManifestFinal.FullPath)')"> | |
<HintPath>%(_ApplicationManifestFinal.FullPath)</HintPath> | |
</ComputedApplicationManifest> | |
</ItemGroup> | |
</Target> | |
<!-- | |
============================================================ | |
ResolveNativeReferences | |
Resolve native references | |
[IN] | |
@(NativeReference) - The manifest reference (or list of manifest references) | |
[OUT] | |
@(NativeReferenceFile) - List of manifest files referenced. | |
@(_DeploymentNativePrerequisite) - List of native assembly prerequisites contained in the manifest. | |
@(ComClassReference) - List of COM components contained in the manifest. | |
@(COMReferenceFromNative) List of type libraries contained in the manifest. | |
@(COMFileReference) - List of loose files contained in the manifest. | |
@(_DeploymentLooseManifestFile) - List of extra files that should be published. | |
============================================================ | |
--> | |
<Target Name="ResolveNativeReferences" Condition="'@(NativeReference)'!=''" DependsOnTargets="ResolveProjectReferences"> | |
<ResolveNativeReference NativeReferences="@(NativeReference)" AdditionalSearchPaths="$(ReferencePath);$(OutDir)"> | |
<Output TaskParameter="ContainingReferenceFiles" ItemName="NativeReferenceFile" /> | |
<Output TaskParameter="ContainedPrerequisiteAssemblies" ItemName="_DeploymentNativePrerequisite" /> | |
<Output TaskParameter="ContainedComComponents" ItemName="ComClassReference" /> | |
<Output TaskParameter="ContainedTypeLibraries" ItemName="COMReferenceFromNative" /> | |
<Output TaskParameter="ContainedLooseTlbFiles" ItemName="COMFileReference" /> | |
<Output TaskParameter="ContainedLooseEtcFiles" ItemName="_DeploymentLooseManifestFile" /> | |
</ResolveNativeReference> | |
</Target> | |
<!-- | |
============================================================ | |
ResolveAssemblyReferences | |
Given the list of assemblies, find the closure of all assemblies that they depend on. These are | |
what we need to copy to the output directory. | |
[IN] | |
@(Reference) - List of assembly references as fusion names. | |
@(_ResolvedProjectReferencePaths) - List of project references produced by projects that this project depends on. | |
The 'Private' attribute on the reference corresponds to the Copy Local flag in IDE. | |
The 'Private' flag can have three possible values: | |
- 'True' means the reference should be Copied Local | |
- 'False' means the reference should not be Copied Local | |
- [Missing] means this task will decide whether to treat this reference as CopyLocal or not. | |
[OUT] | |
@(ReferencePath) - Paths to resolved primary files. | |
@(ReferenceDependencyPaths) - Paths to resolved dependency files. | |
@(_ReferenceRelatedPaths) - Paths to .xmls and .pdbs. | |
@(ReferenceSatellitePaths) - Paths to satellites. | |
@(_ReferenceSerializationAssemblyPaths) - Paths to XML serialization assemblies created by sgen. | |
@(_ReferenceScatterPaths) - Paths to scatter files. | |
@(ReferenceCopyLocalPaths) - Paths to files that should be copied to the local directory. | |
============================================================ | |
--> | |
<PropertyGroup> | |
<ResolveAssemblyReferencesDependsOn> | |
ResolveProjectReferences; | |
FindInvalidProjectReferences; | |
GetFrameworkPaths; | |
GetReferenceAssemblyPaths; | |
PrepareForBuild; | |
ResolveSDKReferences; | |
ExpandSDKReferences; | |
</ResolveAssemblyReferencesDependsOn> | |
</PropertyGroup> | |
<Target Name="ResolveAssemblyReferences" Returns="@(ReferencePath)" DependsOnTargets="$(ResolveAssemblyReferencesDependsOn)"> | |
<ItemGroup> | |
<_ReferenceInstalledAssemblyDirectory Include="$(TargetFrameworkDirectory)" /> | |
<_ReferenceInstalledAssemblySubsets Include="$(TargetFrameworkSubset)" /> | |
</ItemGroup> | |
<!-- | |
Only read and write cache file at build time, skip it for load time because its more | |
expensive to write the newly created cache file. | |
--> | |
<PropertyGroup> | |
<ResolveAssemblyReferencesStateFile Condition="'$(DisableRarCache)'!='true' and '$(ResolveAssemblyReferencesStateFile)' == ''">$(IntermediateOutputPath)$(MSBuildProjectFile).AssemblyReference.cache</ResolveAssemblyReferencesStateFile> | |
</PropertyGroup> | |
<!-- Make an App.Config item that exists when AutoUnify is false. --> | |
<ItemGroup> | |
<_ResolveAssemblyReferencesApplicationConfigFileForExes Include="@(AppConfigWithTargetPath)" Condition="'$(AutoGenerateBindingRedirects)'=='true' or '$(AutoUnifyAssemblyReferences)'=='false'" /> | |
</ItemGroup> | |
<PropertyGroup> | |
<!-- Default in task is true --> | |
<_FindDependencies Condition="'$(BuildingProject)' != 'true' and '$(_ResolveReferenceDependencies)' != 'true'">false</_FindDependencies> | |
<ResolveAssemblyReferencesSilent Condition="'$(ResolveAssemblyReferencesSilent)' == '' and '$(TraceDesignTime)' != 'true' and '$(BuildingProject)' == 'false'">true</ResolveAssemblyReferencesSilent> | |
<ResolveAssemblyReferencesSilent Condition="'$(ResolveAssemblyReferencesSilent)' == ''">false</ResolveAssemblyReferencesSilent> | |
<ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch Condition="'$(ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch)' == ''">Warning</ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch> | |
<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"> | |
<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);@(AppConfigWithTargetPath);$(SuggestedBindingRedirectsCacheFile)" Outputs="$(_GenerateBindingRedirectsIntermediateAppConfig)" Condition="'$(AutoGenerateBindingRedirects)' == 'true' and '$(GenerateBindingRedirectsOutputType)' == 'true' and '@(SuggestedBindingRedirects)' != '' and '$(DesignTimeBuild)' != 'true' and '$(BuildingProject)' == 'true'" DependsOnTargets="_GenerateSuggestedBindingRedirectsCache"> | |
<GenerateBindingRedirects AppConfigFile="@(AppConfigWithTargetPath)" TargetName="$(TargetFileName).config" OutputAppConfigFile="$(_GenerateBindingRedirectsIntermediateAppConfig)" SuggestedRedirects="@(SuggestedBindingRedirects)" /> | |
<ItemGroup> | |
<FileWrites Include="$(_GenerateBindingRedirectsIntermediateAppConfig)" /> | |
</ItemGroup> | |
</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" Condition="'$(AutoGenerateBindingRedirects)' == 'true' and '$(GenerateBindingRedirectsOutputType)' == 'true'"> | |
<PropertyGroup> | |
<_NewGenerateBindingRedirectsIntermediateAppConfig Condition="Exists('$(_GenerateBindingRedirectsIntermediateAppConfig)')">true</_NewGenerateBindingRedirectsIntermediateAppConfig> | |
<AppConfig Condition="$(_NewGenerateBindingRedirectsIntermediateAppConfig) == 'true'">$(_GenerateBindingRedirectsIntermediateAppConfig)</AppConfig> | |
</PropertyGroup> | |
<ItemGroup Condition="$(_NewGenerateBindingRedirectsIntermediateAppConfig) == 'true'"> | |
<AppConfigWithTargetPath Remove="@(AppConfigWithTargetPath)" /> | |
<AppConfigWithTargetPath Include="$(AppConfig)"> | |
<TargetPath>$(TargetFileName).config</TargetPath> | |
</AppConfigWithTargetPath> | |
</ItemGroup> | |
</Target> | |
<!-- | |
=========================================================================================== | |
GetInstalledSDKs | |
Gets the list of SDKs installed in the SDKDirectoryRoot and SDKRegistryRoot locations | |
These paths are used by the ResolveSDKReference task and the ResolveAssemblyReference task. | |
=========================================================================================== | |
--> | |
<PropertyGroup> | |
<SDKReferenceRegistryRoot Condition="'$(SDKReferenceRegistryRoot)' == ''">Software\Microsoft\Microsoft SDKs</SDKReferenceRegistryRoot> | |
<SDKReferenceDirectoryRoot Condition="'$(SDKReferenceDirectoryRoot)' == ''">$(LocalAppData)\Microsoft SDKs;$(MSBuildProgramFiles32)\Microsoft SDKs</SDKReferenceDirectoryRoot> | |
<!-- Manifest driven extension SDK locations --> | |
<SDKExtensionDirectoryRoot Condition="'$(SDKExtensionDirectoryRoot)' == '' and '$(SDKIdentifier)' != ''">$(MSBuildProgramFiles32)\Microsoft SDKs\Windows Kits\10;$(WindowsKitsRoot)</SDKExtensionDirectoryRoot> | |
<!-- UAP projects by default should support Windows 8.1 SDKs --> | |
<SupportWindows81SDKs Condition="'$(SupportWindows81SDKs)' == '' and '$(Support81SDKs)' != 'false' and '$(TargetPlatformIdentifier)' == 'UAP'">true</SupportWindows81SDKs> | |
<TargetPlatformIdentifierWindows81 Condition="'$(TargetPlatformIdentifierWindows81)' == '' and '$(SupportWindows81SDKs)' == 'true'">Windows</TargetPlatformIdentifierWindows81> | |
<TargetPlatformVersionWindows81 Condition="'$(TargetPlatformVersionWindows81)' == '' and '$(SupportWindows81SDKs)' == 'true'">8.1</TargetPlatformVersionWindows81> | |
<!-- Desktop and phone SDKs often have the exact same identifiers, don't enable phone by default --> | |
<SupportWindowsPhone81SDKs Condition="'$(SupportWindowsPhone81SDKs)' == '' and '$(Support81SDKs)' != 'false' and '$(TargetPlatformIdentifier)' == 'UAP'">false</SupportWindowsPhone81SDKs> | |
<TargetPlatformIdentifierWindowsPhone81 Condition="'$(TargetPlatformIdentifierWindowsPhone81)' == '' and '$(SupportWindowsPhone81SDKs)' == 'true'">WindowsPhoneApp</TargetPlatformIdentifierWindowsPhone81> | |
<TargetPlatformVersionWindowsPhone81 Condition="'$(TargetPlatformVersionWindowsPhone81)' == '' and '$(SupportWindowsPhone81SDKs)' == 'true'">8.1</TargetPlatformVersionWindowsPhone81> | |
</PropertyGroup> | |
<Target Name="GetInstalledSDKLocations" Condition="'@(SDKReference)' != ''" DependsOnTargets="$(GetInstalledSDKLocationsDependsOn)" Returns="@(InstalledSDKLocations)"> | |
<GetInstalledSDKLocations SDKDirectoryRoots="$(SDKReferenceDirectoryRoot)" SDKExtensionDirectoryRoots="$(SDKExtensionDirectoryRoot)" SDKRegistryRoot="$(SDKReferenceRegistryRoot)" TargetPlatformVersion="$(TargetPlatformVersion)" TargetPlatformIdentifier="$(TargetPlatformIdentifier)"> | |
<Output TaskParameter="InstalledSDKs" ItemName="InstalledSDKLocations" /> | |
</GetInstalledSDKLocations> | |
<!-- Also lookup 8.1 SDKs if requested --> | |
<GetInstalledSDKLocations SDKDirectoryRoots="$(SDKReferenceDirectoryRoot)" SDKExtensionDirectoryRoots="" SDKRegistryRoot="$(SDKReferenceRegistryRoot)" TargetPlatformVersion="$(TargetPlatformVersionWindows81)" TargetPlatformIdentifier="$(TargetPlatformIdentifierWindows81)" Condition="'$(SupportWindows81SDKs)' == 'true' and '$(TargetPlatformIdentifierWindows81)' != '' and '$(TargetPlatformVersionWindows81)' != ''" WarnWhenNoSDKsFound="false"> | |
<Output TaskParameter="InstalledSDKs" ItemName="InstalledSDKLocations" /> | |
</GetInstalledSDKLocations> | |
<GetInstalledSDKLocations SDKDirectoryRoots="$(SDKReferenceDirectoryRoot)" SDKExtensionDirectoryRoots="" SDKRegistryRoot="$(SDKReferenceRegistryRoot)" TargetPlatformVersion="$(TargetPlatformVersionWindowsPhone81)" TargetPlatformIdentifier="$(TargetPlatformIdentifierWindowsPhone81)" Condition="'$(SupportWindowsPhone81SDKs)' == 'true' and '$(TargetPlatformIdentifierWindowsPhone81)' != '' and '$(TargetPlatformVersionWindowsPhone81)' != ''" WarnWhenNoSDKsFound="false"> | |
<Output TaskParameter="InstalledSDKs" ItemName="InstalledSDKLocations" /> | |
</GetInstalledSDKLocations> | |
</Target> | |
<!-- | |
============================================================ | |
ResolveSDKReferences | |
Given a list of SDKReference items and a list of resolved winmd files which may contain metadata as to which sdk they came from | |
we need to find the sdk root folders on disk and populate a ResolvedSDKReference item which has the full path to the SDK ROOT | |
and the sdk identity as a piece of metadata. | |
[IN] | |
@(SDKReference) - List of sdk references (the identity in the sdk manifest file). | |
@(ReferencePath) -List of resolved assemblies, we are interested in the ones which have IsWinMDFile set to true. | |
[OUT] | |
@(ResolvedSDKReference) - Full path to the root of the SDK | |
============================================================ | |
--> | |
<PropertyGroup> | |
<ResolveSDKReferencesDependsOn> | |
GetInstalledSDKLocations | |
</ResolveSDKReferencesDependsOn> | |
</PropertyGroup> | |
<PropertyGroup> | |
<TargetedSDKConfiguration Condition="'$(TargetedSDKConfiguration)' == '' and '_$(Configuration)' == '_Debug'">Debug</TargetedSDKConfiguration> | |
<TargetedSDKConfiguration Condition="'$(TargetedSDKConfiguration)' == '' and '_$(Configuration)' == '_Release'">Retail</TargetedSDKConfiguration> | |
<TargetedSDKConfiguration Condition="'$(TargetedSDKConfiguration)' == ''">Retail</TargetedSDKConfiguration> | |
<TargetedSDKArchitecture Condition="'$(TargetedSDKArchitecture)' == ''">$(ProcessorArchitecture)</TargetedSDKArchitecture> | |
<TargetedSDKArchitecture Condition="'$(TargetedSDKArchitecture)' == ''">Neutral</TargetedSDKArchitecture> | |
</PropertyGroup> | |
<PropertyGroup> | |
<ShouldMarkCertainSDKReferencesAsRuntimeOnly Condition="'$(ShouldMarkCertainSDKReferencesAsRuntimeOnly)' == ''">true</ShouldMarkCertainSDKReferencesAsRuntimeOnly> | |
</PropertyGroup> | |
<ItemGroup Condition="'$(ShouldMarkCertainSDKReferencesAsRuntimeOnly)' == 'true'"> | |
<!-- Dependencies that are specified as runtime-only dependencies. Therefore the associated files are not used to build Appx package. --> | |
<!-- TODO: Do we need to do anything like this for the new SDK? --> | |
<RuntimeReferenceOnlySDKDependencies Condition="'$(TargetPlatformVersion)' == '8.1'" Include="Microsoft.VCLibs, Version=11.0" /> | |
</ItemGroup> | |
<Target Name="ResolveSDKReferences" Returns="@(ResolvedSDKReference)" DependsOnTargets="$(ResolveSDKReferencesDependsOn)"> | |
<ResolveSDKReference SDKReferences="@(SDKReference)" RuntimeReferenceOnlySDKDependencies="@(RuntimeReferenceOnlySDKDependencies)" References="@(Reference)" TargetPlatformVersion="$(TargetPlatformVersion)" TargetPlatformIdentifier="$(TargetPlatformIdentifier)" WarnOnMissingPlatformVersion="$(SDKReferenceWarnOnMissingMaxPlatformVersion)" ProjectName="$(MSBuildProjectName)" TargetedSDKConfiguration="$(TargetedSDKConfiguration)" TargetedSDKArchitecture="$(TargetedSDKArchitecture)" InstalledSDKs="@(InstalledSDKLocations)" LogResolutionErrorsAsWarnings="$(LogSDKReferenceResolutionErrorsAsWarnings)" Prefer32Bit="$(Prefer32Bit)" ContinueOnError="$(ContinueOnError)" Condition="'@(SDKReference)'!=''"> | |
<Output TaskParameter="ResolvedSDKReferences" ItemName="ResolvedSDKReference" /> | |
</ResolveSDKReference> | |
</Target> | |
<Target Name="ResolveSDKReferencesDesignTime" Returns="@(ResolvedSDKReference)" DependsOnTargets="ResolveSDKReferences" /> | |
<!-- | |
============================================================ | |
FindInvalidProjectReferences | |
Find project to project references with target platform version higher than the one used by the current project and | |
creates a list of invalid references to be unresolved. It issues a warning for each invalid reference. | |
[IN] | |
$(TargetPlatformVersion) - Project's target platform version | |
@(_ProjectReferenceTargetPlatformMonikers) - List of monikers of all referenced projects gathered by the helper | |
target GetTargetPlatformMonikers. | |
[OUT] | |
@(InvalidProjectReferences) - List of invalid project references | |
============================================================ | |
--> | |
<PropertyGroup> | |
<FindInvalidProjectReferencesDependsOn> | |
GetReferenceTargetPlatformMonikers | |
</FindInvalidProjectReferencesDependsOn> | |
</PropertyGroup> | |
<Target Name="FindInvalidProjectReferences" Condition="'$(FindInvalidProjectReferences)' == 'true'" DependsOnTargets="$(FindInvalidProjectReferencesDependsOn)"> | |
<FindInvalidProjectReferences TargetPlatformVersion="$(TargetPlatformVersion)" TargetPlatformIdentifier="$(TargetPlatformIdentifier)" ProjectReferences="@(TargetPathWithTargetPlatformMoniker)"> | |
<Output TaskParameter="InvalidReferences" ItemName="InvalidProjectReferences" /> | |
</FindInvalidProjectReferences> | |
<ItemGroup> | |
<_ResolvedProjectReferencePaths Remove="@(InvalidProjectReferences)" /> | |
</ItemGroup> | |
</Target> | |
<Target Name="GetReferenceTargetPlatformMonikers" DependsOnTargets="PrepareProjectReferences"> | |
<MSBuild Projects="@(_MSBuildProjectReferenceExistent)" Properties="%(_MSBuildProjectReferenceExistent.SetConfiguration); %(_MSBuildProjectReferenceExistent.SetPlatform); %(_MSBuildProjectReferenceExistent.SetTargetFramework)" Targets="GetTargetPathWithTargetPlatformMoniker" BuildInParallel="$(BuildInParallel)" ContinueOnError="!$(BuildingProject)" RemoveProperties="%(_MSBuildProjectReferenceExistent.GlobalPropertiesToRemove)$(_GlobalPropertiesToRemoveFromProjectReferences)"> | |
<Output TaskParameter="TargetOutputs" ItemName="TargetPathWithTargetPlatformMoniker" /> | |
</MSBuild> | |
</Target> | |
<ItemGroup Condition="'$(IsGraphBuild)' == 'true' and '$(FindInvalidProjectReferences)' == 'true'"> | |
<ProjectReferenceTargets Include="Build" Targets="GetTargetPathWithTargetPlatformMoniker" /> | |
</ItemGroup> | |
<!-- | |
============================================================ | |
ExpandSDKReferences | |
After we have resolved the sdk refrence we need to make sure that we automatically include the references which are part of the SDK (both winmd and dll) | |
as part of the assemblies passed to the compiler. | |
Project systems or project which do not want to reference all dlls or winmd files should override this target to do nothing. | |
============================================================ | |
--> | |
<PropertyGroup> | |
<ExpandSDKReferencesDependsOn> | |
ResolveSDKReferences | |
</ExpandSDKReferencesDependsOn> | |
<ExpandSDKAllowedReferenceExtensions Condition="'$(ExpandSDKAllowedReferenceExtensions)' == ''"> | |
.winmd; | |
.dll | |
</ExpandSDKAllowedReferenceExtensions> | |
</PropertyGroup> | |
<Target Name="ExpandSDKReferences" Returns="@(ReferencesFromSDK)" DependsOnTargets="$(ExpandSDKReferencesDependsOn)"> | |
<GetSDKReferenceFiles ResolvedSDKReferences="@(ResolvedSDKReference)" ReferenceExtensions="$(ExpandSDKAllowedReferenceExtensions)" TargetSDKIdentifier="$(SDKIdentifier)" TargetSDKVersion="$(SDKVersion)" TargetPlatformIdentifier="$(TargetPlatformIdentifier)" TargetPlatformVersion="$(TargetPlatformVersion)" LogRedistFilesList="$(GetSDKReferenceFilesLogRedistFilesList)" LogRedistConflictWithinSDKAsWarning="$(GetSDKReferenceFilesLogRedistConflictsWithinSDKAsWarning)" LogRedistConflictBetweenSDKsAsWarning="$(GetSDKReferenceFilesLogRedistConflictsBetweenSDKsAsWarning)" LogReferencesList="$(GetSDKReferenceFilesLogReferencesList)" LogReferenceConflictWithinSDKAsWarning="$(GetSDKReferenceFilesLogReferenceConflictsWithinSDKAsWarning)" LogReferenceConflictBetweenSDKsAsWarning="$(GetSDKReferenceFilesLogReferenceConflictsBetweenSDKsAsWarning)" CacheFileFolderPath="$(GetSDKReferenceFilesCacheFolder)" LogCacheFileExceptions="$(GetSDKReferenceFilesLogCacheFileExceptions)" Condition="'@(ResolvedSDKReference)'!=''"> | |
<Output TaskParameter="References" ItemName="ReferencePath" /> | |
<Output TaskParameter="References" ItemName="ReferencesFromSDK" /> | |
<Output TaskParameter="References" ItemName="_ResolveAssemblyReferenceResolvedFiles" /> | |
<Output TaskParameter="CopyLocalFiles" ItemName="ReferenceCopyLocalPaths" /> | |
<Output TaskParameter="RedistFiles" ItemName="ResolvedRedistFiles" /> | |
</GetSDKReferenceFiles> | |
</Target> | |
<!-- | |
============================================================ | |
ExportWindowsMDFile | |
When a project is generating a a winmd file through c# or vb, ect the compiler will create a WinMDModule file. This file needs to be run | |
through the winmdexp tool in order to generate the resulting WinMD file. | |
=========================================================== | |
--> | |
<Target Name="ExportWindowsMDFile" DependsOnTargets="Compile" Condition="'$(ExportWinMDFile)' == 'true'" Inputs="@(IntermediateAssembly);@(DocFileItem);@(_DebugSymbolsIntermediatePath);@(ReferencePathWithRefAssemblies);$(MSBuildAllProjects)" Outputs="$(_IntermediateWindowsMetadataPath);$(WinMDExpOutputPdb);$(WinMDOutputDocumentationFile)"> | |
<PropertyGroup> | |
<!-- Will be copied by the "copy WinMD artifacts" step instead --> | |
<CopyBuildOutputToOutputDirectory>false</CopyBuildOutputToOutputDirectory> | |
<CopyOutputSymbolsToOutputDirectory>false</CopyOutputSymbolsToOutputDirectory> | |
<CopyDocumentationFileToOutputDirectory>false</CopyDocumentationFileToOutputDirectory> | |
<WinMdExpToolPath Condition="'$(WinMdExpToolPath)' == ''">$(TargetFrameworkSDKToolsDirectory)</WinMdExpToolPath> | |
<WinMdExpUTF8Ouput Condition="'$(WinMdExpUTF8Ouput)' == ''">true</WinMdExpUTF8Ouput> | |
</PropertyGroup> | |
<WinMDExp WinMDModule="@(IntermediateAssembly)" References="@(ReferencePathWithRefAssemblies)" DisabledWarnings="$(WinMdExpNoWarn)" InputDocumentationFile="@(DocFileItem)" OutputDocumentationFile="$(WinMDOutputDocumentationFile)" TreatWarningsAsErrors="$(TreatWarningsAsErrors)" InputPDBFile="@(_DebugSymbolsIntermediatePath)" OutputPDBFile="$(WinMDExpOutputPdb)" OutputWindowsMetadataFile="$(_IntermediateWindowsMetadataPath)" EnvironmentVariables="$(WinMDExpEnvironment)" UTF8Output="$(WinMdExpUTF8Ouput)" SdkToolsPath="$(WinMdExpToolPath)" AssemblyUnificationPolicy="$(WinMDExpAssemblyUnificationPolicy)"> | |
<Output TaskParameter="OutputWindowsMetadataFile" ItemName="FileWrites" /> | |
</WinMDExp> | |
<ItemGroup> | |
<WinMDExpArtifacts Include="$(_IntermediateWindowsMetadataPath)" /> | |
<WinMDExpArtifacts Include="$(WinMDOutputDocumentationFile)" /> | |
<WinMDExpArtifacts Include="$(WinMDExpOutputPdb)" /> | |
<FileWrites Include="$(WinMDOutputDocumentationFile);$(WinMDExpOutputPdb)" /> | |
</ItemGroup> | |
</Target> | |
<Target Name="ResolveAssemblyReferencesDesignTime" Returns="@(_ReferencesFromRAR)" DependsOnTargets="ResolveProjectReferences;ResolveAssemblyReferences"> | |
<!-- We need to do this here because we only want references which have been passed into rar but are not project to project references. --> | |
<ItemGroup> | |
<_ReferencesFromRAR Include="@(ReferencePath->WithMetadataValue('ReferenceSourceTarget', 'ResolveAssemblyReference'))" /> | |
</ItemGroup> | |
</Target> | |
<PropertyGroup> | |
<ProjectDesignTimeAssemblyResolutionSearchPaths Condition=" '$(ProjectDesignTimeAssemblyResolutionSearchPaths)' == '' "> | |
{CandidateAssemblyFiles}; | |
$(ReferencePath); | |
{HintPathFromItem}; | |
{TargetFrameworkDirectory}; | |
{Registry:$(FrameworkRegistryBase),$(TargetFrameworkVersion),$(AssemblyFoldersSuffix)$(AssemblyFoldersExConditions)}; | |
{RawFileName}; | |
$(TargetDir) | |
</ProjectDesignTimeAssemblyResolutionSearchPaths> | |
</PropertyGroup> | |
<!-- | |
============================================================== | |
DesignTimeResolveAssemblyReferences | |
Given the list of assemblies, resolve their reference paths. | |
This target is called by Visual Studio at run time in order to filter references | |
according to the targeted framework. | |
[IN] | |
@(DesignTimeReference) - List of assembly references as simple/fusion names. | |
[OUT] | |
@(ReferencePath) - Paths to resolved primary files. | |
============================================================== | |
--> | |
<PropertyGroup> | |
<DesignTimeResolveAssemblyReferencesDependsOn> | |
GetFrameworkPaths; | |
GetReferenceAssemblyPaths; | |
ResolveReferences | |
</DesignTimeResolveAssemblyReferencesDependsOn> | |
</PropertyGroup> | |
<Target Name="DesignTimeResolveAssemblyReferences" Condition="'$(DesignTimeReference)'!=''" DependsOnTargets="$(DesignTimeResolveAssemblyReferencesDependsOn)"> | |
<ItemGroup> | |
<_DesignTimeReferenceInstalledAssemblyDirectory Include="$(TargetFrameworkDirectory)" /> | |
</ItemGroup> | |
<PropertyGroup> | |
<DesignTimeResolveAssemblyReferencesStateFile Condition="'$(DisableRarCache)'!='true'">$(IntermediateOutputPath)$(MSBuildProjectFile)DesignTimeResolveAssemblyReferences.cache</DesignTimeResolveAssemblyReferencesStateFile> | |
</PropertyGroup> | |
<PropertyGroup> | |
<DesignTimeAssemblySearchPaths Condition=" '$(DesignTimeAssemblySearchPaths)' == '' "> | |
{CandidateAssemblyFiles}; | |
$(ReferencePath); | |
{HintPathFromItem}; | |
{TargetFrameworkDirectory}; | |
{Registry:$(FrameworkRegistryBase),$(TargetFrameworkVersion),$(AssemblyFoldersSuffix)$(AssemblyFoldersExConditions)}; | |
{RawFileName}; | |
$(OutDir) | |
</DesignTimeAssemblySearchPaths> | |
</PropertyGroup> | |
<PropertyGroup> | |
<DesignTimeFindDependencies Condition=" '$(DesignTimeFindDependencies)' == '' ">false</DesignTimeFindDependencies> | |
<DesignTimeIgnoreVersionForFrameworkReferences Condition=" '$(DesignTimeIgnoreVersionForFrameworkReferences)' == '' ">false</DesignTimeIgnoreVersionForFrameworkReferences> | |
<DesignTimeFindSatellites Condition=" '$(DesignTimeFindSatellites)' == '' ">false</DesignTimeFindSatellites> | |
<DesignTimeFindSerializationAssemblies Condition=" '$(DesignTimeFindSerializationAssemblies)' == '' ">false</DesignTimeFindSerializationAssemblies> | |
<DesignTimeFindRelatedFiles Condition=" '$(DesignTimeFindRelatedFiles)' == '' ">false</DesignTimeFindRelatedFiles> | |
<DesignTimeSilentResolution Condition=" '$(DesignTimeSilentResolution)' == '' and '$(TraceDesignTime)' != 'true'">true</DesignTimeSilentResolution> | |
<DesignTimeAutoUnify Condition="'$(DesignTimeAutoUnify)' == ''">false</DesignTimeAutoUnify> | |
</PropertyGroup> | |
<ItemGroup> | |
<_DesignTimeReferenceAssemblies Include="$(DesignTimeReference)" /> | |
</ItemGroup> | |
<ItemGroup> | |
<_RARResolvedReferencePath Include="@(ReferencePath)" /> | |
<ReferencePath Remove="@(ReferencePath)" /> | |
</ItemGroup> | |
<ResolveAssemblyReference Assemblies="@(_DesignTimeReferenceAssemblies)" TargetFrameworkDirectories="@(_DesignTimeReferenceInstalledAssemblyDirectory)" SearchPaths="$(DesignTimeAssemblySearchPaths)" AllowedAssemblyExtensions="$(AllowedReferenceAssemblyFileExtensions)" TargetProcessorArchitecture="$(ProcessorArchitecture)" CandidateAssemblyFiles="@(Content);@(None);@(_RARResolvedReferencePath)" FindDependencies="$(DesignTimeFindDependencies)" AutoUnify="$(DesignTimeAutoUnify)" IgnoreVersionForFrameworkReferences="$(DesignTimeIgnoreVersionForFrameworkReferences)" FindSatellites="$(DesignTimeFindSatellites)" FindSerializationAssemblies="$(DesignTimeFindSerializationAssemblies)" FindRelatedFiles="$(DesignTimeFindRelatedFiles)" Silent="$(DesignTimeSilentResolution)" TargetFrameworkVersion="$(TargetFrameworkVersion)" TargetFrameworkMoniker="$(TargetFrameworkMoniker)" TargetFrameworkMonikerDisplayName="$(TargetFrameworkMonikerDisplayName)" TargetedRuntimeVersion="$(TargetedRuntimeVersion)" StateFile="$(DesignTimeResolveAssemblyReferencesStateFile)" InstalledAssemblySubsetTables="@(InstalledAssemblySubsetTables)" IgnoreDefaultInstalledAssemblySubsetTables="$(IgnoreInstalledAssemblySubsetTables)" TargetFrameworkSubsets="@(_ReferenceInstalledAssemblySubsets)" FullTargetFrameworkSubsetNames="$(FullReferenceAssemblyNames)" FullFrameworkFolders="$(_FullFrameworkReferenceAssemblyPaths)" FullFrameworkAssemblyTables="@(FullFrameworkAssemblyTables)" ProfileName="$(TargetFrameworkProfile)" ResolvedSDKReferences="@(ResolvedSDKReference)" IgnoreTargetFrameworkAttributeVersionMismatch="$(DesignTimeIgnoreTargetFrameworkAttributeVersionMismatch)"> | |
<Output TaskParameter="ResolvedFiles" ItemName="DesignTimeReferencePath" /> | |
<Output TaskParameter="FilesWritten" ItemName="FileWrites" /> | |
</ResolveAssemblyReference> | |
</Target> | |
<!-- | |
============================================================ | |
ResolveComReferences | |
Resolve COM references | |
[IN] | |
@(COMReference) - The list of COM references | |
$(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> | |
<ComReferenceExecuteAsTool Condition="'$(ComReferenceExecuteAsTool)'==''">false</ComReferenceExecuteAsTool> | |
</PropertyGroup> | |
<Target Name="ResolveComReferences" Condition="'@(COMReference)'!='' or '@(COMFileReference)'!=''" Returns="@(ReferencePath)" DependsOnTargets="PrepareForBuild;ResolveKeySource;ResolveAssemblyReferences"> | |
<PropertyGroup Condition=" '$(InteropOutputPath)' == '' "> | |
<InteropOutputPath>$(IntermediateOutputPath)</InteropOutputPath> | |
</PropertyGroup> | |
<MakeDir Directories="$(InteropOutputPath)" /> | |
<!-- | |
Note: This task should not be batched, since it relies on having all the COM references fed into it at once. | |
--> | |
<PropertyGroup> | |
<ResolveComReferenceMSBuildArchitecture Condition="'$(ResolveComReferenceMSBuildArchitecture)' == ''">$(PlatformTargetAsMSBuildArchitecture)</ResolveComReferenceMSBuildArchitecture> | |
<ResolveComReferenceToolPath Condition="'$(ResolveComReferenceToolPath)' == ''">$(TargetFrameworkSDKToolsDirectory)</ResolveComReferenceToolPath> | |
<ResolveComReferenceSilent Condition="'$(ResolveComReferenceSilent)' == ''">false</ResolveComReferenceSilent> | |
</PropertyGroup> | |
<ResolveComReference TypeLibNames="@(COMReference)" TypeLibFiles="@(COMFileReference)" ResolvedAssemblyReferences="@(ReferencePath)" WrapperOutputDirectory="$(InteropOutputPath)" IncludeVersionInInteropName="$(IncludeVersionInInteropName)" KeyContainer="$(KeyContainerName)" KeyFile="$(KeyOriginatorFile)" DelaySign="$(DelaySign)" StateFile="@(_ResolveComReferenceCache)" TargetFrameworkVersion="$(TargetFrameworkVersion)" TargetProcessorArchitecture="$(ProcessorArchitecture)" NoClassMembers="$(ComReferenceNoClassMembers)" Silent="$(ResolveComReferenceSilent)" EnvironmentVariables="$(ResolveComReferenceEnvironment)" SdkToolsPath="$(ResolveComReferenceToolPath)" ExecuteAsTool="$(ComReferenceExecuteAsTool)" MSBuildArchitecture="$(ResolveComReferenceMSBuildArchitecture)" ContinueOnError="$(ContinueOnError)"> | |
<Output TaskParameter="ResolvedFiles" ItemName="ReferencePath" /> | |
<Output TaskParameter="ResolvedFiles" ItemName="ComReferenceWrappers" /> | |
<Output TaskParameter="ResolvedFiles" ItemName="FileWrites" /> | |
<!-- This output list only includes items with Isolated attribute set to True. It's done by the task itself. --> | |
<Output TaskParameter="ResolvedModules" ItemName="ResolvedIsolatedComModules" /> | |
</ResolveComReference> | |
<ItemGroup> | |
<FileWrites Include="@(_ResolveComReferenceCache)" /> | |
<ReferenceComWrappersToCopyLocal Include="@(ComReferenceWrappers)" Condition="'%(ComReferenceWrappers.CopyLocal)'!='false'" /> | |
</ItemGroup> | |
</Target> | |
<!-- | |
============================================================ | |
_GetAssembliesMetadata | |
Resolve Assembly attributes for assemblies | |
The ResolveComReferences dependency is needed for defining COM-referenced wrappers only, | |
but this target handles all the assembly references from ResolveAssemblyReferences | |
This target is needed by the Visual Studio legacy project system during design time build only | |
[IN] | |
@(ReferencePath) - Paths to COM-referenced wrappers and other types of assembly references. | |
[OUT] | |
@(AssembliesMetadata) - Resolved assemblies attributes. | |
============================================================ | |
--> | |
<Target Name="_GetAssembliesMetadata" Condition="'@(ReferencePath)'!=''and '$(DesignTimeBuild)' == 'true' " Returns="@(_AssembliesMetadata)" DependsOnTargets="ResolveComReferences"> | |
<GetAssembliesMetadata AssemblyPaths="@(ReferencePath)" ContinueOnError="$(ContinueOnError)"> | |
<Output TaskParameter="AssembliesMetadata" ItemName="_AssembliesMetadata" /> | |
</GetAssembliesMetadata> | |
</Target> | |
<Target Name="ResolveComReferencesDesignTime" Returns="@(ComReferenceWrappers)" DependsOnTargets="ResolveComReferences" /> | |
<!-- | |
============================================================ | |
ResolveFrameworkReferences | |
Overrridden by Microsoft.NET.Sdk to return | |
ResolvedFrameworkReference items in order to populate the | |
Frameworks node of the Solution Explorer in the IDE. | |
--> | |
<Target Name="ResolveFrameworkReferences" /> | |
<!-- | |
*********************************************************************************************** | |
*********************************************************************************************** | |
PrepareResources Section | |
*********************************************************************************************** | |
*********************************************************************************************** | |
--> | |
<!-- | |
============================================================ | |
PrepareResources | |
Prepare resources for the Compile step. | |
============================================================ | |
--> | |
<PropertyGroup> | |
<PrepareResourcesDependsOn> | |
$(PrepareResourcesDependsOn); | |
PrepareResourceNames; | |
ResGen; | |
CompileLicxFiles | |
</PrepareResourcesDependsOn> | |
</PropertyGroup> | |
<Target Name="PrepareResources" DependsOnTargets="$(PrepareResourcesDependsOn)" /> | |
<!-- | |
============================================================ | |
PrepareResourceNames | |
Prepare the names of resource files. | |
============================================================ | |
--> | |
<PropertyGroup> | |
<PrepareResourceNamesDependsOn> | |
AssignTargetPaths; | |
SplitResourcesByCulture; | |
CreateManifestResourceNames; | |
CreateCustomManifestResourceNames | |
</PrepareResourceNamesDependsOn> | |
</PropertyGroup> | |
<Target Name="PrepareResourceNames" DependsOnTargets="$(PrepareResourceNamesDependsOn)" /> | |
<!-- | |
============================================================ | |
AssignTargetPaths | |
This target creates <TargetPath> tags for items. <TargetPath> is a relative folder plus filename | |
for the destination of this item. | |
============================================================ | |
--> | |
<PropertyGroup> | |
<AssignTargetPathsDependsOn /> | |
</PropertyGroup> | |
<Target Name="AssignTargetPaths" DependsOnTargets="$(AssignTargetPathsDependsOn)"> | |
<ItemGroup> | |
<_Temporary Remove="@(_Temporary)" /> | |
</ItemGroup> | |
<!-- AssignTargetPath generates TargetPath metadata that is consumed by CreateManifestResourceNames target for manifest name generation --> | |
<AssignTargetPath Files="@(EmbeddedResource)" RootFolder="$(MSBuildProjectDirectory)"> | |
<Output TaskParameter="AssignedFiles" ItemName="_Temporary" /> | |
</AssignTargetPath> | |
<ItemGroup> | |
<!-- Replace items in EmbeddedResource with the items emitted by the AssignTargetPath task that have the TargetPath metadata --> | |
<EmbeddedResource Remove="@(_Temporary)" /> | |
<EmbeddedResource Include="@(_Temporary)" /> | |
<_Temporary Remove="@(_Temporary)" /> | |
</ItemGroup> | |
<AssignTargetPath Files="@(Content)" RootFolder="$(MSBuildProjectDirectory)"> | |
<Output TaskParameter="AssignedFiles" ItemName="ContentWithTargetPath" /> | |
</AssignTargetPath> | |
<AssignTargetPath Files="@(None)" RootFolder="$(MSBuildProjectDirectory)"> | |
<Output TaskParameter="AssignedFiles" ItemName="_NoneWithTargetPath" /> | |
</AssignTargetPath> | |
<AssignTargetPath Files="@(BaseApplicationManifest)" RootFolder="$(MSBuildProjectDirectory)"> | |
<Output TaskParameter="AssignedFiles" ItemName="_DeploymentBaseManifestWithTargetPath" /> | |
</AssignTargetPath> | |
<AssignTargetPath Files="@(None)" RootFolder="$(MSBuildProjectDirectory)" Condition="'@(_DeploymentBaseManifestWithTargetPath)'=='' and '%(None.Extension)'=='.manifest'"> | |
<Output TaskParameter="AssignedFiles" ItemName="_DeploymentBaseManifestWithTargetPath" /> | |
</AssignTargetPath> | |
</Target> | |
<!-- | |
============================================================ | |
GetItemTargetPaths | |
This target returns all items that have TargetPath metadata assigned by the AssignTargetPaths target. | |
============================================================ | |
--> | |
<Target Name="GetItemTargetPaths" DependsOnTargets="AssignTargetPaths" Returns="
 @(EmbeddedResource);
 @(ContentWithTargetPath);
 @(_NoneWithTargetPath);
 @(_DeploymentBaseManifestWithTargetPath);
 " /> | |
<!-- | |
============================================================ | |
SplitResourcesByCulture | |
Split EmbeddedResource items into five lists based on whether | |
they are resx files, licx files or other resources and whether they should be localized. Also adds Type and Culture | |
metadata. Type indicates whether the resource is "Resx" or "Non-Resx". | |
[IN]/[OUT] | |
@(EmbeddedResource) - The raw list of resources. | |
[OUT] | |
@(_LicxFile) - The EmbeddedResource items with extension equal to '.licx'. | |
============================================================ | |
--> | |
<Target Name="SplitResourcesByCulture" DependsOnTargets="AssignTargetPaths"> | |
<PropertyGroup> | |
<RespectAlreadyAssignedItemCulture Condition="'$(RespectAlreadyAssignedItemCulture)' == ''">false</RespectAlreadyAssignedItemCulture> | |
</PropertyGroup> | |
<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'" RespectAlreadyAssignedItemCulture="$(RespectAlreadyAssignedItemCulture)"> | |
<!-- Create the list of culture resx and embedded resource files --> | |
<Output TaskParameter="AssignedFilesWithCulture" ItemName="_MixedResourceWithCulture" /> | |
<!-- Create the list of non-culture resx and embedded resource files --> | |
<Output TaskParameter="AssignedFilesWithNoCulture" ItemName="_MixedResourceWithNoCulture" /> | |
</AssignCulture> | |
<ItemGroup> | |
<!-- Remove EmbeddedResource items that we have processed already | |
i.e. either Licx, or resources that don't have culture info --> | |
<EmbeddedResource Remove="@(_MixedResourceWithCulture)" /> | |
<EmbeddedResource Remove="@(_MixedResourceWithNoCulture)" /> | |
<EmbeddedResource Remove="@(_LicxFile)" /> | |
<!-- Add back everything except Licx, so that we have culture info --> | |
<EmbeddedResource Include="@(_MixedResourceWithNoCulture);@(_MixedResourceWithCulture)" Condition="'%(Extension)'=='.resx' or '%(Extension)'=='.restext'"> | |
<Type Condition="'%(_MixedResourceWithNoCulture.Type)'=='' and '%(_MixedResourceWithCulture.Type)'==''">Resx</Type> | |
</EmbeddedResource> | |
<EmbeddedResource Include="@(_MixedResourceWithNoCulture);@(_MixedResourceWithCulture)" Condition="'%(Extension)'!='.resx' and '%(Extension)'!='.restext'"> | |
<Type Condition="'%(_MixedResourceWithNoCulture.Type)'=='' and '%(_MixedResourceWithCulture.Type)'==''">Non-Resx</Type> | |
</EmbeddedResource> | |
<!-- EMITTED FOR COMPATIBILITY REASONS ONLY. CONSUME EMBEDDEDRESOURCE INSTEAD --> | |
<ResxWithNoCulture Remove="@(ResxWithNoCulture)" /> | |
<NonResxWithNoCulture Remove="@(NonResxWithNoCulture)" /> | |
<ResxWithCulture Remove="@(ResxWithCulture)" /> | |
<NonResxWithCulture Remove="@(NonResxWithCulture)" /> | |
<ResxWithNoCulture Include="@(_MixedResourceWithNoCulture)" Condition="'%(WithCulture)'=='false' and ('%(Extension)'=='.resx' or '%(Extension)'=='.restext')" /> | |
<NonResxWithNoCulture Include="@(_MixedResourceWithNoCulture)" Condition="'%(WithCulture)'=='false' and ('%(Extension)'!='.resx' and '%(Extension)'!='.restext')" /> | |
<ResxWithCulture Include="@(_MixedResourceWithCulture)" Condition="'%(WithCulture)'=='true' and ('%(Extension)'=='.resx' or '%(Extension)'=='.restext')" /> | |
<NonResxWithCulture Include="@(_MixedResourceWithCulture)" Condition="'%(WithCulture)'=='true' and ('%(Extension)'!='.resx' and '%(Extension)'!='.restext')" /> | |
<!-- Clean up temporary lists --> | |
<_MixedResourceWithNoCulture Remove="@(_MixedResourceWithNoCulture)" /> | |
<_MixedResourceWithCulture Remove="@(_MixedResourceWithCulture)" /> | |
</ItemGroup> | |
</Target> | |
<!-- | |
======================================================================= | |
CreateCustomManifestResourceNames | |
Allows custom manifest resource name generation tasks to plug | |
into the build process | |
======================================================================= | |
--> | |
<PropertyGroup> | |
<CreateCustomManifestResourceNamesDependsOn /> | |
</PropertyGroup> | |
<Target Name="CreateCustomManifestResourceNames" DependsOnTargets="$(CreateCustomManifestResourceNamesDependsOn)" /> | |
<!-- | |
============================================================ | |
ResGen | |
Run GenerateResource on the given resx files. | |
============================================================ | |
--> | |
<PropertyGroup> | |
<ResGenDependsOn>ResolveAssemblyReferences;SplitResourcesByCulture;BeforeResGen;CoreResGen;AfterResGen</ResGenDependsOn> | |
<CoreResGenDependsOn>FindReferenceAssembliesForReferences</CoreResGenDependsOn> | |
<UseSourcePath Condition="'$(UseSourcePath)'==''">true</UseSourcePath> | |
<ResGenExecuteAsTool Condition="'$(ResGenExecuteAsTool)'==''">false</ResGenExecuteAsTool> | |
</PropertyGroup> | |
<Target Name="ResGen" DependsOnTargets="$(ResGenDependsOn)" /> | |
<!-- | |
============================================================ | |
BeforeResGen | |
Redefine this target in your project in order to run tasks just before Resgen. | |
============================================================ | |
--> | |
<Target Name="BeforeResGen" /> | |
<!-- | |
============================================================ | |
AfterResGen | |
Redefine this target in your project in order to run tasks just after Resgen. | |
============================================================ | |
--> | |
<Target Name="AfterResGen" /> | |
<!-- | |
============================================================ | |
CoreResGen | |
============================================================ | |
--> | |
<Target Name="CoreResGen" DependsOnTargets="$(CoreResGenDependsOn)"> | |
<ItemGroup> | |
<_Temporary Remove="@(_Temporary)" /> | |
</ItemGroup> | |
<PropertyGroup> | |
<GenerateResourceMSBuildArchitecture Condition="'$(GenerateResourceMSBuildArchitecture)' == ''">$(PlatformTargetAsMSBuildArchitecture)</GenerateResourceMSBuildArchitecture> | |
<ResgenToolPath Condition="'$(ResgenToolPath)' == ''">$(TargetFrameworkSDKToolsDirectory)</ResgenToolPath> | |
</PropertyGroup> | |
<PropertyGroup Condition="'$(TargetFrameworkAsMSBuildRuntime)' != '' and '$(GenerateResourceMSBuildArchitecture)' != ''"> | |
<!-- In the general case, we want to fail to run the task if the task host it's requesting doesn't exist, because we'd rather let the | |
user know there's something wrong than just silently generate something that's probably not quite right. However, in a few | |
circumstances, there are tasks that are already aware of runtime / bitness concerns, in which case even if we go ahead and run | |
the more recent version of the task, it should be able to generate something correct. GenerateResource is one such task, so | |
we check for the existence of the targeted task host so that we can use it preferentially, but if it can't be found, we'll fall | |
back to the current task since it's still mostly correct. | |
In particular, we need to do this because otherwise people with Dev10 on a machine that they upgrade to Win8 will be broken: | |
they'll have ResGen from the 7.0A SDK installed, so launching ResGen will still work, but the CLR2 task host is only installed by | |
the 8.0A SDK, which they won't have installed, and thus without this fallback mechanism, their projects targeting v3.5 will | |
suddenly start failing to build.--> | |
<GenerateResourceMSBuildRuntime Condition="'$(GenerateResourceMSBuildRuntime)' == '' and
 $([MSBuild]::DoesTaskHostExist(`$(TargetFrameworkAsMSBuildRuntime)`, `$(GenerateResourceMSBuildArchitecture)`))">$(TargetFrameworkAsMSBuildRuntime)</GenerateResourceMSBuildRuntime> | |
<!-- If the targeted runtime doesn't exist, fall back to current --> | |
<GenerateResourceMSBuildRuntime Condition="'$(GenerateResourceMSBuildRuntime)' == ''">CurrentRuntime</GenerateResourceMSBuildRuntime> | |
</PropertyGroup> | |
<!-- 4.0 task has some new parameters that we want to make use of if we're targeting 4.0 --> | |
<GenerateResource Sources="@(EmbeddedResource)" UseSourcePath="$(UseSourcePath)" References="@(ReferencePathWithRefAssemblies)" UsePreserializedResources="$(GenerateResourceUsePreserializedResources)" AdditionalInputs="$(MSBuildAllProjects)" NeverLockTypeAssemblies="$(GenerateResourceNeverLockTypeAssemblies)" StateFile="$(IntermediateOutputPath)$(MSBuildProjectFile).GenerateResource.cache" StronglyTypedClassName="%(EmbeddedResource.StronglyTypedClassName)" StronglyTypedFileName="%(EmbeddedResource.StronglyTypedFileName)" StronglyTypedLanguage="%(EmbeddedResource.StronglyTypedLanguage)" StronglyTypedNamespace="%(EmbeddedResource.StronglyTypedNamespace)" StronglyTypedManifestPrefix="%(EmbeddedResource.StronglyTypedManifestPrefix)" PublicClass="%(EmbeddedResource.PublicClass)" OutputResources="@(EmbeddedResource->'$(IntermediateOutputPath)%(ManifestResourceName).resources')" Condition="'%(EmbeddedResource.Type)' == 'Resx' and '%(EmbeddedResource.GenerateResource)' != 'false' and '$(GenerateResourceMSBuildRuntime)' != 'CLR2'" SdkToolsPath="$(ResgenToolPath)" ExecuteAsTool="$(ResGenExecuteAsTool)" EnvironmentVariables="$(ResGenEnvironment)" WarnOnBinaryFormatterUse="$(GenerateResourceWarnOnBinaryFormatterUse)" 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> | |
<CompileLicxFilesDependsOn /> | |
</PropertyGroup> | |
<Target Name="CompileLicxFiles" Condition="'@(_LicxFile)'!=''" DependsOnTargets="$(CompileLicxFilesDependsOn)" Inputs="$(MSBuildAllProjects);@(_LicxFile);@(ReferencePathWithRefAssemblies);@(ReferenceDependencyPaths)" Outputs="$(IntermediateOutputPath)$(TargetFileName).licenses"> | |
<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'"> | |
<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> | |
<CompileDependsOn> | |
ResolveReferences; | |
ResolveKeySource; | |
SetWin32ManifestProperties; | |
_SetPreferNativeArm64Win32ManifestProperties; | |
FindReferenceAssembliesForReferences; | |
_GenerateCompileInputs; | |
BeforeCompile; | |
_TimeStampBeforeCompile; | |
_GenerateCompileDependencyCache; | |
CoreCompile; | |
_TimeStampAfterCompile; | |
AfterCompile; | |
</CompileDependsOn> | |
</PropertyGroup> | |
<Target Name="Compile" DependsOnTargets="$(CompileDependsOn)" /> | |
<!-- | |
============================================================ | |
_GenerateCompileInputs | |
Create the _CoreCompileResourceInputs list of inputs to the CoreCompile target. | |
============================================================ | |
--> | |
<Target Name="_GenerateCompileInputs"> | |
<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)' != ''"> | |
<!-- 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> | |
<GenerateTargetFrameworkAttribute Condition="'$(GenerateTargetFrameworkAttribute)' == '' and '$(TargetFrameworkMoniker)' != '' and '$(TargetingClr2Framework)' != 'true'">true</GenerateTargetFrameworkAttribute> | |
</PropertyGroup> | |
<ItemGroup Condition="'$(TargetFrameworkMonikerAssemblyAttributesFileClean)' == 'true'"> | |
<Clean Include="$(TargetFrameworkMonikerAssemblyAttributesPath)" /> | |
</ItemGroup> | |
<Target Name="GenerateTargetFrameworkMonikerAttribute" BeforeTargets="BeforeCompile" DependsOnTargets="PrepareForBuild;GetReferenceAssemblyPaths" Inputs="$(MSBuildToolsPath)\Microsoft.Common.targets" Outputs="$(TargetFrameworkMonikerAssemblyAttributesPath)" Condition="'@(Compile)' != '' and '$(GenerateTargetFrameworkAttribute)' == 'true'"> | |
<!-- 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)' != ''"> | |
<GenerateAdditionalSources Condition="'$(GenerateAdditionalSources)' == ''">true</GenerateAdditionalSources> | |
</PropertyGroup> | |
<ItemGroup Condition="'$(AssemblyAttributesPath)' != ''"> | |
<Clean Include="$(AssemblyAttributesPath)" Condition="'$(AssemblyAttributesFileClean)' != 'false'" /> | |
</ItemGroup> | |
<Target Name="GenerateAdditionalSources" BeforeTargets="BeforeCompile" DependsOnTargets="PrepareForBuild;GetReferenceAssemblyPaths" Inputs="$(MSBuildAllProjects)" Outputs="$(AssemblyAttributesPath)" Condition="'@(AssemblyAttributes)' != '' and '$(GenerateAdditionalSources)' == 'true'"> | |
<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" /> | |
<!-- | |
============================================================ | |
AfterCompile | |
Redefine this target in your project in order to run tasks just after Compile. | |
============================================================ | |
--> | |
<Target Name="AfterCompile" /> | |
<!-- | |
============================================================ | |
_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')"> | |
<PropertyGroup> | |
<_AssemblyTimestampBeforeCompile>%(IntermediateAssembly.ModifiedTime)</_AssemblyTimestampBeforeCompile> | |
</PropertyGroup> | |
</Target> | |
<!-- | |
============================================================ | |
_GenerateSuggestedBindingRedirectsCache | |
Generate a file used to track whether suggested binding redirects changed between builds. | |
@(SuggestedBindingRedirects) never contains a file on disk, so create a file | |
that contains a hash of the items to prevent `GenerateBindingRedirects` | |
from running every build. | |
See https://github.com/dotnet/msbuild/issues/5943 for details. | |
============================================================ | |
--> | |
<Target Name="_GenerateSuggestedBindingRedirectsCache" Condition="'$(DesignTimeBuild)' != 'true' and '$(BuildingProject)' == 'true'" DependsOnTargets="ResolveAssemblyReferences"> | |
<PropertyGroup> | |
<SuggestedBindingRedirectsCacheFile>$(IntermediateOutputPath)$(MSBuildProjectFile).SuggestedBindingRedirects.cache</SuggestedBindingRedirectsCacheFile> | |
</PropertyGroup> | |
<Hash ItemsToHash="@(SuggestedBindingRedirects)"> | |
<Output TaskParameter="HashResult" PropertyName="SuggestedBindingRedirectsHash" /> | |
</Hash> | |
<WriteLinesToFile Lines="$(SuggestedBindingRedirectsHash)" File="$(SuggestedBindingRedirectsCacheFile)" Overwrite="true" WriteOnlyWhenDifferent="true" /> | |
<ItemGroup> | |
<FileWrites Include="$(SuggestedBindingRedirectsCacheFile)" /> | |
</ItemGroup> | |
</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"> | |
<ItemGroup> | |
<CustomAdditionalCompileInputs Include="$(IntermediateOutputPath)$(MSBuildProjectFile).CoreCompileInputs.cache" /> | |
<CoreCompileCache Include="@(Compile)" /> | |
<CoreCompileCache Include="@(ReferencePath)" /> | |
<CoreCompileCache Include="$(DefineConstants)" /> | |
<CoreCompileCache Include="$(LangVersion)" /> | |
<CoreCompileCache Include="$(Deterministic)" /> | |
<CoreCompileCache Include="$(PathMap)" /> | |
</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')"> | |
<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'))"> | |
<PropertyGroup> | |
<NonExistentFile>__NonExistentSubDir__\__NonExistentFile__</NonExistentFile> | |
</PropertyGroup> | |
</Target> | |
<!-- | |
*********************************************************************************************** | |
*********************************************************************************************** | |
GenerateSerializationAssemblies Section | |
*********************************************************************************************** | |
*********************************************************************************************** | |
--> | |
<PropertyGroup> | |
<_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)"> | |
<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> | |
<CreateSatelliteAssembliesDependsOn> | |
$(CreateSatelliteAssembliesDependsOn); | |
_GenerateSatelliteAssemblyInputs; | |
ComputeIntermediateSatelliteAssemblies; | |
GenerateSatelliteAssemblies | |
</CreateSatelliteAssembliesDependsOn> | |
</PropertyGroup> | |
<Target Name="CreateSatelliteAssemblies" DependsOnTargets="$(CreateSatelliteAssembliesDependsOn)" /> | |
<!-- | |
============================================================ | |
_GenerateSatelliteAssemblyInputs | |
Create the _SatelliteAssemblyResourceInputs list of inputs to the CreateSatelliteAssemblies target. | |
============================================================ | |
--> | |
<Target Name="_GenerateSatelliteAssemblyInputs"> | |
<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'"> | |
<PropertyGroup> | |
<_ALExeToolPath Condition="'$(_ALExeToolPath)' == ''">$(TargetFrameworkSDKToolsDirectory)</_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="$(_ALExeToolPath)" 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> | |
<ComputeIntermediateSatelliteAssembliesDependsOn> | |
CreateManifestResourceNames | |
</ComputeIntermediateSatelliteAssembliesDependsOn> | |
</PropertyGroup> | |
<Target Name="ComputeIntermediateSatelliteAssemblies" Condition="@(EmbeddedResource->'%(WithCulture)') != ''" DependsOnTargets="$(ComputeIntermediateSatelliteAssembliesDependsOn)"> | |
<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> | |
<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" /> | |
<Target Name="_SetExternalWin32ManifestProperties" Condition="'$(GenerateClickOnceManifests)'=='true' or '@(NativeReference)'!='' or '@(ResolvedIsolatedComModules)'!=''"> | |
<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)'==''"> | |
<PropertyGroup> | |
<EmbeddedWin32Manifest>$(ApplicationManifest)</EmbeddedWin32Manifest> | |
<Win32Manifest>$(ApplicationManifest)</Win32Manifest> | |
</PropertyGroup> | |
<!-- If PreferNativeArm64 is enabled, it searches for the same default.win32manifest --> | |
<GetFrameworkPath Condition="'$(ApplicationManifest)'=='' and '$(NoWin32Manifest)'!='true' and '$(PreferNativeArm64)' != 'true'"> | |
<Output TaskParameter="FrameworkVersion40Path" PropertyName="_FrameworkVersion40Path" /> | |
</GetFrameworkPath> | |
<PropertyGroup> | |
<EmbeddedWin32Manifest Condition="'$(ApplicationManifest)'=='' and '$(NoWin32Manifest)'!='true' and '$(PreferNativeArm64)' != 'true' and Exists('$(_FrameworkVersion40Path)\default.win32manifest')">$(_FrameworkVersion40Path)\default.win32manifest</EmbeddedWin32Manifest> | |
</PropertyGroup> | |
</Target> | |
<!-- | |
============================================================ | |
_SetPreferNativeArm64Win32ManifestProperties | |
Populates Manifest with SupportedArchitectures and updates Win32Manifest property to be used later in the build. | |
============================================================ | |
--> | |
<Target Name="_SetPreferNativeArm64Win32ManifestProperties" Condition=" '$(PreferNativeArm64)'=='true' and '$(NoWin32Manifest)'!='true'" DependsOnTargets="SetWin32ManifestProperties"> | |
<AddToWin32Manifest ApplicationManifest="$(Win32Manifest)" OutputDirectory="$(IntermediateOutputPath)" SupportedArchitectures="$(_SupportedArchitectures)"> | |
<Output TaskParameter="ManifestPath" PropertyName="_Win32Manifest" /> | |
</AddToWin32Manifest> | |
<PropertyGroup> | |
<Win32Manifest Condition="'$(_Win32Manifest)' != ''">$(_Win32Manifest)</Win32Manifest> | |
</PropertyGroup> | |
</Target> | |
<!-- | |
*********************************************************************************************** | |
*********************************************************************************************** | |
GenerateManifests Section | |
*********************************************************************************************** | |
*********************************************************************************************** | |
--> | |
<!-- | |
============================================================ | |
GenerateManifests | |
Generates ClickOnce application and deployment manifests or a native manifest. | |
============================================================ | |
--> | |
<PropertyGroup> | |
<GenerateManifestsDependsOn> | |
SetWin32ManifestProperties; | |
GenerateApplicationManifest; | |
GenerateDeploymentManifest | |
</GenerateManifestsDependsOn> | |
</PropertyGroup> | |
<!-- | |
============================================================ | |
_GenerateResolvedDeploymentManifestEntryPoint | |
Use the ResolveManifestFiles to generate the GenerateResolvedDeploymentManifestEntryPoint | |
============================================================ | |
--> | |
<Target Name="_GenerateResolvedDeploymentManifestEntryPoint"> | |
<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)" /> | |
<!-- | |
============================================================ | |
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="
 _DeploymentSetClickOnceVersions;
 _DeploymentGenerateLauncher;
 _DeploymentComputeNativeManifestInfo;
 _DeploymentComputeClickOnceManifestInfo;
 ResolveComReferences;
 ResolveNativeReferences;
 _GenerateResolvedDeploymentManifestEntryPoint" Inputs="
 $(MSBuildAllProjects);
 @(AppConfigWithTargetPath);
 $(_DeploymentBaseManifest);
 @(ResolvedIsolatedComModules);
 @(_DeploymentManifestDependencies);
 @(_DeploymentResolvedManifestEntryPoint);
 @(_DeploymentManifestFiles)" Outputs="@(ApplicationManifest)"> | |
<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> | |
<AddToWin32Manifest Condition="'$(PreferNativeArm64)'=='true'" ApplicationManifest="@(ApplicationManifest)" OutputDirectory="$(IntermediateOutputPath)" SupportedArchitectures="$(_SupportedArchitectures)" /> | |
<PropertyGroup> | |
<_DeploymentCopyApplicationManifest>true</_DeploymentCopyApplicationManifest> | |
</PropertyGroup> | |
</Target> | |
<!-- | |
============================================================ | |
_DeploymentSetClickOnceVersions | |
Sets ClickOnce versions | |
============================================================ | |
--> | |
<Target Name="_DeploymentSetClickOnceVersions" Condition="'$(GenerateClickOnceManifests)'=='true'"> | |
<PropertyGroup> | |
<_DeploymentManifestTargetFrameworkMoniker>$(TargetFrameworkMoniker)</_DeploymentManifestTargetFrameworkMoniker> | |
<_DeploymentManifestTargetFrameworkVersion>$(TargetFrameworkVersion)</_DeploymentManifestTargetFrameworkVersion> | |
</PropertyGroup> | |
</Target> | |
<!-- | |
============================================================ | |
_DeploymentGenerateLauncher | |
Generates Launcher if needed | |
============================================================ | |
--> | |
<Target Name="_DeploymentGenerateLauncher" Condition="'$(GenerateClickOnceManifests)'=='true' and '$(_DeploymentLauncherBased)' == 'true'"> | |
<!-- | |
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)" TargetPath="$(AssemblyName).exe" /> | |
<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'"> | |
<!-- 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> | |
<!-- | |
============================================================ | |
_DeploymentComputeClickOnceManifestInfo | |
Compute info for ClickOnce manifest generation | |
============================================================ | |
--> | |
<Target Name="_DeploymentComputeClickOnceManifestInfo" Condition="'$(GenerateClickOnceManifests)'=='true'" DependsOnTargets="$(DeploymentComputeClickOnceManifestInfoDependsOn)"> | |
<!-- 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> | |
<ItemGroup Condition="'$(PublishSingleFile)' != 'true'"> | |
<_ClickOnceSatelliteAssemblies Include="@(IntermediateSatelliteAssembliesWithTargetPath);@(ReferenceSatellitePaths)" /> | |
</ItemGroup> | |
<!-- Flag primary dependencies-certain warnings emitted during application manifest generation apply only to them. --> | |
<ItemGroup> | |
<_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="@(_ClickOnceSatelliteAssemblies);@(_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)" /> | |
<!-- | |
For .NET>=5, we need to check if we need to publish any content items from transitive project references. For such items to be published, they | |
either have the .exe/.dll extension or their publish status has been overriden in VS so they will show up in the PublishFiles collection. | |
The PublishProtocol property is available only in .NET>=5 so we will used that to exclude .NET FX 4.X case. | |
--> | |
<_ClickOnceTransitiveContentItemsTemp Include="@(_TransitiveItemsToCopyToOutputDirectory->WithoutMetadataValue('CopyToPublishDirectory', 'Never')->'%(TargetPath)')" Condition="'$(PublishProtocol)' == 'ClickOnce'"> | |
<SavedIdentity>%(Identity)</SavedIdentity> | |
</_ClickOnceTransitiveContentItemsTemp> | |
<_ClickOnceTransitiveContentItems Include="@(_ClickOnceTransitiveContentItemsTemp->'%(SavedIdentity)')" Condition="'%(Identity)'=='@(PublishFile)' Or '%(Extension)'=='.exe' Or '%(Extension)'=='.dll'" /> | |
<!-- | |
ClickOnce content items is union of transitive content items and content items from this project. | |
We also exclude content items from this project that have set CopyToPublishDirectory to Never. | |
--> | |
<_ClickOnceContentItems Include="@(ContentWithTargetPath->WithoutMetadataValue('CopyToPublishDirectory', 'Never'))" /> | |
<_ClickOnceContentItems Include="@(_ClickOnceTransitiveContentItems)" /> | |
<!-- | |
For .NET>=5, we need to check if we need to publish any copylocal items from None group. For such items to be published, they either | |
have .exe/.dll extension or their publish status has been overriden in VS so they will show up in the PublishFiles collection. | |
The PublishProtocol property is available only in .NET>=5 so we will used that to exclude .NET FX 4.X case. | |
--> | |
<!-- Include items from None group for publishing --> | |
<_ClickOnceNoneItemsTemp Include="@(_NoneWithTargetPath->WithoutMetadataValue('CopyToPublishDirectory', 'Never')->'%(TargetPath)')" Condition="'$(PublishProtocol)'=='Clickonce' And ('%(_NoneWithTargetPath.CopyToOutputDirectory)'=='Always' or '%(_NoneWithTargetPath.CopyToOutputDirectory)'=='PreserveNewest')"> | |
<SavedIdentity>%(Identity)</SavedIdentity> | |
</_ClickOnceNoneItemsTemp> | |
<_ClickOnceNoneItems Include="@(_ClickOnceNoneItemsTemp->'%(SavedIdentity)')" Condition="'%(Identity)'=='@(PublishFile)' Or '%(Extension)'=='.exe' Or '%(Extension)'=='.dll'" /> | |
<_ClickOnceFiles Include="@(_ClickOnceContentItems);@(_DeploymentManifestIconFile);@(AppConfigWithTargetPath);@(NetCoreRuntimeJsonFilesForClickOnce);@(_ClickOnceRuntimeCopyLocalItems);@(_ClickOnceNoneItems)" /> | |
<!-- clear temporary item groups to free memory --> | |
<_ClickOnceNoneItemsTemp Remove="@(_ClickOnceNoneItemsTemp)" /> | |
<_ClickOnceNoneItems Remove="@(_ClickOnceNoneItems)" /> | |
<_ClickOnceTransitiveContentItemsTemp Remove="@(_ClickOnceTransitiveContentItemsTemp)" /> | |
<_ClickOnceTransitiveContentItems Remove="@(_ClickOnceTransitiveContentItems)" /> | |
<_ClickOnceContentItems Remove="@(_ClickOnceContentItems)" /> | |
<_ClickOnceRuntimeCopyLocalItems Remove="@(_ClickOnceRuntimeCopyLocalItems)" /> | |
</ItemGroup> | |
<!-- For single file publish, we need to include the SF bundle EXE, application icon file and files excluded from the bundle EXE in the clickonce manifest --> | |
<ItemGroup Condition="'$(PublishSingleFile)' == 'true'"> | |
<_ClickOnceFiles Include="$(PublishedSingleFilePath);@(_DeploymentManifestIconFile)" /> | |
<_ClickOnceFiles Include="@(_FilesExcludedFromBundle)" /> | |
<!-- Include file association icons from Content as loose files --> | |
<_FileAssociationIcons Include="%(FileAssociation.DefaultIcon)" /> | |
<_ClickOnceFiles Include="@(ContentWithTargetPath)" Condition="'%(Identity)'=='@(_FileAssociationIcons)'" /> | |
</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="$(ClickOncePublishDir)"> | |
<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="@(_ClickOnceSatelliteAssemblies)" 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="
 $(MSBuildAllProjects);
 $(_DeploymentBaseManifest);
 " Outputs="@(_DeploymentIntermediateTrustInfoFile)"> | |
<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="
 $(MSBuildAllProjects);
 @(ApplicationManifest)
 " Outputs="@(DeployManifest)"> | |
<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> | |
<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> | |
<PrepareForRunDependsOn> | |
CopyFilesToOutputDirectory | |
</PrepareForRunDependsOn> | |
</PropertyGroup> | |
<Target Name="PrepareForRun" DependsOnTargets="$(PrepareForRunDependsOn)" /> | |
<!-- | |
============================================================ | |
CopyFilesToOutputDirectory | |
Copy all build outputs, satellites and other necessary files to the final directory. | |
============================================================ | |
--> | |
<PropertyGroup> | |
<!-- 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="
 ComputeIntermediateSatelliteAssemblies;
 _CopyFilesMarkedCopyLocal;
 _CopySourceItemsToOutputDirectory;
 _CopyAppConfigFile;
 _CopyManifestFiles;
 _CheckForCompileOutputs;
 _SGenCheckForOutputs"> | |
<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) -> @(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) -> $([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)' != ''"> | |
<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" /> | |
<Output TaskParameter="WroteAtLeastOneFile" PropertyName="WroteAtLeastOneFile" /> | |
</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)' != '' and '$(WroteAtLeastOneFile)' == 'true'" /> | |
<ItemGroup> | |
<FileWrites Include="@(CopyUpToDateMarker)" /> | |
</ItemGroup> | |
</Target> | |
<!-- | |
============================================================ | |
_CopySourceItemsToOutputDirectory | |
============================================================ | |
--> | |
<Target Name="_CopySourceItemsToOutputDirectory" DependsOnTargets="
 GetCopyToOutputDirectoryItems;
 _CopyOutOfDateSourceItemsToOutputDirectory;
 _CopyOutOfDateSourceItemsToOutputDirectoryAlways" /> | |
<!-- | |
============================================================ | |
GetCopyToOutputDirectoryItems | |
Get all project items that may need to be transferred to the output directory. | |
This includes baggage items from transitively referenced projects. | |
As of 17.0, content items are copied transitively by default. | |
Set `MSBuildCopyContentTransitively` to false to opt out. | |
See https://github.com/dotnet/msbuild/pull/6622 for more info. | |
============================================================ | |
--> | |
<PropertyGroup> | |
<_TargetsThatPrepareProjectReferences>_SplitProjectReferencesByFileExistence</_TargetsThatPrepareProjectReferences> | |
<!-- | |
GetCopyToOutputDirectoryItems depends on an unspecified dependency _SplitProjectReferencesByFileExistence -> AssignProjectConfiguration (https://github.com/dotnet/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. | |
--> | |
<MSBuildCopyContentTransitively Condition=" '$(MSBuildCopyContentTransitively)' == ''">true</MSBuildCopyContentTransitively> | |
<_TargetsThatPrepareProjectReferences Condition=" '$(MSBuildCopyContentTransitively)' == 'true' "> | |
AssignProjectConfiguration; | |
_SplitProjectReferencesByFileExistence | |
</_TargetsThatPrepareProjectReferences> | |
<GetCopyToOutputDirectoryItemsDependsOn> | |
AssignTargetPaths; | |
$(_TargetsThatPrepareProjectReferences); | |
_GetProjectReferenceTargetFrameworkProperties; | |
_PopulateCommonStateForGetCopyToOutputDirectoryItems | |
</GetCopyToOutputDirectoryItemsDependsOn> | |
<!-- | |
Mitigation for https://github.com/dotnet/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/dotnet/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"> | |
<!-- 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="@(_CopyToOutputDirectoryTransitiveItems)"> | |
<!-- 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> | |
<_CopyToOutputDirectoryTransitiveItems KeepDuplicates=" '$(_GCTODIKeepDuplicates)' != 'false' " KeepMetadata="$(_GCTODIKeepMetadata)" Include="@(_AllChildProjectItemsWithTargetPath->'%(FullPath)')" Condition="'%(_AllChildProjectItemsWithTargetPath.CopyToOutputDirectory)'=='Always'" /> | |
<_CopyToOutputDirectoryTransitiveItems 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> | |
<_CopyToOutputDirectoryTransitiveItems KeepMetadata="$(_GCTODIKeepMetadata)" Include="@(ContentWithTargetPath->'%(FullPath)')" Condition="'%(ContentWithTargetPath.CopyToOutputDirectory)'=='Always' AND '%(ContentWithTargetPath.MSBuildSourceProjectFile)'!=''" /> | |
<_CopyToOutputDirectoryTransitiveItems KeepMetadata="$(_GCTODIKeepMetadata)" Include="@(ContentWithTargetPath->'%(FullPath)')" Condition="'%(ContentWithTargetPath.CopyToOutputDirectory)'=='PreserveNewest' AND '%(ContentWithTargetPath.MSBuildSourceProjectFile)'!=''" /> | |
</ItemGroup> | |
<ItemGroup> | |
<_CopyToOutputDirectoryTransitiveItems KeepMetadata="$(_GCTODIKeepMetadata)" Include="@(EmbeddedResource->'%(FullPath)')" Condition="'%(EmbeddedResource.CopyToOutputDirectory)'=='Always' AND '%(EmbeddedResource.MSBuildSourceProjectFile)'!=''" /> | |
<_CopyToOutputDirectoryTransitiveItems 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> | |
<_CopyToOutputDirectoryTransitiveItems KeepMetadata="$(_GCTODIKeepMetadata)" Include="@(_CompileItemsToCopyWithTargetPath)" Condition="'%(_CompileItemsToCopyWithTargetPath.CopyToOutputDirectory)'=='Always'" /> | |
<_CopyToOutputDirectoryTransitiveItems KeepMetadata="$(_GCTODIKeepMetadata)" Include="@(_CompileItemsToCopyWithTargetPath)" Condition="'%(_CompileItemsToCopyWithTargetPath.CopyToOutputDirectory)'=='PreserveNewest'" /> | |
</ItemGroup> | |
<ItemGroup> | |
<_CopyToOutputDirectoryTransitiveItems KeepMetadata="$(_GCTODIKeepMetadata)" Include="@(_NoneWithTargetPath->'%(FullPath)')" Condition="'%(_NoneWithTargetPath.CopyToOutputDirectory)'=='Always' AND '%(_NoneWithTargetPath.MSBuildSourceProjectFile)'!=''" /> | |
<_CopyToOutputDirectoryTransitiveItems KeepMetadata="$(_GCTODIKeepMetadata)" Include="@(_NoneWithTargetPath->'%(FullPath)')" Condition="'%(_NoneWithTargetPath.CopyToOutputDirectory)'=='PreserveNewest' AND '%(_NoneWithTargetPath.MSBuildSourceProjectFile)'!=''" /> | |
</ItemGroup> | |
</Target> | |
<Target Name="_GetCopyToOutputDirectoryItemsFromThisProject" DependsOnTargets="AssignTargetPaths;_PopulateCommonStateForGetCopyToOutputDirectoryItems" Returns="@(_ThisProjectItemsToCopyToOutputDirectory)"> | |
<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)"> | |
<!-- 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)" /> | |
<_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)"> | |
<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)')"> | |
<!-- | |
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)' != '' "> | |
<!-- | |
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)')"> | |
<!-- | |
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"> | |
<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) -> @(_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) -> @(_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"> | |
<!--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')"> | |
<!-- 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> | |
<UnmanagedRegistrationDependsOn /> | |
</PropertyGroup> | |
<Target Name="UnmanagedRegistration" Condition="'$(RegisterForComInterop)'=='true' and '$(OutputType)'=='library'" DependsOnTargets="$(UnmanagedRegistrationDependsOn)"> | |
<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
 $([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"> | |
<!-- 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"> | |
<!-- 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> | |
<CleanDependsOn> | |
BeforeClean; | |
UnmanagedUnregistration; | |
CoreClean; | |
CleanReferencedProjects; | |
CleanPublishFolder; | |
AfterClean | |
</CleanDependsOn> | |
</PropertyGroup> | |
<Target Name="Clean" Condition=" '$(_InvalidConfigurationWarning)' != 'true' " DependsOnTargets="$(CleanDependsOn)" /> | |
<!-- | |
============================================================ | |
BeforeClean | |
Redefine this target in your project in order to run tasks just before Clean. | |
============================================================ | |
--> | |
<Target Name="BeforeClean" /> | |
<!-- | |
============================================================ | |
AfterClean | |
Redefine this target in your project in order to run tasks just after Clean. | |
============================================================ | |
--> | |
<Target Name="AfterClean" /> | |
<!-- | |
============================================================ | |
CleanReferencedProjects | |
Call Clean target on all Referenced Projects. | |
============================================================ | |
--> | |
<Target Name="CleanReferencedProjects" DependsOnTargets="PrepareProjectReferences"> | |
<!-- | |
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> | |
<CoreCleanDependsOn /> | |
</PropertyGroup> | |
<Target Name="CoreClean" DependsOnTargets="$(CoreCleanDependsOn)"> | |
<!-- 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)" WriteOnlyWhenDifferent="true" 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"> | |
<!-- | |
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" WriteOnlyWhenDifferent="true" /> | |
</Target> | |
<!-- | |
============================================================ | |
CleanPublishFolder | |
============================================================ | |
--> | |
<Target Name="CleanPublishFolder"> | |
<RemoveDir Directories="$(ClickOncePublishDir)" Condition="'$(ClickOncePublishDir)'=='$(OutputPath)app.publish\' and Exists('$(ClickOncePublishDir)')" /> | |
</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> | |
<PostBuildEventDependsOn /> | |
</PropertyGroup> | |
<Target Name="PostBuildEvent" Condition="'$(PostBuildEvent)' != '' and ('$(RunPostBuildEvent)' != 'OnOutputUpdated' or '$(_AssemblyTimestampBeforeCompile)' != '$(_AssemblyTimestampAfterCompile)')" DependsOnTargets="$(PostBuildEventDependsOn)"> | |
<Exec WorkingDirectory="$(OutDir)" Command="$(PostBuildEvent)" /> | |
</Target> | |
<!-- | |
*********************************************************************************************** | |
*********************************************************************************************** | |
Publish Section | |
*********************************************************************************************** | |
*********************************************************************************************** | |
--> | |
<PropertyGroup> | |
<DeploymentComputeClickOnceManifestInfoDependsOn> | |
CleanPublishFolder; | |
$(_RecursiveTargetForContentCopying); | |
_DeploymentGenerateTrustInfo | |
$(DeploymentComputeClickOnceManifestInfoDependsOn) | |
</DeploymentComputeClickOnceManifestInfoDependsOn> | |
</PropertyGroup> | |
<!-- | |
============================================================ | |
Publish | |
This target is only called when doing ClickOnce publishing outside the IDE, which implicitly builds before publishing. | |
============================================================ | |
--> | |
<PropertyGroup> | |
<PublishDependsOn Condition="'$(PublishableProject)'=='true'"> | |
SetGenerateManifests; | |
Build; | |
PublishOnly | |
</PublishDependsOn> | |
<PublishDependsOn Condition="'$(PublishableProject)'!='true'"> | |
_DeploymentUnpublishable | |
</PublishDependsOn> | |
</PropertyGroup> | |
<Target Name="Publish" DependsOnTargets="$(PublishDependsOn)" /> | |
<!-- | |
============================================================ | |
_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"> | |
<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"> | |
<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> | |
<PublishOnlyDependsOn> | |
SetGenerateManifests; | |
PublishBuild; | |
BeforePublish; | |
GenerateManifests; | |
CopyFilesToOutputDirectory; | |
_CopyFilesToPublishFolder; | |
_DeploymentGenerateBootstrapper; | |
ResolveKeySource; | |
_DeploymentSignClickOnceDeployment; | |
AfterPublish | |
</PublishOnlyDependsOn> | |
</PropertyGroup> | |
<Target Name="PublishOnly" DependsOnTargets="$(PublishOnlyDependsOn)" /> | |
<!-- | |
============================================================ | |
BeforePublish | |
Redefine this target in your project in order to run tasks just before Publish. | |
============================================================ | |
--> | |
<Target Name="BeforePublish" /> | |
<!-- | |
============================================================ | |
AfterPublish | |
Redefine this target in your project in order to run tasks just after Publish. | |
============================================================ | |
--> | |
<Target Name="AfterPublish" /> | |
<!-- | |
============================================================ | |
PublishBuild | |
Defines the set of targets that publishing is directly dependent on. | |
============================================================ | |
--> | |
<PropertyGroup> | |
<PublishBuildDependsOn> | |
BuildOnlySettings; | |
PrepareForBuild; | |
ResolveReferences; | |
PrepareResources; | |
ResolveKeySource; | |
GenerateSerializationAssemblies; | |
CreateSatelliteAssemblies; | |
</PublishBuildDependsOn> | |
</PropertyGroup> | |
<Target Name="PublishBuild" DependsOnTargets="$(PublishBuildDependsOn)" /> | |
<!-- | |
============================================================ | |
_CopyFilesToPublishFolder | |
============================================================ | |
--> | |
<Target Name="_CopyFilesToPublishFolder"> | |
<!-- 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>$(ClickOncePublishDir)$(_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);
 @(_DeploymentResolvedManifestEntryPoint);
 @(_DeploymentManifestFiles);
 @(ReferenceComWrappersToCopyLocal);
 @(ResolvedIsolatedComModules);
 @(_DeploymentLooseManifestFile)" DestinationFiles="@(_ApplicationManifestFinal->'$(_DeploymentApplicationDir)%(TargetPath)');
 @(_DeploymentManifestEntryPoint->'$(_DeploymentApplicationDir)%(TargetPath)$(_DeploymentFileMappingExtension)');
 @(_DeploymentManifestFiles->'$(_DeploymentApplicationDir)%(TargetPath)$(_DeploymentFileMappingExtension)');
 @(ReferenceComWrappersToCopyLocal->'$(_DeploymentApplicationDir)%(FileName)%(Extension)$(_DeploymentFileMappingExtension)');
 @(ResolvedIsolatedComModules->'$(_DeploymentApplicationDir)%(FileName)%(Extension)$(_DeploymentFileMappingExtension)');
 @(_DeploymentLooseManifestFile->'$(_DeploymentApplicationDir)%(FileName)%(Extension)$(_DeploymentFileMappingExtension)')" 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);
 @(_DeploymentResolvedManifestEntryPoint);
 @(PublishedSingleFileToBeCopied);" DestinationFiles="@(_ApplicationManifestFinal->'$(_DeploymentApplicationDir)%(TargetPath)');
 @(_DeploymentManifestEntryPoint->'$(_DeploymentApplicationDir)%(TargetPath)$(_DeploymentFileMappingExtension)');
 @(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"> | |
<!-- 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="$(ClickOncePublishDir)" SupportUrl="$(_DeploymentFormattedSupportUrl)" Path="$(GenerateBootstrapperSdkPath)" VisualStudioVersion="$(VisualStudioVersion)" Condition="'$(BootstrapperEnabled)'=='true'" /> | |
</Target> | |
<!-- | |
============================================================ | |
_DeploymentSignClickOnceDeployment | |
============================================================ | |
--> | |
<Target Name="_DeploymentSignClickOnceDeployment"> | |
<!-- Sign manifests and the bootstrapper --> | |
<SignFile CertificateThumbprint="$(_DeploymentResolvedManifestCertificateThumbprint)" TimestampUrl="$(ManifestTimestampUrl)" SigningTarget="$(_DeploymentApplicationDir)$(_DeploymentTargetApplicationManifestFileName)" TargetFrameworkIdentifier="$(TargetFrameworkIdentifier)" TargetFrameworkVersion="$(TargetFrameworkVersion)" DisallowMansignTimestampFallback="$(DisallowMansignTimestampFallback)" Condition="'$(_DeploymentSignClickOnceManifests)'=='true'" /> | |
<!-- Update entry point path in deploy manifest --> | |
<UpdateManifest ApplicationPath="$(_DeploymentApplicationFolderName)\$(_DeploymentTargetApplicationManifestFileName)" TargetFrameworkVersion="$(_DeploymentManifestTargetFrameworkVersion)" ApplicationManifest="$(_DeploymentApplicationDir)$(_DeploymentTargetApplicationManifestFileName)" InputManifest="$(OutDir)$(TargetDeployManifestFileName)" OutputManifest="$(ClickOncePublishDir)$(TargetDeployManifestFileName)"> | |
<Output TaskParameter="OutputManifest" ItemName="PublishedDeployManifest" /> | |
</UpdateManifest> | |
<SignFile CertificateThumbprint="$(_DeploymentResolvedManifestCertificateThumbprint)" TimestampUrl="$(ManifestTimestampUrl)" SigningTarget="$(ClickOncePublishDir)$(TargetDeployManifestFileName)" TargetFrameworkIdentifier="$(TargetFrameworkIdentifier)" TargetFrameworkVersion="$(TargetFrameworkVersion)" DisallowMansignTimestampFallback="$(DisallowMansignTimestampFallback)" Condition="'$(_DeploymentSignClickOnceManifests)'=='true'" /> | |
<SignFile CertificateThumbprint="$(_DeploymentResolvedManifestCertificateThumbprint)" TimestampUrl="$(ManifestTimestampUrl)" SigningTarget="$(ClickOncePublishDir)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="
 BuiltProjectOutputGroup;
 DebugSymbolsProjectOutputGroup;
 DocumentationProjectOutputGroup;
 SatelliteDllsProjectOutputGroup;
 SourceFilesProjectOutputGroup;
 ContentFilesProjectOutputGroup;
 SGenFilesOutputGroup" /> | |
<!-- | |
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' "> | |
<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' "> | |
<WinMDExpOutputWindowsMetadataFileItem Include="$(_IntermediateWindowsMetadataPath)" Condition="'$(_IntermediateWindowsMetadataPath)' != ''" /> | |
<BuiltProjectOutputGroupKeyOutput Include="@(WinMDExpOutputWindowsMetadataFileItem->'%(FullPath)')"> | |
<IsKeyOutput>true</IsKeyOutput> | |
<FinalOutputPath>$(TargetPath)</FinalOutputPath> | |
<TargetPath>$(TargetFileName)</TargetPath> | |
</BuiltProjectOutputGroupKeyOutput> | |
</ItemGroup> | |
<!-- | |
============================================================ | |
BuiltProjectOutputGroup | |
============================================================ | |
--> | |
<PropertyGroup> | |
<BuiltProjectOutputGroupDependsOn>PrepareForBuild</BuiltProjectOutputGroupDependsOn> | |
<AddAppConfigToBuildOutputs Condition="('$(AddAppConfigToBuildOutputs)'=='') and ('$(OutputType)'!='library' and '$(OutputType)'!='winmdobj')">true</AddAppConfigToBuildOutputs> | |
</PropertyGroup> | |
<Target Name="BuiltProjectOutputGroup" Returns="@(BuiltProjectOutputGroupOutput)" DependsOnTargets="$(BuiltProjectOutputGroupDependsOn)"> | |
<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)'!='') And Exists('$(OutDir)$(_DeploymentTargetApplicationManifestFileName)')"> | |
<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> | |
<DebugSymbolsProjectOutputGroupDependsOn /> | |
</PropertyGroup> | |
<ItemGroup Condition="'$(_DebugSymbolsProduced)' != 'false' and '$(OutputType)' != 'winmdobj'"> | |
<DebugSymbolsProjectOutputGroupOutput Include="@(_DebugSymbolsIntermediatePath->'%(FullPath)')"> | |
<FinalOutputPath>@(_DebugSymbolsOutputPath->'%(FullPath)')</FinalOutputPath> | |
<TargetPath>@(_DebugSymbolsIntermediatePath->'%(Filename)%(Extension)')</TargetPath> | |
</DebugSymbolsProjectOutputGroupOutput> | |
</ItemGroup> | |
<ItemGroup Condition="'$(_DebugSymbolsProduced)' != 'false' and '$(OutputType)' == 'winmdobj'"> | |
<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)" /> | |
<!-- | |
============================================================ | |
DocumentationProjectOutputGroup | |
This target performs population of the Documentation project output group. | |
============================================================ | |
--> | |
<PropertyGroup> | |
<DocumentationProjectOutputGroupDependsOn /> | |
</PropertyGroup> | |
<ItemGroup Condition="'$(DocumentationFile)'!='' and '$(OutputType)' != 'winmdobj'"> | |
<DocumentationProjectOutputGroupOutput Include="@(DocFileItem->'%(FullPath)')"> | |
<FinalOutputPath>@(FinalDocFile->'%(FullPath)')</FinalOutputPath> | |
<IsKeyOutput>true</IsKeyOutput> | |
<TargetPath>@(DocFileItem->'%(Filename)%(Extension)')</TargetPath> | |
</DocumentationProjectOutputGroupOutput> | |
</ItemGroup> | |
<ItemGroup Condition="'$(DocumentationFile)' != '' and '$(OutputType)' == 'winmdobj'"> | |
<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)" /> | |
<!-- | |
============================================================ | |
SatelliteDllsProjectOutputGroup | |
This target performs population of the Satellite Files project output group. | |
============================================================ | |
--> | |
<PropertyGroup> | |
<SatelliteDllsProjectOutputGroupDependsOn>$(SatelliteDllsProjectOutputGroupDependsOn);PrepareForBuild;PrepareResourceNames</SatelliteDllsProjectOutputGroupDependsOn> | |
</PropertyGroup> | |
<Target Name="SatelliteDllsProjectOutputGroup" Returns="@(SatelliteDllsProjectOutputGroupOutput)" DependsOnTargets="$(SatelliteDllsProjectOutputGroupDependsOn)"> | |
<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> | |
<SourceFilesProjectOutputGroupDependsOn>PrepareForBuild;AssignTargetPaths</SourceFilesProjectOutputGroupDependsOn> | |
</PropertyGroup> | |
<Target Name="SourceFilesProjectOutputGroup" Returns="@(SourceFilesProjectOutputGroupOutput)" DependsOnTargets="$(SourceFilesProjectOutputGroupDependsOn)"> | |
<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)" /> | |
<!-- | |
============================================================ | |
ContentFilesProjectOutputGroup | |
This target performs population of the Content Files project output group. | |
Content files are items in the project whose type is "Content". | |
============================================================ | |
--> | |
<PropertyGroup> | |
<ContentFilesProjectOutputGroupDependsOn>PrepareForBuild;AssignTargetPaths</ContentFilesProjectOutputGroupDependsOn> | |
</PropertyGroup> | |
<Target Name="ContentFilesProjectOutputGroup" Returns="@(ContentFilesProjectOutputGroupOutput)" DependsOnTargets="$(ContentFilesProjectOutputGroupDependsOn)"> | |
<!-- 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> | |
<SGenFilesOutputGroupDependsOn /> | |
</PropertyGroup> | |
<ItemGroup Condition="'$(_SGenGenerateSerializationAssembliesConfig)' == 'On' or ('@(WebReferenceUrl)'!='' and '$(_SGenGenerateSerializationAssembliesConfig)' == 'Auto')"> | |
<SGenFilesOutputGroupOutput Include="@(_OutputPathItem->'%(FullPath)$(_SGenDllName)')"> | |
<FinalOutputPath>@(_OutputPathItem->'%(FullPath)$(_SGenDllName)')</FinalOutputPath> | |
<TargetPath>$(_SGenDllName)</TargetPath> | |
</SGenFilesOutputGroupOutput> | |
</ItemGroup> | |
<Target Name="SGenFilesOutputGroup" Returns="@(SGenFilesOutputGroupOutput)" DependsOnTargets="$(SGenFilesOutputGroupDependsOn)" /> | |
<!-- | |
============================================================ | |
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)" /> | |
<!-- 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)" /> | |
<!-- Get the TargetFrameworks that are supported for the Visual Studio TargetFramework drop down --> | |
<Target Name="GenerateSupportedTargetFrameworkAlias" Returns="@(SupportedTargetFrameworkAlias)" /> | |
<!-- | |
============================================================ | |
PriFilesOutputGroup | |
This target performs population of the pri files output group | |
============================================================ | |
--> | |
<Target Name="PriFilesOutputGroup" Condition="'@(_ReferenceRelatedPaths)' != ''" DependsOnTargets="BuildOnlySettings;PrepareForBuild;AssignTargetPaths;ResolveReferences" Returns="@(PriFilesOutputGroupOutput)"> | |
<!-- This item represents dependent pri file's --> | |
<ItemGroup> | |
<PriFilesOutputGroupOutput Include="@(_ReferenceRelatedPaths->'%(FullPath)')" Condition="'%(Extension)' == '.pri'" /> | |
</ItemGroup> | |
</Target> | |
<PropertyGroup> | |
<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)"> | |
<!-- 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> | |
<CommonOutputGroupsDependsOn> | |
$(CommonOutputGroupsDependsOn); | |
BuildOnlySettings; | |
PrepareForBuild; | |
AssignTargetPaths; | |
ResolveReferences | |
</CommonOutputGroupsDependsOn> | |
</PropertyGroup> | |
<!-- | |
============================================================ | |
AllProjectOutputGroupsDependencies | |
============================================================ | |
--> | |
<Target Name="AllProjectOutputGroupsDependencies" DependsOnTargets="
 BuiltProjectOutputGroupDependencies;
 DebugSymbolsProjectOutputGroupDependencies;
 SatelliteDllsProjectOutputGroupDependencies;
 DocumentationProjectOutputGroupDependencies;
 SGenFilesOutputGroupDependencies" /> | |
<!-- | |
============================================================ | |
BuiltProjectOutputGroupDependencies | |
This target performs population of the Built project output group dependencies. | |
============================================================ | |
--> | |
<PropertyGroup> | |
<BuiltProjectOutputGroupDependenciesDependsOn> | |
$(BuiltProjectOutputGroupDependenciesDependsOn); | |
$(CommonOutputGroupsDependsOn) | |
</BuiltProjectOutputGroupDependenciesDependsOn> | |
</PropertyGroup> | |
<Target Name="BuiltProjectOutputGroupDependencies" DependsOnTargets="$(BuiltProjectOutputGroupDependenciesDependsOn)" Returns="@(BuiltProjectOutputGroupDependency)"> | |
<ItemGroup> | |
<BuiltProjectOutputGroupDependency Include="@(ReferencePath->'%(FullPath)');
 @(ReferenceDependencyPaths->'%(FullPath)');
 @(NativeReferenceFile->'%(FullPath)');
 @(_DeploymentLooseManifestFile->'%(FullPath)');
 @(ResolvedIsolatedComModules->'%(FullPath)')" /> | |
</ItemGroup> | |
</Target> | |
<!-- | |
============================================================ | |
DebugSymbolsProjectOutputGroupDependencies | |
This target performs population of the dependencies for the debug symbols project output group. | |
============================================================ | |
--> | |
<PropertyGroup> | |
<DebugSymbolsProjectOutputGroupDependenciesDependsOn> | |
$(DebugSymbolsProjectOutputGroupDependenciesDependsOn); | |
$(CommonOutputGroupsDependsOn) | |
</DebugSymbolsProjectOutputGroupDependenciesDependsOn> | |
</PropertyGroup> | |
<Target Name="DebugSymbolsProjectOutputGroupDependencies" Condition="'$(DebugSymbols)'!='false'" DependsOnTargets="$(DebugSymbolsProjectOutputGroupDependenciesDependsOn)" Returns="@(DebugSymbolsProjectOutputGroupDependency)"> | |
<!-- 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> | |
<SatelliteDllsProjectOutputGroupDependenciesDependsOn> | |
$(SatelliteDllsProjectOutputGroupDependenciesDependsOn); | |
$(CommonOutputGroupsDependsOn) | |
</SatelliteDllsProjectOutputGroupDependenciesDependsOn> | |
</PropertyGroup> | |
<Target Name="SatelliteDllsProjectOutputGroupDependencies" DependsOnTargets="$(SatelliteDllsProjectOutputGroupDependenciesDependsOn)" Returns="@(SatelliteDllsProjectOutputGroupDependency)"> | |
<!-- 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> | |
<DocumentationProjectOutputGroupDependenciesDependsOn> | |
$(DocumentationProjectOutputGroupDependenciesDependsOn); | |
$(CommonOutputGroupsDependsOn) | |
</DocumentationProjectOutputGroupDependenciesDependsOn> | |
</PropertyGroup> | |
<Target Name="DocumentationProjectOutputGroupDependencies" Condition="'$(DocumentationFile)'!=''" DependsOnTargets="$(DocumentationProjectOutputGroupDependenciesDependsOn)" Returns="@(DocumentationProjectOutputGroupDependency)"> | |
<!-- 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> | |
<SGenFilesOutputGroupDependenciesDependsOn> | |
$(SGenFilesOutputGroupDependenciesDependsOn); | |
$(CommonOutputGroupsDependsOn) | |
</SGenFilesOutputGroupDependenciesDependsOn> | |
</PropertyGroup> | |
<Target Name="SGenFilesOutputGroupDependencies" DependsOnTargets="$(SGenFilesOutputGroupDependenciesDependsOn)" Returns="@(SGenFilesOutputGroupDependency)"> | |
<!-- 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> | |
<ReferenceCopyLocalPathsOutputGroupDependsOn> | |
$(ReferenceCopyLocalPathsOutputGroupDependsOn); | |
$(CommonOutputGroupsDependsOn) | |
</ReferenceCopyLocalPathsOutputGroupDependsOn> | |
</PropertyGroup> | |
<Target Name="ReferenceCopyLocalPathsOutputGroup" DependsOnTargets="$(ReferenceCopyLocalPathsOutputGroupDependsOn)" Returns="@(ReferenceCopyLocalPathsOutputGroupOutput)"> | |
<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> | |
<DesignerRuntimeImplementationProjectOutputGroupDependsOn> | |
$(DesignerRuntimeImplementationProjectOutputGroupDependsOn); | |
$(CommonOutputGroupsDependsOn) | |
</DesignerRuntimeImplementationProjectOutputGroupDependsOn> | |
</PropertyGroup> | |
<Target Name="DesignerRuntimeImplementationProjectOutputGroup" DependsOnTargets="$(DesignerRuntimeImplementationProjectOutputGroupDependsOn)" Returns="@(DesignerRuntimeImplementationProjectOutputGroupOutput)" /> | |
<!-- | |
============================================================ | |
.editorconfig support | |
============================================================ | |
--> | |
<!-- Expose the set of potential .editorconfig files so the project system can | |
retrieve them. --> | |
<Target Name="GetPotentialEditorConfigFiles" Returns="@(PotentialEditorConfigFiles)" /> | |
<PropertyGroup> | |
<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> | |
<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> | |
<MsTestToolsTargets Condition="'$(MsTestToolsTargets)'==''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\TeamTest\Microsoft.TeamTest.targets</MsTestToolsTargets> | |
</PropertyGroup> | |
<!--<Import Project="$(MsTestToolsTargets)" Condition="Exists('$(MsTestToolsTargets)')" />--> | |
<PropertyGroup> | |
<UseMSBuildTestInfrastructure Condition="'$(UseMSBuildTestInfrastructure)' == ''">false</UseMSBuildTestInfrastructure> | |
</PropertyGroup> | |
<!--<Import Project="$(MSBuildToolsPath)\Microsoft.Common.Test.targets" Condition="'$(UseMSBuildTestInfrastructure)' == 'true'" />--> | |
<!-- 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" /> | |
<Target Name="GetPackagingOutputs" /> | |
<PropertyGroup> | |
<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> | |
<MSBuildUseVisualStudioDirectoryLayout Condition="'$(MSBuildUseVisualStudioDirectoryLayout)'==''">$([MSBuild]::IsRunningFromVisualStudio())</MSBuildUseVisualStudioDirectoryLayout> | |
<NuGetRestoreTargets Condition="'$(NuGetRestoreTargets)'=='' and '$(MSBuildUseVisualStudioDirectoryLayout)'=='true'">$([MSBuild]::GetToolsDirectory32())\..\..\..\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\8.0.404\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> | |
<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> | |
<!-- | |
Visual Studio's project property page requires defaults to be set to inform customers what the default values are. | |
Project-system uses DefaultValueSourceLocation.AfterContext to detect when a customer's project changes the value, so these defaults must be set here in the targets file. | |
--> | |
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<!-- Enable NuGetAudit by default --> | |
<NuGetAudit Condition=" '$(NuGetAudit)' == '' ">true</NuGetAudit> | |
<!-- Report on low severity vulnerabilities, and higher. Allowed values are: low, moderate, high, critical --> | |
<NuGetAuditLevel Condition=" '$(NuGetAuditLevel)' == '' ">low</NuGetAuditLevel> | |
<!-- Report known vulnerabilities on direct dependencies only. Allowed values are: direct, all --> | |
<NuGetAuditMode Condition="'$(NuGetAuditMode)' == ''
 AND '$(NuGetExeSkipSdkAnalysisLevelCheck)' != 'true'
 AND $([MSBuild]::VersionGreaterThanOrEquals($([MSBuild]::ValueOrDefault('$(SdkAnalysisLevel)', '0.0')), '9.0.100'))">all</NuGetAuditMode> | |
<NuGetAuditMode Condition=" '$(NuGetAuditMode)' == '' ">direct</NuGetAuditMode> | |
</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> | |
<ItemGroup Condition="'$(ManagePackageVersionsCentrally)' == 'true' And '$(RestoreEnableGlobalPackageReference)' != 'false'" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<!-- | |
Add GlobalPackageReference items to the PackageReference item group with no version. | |
Global package references only include the same assets as a development dependency (runtime; build; native; contentfiles; analyzers) | |
because those kind of packages are the best candidate for a global package reference. They are generally packages that | |
extend the build. | |
Global package references have all assets private because central package references are generally packages that provide | |
versioning, signing, etc and should not flow to downstream dependencies. Also, central package references are already | |
referenced by every project in the tree so they don't need to be transitive. | |
--> | |
<PackageReference Include="@(GlobalPackageReference)" Version="" IncludeAssets="Runtime;Build;Native;contentFiles;Analyzers" PrivateAssets="All" /> | |
<!-- | |
Add GlobalPackageReference items to the PackageVersion item group with the version. | |
--> | |
<PackageVersion Include="@(GlobalPackageReference)" Version="%(Version)" /> | |
</ItemGroup> | |
<!-- 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.GetRestoreNuGetAuditSuppressionsTask" 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" /> | |
<UsingTask TaskName="NuGet.Build.Tasks.CheckForDuplicateNuGetItemsTask" AssemblyFile="$(RestoreTaskAssemblyFile)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" /> | |
<UsingTask TaskName="NuGet.Build.Tasks.GetGlobalPropertyValueTask" 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)" RestoreNoHttpCache="$(RestoreNoHttpCache)" RestoreIgnoreFailedSources="$(RestoreIgnoreFailedSources)" RestoreRecursive="$(RestoreRecursive)" RestoreForce="$(RestoreForce)" HideWarningsAndErrors="$(HideWarningsAndErrors)" Interactive="$(NuGetInteractive)" RestoreForceEvaluate="$(RestoreForceEvaluate)" RestorePackagesConfig="$(RestorePackagesConfig)" EmbedFilesInBinlog="$(RestoreEmbedFilesInBinlog)"> | |
<Output TaskParameter="EmbedInBinlog" ItemName="EmbedInBinlog" /> | |
</RestoreTask> | |
</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"> | |
<!-- NOTE for design-time builds we need to ensure that we continue on error. --> | |
<PropertyGroup> | |
<CollectPackageReferencesContinueOnError>$(ContinueOnError)</CollectPackageReferencesContinueOnError> | |
<CollectPackageReferencesContinueOnError Condition="'$(ContinueOnError)' == '' ">false</CollectPackageReferencesContinueOnError> | |
</PropertyGroup> | |
<CheckForDuplicateNuGetItemsTask Condition="'$(DisableCheckingDuplicateNuGetItems)' != 'true' " Items="@(PackageReference)" ItemName="PackageReference" LogCode="NU1504" MSBuildProjectFullPath="$(MSBuildProjectFullPath)" TreatWarningsAsErrors="$(TreatWarningsAsErrors)" WarningsAsErrors="$(WarningsAsErrors)" WarningsNotAsErrors="$(WarningsNotAsErrors)" NoWarn="$(NoWarn)" ContinueOnError="$(CollectPackageReferencesContinueOnError)"> | |
<Output TaskParameter="DeduplicatedItems" ItemName="DeduplicatedPackageReferences" /> | |
</CheckForDuplicateNuGetItemsTask> | |
<ItemGroup Condition="'@(DeduplicatedPackageReferences)' != ''"> | |
<PackageReference Remove="@(PackageReference)" /> | |
<PackageReference Include="@(DeduplicatedPackageReferences)" /> | |
</ItemGroup> | |
</Target> | |
<!-- | |
============================================================ | |
CollectCentralPackageVersions | |
Gathers all PackageVersion items from the central package versions file. | |
============================================================ | |
--> | |
<Target Name="CollectCentralPackageVersions" Returns="@(PackageVersion)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<!-- NOTE for design-time builds we need to ensure that we continue on error. --> | |
<PropertyGroup> | |
<CollectCentralPackageVersionsContinueOnError>$(ContinueOnError)</CollectCentralPackageVersionsContinueOnError> | |
<CollectCentralPackageVersionsContinueOnError Condition="'$(ContinueOnError)' == '' ">false</CollectCentralPackageVersionsContinueOnError> | |
</PropertyGroup> | |
<CheckForDuplicateNuGetItemsTask Condition="'$(DisableCheckingDuplicateNuGetItems)' != 'true' " Items="@(PackageVersion)" ItemName="PackageVersion" LogCode="NU1506" MSBuildProjectFullPath="$(MSBuildProjectFullPath)" TreatWarningsAsErrors="$(TreatWarningsAsErrors)" WarningsAsErrors="$(WarningsAsErrors)" WarningsNotAsErrors="$(WarningsNotAsErrors)" NoWarn="$(NoWarn)" ContinueOnError="$(CollectCentralPackageVersionsContinueOnError)"> | |
<Output TaskParameter="DeduplicatedItems" ItemName="DeduplicatedPackageVersions" /> | |
</CheckForDuplicateNuGetItemsTask> | |
<ItemGroup Condition="'@(DeduplicatedPackageVersions)' != ''"> | |
<PackageVersion Remove="@(PackageVersion)" /> | |
<PackageVersion Include="@(DeduplicatedPackageVersions)" /> | |
</ItemGroup> | |
</Target> | |
<!-- | |
============================================================ | |
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"> | |
<!-- NOTE for design-time builds we need to ensure that we continue on error. --> | |
<PropertyGroup> | |
<CollectPackageDownloadsContinueOnError>$(ContinueOnError)</CollectPackageDownloadsContinueOnError> | |
<CollectPackageDownloadsContinueOnError Condition="'$(ContinueOnError)' == '' ">false</CollectPackageDownloadsContinueOnError> | |
</PropertyGroup> | |
<CheckForDuplicateNuGetItemsTask Condition="'$(DisableCheckingDuplicateNuGetItems)' != 'true' " Items="@(PackageDownload)" ItemName="PackageDownload" LogCode="NU1505" MSBuildProjectFullPath="$(MSBuildProjectFullPath)" TreatWarningsAsErrors="$(TreatWarningsAsErrors)" WarningsAsErrors="$(WarningsAsErrors)" WarningsNotAsErrors="$(WarningsNotAsErrors)" NoWarn="$(NoWarn)" ContinueOnError="$(CollectPackageDownloadsContinueOnError)"> | |
<Output TaskParameter="DeduplicatedItems" ItemName="DeduplicatedPackageDownloads" /> | |
</CheckForDuplicateNuGetItemsTask> | |
<ItemGroup Condition="'@(DeduplicatedPackageDownloads)' != ''"> | |
<PackageDownload Remove="@(PackageDownload)" /> | |
<PackageDownload Include="@(DeduplicatedPackageDownloads)" /> | |
</ItemGroup> | |
</Target> | |
<!-- | |
============================================================ | |
CollectFrameworkReferences | |
============================================================ | |
--> | |
<Target Name="CollectFrameworkReferences" Returns="@(_FrameworkReferenceForRestore)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<ItemGroup> | |
<_FrameworkReferenceForRestore Include="@(FrameworkReference)" Condition="'%(FrameworkReference.IsTransitiveFrameworkReference)' != 'true'" /> | |
</ItemGroup> | |
</Target> | |
<!-- | |
============================================================ | |
CollectNuGetAuditSuppressions | |
Gathers all NuGetAuditSuppress items from the project. | |
This target may be used as an extension point to modify | |
advisory suppressions before NuGet reads them. | |
============================================================ | |
--> | |
<Target Name="CollectNuGetAuditSuppressions" Returns="@(NuGetAuditSuppress)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<!-- NOTE for design-time builds we need to ensure that we continue on error. --> | |
<PropertyGroup> | |
<CollectNuGetAuditSuppressionsContinueOnError>$(ContinueOnError)</CollectNuGetAuditSuppressionsContinueOnError> | |
<CollectNuGetAuditSuppressionsContinueOnError Condition="'$(ContinueOnError)' == '' ">false</CollectNuGetAuditSuppressionsContinueOnError> | |
</PropertyGroup> | |
<CheckForDuplicateNuGetItemsTask Items="@(NuGetAuditSuppress)" ItemName="NuGetAuditSuppress" LogCode="NU1505" MSBuildProjectFullPath="$(MSBuildProjectFullPath)" TreatWarningsAsErrors="$(TreatWarningsAsErrors)" WarningsAsErrors="$(WarningsAsErrors)" WarningsNotAsErrors="$(WarningsNotAsErrors)" NoWarn="$(NoWarn)" ContinueOnError="$(CollectNuGetAuditSuppressionsContinueOnError)"> | |
<Output TaskParameter="DeduplicatedItems" ItemName="DeduplicatedNuGetAuditSuppressions" /> | |
</CheckForDuplicateNuGetItemsTask> | |
<ItemGroup Condition="'@(DeduplicatedNuGetAuditSuppressions)' != ''"> | |
<NuGetAuditSuppress Remove="@(NuGetAuditSuppress)" /> | |
<NuGetAuditSuppress Include="@(DeduplicatedNuGetAuditSuppressions)" /> | |
</ItemGroup> | |
</Target> | |
<!-- | |
============================================================ | |
_CollectRestoreInputs | |
Runs all the 'Collect' targets | |
============================================================ | |
--> | |
<Target Name="_CollectRestoreInputs" DependsOnTargets="CollectPackageReferences;CollectPackageDownloads;CollectFrameworkReferences;CollectCentralPackageVersions;CollectNuGetAuditSuppressions" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" /> | |
<!-- | |
============================================================ | |
_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
 '%(RestoreGraphProjectInputItems.Extension)' == '.vbproj' Or
 '%(RestoreGraphProjectInputItems.Extension)' == '.fsproj' Or
 '%(RestoreGraphProjectInputItems.Extension)' == '.nuproj' Or
 '%(RestoreGraphProjectInputItems.Extension)' == '.proj' Or
 '%(RestoreGraphProjectInputItems.Extension)' == '.msbuildproj' Or
 '%(RestoreGraphProjectInputItems.Extension)' == '.vcxproj' " /> | |
</ItemGroup> | |
<!-- Filter out disallowed types --> | |
<ItemGroup Condition=" '$(RestoreProjectFilterMode)' == 'exclusionlist' "> | |
<_FilteredRestoreGraphProjectInputItemsTmp Include="@(RestoreGraphProjectInputItems)" Condition=" '%(RestoreGraphProjectInputItems.Extension)' != '.metaproj'
 AND '%(RestoreGraphProjectInputItems.Extension)' != '.shproj'
 AND '%(RestoreGraphProjectInputItems.Extension)' != '.vcxitems'
 AND '%(RestoreGraphProjectInputItems.Extension)' != '.vdproj'
 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)' < '15.0'"> | |
<_HasPackageReferenceItems Condition="'@(PackageReference)' != ''">true</_HasPackageReferenceItems> | |
</PropertyGroup> | |
<PropertyGroup Condition="'$(MSBuildAssemblyVersion)' >= '15.0'"> | |
<_HasPackageReferenceItems Condition="@(PackageReference->Count()) > 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;_GetRestoreTargetFrameworkOverride" Returns="@(_RestoreTargetFrameworksOutputFiltered)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<PropertyGroup> | |
<_RestoreProjectFramework /> | |
<_TargetFrameworkToBeUsed Condition=" '$(_TargetFrameworkOverride)' == '' ">$(TargetFrameworks)</_TargetFrameworkToBeUsed> | |
</PropertyGroup> | |
<!-- For project.json projects target frameworks will be read from project.json. --> | |
<GetProjectTargetFrameworksTask Condition=" '$(RestoreProjectStyle)' != 'ProjectJson'" ProjectPath="$(MSBuildProjectFullPath)" TargetFrameworks="$(_TargetFrameworkToBeUsed)" 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. | |
If $(TargetFramework) is specified globally, it'll be preferred over $(TargetFrameworks) | |
============================================================ | |
--> | |
<Target Name="_GetRestoreTargetFrameworksAsItems" DependsOnTargets="_GetRestoreProjectStyle;_GetRestoreTargetFrameworkOverride" Returns="@(_RestoreTargetFrameworkItems)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<ItemGroup Condition=" '$(TargetFrameworks)' != '' AND '$(_TargetFrameworkOverride)' == '' "> | |
<_RestoreTargetFrameworkItems Include="$(TargetFrameworks.Split(';'))" /> | |
</ItemGroup> | |
<ItemGroup Condition=" '$(TargetFrameworks)' != '' AND '$(_TargetFrameworkOverride)' != '' "> | |
<_RestoreTargetFrameworkItems Include="$(_TargetFrameworkOverride)" /> | |
</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" /> | |
<!-- | |
============================================================ | |
_GetRestoreSettingsAllFrameworks | |
Generate items for all frameworks. | |
============================================================ | |
--> | |
<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);
 $(_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-PackageReference 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> | |
<WarningsNotAsErrors>$(WarningsNotAsErrors)</WarningsNotAsErrors> | |
<NoWarn>$(NoWarn)</NoWarn> | |
<RestorePackagesWithLockFile>$(RestorePackagesWithLockFile)</RestorePackagesWithLockFile> | |
<NuGetLockFilePath>$(NuGetLockFilePath)</NuGetLockFilePath> | |
<RestoreLockedMode>$(RestoreLockedMode)</RestoreLockedMode> | |
<_CentralPackageVersionsEnabled>$(_CentralPackageVersionsEnabled)</_CentralPackageVersionsEnabled> | |
<CentralPackageFloatingVersionsEnabled>$(CentralPackageFloatingVersionsEnabled)</CentralPackageFloatingVersionsEnabled> | |
<CentralPackageVersionOverrideEnabled>$(CentralPackageVersionOverrideEnabled)</CentralPackageVersionOverrideEnabled> | |
<CentralPackageTransitivePinningEnabled>$(CentralPackageTransitivePinningEnabled)</CentralPackageTransitivePinningEnabled> | |
<NuGetAudit>$(NuGetAudit)</NuGetAudit> | |
<NuGetAuditLevel>$(NuGetAuditLevel)</NuGetAuditLevel> | |
<NuGetAuditMode>$(NuGetAuditMode)</NuGetAuditMode> | |
</_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> | |
<NuGetAudit>$(NuGetAudit)</NuGetAudit> | |
<NuGetAuditLevel>$(NuGetAuditLevel)</NuGetAuditLevel> | |
</_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="
 _GetRestoreProjectStyle;
 _GenerateRestoreProjectSpec;
 _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);
 $(_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;_CollectRestoreInputs" 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 advisory suppressions--> | |
<GetRestoreNuGetAuditSuppressionsTask Condition=" '$(PackageReferenceCompatibleProjectStyle)' == 'true' " ProjectUniqueName="$(MSBuildProjectFullPath)" NuGetAuditSuppressions="@(NuGetAuditSuppress)" TargetFrameworks="$(TargetFramework)"> | |
<Output TaskParameter="RestoreGraphItems" ItemName="_RestoreGraphEntry" /> | |
</GetRestoreNuGetAuditSuppressionsTask> | |
<!-- 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> | |
<CLRSupport>$(CLRSupport)</CLRSupport> | |
<RuntimeIdentifierGraphPath>$(RuntimeIdentifierGraphPath)</RuntimeIdentifierGraphPath> | |
<WindowsTargetPlatformMinVersion>$(WindowsTargetPlatformMinVersion)</WindowsTargetPlatformMinVersion> | |
</_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);
 $(_GenerateRestoreGraphProjectEntryInputProperties)"> | |
<Output TaskParameter="TargetOutputs" ItemName="_RestoreProjectPathItems" /> | |
</MSBuild> | |
<!-- Without SkipNonexistentTargets support --> | |
<MSBuild Condition=" '$(RestoreUseSkipNonexistentTargets)' != 'true' " Projects="$(MSBuildProjectFullPath)" Targets="_GenerateRestoreProjectPathItemsPerFramework" ContinueOnError="$(RestoreContinueOnError)" Properties="TargetFramework=%(_RestoreTargetFrameworkItems.Identity);
 $(_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> | |
<!-- | |
============================================================ | |
_GetRestoreTargetFrameworkOverride | |
============================================================ | |
--> | |
<Target Name="_GetRestoreTargetFrameworkOverride" Condition=" '$(_DisableNuGetRestoreTargetFrameworksOverride)' != 'true' " Returns="$(_TargetFrameworkOverride)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<GetGlobalPropertyValueTask PropertyName="TargetFramework" Condition=" '$(TargetFrameworks)' != '' "> | |
<Output TaskParameter="GlobalPropertyValue" PropertyName="_TargetFrameworkOverride" /> | |
</GetGlobalPropertyValueTask> | |
<!-- Only set the override if TargetFrameworks has not been overriden as well. In that case, prefer it. --> | |
</Target> | |
<!-- | |
============================================================ | |
_GetTargetFrameworkOverrides | |
============================================================ | |
--> | |
<Target Name="_GetTargetFrameworkOverrides" Returns="$(_TargetFrameworkOverride)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<PropertyGroup> | |
<_TargetFrameworkOverride Condition=" '$(TargetFrameworks)' == '' ">$(TargetFramework)</_TargetFrameworkOverride> | |
</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\8.0.404\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\8.0.404\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\8.0.404\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\net8.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\8.0.404\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\8.0.404\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\8.0.404\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> | |
<VSTestNoBuild Condition="'$(VSTestNoBuild)' == ''">False</VSTestNoBuild> | |
<VsTestUseMSBuildOutput Condition="'$(VsTestUseMSBuildOutput)' == ''">False</VsTestUseMSBuildOutput> | |
</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" /> | |
<UsingTask TaskName="Microsoft.TestPlatform.Build.Tasks.VSTestTask2" 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"> | |
<!-- Unloggable colorized output (cf. https://github.com/microsoft/vstest/issues/680) --> | |
<CallTarget Targets="_VSTestConsole" Condition="!$(VsTestUseMSBuildOutput) OR $(MSBUILDENSURESTDOUTFORTASKPROCESSES) == '1'" /> | |
<!-- Proper MSBuild integration, but no custom colorization --> | |
<CallTarget Targets="_VSTestMSBuild" Condition="$(VsTestUseMSBuildOutput)" /> | |
</Target> | |
<!-- | |
Used when called from dotnet msbuild command line: uses MSBuild logs but does not allow for console colorization. | |
We call to empty target _TestRunStart to mark start of the actual test running, in case we need to do build before | |
the test running. This is used in MSBuild Terminal Logger to detect that the current project will run some tests. | |
--> | |
<Target Name="_VSTestMSBuild" Condition="'$(IsTestProject)' == 'true'" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<CallTarget Condition="!$(VSTestNoBuild)" Targets="BuildProject" /> | |
<CallTarget Targets="_TestRunStart" /> | |
<VSTestTask2 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)" VSTestArtifactsProcessingMode="$(VSTestArtifactsProcessingMode)" VSTestSessionCorrelationId="$(VSTestSessionCorrelationId)" VSTestNoLogo="$(VSTestNoLogo)" /> | |
</Target> | |
<Target Name="_TestRunStart" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" /> | |
<!-- Used when called from dotnet test command line: does not use MSBuild logs to allow for console colorization --> | |
<Target Name="_VSTestConsole" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<CallTarget Condition="'$(VSTestNoBuild)' != 'true' AND '$(IsTestProject)' == 'true'" Targets="BuildProject" /> | |
<CallTarget Targets="ShowCallOfVSTestTaskWithParameter" /> | |
<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)" VSTestArtifactsProcessingMode="$(VSTestArtifactsProcessingMode)" VSTestSessionCorrelationId="$(VSTestSessionCorrelationId)" VSTestNoLogo="$(VSTestNoLogo)" Condition="'$(IsTestProject)' == 'true'" /> | |
</Target> | |
<Target Name="ShowInfoMessageIfProjectHasNoIsTestProjectProperty" Condition="'$(IsTestProject)' == ''" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<VSTestLogsTask LogType="NoIsTestProjectProperty" ProjectFilePath="$(MSBuildProjectFullPath)" /> | |
</Target> | |
<Target Name="BuildProject" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<CallTarget Targets="ShowMsbuildWithParameter" /> | |
<VSTestLogsTask LogType="BuildStarted" /> | |
<MSBuild Projects="$(MSBuildProjectFullPath)" /> | |
<VSTestLogsTask LogType="BuildCompleted" /> | |
<Message Importance="Low" Text="Done Building project $(MSBuildProjectFullPath) for TargetFramework=$(TargetFramework)" /> | |
</Target> | |
<Target Name="ShowMsbuildWithParameter" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<Message Importance="Low" Text="Building project $(MSBuildProjectFullPath) for TargetFramework=$(TargetFramework)" /> | |
<Message Importance="Low" Text="Value passed to msbuild are..." /> | |
<Message Importance="Low" Text="Configuration = $(Configuration)" /> | |
<Message Importance="Low" Text="TargetFramework = $(TargetFramework)" /> | |
<Message Importance="Low" Text="Platform = $(PlatformTarget)" /> | |
<Message Importance="Low" Text="OutputPath = $(OutputPath)" /> | |
</Target> | |
<Target Name="ShowCallOfVSTestTaskWithParameter" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<Message Importance="Low" Text="Calling task Microsoft.TestPlatform.Build.Tasks.VSTestTask with following parameter..." /> | |
<Message Importance="Low" Text="TestFileFullPath = $(TargetPath)" /> | |
<Message Importance="Low" Text="VSTestSetting = $(VSTestSetting)" /> | |
<Message Importance="Low" Text="VSTestTestAdapterPath = $(VSTestTestAdapterPath)" /> | |
<Message Importance="Low" Text="VSTestFramework = $(TargetFrameworkMoniker)" /> | |
<Message Importance="Low" Text="VSTestPlatform = $(PlatformTarget)" /> | |
<Message Importance="Low" Text="VSTestTestCaseFilter = $(VSTestTestCaseFilter)" /> | |
<Message Importance="Low" Text="VSTestLogger = $(VSTestLogger)" /> | |
<Message Importance="Low" Text="VSTestListTests = $(VSTestListTests)" /> | |
<Message Importance="Low" Text="VSTestDiag = $(VSTestDiag)" /> | |
<Message Importance="Low" Text="VSTestCLIRunSettings = $(VSTestCLIRunSettings)" /> | |
<Message Importance="Low" Text="VSTestResultsDirectory = $(VSTestResultsDirectory)" /> | |
<Message Importance="Low" Text="VSTestConsolePath = $(VSTestConsolePath)" /> | |
<Message Importance="Low" Text="VSTestVerbosity = $(VSTestVerbosity)" /> | |
<Message Importance="Low" Text="VSTestCollect = $(VSTestCollect)" /> | |
<Message Importance="Low" Text="VSTestBlame = $(VSTestBlame)" /> | |
<Message Importance="Low" Text="VSTestTraceDataCollectorDirectoryPath = $(TraceDataCollectorDirectoryPath)" /> | |
<Message Importance="Low" Text="VSTestNoLogo = $(VSTestNoLogo)" /> | |
</Target> | |
<!-- | |
============================================================================================================================================ | |
</Import> | |
C:\Program Files\dotnet\sdk\8.0.404\Current\Microsoft.Common.targets\ImportAfter\Microsoft.TestPlatform.ImportAfter.targets | |
============================================================================================================================================ | |
--> | |
<!-- | |
============================================================================================================================================ | |
</Import> | |
C:\Program Files\dotnet\sdk\8.0.404\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\8.0.404\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> | |
<!-- | |
Don't import project extensions during restore because NuGet restore generates them. Importing them during restore will embed | |
the pre-restore files in the binary log and then NuGet won't be able to embed the generated one after restore. If some other | |
project extension mechanism wants to import project extensions during restore, they need to explicitly set ImportProjectExtensionTargets | |
--> | |
<ImportProjectExtensionTargets Condition="$([MSBuild]::AreFeaturesEnabled('17.10')) And '$(ImportProjectExtensionTargets)' == '' And '$(MSBuildIsRestoring)' == 'true'">false</ImportProjectExtensionTargets> | |
<ImportProjectExtensionTargets Condition="'$(ImportProjectExtensionTargets)' == ''">true</ImportProjectExtensionTargets> | |
</PropertyGroup> | |
<!-- | |
============================================================================================================================================ | |
<Import Project="$(MSBuildProjectExtensionsPath)$(MSBuildProjectFile).*.targets" Condition="'$(ImportProjectExtensionTargets)' == 'true' and exists('$(MSBuildProjectExtensionsPath)')"> | |
D:\Projects\App-Workspace\Csharp\minimalref\obj\minimalref.csproj.nuget.g.targets | |
============================================================================================================================================ | |
--> | |
<!--<ImportGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">--> | |
<!-- | |
============================================================================================================================================ | |
<Import Project="$(NuGetPackageRoot)microsoft.extensions.apidescription.server\6.0.5\build\Microsoft.Extensions.ApiDescription.Server.targets" Condition="Exists('$(NuGetPackageRoot)microsoft.extensions.apidescription.server\6.0.5\build\Microsoft.Extensions.ApiDescription.Server.targets')"> | |
C:\Users\you\.nuget\packages\microsoft.extensions.apidescription.server\6.0.5\build\Microsoft.Extensions.ApiDescription.Server.targets | |
============================================================================================================================================ | |
--> | |
<PropertyGroup> | |
<_IsMicrosoftNETCoreApp20OrOlder>false</_IsMicrosoftNETCoreApp20OrOlder> | |
<_IsMicrosoftNETCoreApp20OrOlder Condition=" '$(TargetFrameworkIdentifier)' == '.NETCoreApp' AND
 $([MSBuild]::VersionLessThanOrEquals('$(TargetFrameworkVersion)', '2.0')) ">true</_IsMicrosoftNETCoreApp20OrOlder> | |
</PropertyGroup> | |
<PropertyGroup Condition=" '$(OpenApiGenerateDocuments)' == '' "> | |
<OpenApiGenerateDocuments>true</OpenApiGenerateDocuments> | |
<OpenApiGenerateDocuments Condition=" $(_IsMicrosoftNETCoreApp20OrOlder) " /> | |
</PropertyGroup> | |
<PropertyGroup Condition=" '$(OpenApiGenerateDocumentsOnBuild)' == '' "> | |
<OpenApiGenerateDocumentsOnBuild>$(OpenApiGenerateDocuments)</OpenApiGenerateDocumentsOnBuild> | |
</PropertyGroup> | |
<PropertyGroup> | |
<_OpenApiDocumentsCache>$(BaseIntermediateOutputPath)$(MSBuildProjectName).OpenApiFiles.cache</_OpenApiDocumentsCache> | |
</PropertyGroup> | |
<ItemGroup Condition=" '$(OpenApiGenerateDocuments)' == 'true' "> | |
<ProjectCapability Include="OpenApiGenerateDocuments" /> | |
</ItemGroup> | |
<Target Name="OpenApiGetDocuments" Returns="@(_OpenApiProjectDocuments)"> | |
<!-- E.g. a client project has @(OpenApiProjectReference) item for project that does not support doc generation. --> | |
<Error Condition=" '$(OpenApiGenerateDocuments)' != 'true' " Text="OpenAPI document generation is disabled. Add '<OpenApiGenerateDocuments>true</OpenApiGenerateDocuments>' to the project." /> | |
<!-- E.g. project set $(OpenApiGenerateDocuments) to 'true' but TFM is not supported. --> | |
<Error Condition=" $(_IsMicrosoftNETCoreApp20OrOlder) " Text="OpenAPI document generation is not supported when targeting netcoreapp2.0 or earlier. Disable the feature or move to a later target framework." /> | |
<!-- E.g. project set $(OpenApiGenerateDocumentsOnBuild) to 'false' but did not invoke GenerateOpenApiDocuments. --> | |
<Error Condition=" !Exists('$(_OpenApiDocumentsCache)' )" Text="$(_OpenApiDocumentsCache) file does not exist. Add '<OpenApiGenerateDocumentsOnBuild>true</OpenApiGenerateDocumentsOnBuild>' to the project or call the GenerateOpenApiDocuments target." /> | |
<ReadLinesFromFile File="$(_OpenApiDocumentsCache)"> | |
<Output TaskParameter="Lines" ItemName="_OpenApiProjectDocuments" /> | |
</ReadLinesFromFile> | |
<!-- Fallback error in case something slips through the insider's error checking. --> | |
<Error Condition=" '@(_OpenApiProjectDocuments)' == '' " Text="Application does not have any registered documents. Update its 'Startup' class to register a document." /> | |
</Target> | |
<Target Name="GenerateOpenApiDocuments" Inputs="$(TargetPath)" Outputs="$(_OpenApiDocumentsCache)"> | |
<!-- E.g. project sets $(OpenApiGenerateDocumentsOnBuild) to 'true' but $(OpenApiGenerateDocuments) is 'false'. --> | |
<Error Condition=" '$(OpenApiGenerateDocuments)' != 'true' " Text="OpenAPI document generation is disabled. Add '<OpenApiGenerateDocuments>true</OpenApiGenerateDocuments>' to the project." /> | |
<!-- E.g. project sets $(OpenApiGenerateDocuments) to 'true' but TFM is not supported. --> | |
<Error Condition=" $(_IsMicrosoftNETCoreApp20OrOlder) " Text="OpenAPI document generation is not supported when targeting netcoreapp2.0 or earlier. Disable the feature or move to a later target framework." /> | |
<PropertyGroup> | |
<_Command>dotnet "$(MSBuildThisFileDirectory)../tools/dotnet-getdocument.dll" --assembly "$(TargetPath)"</_Command> | |
<_Command>$(_Command) --file-list "$(_OpenApiDocumentsCache)" --framework "$(TargetFrameworkMoniker)"</_Command> | |
<_Command>$(_Command) --output "$(OpenApiDocumentsDirectory.TrimEnd('\'))" --project "$(MSBuildProjectName)"</_Command> | |
<_Command Condition=" '$(ProjectAssetsFile)' != '' ">$(_Command) --assets-file "$(ProjectAssetsFile)"</_Command> | |
<_Command Condition=" '$(PlatformTarget)' != '' ">$(_Command) --platform "$(PlatformTarget)"</_Command> | |
<_Command Condition=" '$(PlatformTarget)' == '' AND '$(Platform)' != '' ">$(_Command) --platform "$(Platform)"</_Command> | |
<_Command Condition=" '$(RuntimeIdentifier)' != '' ">$(_Command) --runtime "$(RuntimeIdentifier)"</_Command> | |
<_Command>$(_Command) $(OpenApiGenerateDocumentsOptions)</_Command> | |
</PropertyGroup> | |
<Message Importance="high" Text="%0AGenerateOpenApiDocuments:" /> | |
<Message Importance="high" Text=" $(_Command)" /> | |
<Exec Command="$(_Command)" LogStandardErrorAsError="true" /> | |
</Target> | |
<!-- Unless this is an inner build or default timing is disabled, tie document retrieval into the build. --> | |
<Target Name="_GenerateOpenApiDocuments" BeforeTargets="Build" Condition=" '$(OpenApiGenerateDocumentsOnBuild)' == 'true' AND ('$(TargetFramework)' == '' OR '$(TargetFrameworks)' == '') " DependsOnTargets="GenerateOpenApiDocuments" /> | |
<!-- | |
============================================================================================================================================ | |
</Import> | |
D:\Projects\App-Workspace\Csharp\minimalref\obj\minimalref.csproj.nuget.g.targets | |
============================================================================================================================================ | |
--> | |
<!--</ImportGroup>--> | |
<!-- | |
============================================================================================================================================ | |
</Import> | |
C:\Program Files\dotnet\sdk\8.0.404\Microsoft.Common.targets | |
============================================================================================================================================ | |
--> | |
<PropertyGroup> | |
<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)' == ''"> | |
<_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="$(CustomBeforeDirectoryBuildTargets)" Condition="'$(CustomBeforeDirectoryBuildTargets)' != ''" />--> | |
<!--<Import Project="$(DirectoryBuildTargetsPath)" Condition="'$(ImportDirectoryBuildTargets)' == 'true' and exists('$(DirectoryBuildTargetsPath)')" />--> | |
<!--<Import Project="$(CustomAfterDirectoryBuildTargets)" Condition="'$(CustomAfterDirectoryBuildTargets)' != ''" />--> | |
<!-- | |
============================================================================================================================================ | |
</Import> | |
C:\Program Files\dotnet\sdk\8.0.404\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"> | |
<PropertyGroup> | |
<TargetFrameworkMonikerAssemblyAttributeText Condition="'$(TargetFrameworkMoniker)' != '' and '$(TargetingClr2Framework)' != 'true'"> | |
// <autogenerated /> | |
using System%3b | |
using System.Reflection%3b | |
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute("$(TargetFrameworkMoniker)", FrameworkDisplayName = "$(TargetFrameworkMonikerDisplayName)")] | |
</TargetFrameworkMonikerAssemblyAttributeText> | |
</PropertyGroup> | |
</Target> | |
<PropertyGroup> | |
<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' "> | |
<!-- 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\8.0.404\Microsoft.CSharp.targets | |
============================================================================================================================================ | |
--> | |
<!-- | |
============================================================================================================================================ | |
<Import Project="$(MSBuildToolsPath)\Microsoft.Managed.After.targets"> | |
C:\Program Files\dotnet\sdk\8.0.404\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' and '$(IsCrossTargetingBuild)' != 'true'"> | |
<!-- Empty case is for builds which do not import the target files that set BuildProjectReferences --> | |
<_MainReferenceTargetForBuild Condition="'$(BuildProjectReferences)' == '' or '$(BuildProjectReferences)' == 'true'">.projectReferenceTargetsOrDefaultTargets</_MainReferenceTargetForBuild> | |
<_MainReferenceTargetForBuild Condition="'$(_MainReferenceTargetForBuild)' == ''">GetTargetPath</_MainReferenceTargetForBuild> | |
<ProjectReferenceTargetsForBuild>$(_MainReferenceTargetForBuild);GetNativeManifest;$(_RecursiveTargetForContentCopying);$(ProjectReferenceTargetsForBuild)</ProjectReferenceTargetsForBuild> | |
<!-- Publish has the same logic as Build for the main reference target except it also takes $(NoBuild) into account. --> | |
<_MainReferenceTargetForPublish Condition="'$(NoBuild)' == 'true'">GetTargetPath</_MainReferenceTargetForPublish> | |
<_MainReferenceTargetForPublish Condition="'$(NoBuild)' != 'true'">$(_MainReferenceTargetForBuild)</_MainReferenceTargetForPublish> | |
<ProjectReferenceTargetsForPublish>GetTargetFrameworks;$(_MainReferenceTargetForPublish);GetNativeManifest;GetCopyToPublishDirectoryItems;$(ProjectReferenceTargetsForPublish)</ProjectReferenceTargetsForPublish> | |
<!-- When DeployOnBuild=true, the Publish target is hooked to the Build target --> | |
<ProjectReferenceTargetsForBuild Condition="'$(DeployOnBuild)' == 'true'">$(ProjectReferenceTargetsForBuild);$(ProjectReferenceTargetsForPublish)</ProjectReferenceTargetsForBuild> | |
<ProjectReferenceTargetsForRebuild Condition="'$(DeployOnBuild)' == 'true'">$(ProjectReferenceTargetsForRebuild);$(ProjectReferenceTargetsForPublish)</ProjectReferenceTargetsForRebuild> | |
<ProjectReferenceTargetsForGetCopyToPublishDirectoryItems>GetCopyToPublishDirectoryItems;$(ProjectReferenceTargetsForGetCopyToPublishDirectoryItems)</ProjectReferenceTargetsForGetCopyToPublishDirectoryItems> | |
</PropertyGroup> | |
<PropertyGroup Condition="'$(IsGraphBuild)' == 'true' and '$(IsCrossTargetingBuild)' == 'true'"> | |
<ProjectReferenceTargetsForBuild>.default;$(ProjectReferenceTargetsForBuild)</ProjectReferenceTargetsForBuild> | |
</PropertyGroup> | |
<PropertyGroup Condition="'$(IsGraphBuild)' == 'true'"> | |
<ProjectReferenceTargetsForClean>Clean;$(ProjectReferenceTargetsForClean)</ProjectReferenceTargetsForClean> | |
<ProjectReferenceTargetsForRebuild>$(ProjectReferenceTargetsForClean);$(ProjectReferenceTargetsForBuild);$(ProjectReferenceTargetsForRebuild)</ProjectReferenceTargetsForRebuild> | |
</PropertyGroup> | |
<ItemGroup Condition="'$(IsGraphBuild)' == 'true'"> | |
<ProjectReferenceTargets Include="Build" Targets="$(ProjectReferenceTargetsForBuildInOuterBuild)" Condition=" '$(ProjectReferenceTargetsForBuildInOuterBuild)' != '' " OuterBuild="true" /> | |
<ProjectReferenceTargets Include="Build" Targets="GetTargetFrameworks" OuterBuild="true" SkipNonexistentTargets="true" Condition="'$(IsCrossTargetingBuild)' != 'true'" /> | |
<ProjectReferenceTargets Include="Build" Targets="$(ProjectReferenceTargetsForBuild)" Condition=" '$(ProjectReferenceTargetsForBuild)' != '' " /> | |
<ProjectReferenceTargets Include="Clean" Targets="$(ProjectReferenceTargetsForCleanInOuterBuild)" Condition=" '$(ProjectReferenceTargetsForCleanInOuterBuild)' != '' " OuterBuild="true" /> | |
<ProjectReferenceTargets Include="Clean" Targets="GetTargetFrameworks" OuterBuild="true" SkipNonexistentTargets="true" Condition="'$(IsCrossTargetingBuild)' != 'true'" /> | |
<ProjectReferenceTargets Include="Clean" Targets="$(ProjectReferenceTargetsForClean)" Condition=" '$(ProjectReferenceTargetsForClean)' != '' " /> | |
<!-- | |
Note: SkipNonexistentTargets="true" on the following three items means that an outer build node's call to its existent GetTargetFrameworks target will fail if its inner build nodes don't define GetTargetFrameworksWithPlatformForSingleTargetFrameworks. | |
This is necessary since the P2P protocol cannot express the targets called from the outer build to the inner build. | |
--> | |
<ProjectReferenceTargets Include="Build" Targets="GetTargetFrameworksWithPlatformForSingleTargetFramework" SkipNonexistentTargets="true" Condition="'$(IsCrossTargetingBuild)' != 'true'" /> | |
<ProjectReferenceTargets Include="Clean" Targets="GetTargetFrameworksWithPlatformForSingleTargetFramework" SkipNonexistentTargets="true" Condition="'$(IsCrossTargetingBuild)' != 'true'" /> | |
<ProjectReferenceTargets Include="Rebuild" Targets="GetTargetFrameworksWithPlatformForSingleTargetFramework" SkipNonexistentTargets="true" Condition="'$(IsCrossTargetingBuild)' != 'true'" /> | |
<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\8.0.404\Microsoft.CSharp.targets | |
============================================================================================================================================ | |
--> | |
<!-- | |
============================================================================================================================================ | |
</Import> | |
C:\Program Files\dotnet\sdk\8.0.404\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\8.0.404\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\8.0.404\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'">net8.0</MicrosoftNETBuildTasksTFM> | |
<MicrosoftNETBuildTasksTFM Condition=" '$(MicrosoftNETBuildTasksTFM)' == ''">net472</MicrosoftNETBuildTasksTFM> | |
<MicrosoftNETBuildTasksDirectory>$(MicrosoftNETBuildTasksDirectoryRoot)$(MicrosoftNETBuildTasksTFM)\</MicrosoftNETBuildTasksDirectory> | |
<MicrosoftNETBuildTasksAssembly>$(MicrosoftNETBuildTasksDirectory)Microsoft.NET.Build.Tasks.dll</MicrosoftNETBuildTasksAssembly> | |
<!-- | |
Hardcoded list of known implicit packages 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> | |
<PropertyGroup Condition="'$(EnablePreviewFeatures)' == 'true' And '$(IsNetCoreAppTargetingLatestTFM)' == 'true'" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<LangVersion>Preview</LangVersion> | |
</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\8.0.404\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.targets | |
============================================================================================================================================ | |
--> | |
<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<EnableDynamicLoading Condition="'$(EnableDynamicLoading)' == '' and '$(EnableComHosting)' == 'true'">true</EnableDynamicLoading> | |
</PropertyGroup> | |
<!--<ImportGroup>--> | |
<!-- | |
============================================================================================================================================ | |
<Import Project="$(MSBuildThisFileDirectory)Microsoft.PackageDependencyResolution.targets" Condition="Exists('$(MSBuildThisFileDirectory)Microsoft.PackageDependencyResolution.targets') and ('$(Language)' != 'C++' or '$(_EnablePackageReferencesInVCProjects)' == 'true')"> | |
C:\Program Files\dotnet\sdk\8.0.404\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
 '$(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
 '$(TargetFrameworkIdentifier)' == '.NETCoreApp' and
 ('$(_TargetFrameworkVersionWithoutV)' < '3.0' or
 ('$(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> | |
<!-- A flag that NuGet packages containing multi-targeted analyzers can check to see if the NuGet package needs to do | |
its own multi-targeting logic, or if the current SDK targets will pick the assets correctly. --> | |
<SupportsRoslynComponentVersioning>true</SupportsRoslynComponentVersioning> | |
</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="$(EmbedProjectAssetsFile) != false AND Exists('$(ProjectAssetsFile)')" /> | |
</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')
 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'" /> | |
<!-- Included for backwards compatibility when the EmitLegacyAssetsFileItems property is true. --> | |
<ResolvePackageDependencies ProjectPath="$(MSBuildProjectFullPath)" ProjectAssetsFile="$(ProjectAssetsFile)" ProjectLanguage="$(Language)" TargetFramework="$(TargetFramework)" ContinueOnError="ErrorAndContinue" Condition="'$(EmitLegacyAssetsFileItems)' == 'true'"> | |
<Output TaskParameter="PackageDefinitions" ItemName="PackageDefinitions" /> | |
<Output TaskParameter="PackageDependencies" ItemName="PackageDependencies" /> | |
<Output TaskParameter="TargetDefinitions" ItemName="TargetDefinitions" /> | |
<Output TaskParameter="FileDefinitions" ItemName="FileDefinitions" /> | |
<Output TaskParameter="FileDependencies" ItemName="FileDependencies" /> | |
</ResolvePackageDependencies> | |
</Target> | |
<!-- Reads the version of the compiler APIs that are currently being used in order to pick the correct Roslyn components. --> | |
<Target Name="_ResolveCompilerVersion" Condition="'$(CompilerApiVersion)' == '' And
 ('$(Language)' == 'C#' Or '$(Language)' == 'VB') And
 Exists('$(RoslynTargetsPath)\Microsoft.Build.Tasks.CodeAnalysis.dll')" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<GetAssemblyIdentity AssemblyFiles="$(RoslynTargetsPath)\Microsoft.Build.Tasks.CodeAnalysis.dll"> | |
<Output TaskParameter="Assemblies" ItemName="_CodeAnalysisIdentity" /> | |
</GetAssemblyIdentity> | |
<PropertyGroup> | |
<_RoslynApiVersion>$([System.Version]::Parse(%(_CodeAnalysisIdentity.Version)).Major).$([System.Version]::Parse(%(_CodeAnalysisIdentity.Version)).Minor)</_RoslynApiVersion> | |
<CompilerApiVersion>roslyn$(_RoslynApiVersion)</CompilerApiVersion> | |
</PropertyGroup> | |
</Target> | |
<Target Name="ResolvePackageAssets" Condition="('$(DesignTimeBuild)' != 'true' Or Exists('$(ProjectAssetsFile)')) And '$(SkipResolvePackageAssets)' != 'true'" DependsOnTargets="ProcessFrameworkReferences;_DefaultMicrosoftNETPlatformLibrary;_ComputePackageReferencePublish;_ResolveCompilerVersion" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<PropertyGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp'
 and '$(_TargetFrameworkVersionWithoutV)' >= '3.0'
 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)' == ''
 and '$(TargetFrameworkIdentifier)' == '.NETCoreApp'
 and '$(_TargetFrameworkVersionWithoutV)' < '3.0'
 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)" CompilerApiVersion="$(CompilerApiVersion)" 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)" DefaultImplicitPackages="$(DefaultImplicitPackages)"> | |
<!-- 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="DebugSymbolsFiles" ItemName="_DebugSymbolsFiles" /> | |
<Output TaskParameter="ReferenceDocumentationFiles" ItemName="_ReferenceDocumentationFiles" /> | |
<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" /> | |
<Output TaskParameter="PackageDependenciesDesignTime" ItemName="_PackageDependenciesDesignTime" /> | |
</ResolvePackageAssets> | |
<ItemGroup Condition="'$(CopyDebugSymbolFilesFromPackages)' == 'true'"> | |
<ReferenceCopyLocalPaths Include="@(_DebugSymbolsFiles)" /> | |
</ItemGroup> | |
<ItemGroup Condition="'$(CopyDocumentationFilesFromPackages)' == 'true'"> | |
<ReferenceCopyLocalPaths Include="@(_ReferenceDocumentationFiles)" /> | |
</ItemGroup> | |
<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. | |
============================================================ | |
--> | |
<Target Name="ResolvePackageDependenciesDesignTime" Returns="@(_PackageDependenciesDesignTime)" DependsOnTargets="ResolvePackageAssets;RunResolvePackageDependencies;ResolveAssemblyReferencesDesignTime" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" /> | |
<!-- | |
============================================================ | |
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)' != '' and '$(_CleaningWithoutRebuilding)' != 'true'" 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="ProcessedContentItems" 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\8.0.404\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\8.0.404\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> | |
<DefaultItemExcludes>$(DefaultItemExcludes);**/.DS_Store</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. Support both DefaultItemExcludesInProjectFolder and DefaultExcludesInProjectFolder | |
properties because of a naming mistake. --> | |
<DefaultExcludesInProjectFolder>$(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)' < '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)' < '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\8.0.404\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)' >= '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
 '%(Identity)' == 'Microsoft.WindowsDesktop.App.WPF' Or
 '%(Identity)' == 'Microsoft.WindowsDesktop.App.WindowsForms'" /> | |
</ItemGroup> | |
<NetSdkError Condition="'@(_WindowsDesktopTransitiveFrameworkReference)' != ''" ResourceName="WindowsDesktopTargetPlatformMustBeWindows" /> | |
</Target> | |
<!-- | |
============================================================================================================================================ | |
</Import> | |
C:\Program Files\dotnet\sdk\8.0.404\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="_WarnWhenUsingNET8AndVSPriorTo178" BeforeTargets="_CheckForInvalidConfigurationAndPlatform" Condition="$([MSBuild]::VersionLessThan($(MSBuildVersion), '17.8.0')) and '$(TargetFrameworkIdentifier)' == '.NETCoreApp' and $([MSBuild]::VersionGreaterThanOrEquals($(_TargetFrameworkVersionWithoutV), '8.0'))" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<NetSdkWarning ResourceName="Net8NotCompatibleWithDev177" /> | |
</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> | |
<!-- Default the value of PublishRelease for 8.0+ TFMs. Note that this is pre-evaluated by the CLI in an evaluation before evaluation (see ReleasePropertyProjectLocator.cs).--> | |
<PropertyGroup Condition="'$(PublishRelease)' == '' and '$(_TargetFrameworkVersionWithoutV)' >= '8.0'" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<PublishRelease>true</PublishRelease> | |
</PropertyGroup> | |
<!-- This verifies that the configuration between projects in a solution set by PackRelease agree. | |
PackRelease only affects the CLI since VS has its own Configuration UI and it's not possible to detect like this in MSBuild. | |
_IsPacking will only be set if packing in the CLI, so that's fine here. The pack targets are all outside of the SDK, which is why this is here.--> | |
<Target Name="_VerifyPackReleaseConfigurations" BeforeTargets="PrepareForBuild" Condition="'$(_IsPacking)' == 'true' and '$(DOTNET_CLI_DISABLE_PUBLISH_AND_PACK_RELEASE)' != 'true' and '$(DOTNET_CLI_LAZY_PUBLISH_AND_PACK_RELEASE_FOR_SOLUTIONS)' == 'true'" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<NETSdkError Condition="'$(SolutionExt)' == '.sln' and
 '$(_SolutionLevelPackRelease)' != '$(PackRelease)'" ResourceName="SolutionProjectConfigurationsConflict" FormatArguments="PackRelease;$(ProjectName)" /> | |
</Target> | |
<!-- | |
============================================================================================================================================ | |
</Import> | |
C:\Program Files\dotnet\sdk\8.0.404\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.targets | |
============================================================================================================================================ | |
--> | |
<!-- | |
============================================================================================================================================ | |
<Import Project="Microsoft.NET.Sdk.FrameworkReferenceResolution.targets"> | |
C:\Program Files\dotnet\sdk\8.0.404\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 TaskN |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment