【问题标题】:Chocolatey Installation of Visual Studio Pro 2012 is failingVisual Studio Pro 2012 的 Chocolatey 安装失败
【发布时间】:2013-09-05 14:51:45
【问题描述】:

我正在使用Chocolatey 安装 Visual Studio 2012 Professional

> cinst visualstudio2012professional

在我的 Chocolatey 日志中,我看到安装成功。

[DEBUG] Running 'Delete-ExistingErrorLog' for VisualStudio2012Professional
[DEBUG] Looking for failure log at 'C:\Users\Chase\AppData\Local\Temp\chocolatey\VisualStudio2012Professional\failure.log'
[DEBUG] Found the failure log. Deleting it...
[DEBUG] Running 'Run-ChocolateyPS1' for VisualStudio2012Professional with packageFolder:'C:\chocolatey\lib\VisualStudio2012Professional.11.0.1', action: 'install'
[DEBUG]   __ PowerShell install (chocolateyinstall.ps1) __
[DEBUG]   Looking for chocolateyinstall.ps1 in folder 'C:\chocolatey\lib\VisualStudio2012Professional.11.0.1'. If chocolateyinstall.ps1 is found, it will be run.
[DEBUG] Action file is 'ChocolateyInstall.ps1'
[DEBUG] Running 'C:\chocolatey\lib\VisualStudio2012Professional.11.0.1\Tools\ChocolateyInstall.ps1'
[DEBUG] Running 'Install-ChocolateyPackage' for VisualStudio2012Professional with url:'http://go.microsoft.com/?linkid=9810233', args: '/Passive /NoRestart /AdminFile C:\chocolatey\lib\VisualStudio2012Professional.11.0.1\Tools\AdminDeployment.xml /Log C:\Users\Chase\AppData\Local\Temp\vs.log' 
[DEBUG] Running 'Get-ChocolateyWebFile' for VisualStudio2012Professional with url:'http://go.microsoft.com/?linkid=9810233', fileFullPath:'C:\Users\Chase\AppData\Local\Temp\chocolatey\VisualStudio2012Professional\VisualStudio2012ProfessionalInstall.exe',and url64bit:'http://go.microsoft.com/?linkid=9810233'
[DEBUG] Processor width is 64.
Downloading VisualStudio2012Professional (http://go.microsoft.com/?linkid=9810233) to C:\Users\Chase\AppData\Local\Temp\chocolatey\VisualStudio2012Professional\VisualStudio2012ProfessionalInstall.exe
[DEBUG] Running 'Get-WebFile' for C:\Users\Chase\AppData\Local\Temp\chocolatey\VisualStudio2012Professional\VisualStudio2012ProfessionalInstall.exe with url:'http://go.microsoft.com/?linkid=9810233', userAgent: 'chocolatey command line' 
[DEBUG] Setting the UserAgent to 'chocolatey command line'
[DEBUG] Running 'Install-ChocolateyInstallPackage' for VisualStudio2012Professional with file:'C:\Users\Chase\AppData\Local\Temp\chocolatey\VisualStudio2012Professional\VisualStudio2012ProfessionalInstall.exe', args: '/Passive /NoRestart /AdminFile C:\chocolatey\lib\VisualStudio2012Professional.11.0.1\Tools\AdminDeployment.xml /Log C:\Users\Chase\AppData\Local\Temp\vs.log' 
Installing VisualStudio2012Professional...
[DEBUG] Running 'Start-ChocolateyProcessAsAdmin' with exeToRun:'C:\Users\Chase\AppData\Local\Temp\chocolatey\VisualStudio2012Professional\VisualStudio2012ProfessionalInstall.exe', statements: '/Passive /NoRestart /AdminFile C:\chocolatey\lib\VisualStudio2012Professional.11.0.1\Tools\AdminDeployment.xml /Log C:\Users\Chase\AppData\Local\Temp\vs.log ' 
Elevating Permissions and running C:\Users\Chase\AppData\Local\Temp\chocolatey\VisualStudio2012Professional\VisualStudio2012ProfessionalInstall.exe /Passive /NoRestart /AdminFile C:\chocolatey\lib\VisualStudio2012Professional.11.0.1\Tools\AdminDeployment.xml /Log C:\Users\Chase\AppData\Local\Temp\vs.log . This may take awhile, depending on the statements.
[DEBUG] Finishing 'Start-ChocolateyProcessAsAdmin'
VisualStudio2012Professional has been installed.
VisualStudio2012Professional has finished succesfully! The chocolatey gods have answered your request!
[DEBUG] Running 'Get-ChocolateyBins' for C:\chocolatey\lib\VisualStudio2012Professional.11.0.1
[DEBUG]   __ Executable Links (*.exe) __
[DEBUG] Looking for executables in folder: C:\chocolatey\lib\VisualStudio2012Professional.11.0.1
Adding batch files for any executables found to a location on PATH. In other words the executable will be available from ANY command line/powershell prompt.
[DEBUG] There are no executables (that are not ignored) in the package.
[DEBUG] Evaluating NuGet output for line: 
Finished installing 'visualstudio2012professional' and dependencies - if errors not shown in console, none detected. Check log for errors if unsure.

但不幸的是,没有安装 Visual Studio。文件夹已创建,但 IDE 不存在。 (没有 DevEnv.exe)

是否有与 VS 安装程序关联的日志文件?也许答案就在那里。

【问题讨论】:

  • chocolatey 包告诉 vs 安装程序将其日志保存到 $env:temp\vs.log。看一下,里面可能有一个错误。
  • 这是您所指的日志。 pastebin.com/WRtg5m87
  • 我遇到了同样的问题。问题是 exe 以某种方式传递了 /layout 参数:(但它不包含在包中,所以我不确定如何): C:\2aac9080afc1ec44bf2d4b\vs_professional.exe, cmdline: '/Passive /NoRestart /AdminFile C:\Chocolatey\lib\VisualStudio2012Professional.11.0.1\Tools\AdminDeployment.xml /Log C:\Users\Chase\AppData\Local\Temp\vs.log /layout

标签: visual-studio-2012 chocolatey boxstarter


【解决方案1】:

嗯,我无法安装该软件包中使用的下载文件,我正在运行一个 PS 脚本,所以我将使用这个似乎可以工作的脚本:

    $testFolder = Join-Path "${Env:ProgramFiles(x86)}" "Microsoft Visual Studio 11.0\Common7\IDE\devenv.exe"
$alreadyInstalled = (Test-Path $testFolder)
if (!$alreadyInstalled)
{
    Install-ChocolateyPackage 'VisualStudio2012Professional' 'exe' "/Full /Passive /NoRestart /Log $env:temp\vs.log" 'http://download.microsoft.com/download/D/E/8/DE8E42D8-7598-4F4E-93D4-BB011094E2F9/vs_professional.exe'
}

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-08-02
    • 2015-10-28
    • 2021-12-20
    • 1970-01-01
    • 2017-03-07
    相关资源
    最近更新 更多