NuKeeperDotNet / NuKeeper

Automagically update nuget packages in .NET projects
Apache License 2.0
542 stars 126 forks source link

packages.lock.json incorrectly updated for .NET 5 #1086

Open Bouke opened 3 years ago

Bouke commented 3 years ago

🐛 Bug Report

I have some projects that multi-target .NET Framework 4.8 and .NET 5:

I have enabled (packages.lock.json):

When NuKeeper tries to update dependencies in such a library, the lock file is incorrectly modified to refer to ".NET Framework v5":

diff --git a/Library/packages.lock.json b/Library/packages.lock.json
index 8c0d8df4d..ef34bdeb6 100644
--- a/Library/packages.lock.json
+++ b/Library/packages.lock.json
@@ -59,7 +59,7 @@
         "contentHash": "NfmC8NoxrRtw2PSmqSu+kVTcsJuMhspxWKbVzrtPxw+O8hjpCPzD0IttCUJclDf36qkmScvvd1BgRHYE17zF9g=="
       }
     },
-    ".NETCoreApp,Version=v5.0": {
+    ".NETFramework,Version=v5.0": {
       "IDisposableAnalyzers": {
         "type": "Direct",
         "requested": "[3.4.8, )",

Expected behavior

It shouldn't modify the reference to .NET 5.

Reproduction steps

See above.

Configuration

Version: 0.4.43

Platform if applicable:

CrispyDrone commented 3 years ago

Hi @Bouke

Would it be possible to include log files with verbosity detailed?

Bouke commented 3 years ago

I'm trying to get those logs, but apparently I was running an old version (0.26.0) due to this bug: https://github.com/NuKeeperDotNet/NuKeeper-AzureDevops-extension/issues/62. Since upgrading my custom package sources aren't being used anymore, running into this bug: https://github.com/NuKeeperDotNet/NuKeeper/issues/1035#issuecomment-766832587.

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Bouke commented 3 years ago

I’d like to keep this issue open.

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Bouke commented 3 years ago

I’d like to keep this issue open.

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.