Skip to content

Commit 54ff379

Browse files
authored
Don't reference test asset projects in Build.props (#39336)
- test projects should include any necessary references - should further reduce build ordering problems - also, removes mention of a few non-existent folders - but, special case a _few_ test asset projects - reference three used in test classes in relevant test projects - reference five that are otherwise unreferenced in Build.props - move `src\Components\Web.JS\node_modules` mention to correct part of Build.props nit: - sort "not meant to be built" project list
1 parent ca6c2b2 commit 54ff379

File tree

3 files changed

+23
-15
lines changed

3 files changed

+23
-15
lines changed

eng/Build.props

+11-11
Original file line numberDiff line numberDiff line change
@@ -16,25 +16,25 @@
1616
<!-- Exclude the websockets samples for now because they use classic .csproj, which is not yet supported in our build. -->
1717
<ProjectToExclude Include="$(RepoRoot)src\Middleware\WebSockets\samples\**\*.csproj" />
1818

19-
<!-- These projects are meant to be executed by tests. -->
20-
<ProjectToExclude Include="
21-
$(RepoRoot)src\Tools\dotnet-watch\test\TestProjects\**\*.csproj;
22-
$(RepoRoot)src\Tools\Tests.Common\TestProjects\**\*.csproj;
23-
$(RepoRoot)src\Razor\Razor.Design\test\testassets\**\*.*proj;
24-
$(RepoRoot)src\Razor\test\testassets\**\*.*proj;
25-
$(RepoRoot)src\Components\Web.JS\node_modules\**\*.*proj;
26-
$(RepoRoot)src\Components\WebAssembly\Sdk\testassets\**\*.csproj;
27-
" />
19+
<!-- These projects are meant to be referenced only by tests. -->
20+
<ProjectToExclude Include="$(RepoRoot)src\**\testassets\**\*.*proj"
21+
Exclude="$(RepoRoot)src\Components\WebAssembly\testassets\WasmLinkerTest\*.*proj;
22+
$(RepoRoot)src\Components\WebView\Samples\PhotinoPlatform\testassets\PhotinoTestApp\*.*proj;
23+
$(RepoRoot)src\Http\Routing\test\testassets\RoutingSandbox\*.*proj;
24+
$(RepoRoot)src\Security\Authentication\Negotiate\test\testassets\Negotiate.Client\*.*proj;
25+
$(RepoRoot)src\Security\Authentication\Negotiate\test\testassets\Negotiate.Server\*.*proj;
26+
" />
2827

2928
<!-- These projects are not meant to be built in this repo. In the Installers case, must explicitly opt in. -->
3029
<!-- On the other hand, the main spa-templates project is just another project in this repo. -->
3130
<ProjectToExclude Include="
3231
$(RepoRoot)src\submodules\googletest\**\*.*proj;
3332
$(RepoRoot)src\submodules\MessagePack-CSharp\**\*.*proj;
33+
$(RepoRoot)src\submodules\spa-templates\src\content\**\*.csproj;
34+
$(RepoRoot)src\Components\Web.JS\node_modules\**\*.*proj;
3435
$(RepoRoot)src\Installers\**\*.*proj;
35-
$(RepoRoot)src\SignalR\clients\ts\**\node_modules\**\*.*proj;
3636
$(RepoRoot)src\ProjectTemplates\Web.ProjectTemplates\content\**\*.*proj;
37-
$(RepoRoot)src\submodules\spa-templates\src\content\**\*.csproj;
37+
$(RepoRoot)src\SignalR\clients\ts\**\node_modules\**\*.*proj;
3838
" />
3939

4040
<!-- Exclude the benchmarks because they use <PackageReference>. -->

src/Hosting/test/FunctionalTests/Microsoft.AspNetCore.Hosting.FunctionalTests.csproj

+8-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<Project Sdk="Microsoft.NET.Sdk">
2-
32
<PropertyGroup>
43
<TargetFramework>$(DefaultNetCoreTargetFramework)</TargetFramework>
54

@@ -17,13 +16,20 @@
1716

1817
<ItemGroup>
1918
<ProjectReference Include="$(RepoRoot)src\Hosting\Server.IntegrationTesting\src\Microsoft.AspNetCore.Server.IntegrationTesting.csproj" />
19+
<ProjectReference Include="$(RepoRoot)src\Hosting\test\testassets\BasicLinkedApp\BasicLinkedApp.csproj"
20+
Private="false"
21+
ReferenceOutputAssembly="false"
22+
SkipGetTargetFrameworkProperties="true" />
2023
<ProjectReference Include="$(RepoRoot)src\Hosting\test\testassets\IStartupInjectionAssemblyName\IStartupInjectionAssemblyName.csproj"
2124
Private="false"
2225
ReferenceOutputAssembly="false"
2326
SkipGetTargetFrameworkProperties="true" />
27+
<ProjectReference Include="$(RepoRoot)src\Hosting\test\testassets\Microsoft.AspNetCore.Hosting.TestSites\Microsoft.AspNetCore.Hosting.TestSites.csproj"
28+
Private="false"
29+
ReferenceOutputAssembly="false"
30+
SkipGetTargetFrameworkProperties="true" />
2431

2532
<Reference Include="Microsoft.AspNetCore.Hosting" />
2633
<Reference Include="Microsoft.Extensions.Logging.Console" />
2734
</ItemGroup>
28-
2935
</Project>

src/Servers/HttpSys/test/NonHelixTests/Microsoft.AspNetCore.Server.HttpSys.NonHelixTests.csproj

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<Project Sdk="Microsoft.NET.Sdk">
2-
32
<PropertyGroup>
43
<TargetFramework>$(DefaultNetCoreTargetFramework)</TargetFramework>
54
<TestGroupName>HttpSys.NonHelixTests</TestGroupName>
@@ -25,6 +24,9 @@
2524
<ItemGroup>
2625
<Content Include="testroot\**\*" CopyToOutputDirectory="PreserveNewest" CopyToPublishDirectory="PreserveNewest" />
2726
<ProjectReference Include="$(RepoRoot)src\Hosting\Server.IntegrationTesting\src\Microsoft.AspNetCore.Server.IntegrationTesting.csproj" />
27+
<ProjectReference Include="$(RepoRoot)src\Servers\HttpSys\test\testassets\DelegationSite\DelegationSite.csproj"
28+
Private="false"
29+
ReferenceOutputAssembly="false"
30+
SkipGetTargetFrameworkProperties="true" />
2831
</ItemGroup>
29-
3032
</Project>

0 commit comments

Comments
 (0)