Skip to content

Commit 965eaff

Browse files
Merge pull request dotnet#28523 from dotnet-maestro-bot/merge/release/5.0-to-master
[automated] Merge branch 'release/5.0' => 'master'
2 parents 7d73bda + e4c3fb8 commit 965eaff

File tree

18 files changed

+529
-352
lines changed

18 files changed

+529
-352
lines changed

eng/Baseline.Designer.props

Lines changed: 223 additions & 223 deletions
Large diffs are not rendered by default.

eng/Baseline.xml

Lines changed: 101 additions & 101 deletions
Large diffs are not rendered by default.

eng/Publishing.props

Lines changed: 38 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@
44
</PropertyGroup>
55

66
<PropertyGroup>
7-
<PublishDependsOnTargets>$(PublishDependsOnTargets);_PublishInstallersAndChecksums</PublishDependsOnTargets>
7+
<PublishDependsOnTargets>$(PublishDependsOnTargets);_PublishInstallersAndChecksumsAndProductVersion</PublishDependsOnTargets>
88

99
<_UploadPathRoot>aspnetcore</_UploadPathRoot>
10+
<ProductVersionFileName>productVersion.txt</ProductVersionFileName>
11+
<ProductVersionFileLocation>$(ArtifactsShippingPackagesDir)$(ProductVersionFileName)</ProductVersionFileLocation>
1012
</PropertyGroup>
1113

1214
<!-- $(InstallersOutputPath), $(SymbolsOutputPath), and $(ChecksumExtensions) are not defined. Root Directory.Build.props is not imported. -->
@@ -31,7 +33,9 @@
3133
<_ChecksumsToPublish Include="$(ArtifactsDir)**\*.sha512" />
3234
</ItemGroup>
3335

34-
<Target Name="_PublishInstallersAndChecksums">
36+
<Target
37+
Name="_PublishInstallersAndChecksumsAndProductVersion"
38+
DependsOnTargets="_WriteProductVersionFile">
3539
<!--
3640
This target is defined in eng/targets/Packaging.targets and Npm.Common.targets and included in every C#, F#,
3741
and npm project. We use SignalR.Npm.FunctionalTests.npmproj because it is non-shipping (we need a non-stable
@@ -65,6 +69,38 @@
6569
<PublishFlatContainer>true</PublishFlatContainer>
6670
<RelativeBlobPath>$(_UploadPathRoot)/%(_InstallersToPublish.UploadPathSegment)/$(_PackageVersion)/%(Filename)%(Extension)</RelativeBlobPath>
6771
</ItemsToPushToBlobFeed>
72+
73+
<ItemsToPushToBlobFeed Include="$(ProductVersionFileLocation)" Condition=" '$(PublishInstallerBaseVersion)' == 'true'">
74+
<PublishFlatContainer>true</PublishFlatContainer>
75+
<RelativeBlobPath>$(_UploadPathRoot)/Runtime/$(_PackageVersion)/$(ProductVersionFileName)</RelativeBlobPath>
76+
</ItemsToPushToBlobFeed>
6877
</ItemGroup>
6978
</Target>
79+
80+
<Target
81+
Name="_WriteProductVersionFile"
82+
Condition=" '$(PublishInstallerBaseVersion)' == 'true'">
83+
<!--
84+
This target is defined in eng/targets/Packaging.targets and Npm.Common.targets and included in every C#, F#,
85+
and npm project. We use Microsoft.AspNetCore.App.Runtime.csproj because it is shipping (we need a stable
86+
version string to use for productVersion.txt).
87+
-->
88+
<MSBuild Projects="$(RepoRoot)src\Framework\App.Runtime\src\Microsoft.AspNetCore.App.Runtime.csproj"
89+
Properties="DisableYarnCheck=true;ExcludeFromBuild=false"
90+
Targets="_GetPackageVersionInfo"
91+
SkipNonexistentProjects="false">
92+
<Output TaskParameter="TargetOutputs" ItemName="_ResolvedProductVersionInfo" />
93+
</MSBuild>
94+
95+
<PropertyGroup>
96+
<_ProductVersion>@(_ResolvedProductVersionInfo->'%(PackageVersion)')</_ProductVersion>
97+
</PropertyGroup>
98+
99+
<!-- Generate productVersion.txt containing the value of $(PackageVersion) -->
100+
<WriteLinesToFile
101+
File="$(ProductVersionFileLocation)"
102+
Lines="$(_ProductVersion)"
103+
Overwrite="true"
104+
Encoding="ASCII" />
105+
</Target>
70106
</Project>

eng/targets/Wix.Common.targets

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,14 @@
1818
</ItemDefinitionGroup>
1919

2020
<PropertyGroup Condition="'$(OutputType)' == 'package'">
21+
<!-- Set package version for SharedFx & TargetingPack wixproj's -->
22+
<!-- Everything built in those projects _except_ the final package & MSI are shipping assets. -->
23+
<_GeneratedPackageVersion>$(PackageVersion)</_GeneratedPackageVersion>
24+
<_GeneratedPackageVersion
25+
Condition="! $(PackageVersion.Contains('$(_PreReleaseLabel)'))">$(PackageVersion)-$(_PreReleaseLabel)$(_BuildNumberLabels)</_GeneratedPackageVersion>
26+
<!-- Insert PackageVersion into OutputName for SharedFx & TargetingPack -->
27+
<OutputName Condition="'$(OutputNamePrefix)' != '' AND '$(OutputNameSuffix)' != ''">$(OutputNamePrefix)$(_GeneratedPackageVersion)$(OutputNameSuffix)$(TargetExt)</OutputName>
28+
2129
<EmbedCab Condition="'$(EmbedCab)' == ''">yes</EmbedCab>
2230
<Cabinet Condition="'$(Cabinet)' == ''">$(OutputName.Replace('-', '_')).cab</Cabinet>
2331
<InstallDir>$(ProductName)</InstallDir>

global.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66
"dotnet": "6.0.100-alpha.1.20523.3",
77
"runtimes": {
88
"dotnet/x64": [
9-
"2.1.18",
9+
"2.1.23",
1010
"$(MicrosoftNETCoreBrowserDebugHostTransportVersion)"
1111
],
1212
"dotnet/x86": [
1313
"$(MicrosoftNETCoreBrowserDebugHostTransportVersion)"
1414
],
1515
"aspnetcore/x64": [
16-
"3.1.4"
16+
"3.1.10"
1717
]
1818
},
1919
"Git": "2.22.0",

src/Installers/Windows/SharedFramework/SharedFramework.wixproj

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), Directory.Build.props))\Directory.Build.props" />
44

