Where does nuget log detailed error message

若如初见. 提交于 2019-12-24 15:30:13

问题


I created package and pushed it to local repository. Now when I'm trying to install package using Package Manager Console, I'm getting following error message

Installing 'MyPackage 1.0.0'.
Successfully installed 'MyPackage 1.0.0'.
Adding 'MyPackage 1.0.0' to TestConsoleApp.
Uninstalling 'MyPackage 1.0.0'.
Successfully uninstalled 'MyPackage 1.0.0'.
Install failed. Rolling back...
Install-Package : Failed to add reference to 'MyDll'.
At line:1 char:16
+ Install-Package <<<<  MyPackage
    + CategoryInfo          : NotSpecified: (:) [Install-Package], InvalidOperationException
    + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand

I'm using Visual Studio 2012. I found this issue on nuget.org, but I don't see any error message in ActivityLog.xml. I tried to run Visual Studio with /log switch but still nothing is getting logged. The issue is only with this package, I can successfully install other packages I created.

So my question is if nuget is logging more detailed message anywhere and if so where I can find it?


回答1:


Have a look at the $error object in the Package Manager Console. That usually has the exception and from that you can get the callstack.

From the console you may be able to get the full exception callstack the following:

$error[0].Exception.StackTrace

Otherwise take a look at the $error object and see what information it has that might be useful.



来源:https://stackoverflow.com/questions/31672164/where-does-nuget-log-detailed-error-message

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!