Skip to content

Commit 7ec238d

Browse files
dougbuwtgodbe
authored andcommitted
[release/6.0] Always build App.Ref and the targeting packs
- remove `$(IsTargetingPackBuilding)` entirely - 6.0.x version of dotnet#39568
1 parent 42a9709 commit 7ec238d

File tree

14 files changed

+15
-96
lines changed

14 files changed

+15
-96
lines changed

Directory.Build.props

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -141,11 +141,6 @@
141141
<RuntimeInstallerBaseName>aspnetcore-runtime</RuntimeInstallerBaseName>
142142
<TargetingPackInstallerBaseName>aspnetcore-targeting-pack</TargetingPackInstallerBaseName>
143143

144-
<!-- This is used to produce targeting pack installers/packages once per major.minor, or when we need to service it (e.g. 6.0.2) -->
145-
<IsTargetingPackBuilding
146-
Condition=" '$(IsTargetingPackBuilding)' == '' AND '$(AspNetCorePatchVersion)' != '2' ">false</IsTargetingPackBuilding>
147-
<IsTargetingPackBuilding Condition=" '$(IsTargetingPackBuilding)' == '' ">true</IsTargetingPackBuilding>
148-
149144
<!--
150145
Archives and installers using this prefix are intended for internal use only.
151146
For example, this .zip is used to handoff bits to partner teams who then incorporate our shared frameworks
@@ -247,5 +242,4 @@
247242
<Import Project="eng\targets\Npm.Common.props" Condition="'$(MSBuildProjectExtension)' == '.npmproj'" />
248243
<Import Project="eng\targets\Java.Common.props" Condition="'$(MSBuildProjectExtension)' == '.javaproj'" />
249244
<Import Project="eng\targets\Helix.props" Condition="'$(IsTestProject)' == 'true'" />
250-
251245
</Project>

Directory.Build.targets

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@
4949
<SharedFxProductName>$(Product) $(SharedFxVersion) Shared Framework</SharedFxProductName>
5050

5151
<TargetingPackVersion>$(SharedFxVersion)</TargetingPackVersion>
52-
<TargetingPackVersion Condition=" ! $(IsTargetingPackBuilding) ">$(TargetingPackVersionPrefix)</TargetingPackVersion>
5352

5453
<PackageVersion Condition=" '$(NoSemVer20)' == 'true' ">$(SiteExtensionVersion)</PackageVersion>
5554
</PropertyGroup>

eng/Versions.props

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@
2828
It's also used in root Directory.Build.targets to determine the version of the last-built targeting pack.
2929
-->
3030
<TargetingPackVersionPrefix>$(VersionPrefix)</TargetingPackVersionPrefix>
31-
<!-- Targeting packs do not produce patch versions in servicing builds. No API changes are allowed in patches. -->
32-
<TargetingPackVersionPrefix Condition="'$(IsTargetingPackBuilding)' != 'true'">$(AspNetCoreMajorMinorVersion).2</TargetingPackVersionPrefix>
3331
<ExperimentalVersionPrefix>0.3.$(AspNetCorePatchVersion)</ExperimentalVersionPrefix>
3432
<!-- ANCM versioning is intentionally 10 + AspNetCoreMajorVersion because earlier versions of ANCM shipped as 8.x. -->
3533
<AspNetCoreModuleVersionMajor>$([MSBuild]::Add(10, $(AspNetCoreMajorVersion)))</AspNetCoreModuleVersionMajor>

