/
githubmirror
/
aspnetcore
Обзор
Документация
Войти
/
githubmirror
/
aspnetcore
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
Directory.Build.targets
216 строк
13 KB
William Godbe
Configure Dependabot to update NuGet dependencies not automated by Maestro (#68012)
27 июл 2026, 20:04
Не верифицирован
27 июл 2026, 20:04
07e3015
Код
Авторство
О чём код?
<Project> <PropertyGroup> <!-- Workaround while there is no SDK available that understands the TFM; suppress unsupported version errors. --> <NETCoreAppMaximumVersion>99.9</NETCoreAppMaximumVersion> <!-- Disable IsTrimmable on non-DefaultNetCoreTargetFrameworks even if explicitly enabled or else we'll get NETSDK1195 and NETSDK1210 errors --> <IsTrimmable Condition="'$(TargetFramework)' != '$(DefaultNetCoreTargetFramework)'"></IsTrimmable> <EnableAOTAnalyzer Condition=" '$(EnableAOTAnalyzer)' == '' ">$([MSBuild]::ValueOrDefault($(IsTrimmable),'false'))</EnableAOTAnalyzer> </PropertyGroup> <PropertyGroup> <!-- Ignore API doc requirements for test assets --> <NoWarn Condition="'$(IsTestAssetProject)' == 'true' or '$(IsSampleProject)' == 'true' or '$(IsBenchmarkProject)' == 'true' or '$(IsMicrobenchmarksProject)' == 'true'">$(NoWarn);CS1591</NoWarn> </PropertyGroup> <PropertyGroup Label="Resx settings"> <GenerateResxSource Condition="'$(GenerateResxSource)' == ''">true</GenerateResxSource> <GenerateResxSourceEmitFormatMethods Condition="'$(GenerateResxSourceEmitFormatMethods)' == ''">true</GenerateResxSourceEmitFormatMethods> </PropertyGroup> <Import Project="Sdk.targets" Sdk="Microsoft.DotNet.Arcade.Sdk" /> <!-- Properties which should be set after the project has been evaluated --> <PropertyGroup Label="Versioning settings"> <!-- The 'human friendly' version to display in installers. In pre-release builds, this might be "2.0.7 Preview 2 Build 12356". In final builds, it should be "2.0.7" --> <BrandingVersionSuffix>$(PreReleaseBrandingLabel) Build $(VersionSuffix)</BrandingVersionSuffix> <PackageBrandingVersion>$(VersionPrefix)</PackageBrandingVersion> <PackageBrandingVersion Condition=" '$(VersionSuffix)' != '' ">$(PackageBrandingVersion) $(BrandingVersionSuffix.Trim())</PackageBrandingVersion> <SiteExtensionVersion>$(VersionPrefix)</SiteExtensionVersion> <SiteExtensionVersion Condition=" '$(VersionSuffix)' != '' ">$(VersionPrefix)-$(VersionSuffix.Replace('.','-'))</SiteExtensionVersion> <PackageVersion Condition=" '$(PackageVersion)' == '' ">$(Version)</PackageVersion> <SharedFxVersion>$(PackageVersion)</SharedFxVersion> <SharedFxVersion Condition=" '$(StabilizePackageVersion)' == 'true' ">$(VersionPrefix)</SharedFxVersion> <SharedFxProductName>$(Product) $(SharedFxVersion) Shared Framework</SharedFxProductName> <TargetingPackVersion>$(SharedFxVersion)</TargetingPackVersion> <PackageVersion Condition=" '$(NoSemVer20)' == 'true' ">$(SiteExtensionVersion)</PackageVersion> </PropertyGroup> <PropertyGroup> <!-- Analyzers package are special. In general, they should not have dependencies in the nuspec. Analyzer assemblies are not meant to be used for compilation or runtime. --> <SuppressDependenciesWhenPacking Condition="'$(SuppressDependenciesWhenPacking)' == '' AND '$(IsAnalyzersProject)' == 'true'">true</SuppressDependenciesWhenPacking> </PropertyGroup> <PropertyGroup> <!-- Make sure any documentation comments which are included in code get checked for syntax during the build, but do not report warnings for missing comments. CS1573: Parameter 'parameter' has no matching param tag in the XML comment for 'parameter' (but other parameters do) CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' CS1712: Type parameter 'type_parameter' has no matching typeparam tag in the XML comment on 'type_or_member' (but other type parameters do) --> <GenerateDocumentationFile>true</GenerateDocumentationFile> <NoWarn Condition=" '$(IsShipping)' != 'true'">$(NoWarn);CS1573;CS1591;CS1712</NoWarn> </PropertyGroup> <PropertyGroup Condition=" '$(MSBuildProjectExtension)' == '.csproj' "> <PackageId Condition=" '$(PackageId)' == '' ">$(AssemblyName)</PackageId> <IsPackable Condition="'$(IsPackable)' == '' AND ( $(IsTestProject) OR '$(IsTestAssetProject)' == 'true' OR '$(IsBenchmarkProject)' == 'true' OR '$(IsSampleProject)' == 'true' OR '$(IsMicrobenchmarksProject)' == 'true') ">false</IsPackable> </PropertyGroup> <PropertyGroup Condition=" '$(IsPackable)' != 'false' AND '$(IsServicingBuild)' == 'true' "> <IsPackageInThisPatch Condition="'$(IsPackageInThisPatch)' == ''">true</IsPackageInThisPatch> <!-- Used to distinguish between packages building --> <IsPackableInNonServicingBuild>true</IsPackableInNonServicingBuild> <!-- Suppress creation of .nupkg for servicing builds of non-shipping projects. --> <IsPackable Condition=" '$(IsPackageInThisPatch)' != 'true' ">false</IsPackable> </PropertyGroup> <PropertyGroup> <!-- When OnlyPackPlatformSpecificPackages is set, only produce packages for projects which set RuntimeIdentifier. --> <!-- Keep this below where we set "IsPackageInThisPatch" --> <IsPackable Condition=" '$(OnlyPackPlatformSpecificPackages)' == 'true' AND '$(RuntimeIdentifier)' == '' ">false</IsPackable> </PropertyGroup> <PropertyGroup> <PackageVersionForPackageVersionInfo>$(PackageVersion)</PackageVersionForPackageVersionInfo> </PropertyGroup> <PropertyGroup> <!-- Implementation projects are the projects which produce nuget packages or shipping assemblies. --> <IsImplementationProject Condition=" '$(IsImplementationProject)' == '' AND '$(IsAnalyzersProject)' != 'true' AND '$(IsBenchmarkProject)' != 'true' AND '$(IsSampleProject)' != 'true' AND '$(IsSpecificationTestProject)' != 'true' AND '$(IsTestAssetProject)' != 'true' AND !$(IsTestProject) AND '$(IsMicrobenchmarksProject)' != 'true' ">true</IsImplementationProject> <!-- This determines whether a project is available as a <Reference> to other projects in this repo. --> <IsProjectReferenceProvider Condition=" '$(IsProjectReferenceProvider)' == '' AND ( '$(IsImplementationProject)' == 'true' OR '$(IsSpecificationTestProject)' == 'true' ) ">true</IsProjectReferenceProvider> <HasReferenceAssembly Condition=" '$(TargetFramework)' == '$(DefaultNetCoreTargetFramework)' AND '$(IsAspNetCoreApp)' == 'true' ">true</HasReferenceAssembly> <HasReferenceAssembly Condition="'$(HasReferenceAssembly)' == ''">false</HasReferenceAssembly> <ProduceReferenceAssembly>$(HasReferenceAssembly)</ProduceReferenceAssembly> <!-- Duplicate setting from Microsoft.Common.CurrentVersion.targets because this is imported after that file. --> <TargetRefPath Condition=" '$(TargetRefPath)' == '' and $(ProduceReferenceAssembly) ">$([MSBuild]::NormalizePath($(TargetDir), 'ref', $(TargetFileName)))</TargetRefPath> <IsPackable Condition="'$(IsPackable)' == '' AND ('$(IsImplementationProject)' == 'true' OR '$(IsAnalyzersProject)' == 'true') ">true</IsPackable> <IsPackable Condition="'$(IsPackable)' == '' ">false</IsPackable> <BuildHelixPayload Condition="'$(BuildHelixPayload)' == '' AND $(IsTestProject) ">true</BuildHelixPayload> <SkipTests Condition="'$(SkipTests)' == '' AND '$(SkipHelixReadyTests)' == 'true' AND '$(BuildHelixPayload)' == 'true'">true</SkipTests> </PropertyGroup> <PropertyGroup> <PackageThirdPartyNoticesFile Condition="'$(PackageThirdPartyNoticesFile)' == ''">$(RepoRoot)THIRD-PARTY-NOTICES.TXT</PackageThirdPartyNoticesFile> </PropertyGroup> <ItemGroup Condition="'$(IsPackable)' == 'true'"> <None Include="$(PackageThirdPartyNoticesFile)" Pack="true" PackagePath="." /> </ItemGroup> <!-- If assembly is in shared framework and not net4*, assembly version should remain fixed for an entire major.minor release even in servicing. --> <PropertyGroup Condition=" '$(IsAspNetCoreApp)' == 'true' AND '$(Language)' == 'C#' AND '$(TargetFrameworkIdentifier)' != '.NETFramework' "> <AssemblyVersion>$(AspNetCoreMajorMinorVersion).0.0</AssemblyVersion> </PropertyGroup> <PropertyGroup> <!-- Do not update the Microsoft.AspNetCore.App KnownFrameworkReference item unless requested. --> <UpdateAspNetCoreKnownFramework>false</UpdateAspNetCoreKnownFramework> <UpdateAspNetCoreKnownFramework Condition=" '$(UseAspNetCoreSharedRuntime)' == 'true' AND '$(DoNotApplyWorkaroundsToMicrosoftAspNetCoreApp)' != 'true' ">true</UpdateAspNetCoreKnownFramework> </PropertyGroup> <ItemGroup> <_RemovedAspNetKnownFrameworkReference Include="@(KnownFrameworkReference->WithMetadataValue('Identity', 'Microsoft.AspNetCore.App'))" /> <KnownFrameworkReference Condition="'$(UseAspNetCoreSharedRuntime)' != 'true'" Remove="Microsoft.AspNetCore.App" /> <KnownFrameworkReference Remove="Microsoft.WindowsDesktop.App" /> </ItemGroup> <PropertyGroup Condition=" '$(CopySymbolsToArtifacts)' == 'true' AND '$(TargetFramework)' != '' "> <BuildDependsOn>$(BuildDependsOn);_CopySymbolsToArtifacts</BuildDependsOn> </PropertyGroup> <!-- Enable runtime async for net11.0+ source projects that ship only in the Shared Framework --> <PropertyGroup Condition="'$(IsAspNetCoreApp)' == 'true' AND '$(IsPackable)' != 'true' AND $([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net11.0')) AND '$(UseRuntimeAsync)' != 'false' AND '$(DotNetBuildUseMonoRuntime)' != 'true' AND '$(TargetOS)' != 'browser' AND !$(RuntimeIdentifier.StartsWith('browser-'))"> <Features>$(Features);runtime-async=on</Features> </PropertyGroup> <!-- Also enable runtime async for compatible test projects --> <PropertyGroup Condition="'$(IsTestProject)' == 'true' AND $([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net11.0')) AND '$(UseRuntimeAsync)' != 'false' AND '$(DotNetBuildUseMonoRuntime)' != 'true' AND '$(TargetOS)' != 'browser' AND !$(RuntimeIdentifier.StartsWith('browser-'))"> <Features>$(Features);runtime-async=on</Features> </PropertyGroup> <!-- Properties for Package Validation --> <PropertyGroup Condition="'$(ExcludeFromSourceOnlyBuild)' != 'true'"> <EnablePackageValidation Condition="'$(EnablePackageValidation)' == ''">true</EnablePackageValidation> <DisablePackageBaselineValidation Condition="'$(IsServicingBuild)' != 'true'">true</DisablePackageBaselineValidation> <GenerateCompatibilitySuppressionFile>true</GenerateCompatibilitySuppressionFile> </PropertyGroup> <Target Name="_CopySymbolsToArtifacts"> <Copy SourceFiles="$([System.IO.Path]::ChangeExtension('$(TargetPath)', 'pdb'))" DestinationFolder="$(SymbolsOutputPath)$(TargetFramework)" OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)" Retries="$(CopyRetryCount)" RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)" SkipUnchangedFiles="$(SkipCopyUnchangedFiles)" /> </Target> <!-- Remove the implicit package reference for Microsoft.AspNetCore.App.Internal.Assets. Projects within the repo consume framework assets via ProjectReference and the StaticWebAssets.Groups.targets convention file. --> <Target Name="_RemoveAspNetCoreAppInternalAssetsReference" AfterTargets="ProcessFrameworkReferences"> <ItemGroup> <PackageReference Remove="Microsoft.AspNetCore.App.Internal.Assets" /> </ItemGroup> </Target> <Import Project="eng\Workarounds.targets" /> <!-- This file is generated at build time and doesn't exist under Dependabot's un-built clone; skip it there (see eng/tools/DependabotDiscovery). --> <Import Project="artifacts\bin\GenerateFiles\Directory.Build.targets" Condition=" '$(MSBuildProjectName)' != 'GenerateFiles' AND '$(DEPENDABOT_NATIVE_HELPERS_PATH)' == '' " /> <Import Project="eng\targets\ResolveIisReferences.targets" Condition=" '$(MSBuildProjectExtension)' != '.vcxproj' " /> <Import Project="eng\targets\Cpp.Common.targets" Condition="'$(MSBuildProjectExtension)' == '.vcxproj'" /> <Import Project="eng\targets\CSharp.Common.targets" Condition="'$(MSBuildProjectExtension)' == '.csproj'" /> <Import Project="eng\targets\FSharp.Common.targets" Condition="'$(MSBuildProjectExtension)' == '.fsproj'" /> <Import Project="eng\targets\Wix.Common.targets" Condition="'$(MSBuildProjectExtension)' == '.wixproj'" /> <Import Project="eng\targets\Node.Common.targets" Condition="'$(MSBuildProjectExtension)' == '.nodeproj'" /> <Import Project="eng\targets\Java.Common.targets" Condition="'$(MSBuildProjectExtension)' == '.javaproj'" /> <Import Project="eng\targets\Sfx.Common.targets" Condition="'$(MSBuildProjectExtension)' == '.sfxproj'" /> <Import Project="eng\testing\linker\trimmingTests.targets" Condition="'$(IsPublishedAppTestProject)' == 'true'" /> <Import Project="eng\targets\Helix.targets" Condition=" $(IsTestProject) " /> <Import Project="eng\targets\FunctionalTestWithAssets.targets" Condition=" $(IsTestProject) AND $(ContainsFunctionalTestAssets) " /> </Project>