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 ;
54using System . Collections . ObjectModel ;
65using Microsoft . DotNet . Cli . Commands . MSBuild ;
76using Microsoft . DotNet . Cli . Commands . Workload . Install ;
@@ -12,7 +11,6 @@ namespace Microsoft.DotNet.Cli.Commands.Restore;
1211
1312public 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 } ) ;
0 commit comments