Skip to content

Commit 4564c30

Browse files
author
Simon Zhao (BEYONDSOFT CONSULTING INC)
committed
Merge branch 'main' of https://github.com/dotnet/sdk into merge/release/9.0.3xx-to-main
2 parents 8fba3bb + 806e650 commit 4564c30

File tree

15 files changed

+369
-106
lines changed

15 files changed

+369
-106
lines changed

src/Cli/Microsoft.DotNet.Cli.Utils/Constants.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ public static class Constants
1919

2020
public static readonly string MSBUILD_EXE_PATH = nameof(MSBUILD_EXE_PATH);
2121
public static readonly string MSBuildExtensionsPath = nameof(MSBuildExtensionsPath);
22+
2223
public static readonly string EnableDefaultItems = nameof(EnableDefaultItems);
24+
public static readonly string EnableDefaultContentItems = nameof(EnableDefaultContentItems);
2325
public static readonly string EnableDefaultCompileItems = nameof(EnableDefaultCompileItems);
2426
public static readonly string EnableDefaultEmbeddedResourceItems = nameof(EnableDefaultEmbeddedResourceItems);
2527
public static readonly string EnableDefaultNoneItems = nameof(EnableDefaultNoneItems);

src/Cli/dotnet/Commands/Restore/RestoringCommand.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the MIT license.
33

4-
using System.Collections.Frozen;
54
using System.Collections.ObjectModel;
65
using Microsoft.DotNet.Cli.Commands.MSBuild;
76
using Microsoft.DotNet.Cli.Commands.Workload.Install;
@@ -12,7 +11,6 @@ namespace Microsoft.DotNet.Cli.Commands.Restore;
1211

1312
public class RestoringCommand : MSBuildForwardingApp
1413
{
15-
1614
/// <summary>
1715
/// This dictionary contains properties that are set to disable the default items
1816
/// that are added to the project by default. These Item types are not needed
@@ -22,7 +20,9 @@ public class RestoringCommand : MSBuildForwardingApp
2220
public static ReadOnlyDictionary<string, string> RestoreOptimizationProperties =>
2321
new(new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase)
2422
{
25-
{ Constants.EnableDefaultItems, "false" },
23+
// note that we do not disable all default items - Razor at least needs Content
24+
// in order to do implicit PackageReferences if Razor files are present
25+
{ Constants.EnableDefaultCompileItems, "false" },
2626
{ Constants.EnableDefaultEmbeddedResourceItems, "false" },
2727
{ Constants.EnableDefaultNoneItems, "false" },
2828
});

src/Containers/Microsoft.NET.Build.Containers/Logging/MSBuildLogger.cs

Lines changed: 0 additions & 62 deletions
This file was deleted.

src/Containers/Microsoft.NET.Build.Containers/Logging/MSBuildLoggerProvider.cs

Lines changed: 0 additions & 29 deletions
This file was deleted.

src/Containers/Microsoft.NET.Build.Containers/Microsoft.NET.Build.Containers.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@
2525
</PropertyGroup>
2626

2727
<ItemGroup>
28-
<ProjectReference Include="..\..\Cli\Microsoft.DotNet.Cli.Utils\Microsoft.DotNet.Cli.Utils.csproj"
29-
Condition="'$(TargetFramework)' != 'net472'">
28+
<ProjectReference Include="..\..\Cli\Microsoft.DotNet.Cli.Utils\Microsoft.DotNet.Cli.Utils.csproj" Condition="'$(TargetFramework)' != 'net472'">
3029
<!-- This is referenced by the core CLI as well so it doesn't need to be redistributed
3130
in the containers task folder. -->
3231
<IncludeAssets>build</IncludeAssets>
3332
<Private>false</Private>
3433
</ProjectReference>
34+
<ProjectReference Include="..\..\Microsoft.Extensions.Logging.MSBuild\Microsoft.Extensions.Logging.MSBuild.csproj" Condition="'$(TargetFramework)' != 'net472'" />
3535
</ItemGroup>
3636

