Skip to content

Commit fa77a9d

Browse files
committed
Don't warn about explicit package versions of implicit package references are disabled
1 parent 1d04b9c commit fa77a9d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.DefaultItems.targets

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,11 @@ Copyright (c) .NET Foundation. All rights reserved.
111111
Version="$(RuntimeFrameworkVersion)"
112112
Condition="'$(RuntimeFrameworkVersion)' != ''"
113113
AllowExplicitVersion="true"/>
114+
115+
<!-- If implicit PackageReferences are disabled, then don't warn about explicit versions at all -->
116+
<PackageReference Update="@(PackageReference)"
117+
Condition="'$(DisableImplicitFrameworkReferences)' == 'true'"
118+
AllowExplicitVersion="true"/>
114119
</ItemGroup>
115120

116121
<UsingTask TaskName="ApplyImplicitVersions" AssemblyFile="$(MicrosoftNETBuildTasksAssembly)" />

0 commit comments

Comments
 (0)