eng/targets/ResolveReferences.targets

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -234,8 +234,7 @@
234234
-->
235235
<ItemGroup Condition=" '$(MSBuildProjectName)' != 'Microsoft.AspNetCore.App.Runtime' AND
236236
'$(MSBuildProjectName)' != 'RepoTasks' AND
237-
($(_CompileTfmUsingReferenceAssemblies) OR
238-
('$(IsTargetingPackBuilding)' != 'false' AND '$(MSBuildProjectName)' == 'Microsoft.AspNetCore.App.Ref')) ">
237+
($(_CompileTfmUsingReferenceAssemblies) OR '$(MSBuildProjectName)' == 'Microsoft.AspNetCore.App.Ref') ">
239238
<PackageReference Include="Microsoft.Internal.Runtime.AspNetCore.Transport"
240239
Version="$(MicrosoftInternalRuntimeAspNetCoreTransportVersion)"
241240
IsImplicitlyDefined="true"
@@ -258,8 +257,7 @@
258257
'$(IsImplementationProject)' == 'true' AND
259258
'$(MSBuildProjectName)' != 'Ignitor' AND
260259
'$(MSBuildProjectName)' != 'Microsoft.AspNetCore.App.Runtime' AND
261-
($(_CompileTfmUsingReferenceAssemblies) OR
262-
('$(IsTargetingPackBuilding)' != 'false' AND '$(MSBuildProjectName)' == 'Microsoft.AspNetCore.App.Ref')) ">
260+
($(_CompileTfmUsingReferenceAssemblies) OR '$(MSBuildProjectName)' == 'Microsoft.AspNetCore.App.Ref') ">
263261
<ItemGroup>
264262
<ResolvedCompileFileDefinitions Remove="@(ResolvedCompileFileDefinitions)"
265263
Condition=" '%(NuGetPackageId)' != 'Microsoft.Internal.Runtime.AspNetCore.Transport' AND

src/Framework/App.Ref.Internal/src/Microsoft.AspNetCore.App.Ref.Internal.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
<TargetFramework>$(DefaultNetCoreTargetFramework)</TargetFramework>
55
<IsShippingPackage>false</IsShippingPackage>
66
<IsPackable>true</IsPackable>
7-
<IsPackable Condition="'$(IsTargetingPackBuilding)' == 'false'">false</IsPackable>
87
<PackageId>$(TargetingPackName).Internal</PackageId>
98
<VersionPrefix>$(TargetingPackVersionPrefix)</VersionPrefix>
109
<CopyBuildOutputToOutputDirectory>false</CopyBuildOutputToOutputDirectory>

src/Framework/App.Ref/src/Microsoft.AspNetCore.App.Ref.csproj

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
<PropertyGroup>
55
<TargetFramework>$(DefaultNetCoreTargetFramework)</TargetFramework>
66
<IsPackable>true</IsPackable>
7-
<IsPackable Condition="'$(IsTargetingPackBuilding)' == 'false'">false</IsPackable>
87
<PackageId>$(TargetingPackName)</PackageId>
98
<VersionPrefix>$(TargetingPackVersionPrefix)</VersionPrefix>
109

@@ -92,8 +91,7 @@ This package is an internal implementation of the .NET Core SDK and is not meant
9291
</PropertyGroup>
9392

9493
<PropertyGroup>
95-
<!-- If this project won't produce a package, don't bother building anything. -->
96-
<BuildDependsOn Condition="'$(IsTargetingPackBuilding)' != 'false'">
94+
<BuildDependsOn>
9795
$(BuildDependsOn);
9896
_ResolveTargetingPackContent;
9997
GeneratePackageOverrides;
@@ -102,9 +100,6 @@ This package is an internal implementation of the .NET Core SDK and is not meant
102100
_InstallTargetingPackIntoLocalDotNet;
103101
_CreateTargetingPackArchive;
104102
</BuildDependsOn>
105-
106-
<!-- No-op when in source build -->
107-
<BuildDependsOn Condition="'$(IsTargetingPackBuilding)' == 'false'"/>
108103
</PropertyGroup>
109104

110105
<!-- Override the default MSBuild targets so that nothing is returned from the project since it represents a collection of assemblies. -->

src/Framework/test/Microsoft.AspNetCore.App.UnitTests.csproj

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,6 @@
5555
<_Parameter1>TargetingPackLayoutRoot</_Parameter1>
5656
<_Parameter2>$(TargetingPackLayoutRoot)</_Parameter2>
5757
</AssemblyAttribute>
58-
<AssemblyAttribute Include="Microsoft.AspNetCore.TestData">
59-
<_Parameter1>IsTargetingPackBuilding</_Parameter1>
60-
<_Parameter2>$(IsTargetingPackBuilding)</_Parameter2>
61-
</AssemblyAttribute>
6258
<AssemblyAttribute Include="Microsoft.AspNetCore.TestData">
6359
<_Parameter1>VerifyAncmBinary</_Parameter1>
6460
<_Parameter2>$(VerifyAncmBinary)</_Parameter2>
@@ -71,16 +67,10 @@
7167
</ItemGroup>
7268