55
<PropertyGroup>
6+
<OutputNamePrefix>$(RuntimeInstallerBaseName)-</OutputNamePrefix>
7+
<OutputNameSuffix>-win-$(Platform)</OutputNameSuffix>
68
<ProductNameFolder>Microsoft ASP.NET Core Shared Framework</ProductNameFolder>
79
<ProductNameShort>AspNetCore.SharedFramework</ProductNameShort>
8-
<Name>AspNetCoreSharedFramework</Name>
9-
<OutputName>$(Name)-$(Platform)</OutputName>
1010
<OutputType>Package</OutputType>
1111
<EmbedCab>yes</EmbedCab>
1212
<Cabinet>sfx_$(Platform).cab</Cabinet>
@@ -80,11 +80,7 @@
8080
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), Directory.Build.targets))\Directory.Build.targets" />
8181

8282
<PropertyGroup>
83-
<!-- Everything built in this project _except_ the final package & MSI are shipping assets. -->
84-
<_GeneratedPackageVersion>$(PackageVersion)</_GeneratedPackageVersion>
85-
<_GeneratedPackageVersion
86-
Condition="! $(PackageVersion.Contains('$(_PreReleaseLabel)'))">$(PackageVersion)-$(_PreReleaseLabel)$(_BuildNumberLabels)</_GeneratedPackageVersion>
87-
<PackageFileName>$(RuntimeInstallerBaseName)-$(_GeneratedPackageVersion)-win-$(Platform)$(TargetExt)</PackageFileName>
83+
<PackageFileName>$(OutputName)</PackageFileName>
8884
<ProductName>Microsoft ASP.NET Core $(PackageBrandingVersion) Shared Framework ($(Platform))</ProductName>
8985
<DefineConstants>$(DefineConstants);ProductName=$(ProductName)</DefineConstants>
9086
</PropertyGroup>

