Home

lprun.exe accept nuget licenses for "NT AUTHORITY\SYSTEM" account

Hello,

i got a windows service running under "NT AUTHORITY\SYSTEM" account, this service calls lprun.exe to run some maintenance linqpad scripts.

The problem I am having, is that some of these scripts uses nuget packages under user agreement, and i have not way accept for that user account, and the lprun process gets stuck until it timeout.

Sample exception message:

System.Exception: Downloading NuGet package Microsoft.Exchange.WebServices and dependencies from https://api.nuget.org/v3/index.json
Warning: package Microsoft.Exchange.WebServices is subject to license https://github.com/OfficeDev/ews-managed-api/blob/master/license.txt


Any workaround/fix i can use?

Thanks, regards.

Comments

  • I had a similar problem, strangely the packages were already downloaded and approved, but when run from the service with the same user the license warnings appear.

    It'd be great if there could be a cli flag to accept licenses, because otherwise it will hang indefinitely. It would also be nice if lprun would actually fail in those cases if run from a non interactive console (if that's possible in windows)

  • Possible work around: export used dlls from the f4 window (button is bottom center) and copy them to the server, including them directly.

  • That warning shouldn't stop the package from downloading and the script proceeding. Could it be stuck somewhere else in the script?

  • edited March 25

    I don't think so since there was no console output from the script itself and it should have ran in under 2 minutes, but I gave lprun (not lprun6) about 30 before terminating the process. It was run from a service, maybe that's the important difference? I don't really know how Windows may behave differently aside from not having a GUI. User was the same as I started it with before from the GUI and console via RDP without getting any licensing warnings.

Sign In or Register to comment.