2017-09-14 87 views
0

我正在使用Octopus-Deploy,並且在運行以下PowerShell腳本時出現錯誤在觸手:Octopus部署:步驟失敗:主控制器上的活動運行包失敗,出現錯誤'遠程腳本失敗,退出代碼爲255'

cd "C:\Repository\QA - Automation\UnitTestProject\bin\Debug" 
.\UnitTestProject.exe 

的錯誤是:

Unhandled Exception: System.Runtime.InteropServices.COMException: Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80080005 Server execution failed (Exception from HRESULT: 0x80080005 (CO_E_SERVER_EXEC_FAILURE)). September 14th 2017 07:56:03Error
at System.Runtime.Remoting.RemotingServices.AllocateUninitializedObject(RuntimeType objectType) September 14th 2017 07:56:03Error
at System.Runtime.Remoting.Activation.ActivationServices.CreateInstance(RuntimeType serverType) September 14th 2017 07:56:03Error
at System.Runtime.Remoting.Activation.ActivationServices.IsCurrentContextOK(RuntimeType serverType, Object[] props, Boolean bNewObj) September 14th 2017 07:56:03Error
at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck) September 14th 2017 07:56:03Error
at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark) September 14th 2017 07:56:03Error
at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark) September 14th 2017 07:56:03Error
at System.Activator.CreateInstance(Type type, Boolean nonPublic) September 14th 2017 07:56:03Error
at System.Activator.CreateInstance(Type type) September 14th 2017 07:56:03Error
at se_builder.PIM_Bicycle.Main(String[] args) in C:\Repository\QA - Automation\UnitTestProject\PIM_Bicycle.cs:line 25 September 14th 2017 07:56:03Fatal The remote script failed with exit code 255 September 14th 2017 07:56:03Fatal Run Package on Master-Controller

我不知道爲什麼它不工作。我是Octopus-Deploy和Powershell的新手,非常感謝!我正在部署的應用程序是一個使用Selenium來使用包中包含的Excel電子表格運行測試的程序。文件結構是:

C:. 
September 14th 2017 07:55:29Info 
├───QA - Automation 
September 14th 2017 07:55:29Info 
│ ├───packages 
September 14th 2017 07:55:29Info 
│ │ ├───Microsoft.Office.Interop.Excel.15.0.4795.1000 
September 14th 2017 07:55:29Info 
│ │ │ └───lib 
September 14th 2017 07:55:29Info 
│ │ │  └───net20 
September 14th 2017 07:55:29Info 
│ │ ├───Selenium.Chrome.WebDriver.2.31 
September 14th 2017 07:55:29Info 
│ │ │ ├───build 
September 14th 2017 07:55:29Info 
│ │ │ └───driver 
September 14th 2017 07:55:29Info 
│ │ ├───Selenium.Firefox.WebDriver.0.18.0 
September 14th 2017 07:55:29Info 
│ │ │ ├───build 
September 14th 2017 07:55:29Info 
│ │ │ └───driver 
September 14th 2017 07:55:29Info 
│ │ ├───Selenium.PhantomJS.WebDriver.2.1.1 
September 14th 2017 07:55:29Info 
│ │ │ ├───build 
September 14th 2017 07:55:29Info 
│ │ │ └───driver 
September 14th 2017 07:55:29Info 
│ │ ├───Selenium.Support.3.5.2 
September 14th 2017 07:55:29Info 
│ │ │ └───lib 
September 14th 2017 07:55:29Info 
│ │ │  ├───net35 
September 14th 2017 07:55:29Info 
│ │ │  └───net40 
September 14th 2017 07:55:29Info 
│ │ ├───Selenium.WebDriver.3.5.2 
September 14th 2017 07:55:29Info 
│ │ │ └───lib 
September 14th 2017 07:55:29Info 
│ │ │  ├───net35 
September 14th 2017 07:55:29Info 
│ │ │  └───net40 
September 14th 2017 07:55:29Info 
│ │ ├───Selenium.WebDriver.ChromeDriver.2.32.0 
September 14th 2017 07:55:29Info 
│ │ │ ├───build 
September 14th 2017 07:55:29Info 
│ │ │ └───driver 
September 14th 2017 07:55:29Info 
│ │ │  ├───linux64 
September 14th 2017 07:55:29Info 
│ │ │  ├───mac64 
September 14th 2017 07:55:29Info 
│ │ │  └───win32 
September 14th 2017 07:55:29Info 
│ │ └───Selenium.WebDriver.IEDriver.3.5.1 
September 14th 2017 07:55:29Info 
│ │  ├───build 
September 14th 2017 07:55:29Info 
│ │  └───driver 
September 14th 2017 07:55:29Info 
│ ├───PIMData 
September 14th 2017 07:55:29Info 
│ └───UnitTestProject 
September 14th 2017 07:55:29Info 
│  ├───bin 
September 14th 2017 07:55:29Info 
│  │ └───Debug 
September 14th 2017 07:55:29Info 
│  ├───obj 
September 14th 2017 07:55:29Info 
│  │ └───Debug 
September 14th 2017 07:55:29Info 
│  │  └───TempPE 
September 14th 2017 07:55:29Info 
│  └───Properties 
September 14th 2017 07:55:29Info 
└───UnitTestProject 
September 14th 2017 07:55:29Info 
    ├───packages 