src/Installers/Windows/TargetingPack/TargetingPack.wixproj

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), Directory.Build.props))\Directory.Build.props" />
44

55
<PropertyGroup>
6+
<OutputNamePrefix>$(TargetingPackInstallerBaseName)-</OutputNamePrefix>
7+
<OutputNameSuffix>-win-$(Platform)</OutputNameSuffix>
68
<ProductNameFolder>Microsoft ASP.NET Core Targeting Pack</ProductNameFolder>
79
<ProductNameShort>AspNetCore.TargetingPack</ProductNameShort>
8-
<Name>AspNetCoreTargetingPack</Name>
9-
<OutputName>$(Name)-$(Platform)</OutputName>
1010
<OutputType>Package</OutputType>
1111
<IsShipping>true</IsShipping>
1212
<SkipCopyToArtifactsDirectory Condition="'$(IsTargetingPackBuilding)' == 'false'">true</SkipCopyToArtifactsDirectory>
@@ -70,12 +70,8 @@
7070
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), Directory.Build.targets))\Directory.Build.targets" />
7171

7272
<PropertyGroup>
73-
<!-- Everything built in this project _except_ the final package are shipping assets. -->
74-
<_GeneratedPackageVersion>$(PackageVersion)</_GeneratedPackageVersion>
75-
<_GeneratedPackageVersion
76-
Condition="! $(PackageVersion.Contains('$(_PreReleaseLabel)'))">$(PackageVersion)-$(_PreReleaseLabel)$(_BuildNumberLabels)</_GeneratedPackageVersion>
7773
<ProductName>Microsoft ASP.NET Core $(PackageBrandingVersion) Targeting Pack ($(Platform))</ProductName>
78-
<PackageFileName>$(TargetingPackInstallerBaseName)-$(_GeneratedPackageVersion)-win-$(Platform)$(TargetExt)</PackageFileName>
74+
<PackageFileName>$(OutputName)</PackageFileName>
7975
<DefineConstants>$(DefineConstants);ProductName=$(ProductName)</DefineConstants>
8076

8177
<!-- Suppresses building this project completely during servicing builds. -->

