Visual Studio 2017安装程序一直告诉我"需要提升"?

时间:2017-04-10 10:43:11

标签: windows visual-studio windows-10 visual-studio-2017 administrator

当我尝试在计算机上安装VS 2017时,安装程​​序会给我以下错误,尽管我已经是管理员(是的,我已经尝试了#34;以管理员身份运行&#34和乱搞UAC等...相信我,我已经尝试了所有常用的东西并知道Windows是如何工作的:

  

需要提升

     

此程序需要管理员权限才能执行设置操作   请以管理员身份重新运行该程序。

跟踪ProcMon,我在临时目录中看到一条似乎表明原因的日志:

Information : Log configuration: $SERVICEHUBTRACELEVEL=""
Error : HubHost 'desktopClr$C94B8CFE-E3FD-4BAF-A941-2866DBB566FE' PID 3736 stderr: Error running host: System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: creationOptions
   at System.Threading.Tasks.Task..ctor(Object state, TaskCreationOptions creationOptions, Boolean promiseStyle)
   at Microsoft.ServiceHub.HostLib.Host..ctor(String hostId, String pipeName, DevHubTraceSource logger)
   at Microsoft.ServiceHub.HostLib.Program.<MainAsync>d__0.MoveNext()

Error : HubHost 'desktopClr$C94B8CFE-E3FD-4BAF-A941-2866DBB566FE' PID 3736 stderr: 

Error : HubHost 'desktopClr$C94B8CFE-E3FD-4BAF-A941-2866DBB566FE' PID 3736 stderr: Unhandled Exception: 
Error : HubHost 'desktopClr$C94B8CFE-E3FD-4BAF-A941-2866DBB566FE' PID 3736 stderr: System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: creationOptions
   at System.Threading.Tasks.Task..ctor(Object state, TaskCreationOptions creationOptions, Boolean promiseStyle)
   at Microsoft.ServiceHub.HostLib.Host..ctor(String hostId, String pipeName, DevHubTraceSource logger)
   at Microsoft.ServiceHub.HostLib.Program.<MainAsync>d__0.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 ServiceHub.Host.Program.Main(String[] args)

Error : Error starting service 'SetupEngine.ProductsProvider' requested by ProductsProvider (pid: 3340): Hub host 'desktopClr', PID: 3736 exited. code: '3762504530'.
Error : Error starting service 'SetupEngine.Installer' requested by Installer (pid: 3340): Hub host 'desktopClr', PID: 3736 exited. code: '3762504530'.

似乎他们的代码是错误的,除非这只发生在我的机器上?为什么不是每个人都看到这个?是什么触发了这个问题,我该如何解决?

3 个答案:

答案 0 :(得分:0)

我最后通过安装.NET Framework 4.7解决了这个问题,但我怀疑更新4.0甚至更新的版本也可能有用。

问题似乎是// set one of viewcontrollers (usual first) as navigationController delegate class ViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() navigationController?.delegate = self } } // make the view controller conform to `UINavigationControllerDelegate` extension ViewController: UINavigationControllerDelegate { func navigationController(_ navigationController: UINavigationController, animationControllerFor operation: UINavigationControllerOperation, from fromVC: UIViewController, to toVC: UIViewController) -> UIViewControllerAnimatedTransitioning? { return PushPopAnimator(operation: operation) } } // The animation controller class PushPopAnimator: NSObject, UIViewControllerAnimatedTransitioning { let operation: UINavigationControllerOperation init(operation: UINavigationControllerOperation) { self.operation = operation super.init() } func transitionDuration(using transitionContext: UIViewControllerContextTransitioning?) -> TimeInterval { return 0.25 } func animateTransition(using transitionContext: UIViewControllerContextTransitioning) { let from = transitionContext.viewController(forKey: .from)! let to = transitionContext.viewController(forKey: .to)! let rightTransform = CGAffineTransform(translationX: transitionContext.containerView.bounds.size.width, y: 0) let leftTransform = CGAffineTransform(translationX: -transitionContext.containerView.bounds.size.width, y: 0) if operation == .push { to.view.transform = rightTransform transitionContext.containerView.addSubview(to.view) UIView.animate(withDuration: transitionDuration(using: transitionContext), animations: { from.view.transform = leftTransform to.view.transform = .identity }, completion: { finished in from.view.transform = .identity transitionContext.completeTransition(!transitionContext.transitionWasCancelled) }) } else if operation == .pop { to.view.transform = leftTransform transitionContext.containerView.insertSubview(to.view, belowSubview: from.view) UIView.animate(withDuration: transitionDuration(using: transitionContext), animations: { to.view.transform = .identity from.view.transform = rightTransform }, completion: { finished in from.view.transform = .identity transitionContext.completeTransition(!transitionContext.transitionWasCancelled) }) } } } 类中的一个错误,它不允许传递一个本来应该是合法的标志。我认为这是一个版本不匹配并修复。

答案 1 :(得分:0)

我下载了VS预览https://visualstudio.microsoft.com/vs/preview/,然后再次正常运行

答案 2 :(得分:0)

在我的情况下,原因是移除的驱动器上的TMP和TEMP环境变量,指向不可用的路径。