Skip to content

Commit

Permalink
Fix NU1505 (dotnet#13423)
Browse files Browse the repository at this point in the history
  • Loading branch information
vzarytovskii authored Jul 3, 2022
1 parent 22b24b1 commit 2665f36
Show file tree
Hide file tree
Showing 7 changed files with 50 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/fsc/fsc.targets
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<!-- Workaround to get rid of:
error NU1505: Duplicate 'PackageDownload' items found.
Remove the duplicate items or use the Update functionality to ensure a consistent restore behavior.
The duplicate 'PackageDownload' items are:
Microsoft.NETCore.App.Host.win-x64 [6.0.2], Microsoft.NETCore.App.Host.win-x64 [6.0.2], Microsoft.NETCore.App.Host.win-x64 [6.0.2], Microsoft.NETCore.App.Host.win-x64 [6.0.2].
-->
<NoWarn>$(NoWarn);NU1505</NoWarn>

<NoWarn>$(NoWarn);44</NoWarn> <!-- Obsolete -->
<NoWarn>$(NoWarn);75</NoWarn> <!-- InternalCommandLineOption -->
<AllowCrossTargeting>true</AllowCrossTargeting>
Expand Down
7 changes: 7 additions & 0 deletions src/fsi/fsi.targets
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<!-- Workaround to get rid of:
error NU1505: Duplicate 'PackageDownload' items found.
Remove the duplicate items or use the Update functionality to ensure a consistent restore behavior.
The duplicate 'PackageDownload' items are:
Microsoft.NETCore.App.Host.win-x64 [6.0.2], Microsoft.NETCore.App.Host.win-x64 [6.0.2], Microsoft.NETCore.App.Host.win-x64 [6.0.2], Microsoft.NETCore.App.Host.win-x64 [6.0.2].
-->
<NoWarn>$(NoWarn);NU1505</NoWarn>
<NoWarn>$(NoWarn);44</NoWarn> <!-- Obsolete -->
<AllowCrossTargeting>true</AllowCrossTargeting>
<OtherFlags>$(OtherFlags) --warnon:1182</OtherFlags>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@
<OutputType>Exe</OutputType>
<TargetFrameworks>net472;net6.0</TargetFrameworks>
<TargetFrameworks Condition="'$(OS)' == 'Unix'">net6.0</TargetFrameworks>
<!-- Workaround to get rid of:
error NU1505: Duplicate 'PackageDownload' items found.
Remove the duplicate items or use the Update functionality to ensure a consistent restore behavior.
The duplicate 'PackageDownload' items are:
Microsoft.NETCore.App.Host.win-x64 [6.0.2], Microsoft.NETCore.App.Host.win-x64 [6.0.2], Microsoft.NETCore.App.Host.win-x64 [6.0.2], Microsoft.NETCore.App.Host.win-x64 [6.0.2].
-->
<NoWarn>$(NoWarn);NU1505</NoWarn>
<NoWarn>$(NoWarn);44;75;</NoWarn>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<GenerateProgramFile>false</GenerateProgramFile>
Expand Down
7 changes: 7 additions & 0 deletions tests/PEVerify/PEVerify.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@
<TargetFrameworks Condition="'$(OS)' == 'Unix'">net6.0</TargetFrameworks>
<RuntimeIdentifiers>win-x86;win-x64;linux-x64;osx-x64</RuntimeIdentifiers>
<AssetTargetFallback>$(AssetTargetFallback);portable-net45+win8+wp8+wpa81</AssetTargetFallback>
<!-- Workaround to get rid of:
error NU1505: Duplicate 'PackageDownload' items found.
Remove the duplicate items or use the Update functionality to ensure a consistent restore behavior.
The duplicate 'PackageDownload' items are:
Microsoft.NETCore.App.Host.win-x64 [6.0.2], Microsoft.NETCore.App.Host.win-x64 [6.0.2], Microsoft.NETCore.App.Host.win-x64 [6.0.2], Microsoft.NETCore.App.Host.win-x64 [6.0.2].
-->
<NoWarn>$(NoWarn);NU1505</NoWarn>
<NoWarn>$(NoWarn);1591</NoWarn>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<OutputType>Exe</OutputType>
<!-- Workaround to get rid of:
error NU1505: Duplicate 'PackageDownload' items found.
Remove the duplicate items or use the Update functionality to ensure a consistent restore behavior.
The duplicate 'PackageDownload' items are:
Microsoft.NETCore.App.Host.win-x64 [6.0.2], Microsoft.NETCore.App.Host.win-x64 [6.0.2], Microsoft.NETCore.App.Host.win-x64 [6.0.2], Microsoft.NETCore.App.Host.win-x64 [6.0.2].
-->
<NoWarn>$(NoWarn);NU1505</NoWarn>
<DisableImplicitFSharpCoreReference>true</DisableImplicitFSharpCoreReference>
<!-- Turn off "This function is for use by compiled F# code and should not be used directly" -->
<OtherFlags>$(OtherFlags) --nowarn:1204</OtherFlags>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<OutputType>Exe</OutputType>
<!-- Workaround to get rid of:
error NU1505: Duplicate 'PackageDownload' items found.
Remove the duplicate items or use the Update functionality to ensure a consistent restore behavior.
The duplicate 'PackageDownload' items are:
Microsoft.NETCore.App.Host.win-x64 [6.0.2], Microsoft.NETCore.App.Host.win-x64 [6.0.2], Microsoft.NETCore.App.Host.win-x64 [6.0.2], Microsoft.NETCore.App.Host.win-x64 [6.0.2].
-->
<NoWarn>NU1505</NoWarn>
<DisableImplicitFSharpCoreReference>true</DisableImplicitFSharpCoreReference>
<!-- Turn off "This function is for use by compiled F# code and should not be used directly" -->
<OtherFlags>$(OtherFlags) --nowarn:1204</OtherFlags>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<DisableImplicitFSharpCoreReference>true</DisableImplicitFSharpCoreReference>
<!-- Workaround to get rid of:
error NU1505: Duplicate 'PackageDownload' items found.
Remove the duplicate items or use the Update functionality to ensure a consistent restore behavior.
The duplicate 'PackageDownload' items are:
Microsoft.NETCore.App.Host.win-x64 [6.0.2], Microsoft.NETCore.App.Host.win-x64 [6.0.2], Microsoft.NETCore.App.Host.win-x64 [6.0.2], Microsoft.NETCore.App.Host.win-x64 [6.0.2].
-->
<NoWarn>$(NoWarn);NU1505</NoWarn>
</PropertyGroup>

<ItemGroup>
Expand Down

0 comments on commit 2665f36

Please sign in to comment.