Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues with floating versions and ranges #1616

Open
1 task
Falco20019 opened this issue Nov 28, 2024 · 0 comments
Open
1 task

Issues with floating versions and ranges #1616

Falco20019 opened this issue Nov 28, 2024 · 0 comments

Comments

@Falco20019
Copy link

Falco20019 commented Nov 28, 2024

  • Include the log file upgrade-assistant.clef that is produced in the working directory

None was produced, didn't find documentation where it would be created at when using VS Extension.

Describe the bug

My project is using TargetFramework=net6.0 and should be analyzed for a migration to .NET 8.

When using floating versions like 8.5.* or ranges like [8.5,9), a NuGet.0001 issue is reported, stating that the package is incompatible, recommending to use 8.5.0 instead while both variants are fine and would work when migrating.

When already on the correct version (by changing the TargetFramework to net8.0), no issue is reported anymore.

To Reproduce

  1. Create a new .NET 6 console application from template
  2. Add <PackageReference Include="Polly" Version="[8.5,9)" /> or `
  3. Analyze for .NET 8 migration
  4. See NuGet.0001 being reported
  5. Change TargetFramework to net8.0
  6. Analyze for .NET 8 migration again
  7. See NuGet.0001 not being reported

Exceptions on Upgrade

When running the upgrade non-the-less, the project is upgraded correctly, but has an exception for Polly:

StreamJsonRpc.RemoteInvocationException,    at StreamJsonRpc.JsonRpc.<InvokeCoreAsync>d__156`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.UpgradeAssistant.VS.Slices.NuGetService.<>c__DisplayClass18_0.<<CompareVersionsAsync>b__0>d.MoveNext() in D:\a\_work\1\s\src\vs\Slices\Services\NuGet\NuGetService.cs:line 155
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.UpgradeAssistant.VS.Slices.NuGetService.<CallClientServiceAsync>d__31`1.MoveNext() in D:\a\_work\1\s\src\vs\Slices\Services\NuGet\NuGetService.cs:line 474
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.UpgradeAssistant.VS.Slices.NuGetService.<CompareVersionsAsync>d__18.MoveNext() in D:\a\_work\1\s\src\vs\Slices\Services\NuGet\NuGetService.cs:line 153
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.UpgradeAssistant.Transformers.InplacePackageReferenceTransformer.<RunAsync>d__1.MoveNext() in D:\a\_work\1\s\src\engine\Transformers\Package\InplacePackageReferenceTransformer.cs:line 99
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.UpgradeAssistant.Operations.Operation.<RunTransformerAsync>d__24.MoveNext() in D:\a\_work\1\s\src\engine\Operations\Operation.cs:line 429
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Microsoft.UpgradeAssistant.Operations.Operation.<RunNodeTransformersAsync>d__22.MoveNext() in D:\a\_work\1\s\src\engine\Operations\Operation.cs:line 316

Further technical details

  • Windows 10 22H2
  • dotnet CLI 9.0.100
  • upgrade-assistant 0.5.829.41291
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant