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

Error when installing Moq from the Package management UI for a net451 project #3349

Closed
jeremymeng opened this Issue Aug 22, 2016 · 3 comments

Comments

Projects
None yet
3 participants
@jeremymeng

jeremymeng commented Aug 22, 2016

I have ASP.NET and Web Tools 2015.1 - 14.1.20810.0. This issue doesn't repro on the earlier version 14.1.20512.0 on another machine.

Repro steps:

  1. Create a C# class lib project that targets .NET Framework 4.5.1
  2. Open the package management UI
  3. Search for "Moq" then install the latest prerelease version, which is 4.6.38-alpha at the time of writing this

Actual:

Attempting to gather dependency information for package 'Moq.4.6.38-alpha' with respect to project 'ClassLib451', targeting '.NETFramework,Version=v4.5.1'
Gathering dependency information took 20.99 sec
Attempting to resolve dependencies for package 'Moq.4.6.38-alpha' with DependencyBehavior 'Lowest'
Resolving dependency information took 0 ms
Resolving actions to install package 'Moq.4.6.38-alpha'
Resolved actions to install package 'Moq.4.6.38-alpha'
System.ComponentModel.DataAnnotations.ValidationException: Authors is required.
   at NuGet.Manifest.Validate(Manifest manifest)
   at NuGet.Manifest.ReadFrom(Stream stream, IPropertyProvider propertyProvider, Boolean validateSchema)
   at NuGet.LocalPackage.ReadManifest(Stream manifestStream)
   at NuGet.OptimizedZipPackage.EnsureManifest()
   at NuGet.OptimizedZipPackage..ctor(IFileSystem fileSystem, String packagePath)
   at NuGet.LocalPackageRepository.OpenPackage(String path)
   at NuGet.LocalPackageRepository.GetPackage(Func`2 openPackage, String path)
   at NuGet.LocalPackageRepository.<GetPackages>d__15.MoveNext()
   at NuGet.CollectionExtensions.AddRange[T](ICollection`1 collection, IEnumerable`1 items)
   at NuGet.LocalPackageRepository.FindPackagesById(Func`2 openPackage, String packageId)
   at NuGet.LocalPackageRepository.FindPackagesById(String packageId)
   at NuGet.PackageRepositoryExtensions.FindPackagesById(IPackageRepository repository, String packageId)
   at NuGet.LazyLocalPackageRepository.FindPackagesById(String packageId)
   at NuGet.PackageRepositoryExtensions.FindPackagesById(IPackageRepository repository, String packageId)
   at NuGet.Protocol.VisualStudio.PackageMetadataResourceLocal.<>c__DisplayClass2_0.<GetMetadataAsync>b__0()
   at System.Threading.Tasks.Task`1.InnerInvoke()
   at System.Threading.Tasks.Task.Execute()
--- 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.Protocol.VisualStudio.PackageMetadataResourceLocal.<GetMetadataAsync>d__2.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.<GetPackageMetadataAsync>d__13.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.<GetPackageMetadataAsync>d__12.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.<CheckLicenseAcceptanceAsync>d__7.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 ==========
Time Elapsed: 00:00:21.1261783

Expected:

Package installed.

If I do "Install-Package Moq -pre" from the Package Manager Console, the package is installed as expected.

@rrelyea

This comment has been minimized.

Show comment
Hide comment
@rrelyea

rrelyea Aug 24, 2016

Contributor

This should be addressed in 3.5.0 of NuGet. It has not released yet.
The RC1 is available from http://nuget.org/downloads

Contributor

rrelyea commented Aug 24, 2016

This should be addressed in 3.5.0 of NuGet. It has not released yet.
The RC1 is available from http://nuget.org/downloads

@rrelyea

This comment has been minimized.

Show comment
Hide comment
@rrelyea

rrelyea Sep 1, 2016

Contributor

Unsure of why I marked as closedas:duplicate, without putting any supporting info.
Please confirm that this addressed, etc...

Contributor

rrelyea commented Sep 1, 2016

Unsure of why I marked as closedas:duplicate, without putting any supporting info.
Please confirm that this addressed, etc...

@zhili1208

This comment has been minimized.

Show comment
Hide comment
@zhili1208

zhili1208 Sep 1, 2016

Contributor

verified with 3.5-rtm, it's fixed

Contributor

zhili1208 commented Sep 1, 2016

verified with 3.5-rtm, it's fixed

@zhili1208 zhili1208 closed this Sep 1, 2016

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