Skip to content

Commit a05005f

Browse files
committed
Emit package references in SDK mode too
This works more reliably in the IDE for background nuget restore.
1 parent 982f26d commit a05005f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/SmallSharp/EmitTargets.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,10 @@ public override bool Execute()
111111

112112
WriteXml(TargetsFile, new XElement("Project",
113113
new XElement("PropertyGroup", properties),
114-
// don't emit package references in SDK mode, since we'll add them from the SDK targets.
115-
UsingSDK ? new XElement("ItemGroup") : new XElement("ItemGroup", items)
114+
// We emit the package references always, even if UsingSDK is true, because
115+
// this works better with the background restore that VS does, and nuget
116+
// deduplicates package references anyway.
117+
new XElement("ItemGroup", items)
116118
));
117119

118120
WriteXml(Path.Combine(BaseIntermediateOutputPath, "SmallSharp.sdk.props"), new XElement("Project",

0 commit comments

Comments
 (0)