3737
<ItemGroup>

src/Containers/Microsoft.NET.Build.Containers/Tasks/CreateImageIndex.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
using System.Text.Json.Nodes;
66
using Microsoft.Build.Framework;
77
using Microsoft.Extensions.Logging;
8-
using Microsoft.NET.Build.Containers.Logging;
8+
using Microsoft.Extensions.Logging.MSBuild;
99
using Microsoft.NET.Build.Containers.Resources;
1010
using ILogger = Microsoft.Extensions.Logging.ILogger;
1111
using Task = System.Threading.Tasks.Task;

src/Containers/Microsoft.NET.Build.Containers/Tasks/CreateNewImage.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
using Microsoft.Build.Framework;
55
using Microsoft.Extensions.Logging;
6-
using Microsoft.NET.Build.Containers.Logging;
6+
using Microsoft.Extensions.Logging.MSBuild;
77
using Microsoft.NET.Build.Containers.Resources;
88
using ILogger = Microsoft.Extensions.Logging.ILogger;
99

src/Containers/packaging/package.csproj

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,6 @@
2828
SetTargetFramework="TargetFramework=$(TargetFramework)"
2929
OutputItemType="ContainerLibraryOutput"/>
3030

31-
<ProjectReference Include="../../Cli/Microsoft.DotNet.Cli.Utils/Microsoft.DotNet.Cli.Utils.csproj"
32-
SetTargetFramework="TargetFramework=$(ResolverTargetFramework)"
33-
OutputItemType="DotNetCliUtilsLibraryOutput"/>
34-
3531
<ProjectReference Include="../Microsoft.NET.Build.Containers/Microsoft.NET.Build.Containers.csproj"
3632
SetTargetFramework="TargetFramework=$(VSCompatTargetFramework)"
3733
OutputItemType="ContainerLibraryOutputNet472" Condition="'$(DotNetBuildSourceOnly)' != 'true'" />
@@ -86,15 +82,14 @@
8682
$([MSBuild]::ValueOrDefault('%(_AllNetContainerTaskDependencies.NuGetPackageId)', '').Contains('Microsoft.Extensions'))
8783
) and
8884
%(_AllNetContainerTaskDependencies.NuGetIsFrameworkReference) != true" />
89-
85+
<NecessaryNetContainerTaskDependencies Include="@(_AllNetContainerTaskDependencies)" Condition="'%(_AllNetContainerTaskDependencies.ReferenceSourceTarget)' == 'ProjectReference'" />
9086
<!-- root folder -->
9187
<Content Include="README.md" Pack="true" PackagePath="" />
9288

9389
<!-- tasks folder -->
9490
<!-- net7.0 tasks -->
9591
<!-- dependencies -->
9692
<Content Include="@(NecessaryNetContainerTaskDependencies)" Pack="true" PackagePath="tasks/$(TargetFramework)/" />
97-
<Content Include="@(DotNetCliUtilsLibraryOutput)" Pack="true" PackagePath="tasks/$(TargetFramework)/" />
9893

9994
<!-- runtime deps json -->
10095
<Content Include="$(ArtifactsDir)bin/Microsoft.NET.Build.Containers/$(Configuration)/$(TargetFramework)/Microsoft.NET.Build.Containers.deps.json" Pack="true" PackagePath="tasks/$(TargetFramework)" />

src/Layout/redist/dnx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
11
#!/bin/sh
2+
3+
# Licensed to the .NET Foundation under one or more agreements.
4+
# The .NET Foundation licenses this file to you under the MIT license.
5+
26
"$(dirname "$0")/dotnet" dnx "$@"

src/Layout/redist/dnx.cmd

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
1+
:: Licensed to the .NET Foundation under one or more agreements.
2+
:: The .NET Foundation licenses this file to you under the MIT license.
3+
14
@echo off
25
"%~dp0dotnet.exe" dnx %*

0 commit comments

Comments
 (0)