7369
<ItemGroup>
74-
<ProjectReference Include="..\App.Ref\src\Microsoft.AspNetCore.App.Ref.csproj"
75-
Condition=" $(IsTargetingPackBuilding) ">
76-
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
77-
<SkipGetTargetFrameworkProperties>true</SkipGetTargetFrameworkProperties>
78-
</ProjectReference>
79-
<ProjectReference Include="..\App.Runtime\src\Microsoft.AspNetCore.App.Runtime.csproj"
80-
Condition=" !$(IsTargetingPackBuilding) ">
81-
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
82-
<SkipGetTargetFrameworkProperties>true</SkipGetTargetFrameworkProperties>
83-
</ProjectReference>
70+
<ProjectReference Include="$(RepoRoot)\src\Framework\App.Ref\src\Microsoft.AspNetCore.App.Ref.csproj"
71+
Private="false"
72+
ReferenceOutputAssembly="false"
73+
SkipGetTargetFrameworkProperties="true" />
8474
</ItemGroup>
8575

8676
<Target Name="GenerateTestData" BeforeTargets="GetAssemblyAttributes" DependsOnTargets="InitializeSourceControlInformation">

src/Framework/test/TargetingPackTests.cs

Lines changed: 2 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ public class TargetingPackTests
2323
private readonly string _targetingPackTfm;
2424
private readonly string _targetingPackRoot;
2525
private readonly ITestOutputHelper _output;
26-
private readonly bool _isTargetingPackBuilding;
2726

2827
public TargetingPackTests(ITestOutputHelper output)
2928
{
@@ -38,17 +37,11 @@ public TargetingPackTests(ITestOutputHelper output)
3837
"packs",
3938
"Microsoft.AspNetCore.App.Ref",
4039
TestData.GetTestDataValue("TargetingPackVersion"));
41-
_isTargetingPackBuilding = bool.Parse(TestData.GetTestDataValue("IsTargetingPackBuilding"));
4240
}
4341

