Skip to content

Commit 4ff8165

Browse files
authored
Enable targeting pack build during source-build (dotnet#37652)
1 parent 4c194c5 commit 4ff8165

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

Directory.Build.props

-1
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,6 @@
142142
<TargetingPackInstallerBaseName>aspnetcore-targeting-pack</TargetingPackInstallerBaseName>
143143

144144
<!-- This is used to produce targeting pack installers/packages once per major.minor. -->
145-
<IsTargetingPackBuilding Condition=" '$(DotNetBuildFromSource)' == 'true' ">false</IsTargetingPackBuilding>
146145
<IsTargetingPackBuilding
147146
Condition=" '$(IsTargetingPackBuilding)' == '' AND '$(AspNetCorePatchVersion)' != '0' ">false</IsTargetingPackBuilding>
148147
<IsTargetingPackBuilding Condition=" '$(IsTargetingPackBuilding)' == '' ">true</IsTargetingPackBuilding>

Directory.Build.targets

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<Project>
22

33
<PropertyGroup>
4-
<!-- Only build Microsoft.AspNetCore.App and ref/ assemblies in source build. -->
4+
<!-- Only build Microsoft.AspNetCore.App, Microsoft.AspNetCore.App.Ref, and ref/ assemblies in source build. -->
55
<!-- Analyzer package are needed in source build for WebSDK -->
66
<ExcludeFromSourceBuild
7-
Condition="'$(ExcludeFromSourceBuild)' == '' and '$(DotNetBuildFromSource)' == 'true' and '$(IsAspNetCoreApp)' != 'true' and '$(IsAnalyzersProject)' != 'true'">true</ExcludeFromSourceBuild>
7+
Condition="'$(ExcludeFromSourceBuild)' == '' and '$(DotNetBuildFromSource)' == 'true' and '$(IsAspNetCoreApp)' != 'true' and '$(MSBuildProjectName)' != '$(TargetingPackName)' and '$(IsAnalyzersProject)' != 'true'">true</ExcludeFromSourceBuild>
88

99
<!-- If the user has specified that they want to skip building any test related projects with SkipTestBuild,
1010
suppress all targets for TestProjects using ExcludeFromBuild. -->

src/Framework/AspNetCoreAnalyzers/src/CodeFixes/Microsoft.AspNetCore.App.CodeFixes.csproj

+7
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22
<PropertyGroup>
33
<Description>CSharp CodeFixes for ASP.NET Core.</Description>
44
<IsShippingPackage>false</IsShippingPackage>
5+
<!--
6+
This project is fed into the targeting pack build, so it needs to be built during
7+
source-build. One way to build it is to mark it as an analyzers project. If this project's
8+
name ended in '.Analyzers', it would automatically be marked as an analyzers project, but it
9+
doesn't in this case. Mark it manually, instead.
10+
-->
11+
<IsAnalyzersProject>true</IsAnalyzersProject>
512
<AddPublicApiAnalyzers>false</AddPublicApiAnalyzers>
613
<TargetFramework>netstandard2.0</TargetFramework>
714
<IncludeBuildOutput>false</IncludeBuildOutput>

0 commit comments

Comments
 (0)