src/Installers/Windows/WindowsHostingBundle/thm.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,10 @@
6161
<Button Name="ModifyCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.ModifyCloseButton)</Button>
6262
</Page>
6363
<Page Name="Success">
64-
<Text Name="SuccessHeader" X="11" Y="80" Width="-11" Height="30" FontId="2" HideWhenDisabled="yes" DisablePrefix="yes">#(loc.SuccessHeader)</Text>
65-
<Text Name="SuccessInstallHeader" X="11" Y="80" Width="-11" Height="30" FontId="2" HideWhenDisabled="yes" DisablePrefix="yes">#(loc.SuccessInstallHeader)</Text>
66-
<Text Name="SuccessRepairHeader" X="11" Y="80" Width="-11" Height="30" FontId="2" HideWhenDisabled="yes" DisablePrefix="yes">#(loc.SuccessRepairHeader)</Text>
67-
<Text Name="SuccessUninstallHeader" X="11" Y="80" Width="-11" Height="30" FontId="2" HideWhenDisabled="yes" DisablePrefix="yes">#(loc.SuccessUninstallHeader)</Text>
64+
<Text Name="SuccessHeader" X="11" Y="80" Width="-11" Height="60" FontId="2" HideWhenDisabled="yes" DisablePrefix="yes">#(loc.SuccessHeader)</Text>
65+
<Text Name="SuccessInstallHeader" X="11" Y="80" Width="-11" Height="60" FontId="2" HideWhenDisabled="yes" DisablePrefix="yes">#(loc.SuccessInstallHeader)</Text>
66+
<Text Name="SuccessRepairHeader" X="11" Y="80" Width="-11" Height="60" FontId="2" HideWhenDisabled="yes" DisablePrefix="yes">#(loc.SuccessRepairHeader)</Text>
67+
<Text Name="SuccessUninstallHeader" X="11" Y="80" Width="-11" Height="60" FontId="2" HideWhenDisabled="yes" DisablePrefix="yes">#(loc.SuccessUninstallHeader)</Text>
6868
<Button Name="LaunchButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes">#(loc.SuccessLaunchButton)</Button>
6969
<Text Name="SuccessRestartText" X="-11" Y="-51" Width="400" Height="34" FontId="3" HideWhenDisabled="yes" DisablePrefix="yes">#(loc.SuccessRestartText)</Text>
7070
<Button Name="SuccessRestartButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes">#(loc.SuccessRestartButton)</Button>
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
// Copyright (c) .NET Foundation. All rights reserved.
2+
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3+
4+
using System.IO;
5+
using System.Threading.Tasks;
6+
using Microsoft.AspNetCore.Testing;
7+
8+
namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
9+
{
10+
public class MvcBuildIntegrationTest22 : MvcBuildIntegrationTestLegacy
11+
{
12+
public MvcBuildIntegrationTest22(LegacyBuildServerTestFixture buildServer)
13+
: base(buildServer)
14+
{
15+
}
16+
17+
public override string TestProjectName => "SimpleMvc22";
18+
public override string TargetFramework => "netcoreapp2.2";
19+
20+
[ConditionalFact]
21+
[OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)]
22+
public async Task BuildProject_UsingDesktopMSBuild()
23+
{
24+
using var _ = CreateTestProject();
25+
26+
// Build
27+
// This is a regression test for https://github.com/dotnet/aspnetcore/issues/28333. We're trying to ensure
28+
// building in Desktop when DOTNET_HOST_PATH is not configured continues to work.
29+
// Explicitly unset it to verify a value is not being picked up as an ambient value.
30+
var result = await DotnetMSBuild("Build", args: "/p:DOTNET_HOST_PATH=", msBuildProcessKind: MSBuildProcessKind.Desktop);
31+
32+
Assert.BuildPassed(result);
33+
Assert.FileExists(result, OutputPath, OutputFileName);
34+
Assert.FileExists(result, OutputPath, $"{TestProjectName}.pdb");
35+
Assert.FileExists(result, OutputPath, $"{TestProjectName}.Views.dll");
36+
Assert.FileExists(result, OutputPath, $"{TestProjectName}.Views.pdb");
37+
38+
// Verify RazorTagHelper works
39+
Assert.FileExists(result, IntermediateOutputPath, $"{TestProjectName}.TagHelpers.input.cache");
40+
Assert.FileExists(result, IntermediateOutputPath, $"{TestProjectName}.TagHelpers.output.cache");
41+
Assert.FileContains(
42+
result,
43+
Path.Combine(IntermediateOutputPath, $"{TestProjectName}.TagHelpers.output.cache"),
44+
@"""Name"":""SimpleMvc.SimpleTagHelper""");
45+
}
46+
}
47+
}

src/Razor/Microsoft.NET.Sdk.Razor/src/DotnetToolTask.cs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
using Microsoft.AspNetCore.Razor.Tools;
1111
using Microsoft.Build.Framework;
1212
using Microsoft.Build.Utilities;
13+
using Microsoft.Extensions.CommandLineUtils;
1314

1415
namespace Microsoft.AspNetCore.Razor.Tasks
1516
{
@@ -40,7 +41,7 @@ public abstract class DotNetToolTask : ToolTask
4041

4142
public string PipeName { get; set; }
4243

43-
protected override string ToolName => Path.GetDirectoryName(DotNetPath);
44+
protected override string ToolName => "dotnet";
4445

4546
// If we're debugging then make all of the stdout gets logged in MSBuild
4647
protected override MessageImportance StandardOutputLoggingImportance => DebugTool ? MessageImportance.High : base.StandardOutputLoggingImportance;
@@ -60,11 +61,7 @@ private string DotNetPath
6061
return _dotnetPath;
6162
}
6263

63-
_dotnetPath = Environment.GetEnvironmentVariable("DOTNET_HOST_PATH");
64-
if (string.IsNullOrEmpty(_dotnetPath))
65-
{
66-
throw new InvalidOperationException("DOTNET_HOST_PATH is not set");
67-
}
64+
_dotnetPath = Environment.GetEnvironmentVariable("DOTNET_HOST_PATH") ?? ToolExe;
6865

6966
return _dotnetPath;
7067
}

