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

Portable frameworks with hyphenated profiles are rejected. #2734

Closed
joelverhagen opened this Issue May 6, 2016 · 4 comments

Comments

Projects
None yet
2 participants
@joelverhagen
Member

joelverhagen commented May 6, 2016

Prompted by #2711.

This change was made with #1869. It broke some existing packages (e.g. ReadOnlySourceTree 0.1.24-beta).

If we are okay with this breaking change, we should clearly communicate this to the user by a) improving the error message and b) mentioning this in our docs.

@rrelyea @yishaigalatzer

@joelverhagen joelverhagen added this to the 3.4.4 milestone May 6, 2016

@joelverhagen joelverhagen modified the milestones: 3.5 Beta3, 3.4.4 Jun 13, 2016

@joelverhagen

This comment has been minimized.

Show comment
Hide comment
@joelverhagen

joelverhagen Jun 13, 2016

Member

Some scenarios to consider:

  1. What happens if a feed (local v2? local v3? remote v2? remote v3?) has an invalid portable framework in an older version of the package? can the user still use the UI to upgrade out of the bad version?
  2. If there is no fixed version of the package, what else can the user do? Is the only option contacting the package owner about fixing the package in a newer version?
Member

joelverhagen commented Jun 13, 2016

Some scenarios to consider:

  1. What happens if a feed (local v2? local v3? remote v2? remote v3?) has an invalid portable framework in an older version of the package? can the user still use the UI to upgrade out of the bad version?
  2. If there is no fixed version of the package, what else can the user do? Is the only option contacting the package owner about fixing the package in a newer version?
@joelverhagen

This comment has been minimized.

Show comment
Hide comment
@joelverhagen

joelverhagen Jun 24, 2016

Member

Tested some different cases in current dev.

  • Works
    • Browsing V2 remote
    • Browsing V3 remote
    • Browsing V2 local
    • Browsing V3 local
    • Installing, updating, and uninstalling a "good" version of a package that has a "bad" version.
    • Restoring a "bad" version
  • Broken
    • If the user already has a version with net-cf installed, they cannot uninstall or update.
Member

joelverhagen commented Jun 24, 2016

Tested some different cases in current dev.

  • Works
    • Browsing V2 remote
    • Browsing V3 remote
    • Browsing V2 local
    • Browsing V3 local
    • Installing, updating, and uninstalling a "good" version of a package that has a "bad" version.
    • Restoring a "bad" version
  • Broken
    • If the user already has a version with net-cf installed, they cannot uninstall or update.
@joelverhagen

This comment has been minimized.

Show comment
Hide comment
@joelverhagen

joelverhagen Jun 24, 2016

Member

Uninstall has this stack trace when failing:

Attempting to gather dependency information for package 'ReadOnlySourceTree.0.1.24-beta' with respect to project 'ConsoleApplication6', targeting '.NETFramework,Version=v4.6.1'
Resolving actions to uninstall package 'ReadOnlySourceTree.0.1.24-beta'
Resolved actions to uninstall package 'ReadOnlySourceTree.0.1.24-beta'
Install failed. Rolling back...
Package 'ReadOnlySourceTree.0.1.24-beta' already exists in project 'ConsoleApplication6'
Executing nuget actions took 25.56 ms
System.ArgumentException: Invalid portable frameworks.
   at NuGet.Frameworks.FrameworkNameProvider.TryGetPortableFrameworks(String shortPortableProfiles, IEnumerable`1& frameworks)
   at NuGet.Frameworks.NuGetFramework.ParseFolder(String folderName, IFrameworkNameProvider mappings)
   at NuGet.Packaging.PackageReaderBase.GetFrameworkFromPath(String path, Boolean allowSubFolders)
   at NuGet.Packaging.PackageReaderBase.<GetFileGroups>d__29.MoveNext()
   at NuGet.Packaging.PackageReaderBase.GetBuildItems()
   at NuGet.ProjectManagement.MSBuildNuGetProject.<UninstallPackageAsync>d__34.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at NuGet.PackageManagement.NuGetPackageManager.<ExecuteUninstallAsync>d__66.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
   at NuGet.PackageManagement.NuGetPackageManager.<ExecuteNuGetProjectActionsAsync>d__57.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at NuGet.PackageManagement.NuGetPackageManager.<ExecuteNuGetProjectActionsAsync>d__57.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at NuGet.PackageManagement.UI.UIActionEngine.<ExecuteActionsAsync>d__8.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at NuGet.PackageManagement.UI.UIActionEngine.<PerformActionImplAsync>d__6.MoveNext()
========== Finished ==========
Member

joelverhagen commented Jun 24, 2016

Uninstall has this stack trace when failing:

Attempting to gather dependency information for package 'ReadOnlySourceTree.0.1.24-beta' with respect to project 'ConsoleApplication6', targeting '.NETFramework,Version=v4.6.1'
Resolving actions to uninstall package 'ReadOnlySourceTree.0.1.24-beta'
Resolved actions to uninstall package 'ReadOnlySourceTree.0.1.24-beta'
Install failed. Rolling back...
Package 'ReadOnlySourceTree.0.1.24-beta' already exists in project 'ConsoleApplication6'
Executing nuget actions took 25.56 ms
System.ArgumentException: Invalid portable frameworks.
   at NuGet.Frameworks.FrameworkNameProvider.TryGetPortableFrameworks(String shortPortableProfiles, IEnumerable`1& frameworks)
   at NuGet.Frameworks.NuGetFramework.ParseFolder(String folderName, IFrameworkNameProvider mappings)
   at NuGet.Packaging.PackageReaderBase.GetFrameworkFromPath(String path, Boolean allowSubFolders)
   at NuGet.Packaging.PackageReaderBase.<GetFileGroups>d__29.MoveNext()
   at NuGet.Packaging.PackageReaderBase.GetBuildItems()
   at NuGet.ProjectManagement.MSBuildNuGetProject.<UninstallPackageAsync>d__34.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at NuGet.PackageManagement.NuGetPackageManager.<ExecuteUninstallAsync>d__66.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
   at NuGet.PackageManagement.NuGetPackageManager.<ExecuteNuGetProjectActionsAsync>d__57.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at NuGet.PackageManagement.NuGetPackageManager.<ExecuteNuGetProjectActionsAsync>d__57.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at NuGet.PackageManagement.UI.UIActionEngine.<ExecuteActionsAsync>d__8.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at NuGet.PackageManagement.UI.UIActionEngine.<PerformActionImplAsync>d__6.MoveNext()
========== Finished ==========
@joelverhagen

This comment has been minimized.

Show comment
Hide comment
@joelverhagen

joelverhagen Jun 30, 2016

Member

The fix we applied here is to improve the error message that appears to the user when a package contains this invalid framework. More details on the PR:
NuGet/NuGet.Client#715

Member

joelverhagen commented Jun 30, 2016

The fix we applied here is to improve the error message that appears to the user when a package contains this invalid framework. More details on the PR:
NuGet/NuGet.Client#715

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment