将SQL数据源添加到Web测试 [英] Add a SQL Datasource to a Web Test

查看:86
本文介绍了将SQL数据源添加到Web测试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将SQL Server数据源添加到VS2017中的Web测试:

I am trying to add a SQL Server Data Source to a Web Test in VS2017:

我单击安装软件包"并获得此信息:

I click Install packages and get this:

缺少选项值:installpath

Missing option value: installpath

我该如何克服这个问题?

How do I overcome this problem?

使用进程监视器,我已经确定了VS2017运行的命令:

Using Process Monitor I have identified the command VS2017 runs:

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

"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为空,因此我将其指定为:

The installPath is empty so I specified it as:

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

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

当我指定installPath时,出现此错误:

When I specify the installPath I get this error:

System.ArgumentException:目录路径'C:\ Program Files x86 \ Microsoft Visual Studio \ 2017 \ Enterprise \ Common7 \ IDE"--activityId 6bb6d93d-8c2a-4462-9304-4ef2b29d27d1 --add Microsoft.VisualStudio.Component .SQL.DataSources --includeRecommended'无效. 参数名称:installationPath

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

我猜想自从它试图安装软件包以来,它一定是:

I guessed since its trying to install a Package it must be:

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

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

导致此错误:

不支持的选项includeRecommended/finalizeinstall

Unsupported option includeRecommended /finalizeinstall

正确的命令是什么?

确认我已经安装了SQ Server的数据源支持:

Confirming I already have the DataSources for SQ Server support installed:

修改3:

好的,这是我的错.

我使用快捷方式运行Visual Studio,该快捷方式使用结点来避免路径C:\Program Files (x86)中的括号,以便连接到Oracle 9.2数据库.

I run Visual Studio using a shortcut that uses a junction to avoid the brackets in the path C:\Program Files (x86) in order to connect to an Oracle 9.2 database.

运行Visual Studio(不是从快捷方式运行)我看到对话框并且可以连接到数据库.

Running Visual Studio (not from the shortcut) I see the dialog and can connect to the Database.

但是,当我单击确定"时,没有数据源添加到WebTest.

However, when I click OK, no data source is added to the WebTest.

推荐答案

这只是使用VS2017的典型一天.我发誓该产品尚未经过正确的测试.

This is just a typical day using VS2017. I swear this product has not been properly tested.

因此,当我单击数据连接"对话框中的确定"按钮时,我运行了一个进程监视器跟踪,发现一个访问被拒绝:

So I ran a Process Monitor trace when I clicked the OK button in the Data Connection Dialog and I found one Access Denied:

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

我打开了Visual Studios自己的注册表配置单元(使用这些步骤 ),结果发现数据连接对话框"键没有甚至不存在.我创建了密钥,关闭了注册表,重新打开了VS2017并成功添加了数据源:

I opened Visual Studios own Registry Hive (using these steps) and it turns out the Data Connection Dialog key didn't even exist. I created the Key, closed the registry, re-opened VS2017 and added a DataSource successfully:

这篇关于将SQL数据源添加到Web测试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