/
githubmirror
/
aspnetcore
Обзор
Документация
Войти
/
githubmirror
/
aspnetcore
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
eng/Build.props
361 строка
23 KB
Javier Calvarro Nelson
[Blazor] Migrate Components.Testing from xUnit v3 to MSTest on MTP (#67083)
10 авг 2026, 11:47
Не верифицирован
10 авг 2026, 11:47
1d5f6d8
Код
Авторство
О чём код?
<Project> <Import Project="Common.props" /> <!-- @(RequiresDelayedBuild) projects can be extended many ways but this isn't fully automated because the new projects likely aren't referenced initially. To add new projects, edit RequiresDelayedBuildProjects.props manually, update the $(BuildMainlyReferenceProviders)' == 'true' item group near the bottom of this file, or edit BuildAfterTargetingPack.csproj. Then run GenerateProjectList.ps1 (even for the first option to ensure the format is correct) and undo any temporary changes. When complete, only BuildAfterTargetingPack.csproj and other @(RequiresDelayedBuild) projects should mention projects listed in RequiresDelayedBuildProjects.props. --> <Import Project="RequiresDelayedBuildProjects.props" Condition="'$(OnlyTestProjectTemplates)' != 'true'" /> <!-- These projects are always excluded, even when -projects is specified on command line. --> <ItemGroup> <!-- Explicitly excluded projects --> <ProjectToExclude Include="$(ProjectToExclude)" /> <!-- These projects use 'legacy' csproj, which is not supported by dotnet-msbuild. --> <ProjectToExclude Include=" $(RepoRoot)src\Servers\HttpSys\samples\TestClient\TestClient.csproj; $(RepoRoot)src\Middleware\WebSockets\samples\TestServer\WebSockets.TestServer.csproj; " Condition=" '$(MSBuildRuntimeType)' == 'Core' " /> <!-- Exclude the websockets samples for now because they use classic .csproj, which is not yet supported in our build. --> <ProjectToExclude Include="$(RepoRoot)src\Middleware\WebSockets\samples\**\*.csproj" /> <!-- These projects are meant to be referenced only by tests or via BuildAfterTargetingPack.csproj. --> <ProjectToExclude Include="$(RepoRoot)src\**\testassets\**\*.*proj; @(RequiresDelayedBuild); " Exclude="$(RepoRoot)src\Components\WebAssembly\testassets\WasmLinkerTest\*.*proj; $(RepoRoot)src\Components\WebView\Samples\PhotinoPlatform\testassets\PhotinoTestApp\*.*proj; $(RepoRoot)src\Components\Testing\testassets\TestApp.E2E.Tests\TestApp.E2E.Tests.csproj; $(RepoRoot)src\Http\Routing\test\testassets\RoutingSandbox\*.*proj; $(RepoRoot)src\Security\Authentication\Negotiate\test\testassets\Negotiate.Client\*.*proj; $(RepoRoot)src\Security\Authentication\Negotiate\test\testassets\Negotiate.Server\*.*proj; " /> <!-- These projects are not meant to be built in this repo. In the Installers case, must explicitly opt in. --> <ProjectToExclude Include=" $(RepoRoot)src\submodules\googletest\**\*.*proj; $(RepoRoot)src\submodules\MessagePack-CSharp\**\*.*proj; $(RepoRoot)src\Components\Web.JS\node_modules\**\*.*proj; $(RepoRoot)src\Installers\**\*.*proj; $(RepoRoot)src\ProjectTemplates\Web.ProjectTemplates\content\**\*.*proj; $(RepoRoot)src\ProjectTemplates\McpServer.ProjectTemplates\content\**\*.*proj; $(RepoRoot)src\SignalR\clients\ts\**\node_modules\**\*.*proj; " /> <!-- Exclude the benchmarks because they use <PackageReference>. --> <ProjectToExclude Include=" $(RepoRoot)src\Components\benchmarkapps\BlazingPizza.Server\**\*.csproj; $(RepoRoot)src\Mvc\perf\benchmarkapps\**\*.csproj; $(RepoRoot)src\SignalR\perf\benchmarkapps\**\*.csproj; " /> <!-- In the .NET product build mode, don't build the native ANCM bits in pass 1 --> <ProjectToExclude Include=" $(RepoRoot)src\Installers\**\*.vcxproj; " Condition=" '$(BuildNative)' == 'true' and '$(DotNetBuild)' == 'true' and ('$(DotNetBuildPass)' == '' or '$(DotNetBuildPass)' == '1') " /> <!-- This project requires inputs from x64, x86, and arm64 on Windows - therefore in the .NET product build mode, build it in pass 2 --> <ProjectToExclude Include=" $(RepoRoot)src\Servers\IIS/IntegrationTesting.IIS\src\Microsoft.AspNetCore.Server.IntegrationTesting.IIS.csproj; " Condition=" '$(TargetOsName)' == 'win' and '$(DotNetBuild)' == 'true' and ('$(DotNetBuildPass)' == '' or '$(DotNetBuildPass)' == '1') " /> </ItemGroup> <!-- Build the RepoTasks before anything else --> <ItemGroup> <ProjectToBuild Include="$(RepoRoot)eng\tools\RepoTasks\RepoTasks.csproj" BuildStep="repotasks" SkipProjectList="true"> <DotNetBuildPass Condition="'$(DotNetBuildPass)' != ''">$(DotNetBuildPass)</DotNetBuildPass> </ProjectToBuild> </ItemGroup> <Choose> <!-- Project selection can be overridden on the command line by passing in -projects. --> <When Condition="'$(ProjectToBuild)' != '' and '$(DotNetBuildPass)' != '2'"> <ItemGroup> <ProjectToBuild Include="$(ProjectToBuild)" Exclude="@(ProjectToExclude);$(RepoRoot)**\bin\**\*;$(RepoRoot)**\obj\**\*" BuildStep="manual"> <BuildInParallel Condition=" '%(Extension)' == '.nodeproj' OR '%(Extension)' == '.vcxproj' ">false</BuildInParallel> <RestoreInParallel Condition=" '%(Extension)' == '.nodeproj' ">false</RestoreInParallel> <!-- Also do not build in parallel w/in npm projects. --> <AdditionalProperties Condition=" '%(Extension)' == '.nodeproj' OR '%(Extension)' == '.vcxproj' ">BuildInParallel=false</AdditionalProperties> </ProjectToBuild> </ItemGroup> </When> <!-- Projects to build in .NET product build pass 2 --> <When Condition="'$(DotNetBuildPass)' == '2'"> <ItemGroup Condition=" '$(DotNetBuild)' == 'true' AND '$(TargetOsName)' == 'win' AND '$(TargetArchitecture)' == 'x64' "> <ProjectToBuild Include="$(RepoRoot)src\Installers\Windows\WindowsHostingBundle\WindowsHostingBundle.wixproj" BuildStep="bp2" DotNetBuildPass="$(DotNetBuildPass)" AdditionalProperties="Platform=x86" /> <ProjectToBuild Include="$(RepoRoot)src\Servers\IIS\IntegrationTesting.IIS\src\Microsoft.AspNetCore.Server.IntegrationTesting.IIS.csproj" BuildStep="bp2" DotNetBuildPass="$(DotNetBuildPass)" /> <ProjectToBuild Include="$(RepoRoot)src\SiteExtensions\LoggingAggregate\src\Microsoft.AspNetCore.AzureAppServices.SiteExtension\Microsoft.AspNetCore.AzureAppServices.SiteExtension.csproj" BuildStep="bp2" DotNetBuildPass="$(DotNetBuildPass)" /> </ItemGroup> <!-- Disable parallel restore for all pass-2 projects to mitigate https://github.com/dotnet/dotnet/issues/4558 --> <ItemGroup> <ProjectToBuild Update="@(ProjectToBuild)" RestoreInParallel="false" /> </ItemGroup> </When> <Otherwise> <!-- BuildNative --> <ItemGroup Condition=" '$(TargetOsName)' == 'win' AND '$(DotNetBuild)' == 'true' "> <NativeProjects Condition="'$(TargetArchitecture)' == 'x64'" Include="$(RepoRoot)src\**\*.vcxproj" Exclude="@(ProjectToExclude)" AdditionalProperties="Platform=x64" /> <NativeProjects Condition="'$(TargetArchitecture)' == 'x86'" Include="$(RepoRoot)src\**\*.vcxproj" Exclude="@(ProjectToExclude)" AdditionalProperties="Platform=Win32" /> <NativeProjects Condition="'$(TargetArchitecture)' == 'arm64'" Include="$(RepoRoot)src\**\*.vcxproj" Exclude="@(ProjectToExclude)" AdditionalProperties="Platform=arm64" /> </ItemGroup> <ItemGroup Condition=" '$(TargetOsName)' == 'win' AND '$(DotNetBuild)' != 'true' AND ('$(TargetArchitecture)' == 'x86' OR '$(TargetArchitecture)' == 'x64' OR '$(TargetArchitecture)' == 'arm64') "> <NativeProjects Include="$(RepoRoot)src\**\*.vcxproj" Exclude="@(ProjectToExclude)" AdditionalProperties="Platform=x64" /> <NativeProjects Include="$(RepoRoot)src\**\*.vcxproj" Exclude="@(ProjectToExclude)" AdditionalProperties="Platform=Win32" /> <NativeProjects Include="$(RepoRoot)src\**\*.vcxproj" Exclude="@(ProjectToExclude)" AdditionalProperties="Platform=arm64" /> </ItemGroup> <ItemGroup> <ProjectToBuild Condition=" $(BuildNative) " Include="@(NativeProjects)" Exclude="@(ProjectToExclude)" BuildStep="native" /> <ProjectToExclude Condition=" !$(BuildNative) " Include="@(NativeProjects)" /> </ItemGroup> <!-- BuildNode --> <ItemGroup> <NodeJsProjects Include="$(RepoRoot)eng\Npm.Workspace.nodeproj; $(RepoRoot)eng\Npm.Workspace.FunctionalTests.nodeproj;" AdditionalProperties="BuildInParallel=false" BuildInParallel="false" RestoreInParallel="false" Exclude="@(ProjectToExclude)" /> <ExplicitRequiresDelay Include="$(RepoRoot)eng\Npm.Workspace.FunctionalTests.nodeproj" /> <ProjectToBuild Condition=" '$(BuildNodeJS)' == 'true'" Include="@(NodeJsProjects)" Exclude="@(ProjectToExclude)" BuildStep="node" /> <ProjectToExclude Condition=" '$(BuildNodeJS)' != 'true'" Include="@(NodeJsProjects)" /> </ItemGroup> <!-- BuildJava --> <ItemGroup> <JavaProjects Include="$(RepoRoot)src\SignalR\**\*.javaproj" Exclude="@(ProjectToExclude)" /> <ProjectToBuild Condition=" '$(BuildJava)' == 'true'" Include="@(JavaProjects)" Exclude="@(ProjectToExclude)" BuildStep="managed" /> <ProjectToExclude Condition=" '$(BuildJava)' != 'true'" Include="@(JavaProjects)" /> </ItemGroup> <!-- BuildManaged (runs in parallel with BuildJava) --> <ItemGroup> <!-- Use caution to avoid deep recursion. If the globbing pattern picks up something which exceeds MAX_PATH, the entire pattern will silently fail to evaluate correctly. --> <!-- When adding new projects to this file, add them to either ProjectsWithTestsSubset1 or ProjectsWithTestsSubset2 - whichever has fewer entries. --> <!-- Strictly projects with no associated tests - projects with tests are added in subsets below. --> <DotNetProjects Include=" $(RepoRoot)src\Assets\**\*.*proj; $(RepoRoot)src\Framework\App.Ref\src\Microsoft.AspNetCore.App.Ref.sfxproj; $(RepoRoot)src\Framework\App.Ref.Internal\src\Microsoft.AspNetCore.App.Ref.Internal.csproj; $(RepoRoot)src\Framework\App.Runtime\src\aspnetcore-runtime.proj; $(RepoRoot)src\Framework\App.Runtime\src\aspnetcore-base-runtime.proj; $(RepoRoot)src\Framework\App.Runtime\bundle\aspnetcore-runtime-bundle.bundleproj; $(RepoRoot)eng\tools\HelixTestRunner\HelixTestRunner.csproj; $(RepoRoot)src\BuildAfterTargetingPack\*.csproj; " Exclude=" @(ProjectToBuild); @(ProjectToExclude); $(RepoRoot)**\node_modules\**\*; $(RepoRoot)**\bin\**\*; $(RepoRoot)**\obj\**\*;" Condition=" '$(BuildMainlyReferenceProviders)' != 'true' " /> <DotNetProjects Include="$(RepoRoot)src\Tools\NativeAot\aspnetcoretools\aspnetcoretools.csproj" Exclude="@(ProjectToBuild);@(ProjectToExclude);$(RepoRoot)**\bin\**\*;$(RepoRoot)**\obj\**\*" Condition=" '$(BuildMainlyReferenceProviders)' != 'true' and '$(DotNetBuildUseMonoRuntime)' != 'true' " /> <!-- Only build the composite R2R runtime pack when we will actually ship it --> <DotNetProjects Include="$(RepoRoot)src\Framework\App.Runtime\src\aspnetcore-runtime-composite.proj" Condition=" '$(BuildMainlyReferenceProviders)' != 'true' and '$(TargetOsName)' != 'win' " /> <DotNetProjects Include=" $(RepoRoot)src\Assets\**\*.*proj; $(RepoRoot)src\Caching\**\src\*.csproj; $(RepoRoot)src\DefaultBuilder\**\src\*.csproj; $(RepoRoot)src\Features\**\src\*.csproj; $(RepoRoot)src\DataProtection\**\src\*.csproj; $(RepoRoot)src\Antiforgery\**\src\*.csproj; $(RepoRoot)src\Hosting\**\src\*.csproj; $(RepoRoot)src\Http\**\src\*.csproj; $(RepoRoot)src\HttpClientFactory\**\src\*.csproj; $(RepoRoot)src\Html.Abstractions\src\*.csproj; $(RepoRoot)src\Identity\**\src\*.csproj; $(RepoRoot)src\Servers\**\src\*.csproj; $(RepoRoot)src\Security\**\src\*.csproj; $(RepoRoot)src\SiteExtensions\**\src\*.csproj; $(RepoRoot)src\Tools\**\src\*.csproj; $(RepoRoot)src\Tools\NativeAot\aspnetcoretools\aspnetcoretools.csproj; $(RepoRoot)src\Logging.AzureAppServices\**\src\*.csproj; $(RepoRoot)src\Middleware\**\src\*.csproj; $(RepoRoot)src\Razor\**\src\*.csproj; $(RepoRoot)src\Mvc\**\src\*.csproj; $(RepoRoot)src\Azure\**\src\*.csproj; $(RepoRoot)src\SignalR\**\src\*.csproj; $(RepoRoot)src\StaticAssets\src\*.csproj; $(RepoRoot)src\Components\**\src\*.csproj; $(RepoRoot)src\FileProviders\**\src\*.csproj; $(RepoRoot)src\Configuration.KeyPerFile\**\src\*.csproj; $(RepoRoot)src\Localization\**\src\*.csproj; $(RepoRoot)src\ObjectPool\**\src\*.csproj; $(RepoRoot)src\JSInterop\**\src\*.csproj; $(RepoRoot)src\WebEncoders\**\src\*.csproj; $(RepoRoot)src\HealthChecks\**\src\*.csproj; $(RepoRoot)src\Testing\**\src\*.csproj; $(RepoRoot)src\Extensions\**\src\*.csproj; $(RepoRoot)src\BuildAfterTargetingPack\*.csproj; $(RepoRoot)src\OpenApi\**\src\*.csproj; $(RepoRoot)src\Validation\**\src\*.csproj; " Exclude=" @(ProjectToBuild); @(ProjectToExclude); $(RepoRoot)**\node_modules\**\*; $(RepoRoot)**\bin\**\*; $(RepoRoot)**\obj\**\*;" Condition=" '$(BuildMainlyReferenceProviders)' == 'true' " /> <!-- These standalone (non-batchable, Windows-only) test projects live in Subset 1's directory globs but are assigned to Subset 2 to balance the Helix work item count between the two subsets. They are excluded from Subset 1 and included in Subset 2 below. Defined before the subsets so Subset 1's Exclude can reference them. See https://github.com/dotnet/aspnetcore/pull/66808. --> <ProjectsMovedToSubset2 Include=" $(RepoRoot)src\Servers\HttpSys\test\FunctionalTests\Microsoft.AspNetCore.Server.HttpSys.FunctionalTests.csproj; $(RepoRoot)src\Servers\IIS\IIS\test\IIS.LongTests\IIS.LongTests.csproj; $(RepoRoot)src\Servers\IIS\IIS\test\IIS.ShadowCopy.Tests\IIS.ShadowCopy.Tests.csproj; $(RepoRoot)src\Middleware\Diagnostics\test\FunctionalTests\Diagnostics.FunctionalTests.csproj; $(RepoRoot)src\Middleware\Spa\SpaServices.Extensions\test\Microsoft.AspNetCore.SpaServices.Extensions.Tests.csproj; " Condition=" '$(BuildMainlyReferenceProviders)' != 'true' " /> <ProjectsWithTestsSubset1 Include=" $(RepoRoot)src\Framework\AspNetCoreAnalyzers\test\Microsoft.AspNetCore.App.Analyzers.Test.csproj; $(RepoRoot)src\Framework\test\Microsoft.AspNetCore.App.UnitTests.csproj; $(RepoRoot)src\Caching\**\*.*proj; $(RepoRoot)src\DefaultBuilder\**\*.*proj; $(RepoRoot)src\Features\**\*.*proj; $(RepoRoot)src\DataProtection\**\*.*proj; $(RepoRoot)src\Antiforgery\**\*.*proj; $(RepoRoot)src\Hosting\**\*.*proj; $(RepoRoot)src\Http\**\*.*proj; $(RepoRoot)src\HttpClientFactory\**\*.*proj; $(RepoRoot)src\Html.Abstractions\**\*.*proj; $(RepoRoot)src\Identity\**\*.*proj; $(RepoRoot)src\Servers\**\*.csproj; $(RepoRoot)src\Security\**\*.*proj; $(RepoRoot)src\SiteExtensions\Microsoft.Web.Xdt.Extensions\**\*.csproj; $(RepoRoot)src\SiteExtensions\LoggingAggregate\test\**\*.csproj; $(RepoRoot)src\Shared\**\*.*proj; $(RepoRoot)src\Tools\**\*.*proj; $(RepoRoot)src\Logging.AzureAppServices\**\src\*.csproj; $(RepoRoot)src\Middleware\**\*.csproj; " Exclude=" @(ProjectToBuild); @(ProjectToExclude); $(RepoRoot)src\Tools\NativeAot\aspnetcoretools\aspnetcoretools.csproj; $(RepoRoot)**\node_modules\**\*; $(RepoRoot)**\bin\**\*; $(RepoRoot)**\obj\**\*; @(ProjectsMovedToSubset2);" Condition=" '$(BuildMainlyReferenceProviders)' != 'true' " /> <ProjectsWithTestsSubset2 Include=" $(RepoRoot)src\Razor\**\*.*proj; $(RepoRoot)src\Mvc\**\*.*proj; $(RepoRoot)src\Azure\**\*.*proj; $(RepoRoot)src\SignalR\**\*.csproj; $(RepoRoot)src\StaticAssets\**\*.csproj; $(RepoRoot)src\Components\**\*.csproj; $(RepoRoot)src\Analyzers\**\*.csproj; $(RepoRoot)src\FileProviders\**\*.csproj; $(RepoRoot)src\Configuration.KeyPerFile\**\*.csproj; $(RepoRoot)src\Localization\**\*.csproj; $(RepoRoot)src\ObjectPool\**\*.csproj; $(RepoRoot)src\JSInterop\**\*.csproj; $(RepoRoot)src\WebEncoders\**\*.csproj; $(RepoRoot)src\HealthChecks\**\*.csproj; $(RepoRoot)src\Testing\**\*.csproj; $(RepoRoot)src\Grpc\**\*.csproj; $(RepoRoot)src\ProjectTemplates\**\*.csproj; $(RepoRoot)src\Extensions\**\*.csproj; $(RepoRoot)src\OpenApi\**\*.csproj; $(RepoRoot)src\Validation\**\*.csproj; @(ProjectsMovedToSubset2); " Exclude=" @(ProjectToBuild); @(ProjectToExclude); $(RepoRoot)**\node_modules\**\*; $(RepoRoot)**\bin\**\*; $(RepoRoot)**\obj\**\*;" Condition=" '$(BuildMainlyReferenceProviders)' != 'true' " /> <DotNetProjects Condition=" '$(HelixSubset)' == '' OR '$(HelixSubset)' == '1'" Include="@(ProjectsWithTestsSubset1)" /> <DotNetProjects Condition=" '$(HelixSubset)' == '' OR '$(HelixSubset)' == '2'" Include="@(ProjectsWithTestsSubset2)" /> <ProjectToBuild Condition=" '$(BuildManaged)' == 'true'" Include="@(DotNetProjects)" Exclude="@(ProjectToExclude)" BuildStep="managed" /> <ProjectToExclude Condition=" '$(BuildManaged)' != 'true'" Include="@(DotNetProjects)" /> </ItemGroup> <!-- BuildInstallers --> <PropertyGroup> <_BuildWindowsInstallers Condition="'$(TargetOsName)' == 'win' AND ('$(TargetArchitecture)' == 'x86' OR '$(TargetArchitecture)' == 'x64' OR '$(TargetArchitecture)' == 'arm64') ">true</_BuildWindowsInstallers> <_VcxTargetPlatform Condition="'$(TargetArchitecture)' == 'x86'">Win32</_VcxTargetPlatform> <_VcxTargetPlatform Condition="'$(TargetArchitecture)' == 'x64'">x64</_VcxTargetPlatform> <_VcxTargetPlatform Condition="'$(TargetArchitecture)' == 'arm64'">ARM64</_VcxTargetPlatform> </PropertyGroup> <!-- In .NET product build mode, build the installers entirely via HostingBundle ProjectReferences in pass 2 --> <ItemGroup Condition="'$(DotNetBuild)' != 'true' and '$(_BuildWindowsInstallers)' == 'true' "> <!-- Build the ANCM custom action --> <InstallerProject Include="$(RepoRoot)src\Installers\Windows\AspNetCoreModule-Setup\CustomAction\aspnetcoreCA.vcxproj" AdditionalProperties="Platform=x64" /> <InstallerProject Include="$(RepoRoot)src\Installers\Windows\AspNetCoreModule-Setup\CustomAction\aspnetcoreCA.vcxproj" AdditionalProperties="Platform=Win32" /> <InstallerProject Include="$(RepoRoot)src\Installers\Windows\AspNetCoreModule-Setup\CustomAction\aspnetcoreCA.vcxproj" AdditionalProperties="Platform=ARM64" /> <!-- Build the ANCM msis --> <InstallerProject Include="$(RepoRoot)src\Installers\Windows\AspNetCoreModule-Setup\ANCMIISExpressV2\AncmIISExpressV2.wixproj" AdditionalProperties="Platform=x64" /> <InstallerProject Include="$(RepoRoot)src\Installers\Windows\AspNetCoreModule-Setup\ANCMIISExpressV2\AncmIISExpressV2.wixproj" AdditionalProperties="Platform=x86" /> <InstallerProject Include="$(RepoRoot)src\Installers\Windows\AspNetCoreModule-Setup\ANCMIISExpressV2\AncmIISExpressV2.wixproj" AdditionalProperties="Platform=arm64" /> <InstallerProject Include="$(RepoRoot)src\Installers\Windows\AspNetCoreModule-Setup\ANCMV2\ANCMV2.wixproj" AdditionalProperties="Platform=x64" /> <InstallerProject Include="$(RepoRoot)src\Installers\Windows\AspNetCoreModule-Setup\ANCMV2\ANCMV2.wixproj" AdditionalProperties="Platform=x86" /> <InstallerProject Include="$(RepoRoot)src\Installers\Windows\AspNetCoreModule-Setup\ANCMV2\ANCMV2.wixproj" AdditionalProperties="Platform=arm64" /> <!-- Windows hosting bundle --> <InstallerProject Include="$(RepoRoot)src\Installers\Windows\WindowsHostingBundle\WindowsHostingBundle.wixproj" AdditionalProperties="Platform=x86" /> </ItemGroup> <ItemGroup> <ProjectToBuild Condition=" '$(BuildInstallers)' == 'true'" Include="@(InstallerProject)" BuildStep="installer" /> </ItemGroup> </Otherwise> </Choose> </Project>