2016-08-16 34 views
2

我已經通過VSTS擴展將「自定義彙總」部分添加到「構建彙總」部分。VSTS擴展版本彙總部分

我在關於構建完成的VSTS構建摘要部分收到以下錯誤。 enter image description here

「無法加載ABC的VSTS擴展。瞭解有關此擴展的更多信息,包括可用的支持選項。」

貢獻:

 "id": "abcfef-build-status-section", 
     "type": "ms.vss-build-web.build-results-section", 
     "description": "ABC Scan Summary", 
     "targets": [ 
      ".build-info-tab", 
      "ms.vss-build-web.build-results-summary-tab" 
     ], 
     "properties": { 
      "name": "ABC Summary Section", 
      "uri": "buildstatus.html", 
      "order": 20, 
      "height": 500 
     } 

範圍:

"scopes": [ 
    "vso.build", 
    "vso.build_execute" 
] 

Html頁面(buildstatus.html):

<!DOCTYPE html> 
 
<html xmlns="http://www.w3.org/1999/xhtml"> 
 
<head> 
 
    <title>Hello World</title> 
 
    <script src="scripts/VSS.SDK.js"></script> 
 
</head> 
 
<body> 
 
    <script type="text/javascript">VSS.init();</script> 
 
    <h1>Hello World</h1> 
 
    <script type="text/javascript">VSS.notifyLoadSucceeded();</script> 
 
</body> 
 
</html>

PLE有助於解決這個問題。

在此先感謝。

+0

你能分享你的完整日誌你構建的? –

回答

0

我們知道,對於建立一個existing extension sample結果增強器,以及源代碼可以在GitHub上找到:https://github.com/Microsoft/vsts-extension-samples/tree/master/build-results-enhancer

似乎有什麼不對的貢獻,你可能會關注你的HTML頁面上,並嘗試在你的HTML頁面中添加usePlatformScripts: true,看看問題是否仍然存在:

<head> 
    <title>Hello World</title> 
</head> 
<body> 
    <script src="scripts/VSS.SDK.js"></script> 
    <script type="text/javascript"> 
     VSS.init({ 
      usePlatformScripts: true 
     }); 
    </script> 
    <h1>Hello World</h1> 
</body> 
</html> 
1

這通常是由VSS.SDK.js文件引起啓動擴展時無法加載,請檢查下面的事情:

  1. html頁面中的src路徑「scripts/VSS.SDK.js」是正確的。
  2. src路徑和文件包含在「vss-extension.json」文件的「文件」部分中。