Skip to content

Commit

Permalink
Enable targeting pack build during source-build (#37688)
Browse files Browse the repository at this point in the history
(cherry picked from commit 4ff8165)
  • Loading branch information
dagood committed Oct 20, 2021
1 parent e19caf5 commit e39dd44
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
1 change: 0 additions & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,6 @@
<TargetingPackInstallerBaseName>aspnetcore-targeting-pack</TargetingPackInstallerBaseName>

<!-- This is used to produce targeting pack installers/packages once per major.minor. -->
<IsTargetingPackBuilding Condition=" '$(DotNetBuildFromSource)' == 'true' ">false</IsTargetingPackBuilding>
<IsTargetingPackBuilding
Condition=" '$(IsTargetingPackBuilding)' == '' AND '$(AspNetCorePatchVersion)' != '0' ">false</IsTargetingPackBuilding>
<IsTargetingPackBuilding Condition=" '$(IsTargetingPackBuilding)' == '' ">true</IsTargetingPackBuilding>
Expand Down
4 changes: 2 additions & 2 deletions Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<Project>

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

<!-- If the user has specified that they want to skip building any test related projects with SkipTestBuild,
suppress all targets for TestProjects using ExcludeFromBuild. -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@
<PropertyGroup>
<Description>CSharp CodeFixes for ASP.NET Core.</Description>
<IsShippingPackage>false</IsShippingPackage>
<!--
This project is fed into the targeting pack build, so it needs to be built during
source-build. One way to build it is to mark it as an analyzers project. If this project's
name ended in '.Analyzers', it would automatically be marked as an analyzers project, but it
doesn't in this case. Mark it manually, instead.
-->
<IsAnalyzersProject>true</IsAnalyzersProject>
<AddPublicApiAnalyzers>false</AddPublicApiAnalyzers>
<TargetFramework>netstandard2.0</TargetFramework>
<IncludeBuildOutput>false</IncludeBuildOutput>
Expand Down

0 comments on commit e39dd44

Please sign in to comment.