Skip to content

Commit 2665f36

Browse files
authored
Fix NU1505 (#13423)
1 parent 22b24b1 commit 2665f36

File tree

7 files changed

+50
-0
lines changed

7 files changed

+50
-0
lines changed

src/fsc/fsc.targets

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@
44

55
<PropertyGroup>
66
<OutputType>Exe</OutputType>
7+
<!-- Workaround to get rid of:
8+
error NU1505: Duplicate 'PackageDownload' items found.
9+
Remove the duplicate items or use the Update functionality to ensure a consistent restore behavior.
10+
The duplicate 'PackageDownload' items are:
11+
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].
12+
-->
13+
<NoWarn>$(NoWarn);NU1505</NoWarn>
14+
715
<NoWarn>$(NoWarn);44</NoWarn> <!-- Obsolete -->
816
<NoWarn>$(NoWarn);75</NoWarn> <!-- InternalCommandLineOption -->
917
<AllowCrossTargeting>true</AllowCrossTargeting>

src/fsi/fsi.targets

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@
44

55
<PropertyGroup>
66
<OutputType>Exe</OutputType>
7+
<!-- Workaround to get rid of:
8+
error NU1505: Duplicate 'PackageDownload' items found.
9+
Remove the duplicate items or use the Update functionality to ensure a consistent restore behavior.
10+
The duplicate 'PackageDownload' items are:
11+
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].
12+
-->
13+
<NoWarn>$(NoWarn);NU1505</NoWarn>
714
<NoWarn>$(NoWarn);44</NoWarn> <!-- Obsolete -->
815
<AllowCrossTargeting>true</AllowCrossTargeting>
916
<OtherFlags>$(OtherFlags) --warnon:1182</OtherFlags>

tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.Tests.fsproj

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@
55
<OutputType>Exe</OutputType>
66
<TargetFrameworks>net472;net6.0</TargetFrameworks>
77
<TargetFrameworks Condition="'$(OS)' == 'Unix'">net6.0</TargetFrameworks>
8+
<!-- Workaround to get rid of:
9+
error NU1505: Duplicate 'PackageDownload' items found.
10+
Remove the duplicate items or use the Update functionality to ensure a consistent restore behavior.
11+
The duplicate 'PackageDownload' items are:
12+
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].
13+
-->
14+
<NoWarn>$(NoWarn);NU1505</NoWarn>
815
<NoWarn>$(NoWarn);44;75;</NoWarn>
916
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
1017
<GenerateProgramFile>false</GenerateProgramFile>

tests/PEVerify/PEVerify.csproj

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,13 @@
77
<TargetFrameworks Condition="'$(OS)' == 'Unix'">net6.0</TargetFrameworks>
88
<RuntimeIdentifiers>win-x86;win-x64;linux-x64;osx-x64</RuntimeIdentifiers>
99
<AssetTargetFallback>$(AssetTargetFallback);portable-net45+win8+wp8+wpa81</AssetTargetFallback>
10+
<!-- Workaround to get rid of:
11+
error NU1505: Duplicate 'PackageDownload' items found.
12+
Remove the duplicate items or use the Update functionality to ensure a consistent restore behavior.
13+
The duplicate 'PackageDownload' items are:
14+
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].
15+
-->
16+
<NoWarn>$(NoWarn);NU1505</NoWarn>
1017
<NoWarn>$(NoWarn);1591</NoWarn>
1118
</PropertyGroup>
1219

tests/benchmarks/CompiledCodeBenchmarks/MicroPerf/MicroPerf.fsproj

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22
<PropertyGroup>
33
<TargetFramework>net6.0</TargetFramework>
44
<OutputType>Exe</OutputType>
5+
<!-- Workaround to get rid of:
6+
error NU1505: Duplicate 'PackageDownload' items found.
7+
Remove the duplicate items or use the Update functionality to ensure a consistent restore behavior.
8+
The duplicate 'PackageDownload' items are:
9+
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].
10+
-->
11+
<NoWarn>$(NoWarn);NU1505</NoWarn>
512
<DisableImplicitFSharpCoreReference>true</DisableImplicitFSharpCoreReference>
613
<!-- Turn off "This function is for use by compiled F# code and should not be used directly" -->
714
<OtherFlags>$(OtherFlags) --nowarn:1204</OtherFlags>

tests/benchmarks/CompiledCodeBenchmarks/TaskPerf/TaskPerf/TaskPerf.fsproj

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,13 @@
33
<PropertyGroup>
44
<TargetFramework>net6.0</TargetFramework>
55
<OutputType>Exe</OutputType>
6+
<!-- Workaround to get rid of:
7+
error NU1505: Duplicate 'PackageDownload' items found.
8+
Remove the duplicate items or use the Update functionality to ensure a consistent restore behavior.
9+
The duplicate 'PackageDownload' items are:
10+
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].
11+
-->
12+
<NoWarn>NU1505</NoWarn>
613
<DisableImplicitFSharpCoreReference>true</DisableImplicitFSharpCoreReference>
714
<!-- Turn off "This function is for use by compiled F# code and should not be used directly" -->
815
<OtherFlags>$(OtherFlags) --nowarn:1204</OtherFlags>

tests/benchmarks/FCSBenchmarks/CompilerServiceBenchmarks/FSharp.Compiler.Benchmarks.fsproj

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@
44
<OutputType>Exe</OutputType>
55
<TargetFramework>net6.0</TargetFramework>
66
<DisableImplicitFSharpCoreReference>true</DisableImplicitFSharpCoreReference>
7+
<!-- Workaround to get rid of:
8+
error NU1505: Duplicate 'PackageDownload' items found.
9+
Remove the duplicate items or use the Update functionality to ensure a consistent restore behavior.
10+
The duplicate 'PackageDownload' items are:
11+
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].
12+
-->
13+
<NoWarn>$(NoWarn);NU1505</NoWarn>
714
</PropertyGroup>
815

916
<ItemGroup>

0 commit comments

Comments
 (0)