1
1
// Licensed to the .NET Foundation under one or more agreements.
2
2
// The .NET Foundation licenses this file to you under the MIT license.
3
3
4
- using System . Collections . Frozen ;
5
4
using System . Collections . ObjectModel ;
6
5
using Microsoft . DotNet . Cli . Commands . MSBuild ;
7
6
using Microsoft . DotNet . Cli . Commands . Workload . Install ;
@@ -12,7 +11,6 @@ namespace Microsoft.DotNet.Cli.Commands.Restore;
12
11
13
12
public class RestoringCommand : MSBuildForwardingApp
14
13
{
15
-
16
14
/// <summary>
17
15
/// This dictionary contains properties that are set to disable the default items
18
16
/// that are added to the project by default. These Item types are not needed
@@ -22,7 +20,9 @@ public class RestoringCommand : MSBuildForwardingApp
22
20
public static ReadOnlyDictionary < string , string > RestoreOptimizationProperties =>
23
21
new ( new Dictionary < string , string > ( StringComparer . OrdinalIgnoreCase )
24
22
{
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" } ,
26
26
{ Constants . EnableDefaultEmbeddedResourceItems , "false" } ,
27
27
{ Constants . EnableDefaultNoneItems , "false" } ,
28
28
} ) ;
0 commit comments