0

我想一個SQL Server數據源在VS2017添加到Web測試:一個SQL數據源添加到Web測試

enter image description here

我點擊安裝包,並得到這個:

Missing option value: installpath

enter image description here

我該如何解決這個問題?

編輯1:

使用進程監視器我已標識的命令VS2017運行:

"C:\program files (x86)\microsoft visual studio\installer\vs_installer.exe" modify --focusedUi --installPath "" --activityId 6bb6d93d-8c2a-4462-9304-4ef2b29d27d1 --add Microsoft.VisualStudio.Component.SQL.DataSources --includeRecommended

的INSTALLPATH是空的,所以我指定它爲:

"C:\Program Files x86\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\"

當我指定installPath我得到這個錯誤:

System.ArgumentException: The directory path 'C:\Program Files x86\Microsoft Visual Studio\2017\Enterprise\Common7\IDE" --activityId 6bb6d93d-8c2a-4462-9304-4ef2b29d27d1 --add Microsoft.VisualStudio.Component.SQL.DataSources --includeRecommended' is invalid. Parameter name: installationPath

我猜因爲它的試圖安裝一個軟件包它必須是:

"C:\Program Files x86\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\PACKAGES"

導致此錯誤:

Unsupported option includeRecommended /finalizeinstall

enter image description here

什麼是正確的命令?

編輯2:

確認我已經安裝了SQ服務器支持的數據源:

enter image description here

編輯3:

好吧,這是我的錯。

我使用使用連接的快捷方式運行Visual Studio以避免路徑C:\Program Files (x86)中的括號連接到Oracle 9.2數據庫。

運行Visual Studio(不是從快捷方式)我看到對話框並可以連接到數據庫。

enter image description here

然而,當我點擊確定,沒有數據源添加到WebTest的。

回答

1

這只是一個典型的使用VS2017的日子。我發誓這個產品沒有經過適當的測試。

所以我跑了進程監視器跟蹤時,我在數據連接對話框中單擊OK按鈕,我發現一個拒絕訪問:

Event Class: Registry 
Operation: RegCreateKey 
Result: ACCESS DENIED 
Path: \REGISTRY\A\{A8BB3990-53C7-4BD7-A7E3-CFA0DD6BD4EC}\Software\Microsoft\VisualStudio\15.0_8708a912\Data Connection Dialog 
TID: 11800 
Duration: 0.0000764 
Desired Access: Read/Write 

我打開視覺工作室自己的註冊表配置單元(using these steps)和事實證明數據連接對話框鍵甚至不存在。我創建密鑰,關閉註冊表,重新打開VS2017和成功添加一個數據源:

enter image description here

+0

嘿感謝該鏈接!這個問題在我寫評論時被刪除了。你是像我這樣的澳大利亞人)oi oi oi如果你有興趣 - 這裏有一羣我們在這裏https://chat.stackoverflow.com/rooms/41570/so-close-vote-reviewers隨意放棄在聊天 –

+1

oi oi oi,哈哈,是啊,我投票給你上次選舉,以幫助與AEST時區。有時可能會進入聊天:) –

相關問題