4442
[Fact]
4543
public void TargetingPackContainsListedAssemblies()
4644
{
47-
if (!_isTargetingPackBuilding)
48-
{
49-
return;
50-
}
51-
5245
var actualAssemblies = Directory.GetFiles(Path.Combine(_targetingPackRoot, "ref", _targetingPackTfm), "*.dll")
5346
.Select(Path.GetFileNameWithoutExtension)
5447
.ToHashSet();
@@ -74,11 +67,6 @@ public void TargetingPackContainsListedAssemblies()
7467
[Fact]
7568
public void RefAssembliesHaveExpectedAssemblyVersions()
7669
{
77-
if (!_isTargetingPackBuilding)
78-
{
79-
return;
80-
}
81-
8270
IEnumerable<string> dlls = Directory.GetFiles(Path.Combine(_targetingPackRoot, "ref", _targetingPackTfm), "*.dll", SearchOption.AllDirectories);
8371
Assert.NotEmpty(dlls);
8472

@@ -99,11 +87,6 @@ public void RefAssembliesHaveExpectedAssemblyVersions()
9987
[Fact]
10088
public void RefAssemblyReferencesHaveExpectedAssemblyVersions()
10189
{
102-
if (!_isTargetingPackBuilding)
103-
{
104-
return;
105-
}
106-
10790
IEnumerable<string> dlls = Directory.GetFiles(Path.Combine(_targetingPackRoot, "ref", _targetingPackTfm), "*.dll", SearchOption.AllDirectories);
10891
Assert.NotEmpty(dlls);
10992

@@ -126,11 +109,6 @@ public void RefAssemblyReferencesHaveExpectedAssemblyVersions()
126109
[Fact]
127110
public void PackageOverridesContainsCorrectEntries()
128111
{
129-
if (!_isTargetingPackBuilding)
130-
{
131-
return;
132-
}
133-
134112
var packageOverridePath = Path.Combine(_targetingPackRoot, "data", "PackageOverrides.txt");
135113

136114
AssertEx.FileExists(packageOverridePath);
@@ -190,11 +168,6 @@ public void PackageOverridesContainsCorrectEntries()
190168
[Fact]
191169
public void AssembliesAreReferenceAssemblies()
192170
{
193-
if (!_isTargetingPackBuilding)
194-
{
195-
return;
196-
}
197-
198171
IEnumerable<string> dlls = Directory.GetFiles(Path.Combine(_targetingPackRoot, "ref"), "*.dll", SearchOption.AllDirectories);
199172
Assert.NotEmpty(dlls);
200173

@@ -222,11 +195,6 @@ public void AssembliesAreReferenceAssemblies()
222195
[Fact]
223196
public void PlatformManifestListsAllFiles()
224197
{
225-
if (!_isTargetingPackBuilding)
226-
{
227-
return;
228-
}
229-
230198
var platformManifestPath = Path.Combine(_targetingPackRoot, "data", "PlatformManifest.txt");
231199
var expectedAssemblies = TestData.GetSharedFxDependencies()
232200
.Split(';', StringSplitOptions.RemoveEmptyEntries)
@@ -292,11 +260,6 @@ public void PlatformManifestListsAllFiles()
292260
[Fact]
293261
public void FrameworkListListsContainsCorrectEntries()
294262
{
295-
if (!_isTargetingPackBuilding)
296-
{
297-
return;
298-
}
299-
300263
var frameworkListPath = Path.Combine(_targetingPackRoot, "data", "FrameworkList.xml");
301264
var expectedAssemblies = TestData.GetTargetingPackDependencies()
302265
.Split(';', StringSplitOptions.RemoveEmptyEntries)
@@ -364,7 +327,7 @@ void CompareFrameworkElements(HashSet<string> expectedAssemblyNames, IEnumerable
364327
[Fact]
365328
public void FrameworkListListsContainsCorrectPaths()
366329
{
367-
if (!_isTargetingPackBuilding || string.IsNullOrEmpty(Environment.GetEnvironmentVariable("helix")))
330+
if (string.IsNullOrEmpty(Environment.GetEnvironmentVariable("helix")))
368331
{
369332
return;
370333
}
@@ -406,7 +369,7 @@ public void FrameworkListListsContainsCorrectPaths()
406369
[Fact]
407370
public void FrameworkListListsContainsAnalyzerLanguage()
408371
{
409-
if (!_isTargetingPackBuilding || string.IsNullOrEmpty(Environment.GetEnvironmentVariable("helix")))
372+
if (string.IsNullOrEmpty(Environment.GetEnvironmentVariable("helix")))
410373
{
411374
return;
412375
}

src/Installers/Debian/Directory.Build.targets

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
<Target Name="Pack" />
2929

3030
<Target Name="DebBuild" DependsOnTargets="$(DebBuildDependsOn)"
31-
Condition="!( '$(IsTargetingPackBuilding)' == 'false' AND '$(MSBuildProjectName)' == 'Debian.TargetingPack' )">
31+
Condition=" '$(MSBuildProjectName)' != 'Debian.TargetingPack' ">
3232
<!-- Generate debian_config.json. We can't simply use WriteLinesToFile because of https://github.com/Microsoft/msbuild/issues/1622. Use our custom GenerateFileFromTemplate task instead -->
3333
<PropertyGroup>
3434
<DebianConfigProperties>

src/Installers/Debian/TargetingPack/Debian.TargetingPack.debproj

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,6 @@
4444
<!-- Deb installers are versioned as M.N.P~PreReleaseVersionLabel-Build following the core-setup convention -->
4545
<DebPackageVersion Condition="'$(VersionSuffix)' != ''">$(DebPackageVersion)~$(VersionSuffix)</DebPackageVersion>
4646
<PackageRevision>1</PackageRevision>
47-
48-
<!-- Suppresses building this project completely during servicing builds. -->
49-
<DebBuildDependsOn Condition="'$(IsTargetingPackBuilding)' == 'false'" />
5047
</PropertyGroup>
5148

5249
</Project>

0 commit comments

Comments
 (0)