src/Razor/test/testassets/RestoreTestProjects/RestoreTestProjects.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
<ItemGroup>
77
<ProjectReference Include="..\SimpleMvc21\SimpleMvc21.csproj" />
8+
<ProjectReference Include="..\SimpleMvc22\SimpleMvc22.csproj" />
89
<ProjectReference Include="..\SimpleMvc31\SimpleMvc31.csproj" />
910
<ProjectReference Include="..\blazor31\blazor31.csproj" />
1011
<ProjectReference Include="..\ClassLibraryMvc21\ClassLibraryMvc21.csproj" />
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+

2+
namespace SimpleMvc
3+
{
4+
public class Program
5+
{
6+
public static void Main(string[] args)
7+
{
8+
// Just make sure we have a reference to MVC
9+
var t = typeof(Microsoft.AspNetCore.Mvc.IActionResult);
10+
System.Console.WriteLine(t.FullName);
11+
}
12+
}
13+
}
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<Project Sdk="Microsoft.NET.Sdk.Web">
2+
3+
<!--
4+
This project references a shipped version of MVC and should not reference local builds of
5+
the CodeGeneration targets, rzc, or any of the test shims.
6+
-->
7+
8+
<PropertyGroup>
9+
<TargetFramework>netcoreapp2.2</TargetFramework>
10+
<CheckEolTargetFramework>false</CheckEolTargetFramework>
11+
<RazorSdkDirectoryRoot>$(RazorSdkArtifactsDirectory)$(Configuration)\sdk-output\</RazorSdkDirectoryRoot>
12+
</PropertyGroup>
13+
14+
<!-- Test Placeholder -->
15+
16+
<PropertyGroup Condition="'$(RunningAsTest)' == ''">
17+
<!-- We don't want to run build server when not running as tests. -->
18+
<UseRazorBuildServer>false</UseRazorBuildServer>
19+
</PropertyGroup>
20+
21+
<ItemGroup>
22+
<PackageReference Include="Microsoft.AspNetCore.App">
23+
<!-- Avoid exporting types from real MVC that will conflict with the test shim -->
24+
<PrivateAssets>All</PrivateAssets>
25+
</PackageReference>
26+
27+
<PackageReference Include="Microsoft.AspNetCore.Razor.Design" Version="2.2.0">
28+
<!-- Avoid exporting types from real MVC that will conflict with the test shim -->
29+
<PrivateAssets>All</PrivateAssets>
30+
</PackageReference>
31+
</ItemGroup>
32+
33+
</Project>
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
using Microsoft.AspNetCore.Razor.TagHelpers;
2+
3+
namespace SimpleMvc
4+
{
5+
public class SimpleTagHelper : TagHelper
6+
{
7+
}
8+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
@{
2+
ViewData["Title"] = "Home Page";
3+
}
4+
5+
<h2>
6+
Learn how to build ASP.NET apps that can run anywhere.
7+
<a class="btn btn-default" href="https://go.microsoft.com/fwlink/?LinkID=525028&clcid=0x409">
8+
Learn More
9+
</a>
10+
</h2>
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta charset="utf-8" />
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6+
<title>@ViewData["Title"] - SimpleMvc</title>
7+
8+
<environment exclude="Development">
9+
<link rel="stylesheet" href="https://ajax.aspnetcdn.com/ajax/bootstrap/3.3.7/css/bootstrap.min.css"
10+
asp-fallback-href="~/lib/bootstrap/dist/css/bootstrap.min.css"
11+
asp-fallback-test-class="sr-only" asp-fallback-test-property="position" asp-fallback-test-value="absolute" />
12+
<link rel="stylesheet" href="~/css/site.min.css" asp-append-version="true" />
13+
</environment>
14+
</head>
15+
<body>
16+
<nav class="navbar navbar-inverse navbar-fixed-top">
17+
<a asp-area="" asp-controller="Home" asp-action="Index" class="navbar-brand">SimpleMvc</a>
18+
</nav>
19+
<div class="container body-content">
20+
@RenderBody()
21+
</div>
22+
23+
@RenderSection("Scripts", required: false)
24+
</body>
25+
</html>
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
@using SimpleMvc
2+
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
3+
@namespace SimpleMvc21
4+
@inject DateTime TheTime
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
@{
2+
Layout = "_Layout";
3+
}

0 commit comments

Comments
 (0)