September 14th 2017 07:55:29Info 
    │ ├───Selenium.Chrome.WebDriver.2.31 
September 14th 2017 07:55:29Info 
    │ │ ├───build 
September 14th 2017 07:55:29Info 
    │ │ └───driver 
September 14th 2017 07:55:29Info 
    │ ├───Selenium.Firefox.WebDriver.0.18.0 
September 14th 2017 07:55:29Info 
    │ │ ├───build 
September 14th 2017 07:55:29Info 
    │ │ └───driver 
September 14th 2017 07:55:29Info 
    │ ├───Selenium.PhantomJS.WebDriver.2.1.1 
September 14th 2017 07:55:29Info 
    │ │ ├───build 
September 14th 2017 07:55:29Info 
    │ │ └───driver 
September 14th 2017 07:55:29Info 
    │ ├───Selenium.Support.3.5.2 
September 14th 2017 07:55:29Info 
    │ │ └───lib 
September 14th 2017 07:55:29Info 
    │ │  ├───net35 
September 14th 2017 07:55:29Info 
    │ │  └───net40 
September 14th 2017 07:55:29Info 
    │ ├───Selenium.WebDriver.3.5.2 
September 14th 2017 07:55:29Info 
    │ │ └───lib 
September 14th 2017 07:55:29Info 
    │ │  ├───net35 
September 14th 2017 07:55:29Info 
    │ │  └───net40 
September 14th 2017 07:55:29Info 
    │ ├───Selenium.WebDriver.ChromeDriver.2.32.0 
September 14th 2017 07:55:29Info 
    │ │ ├───build 
September 14th 2017 07:55:29Info 
    │ │ └───driver 
September 14th 2017 07:55:29Info 
    │ │  ├───linux64 
September 14th 2017 07:55:29Info 
    │ │  ├───mac64 
September 14th 2017 07:55:29Info 
    │ │  └───win32 
September 14th 2017 07:55:29Info 
    │ └───Selenium.WebDriver.IEDriver.3.5.1 
September 14th 2017 07:55:29Info 
    │  ├───build 
September 14th 2017 07:55:29Info 
    │  └───driver 
September 14th 2017 07:55:29Info 
    └───UnitTestProject 
September 14th 2017 07:55:29Info 
     ├───bin 
September 14th 2017 07:55:29Info 
     │ └───Debug 
September 14th 2017 07:55:29Info 
     ├───obj 
September 14th 2017 07:55:29Info 
     │ └───Debug 
September 14th 2017 07:55:29Info 
     │  └───TempPE 
September 14th 2017 07:55:29Info 
     └───Properties 

此外,請注意,這個應用程序完美運行在Visual Studio和我打包Visual Studio團隊服務的應用程序並將其推到我的八達通,部署服務器。這些都是在Visual Studio團隊服務我使用步驟:

Image of Steps in VSTS

感謝您的幫助!

+0

您能否在OneDrive上共享詳細日誌? –

回答

0

好的,所以我想出瞭解決這個問題的辦法。問題是Microsoft Excel不允許網絡服務控制它。爲了解決這個問題,我需要做的是以下幾點:

1)轉到C:\ Program Files文件(x86)\ Microsoft Office \ Office14並打開EXCEL.EXE的屬性窗口。

2)打開安全選項卡,然後單擊編輯,然後單擊添加..

3)式中:「網絡服務」,而不在「輸入對象名稱來選擇」報價和然後點擊「檢查名稱」並點擊確定。

4)在「組或用戶名稱」下,您需要選擇剛添加到組(網絡服務)的內容,然後在「系統權限」下的複選框中勾選「完全控制」 「允許」,然後點擊「應用」,然後「確定」。

然後,這將解決您的問題!

謝謝!

Zach

相關問題