Silviu Saulea
Silviu Saulea

Reputation: 51

Web Performance Test - could not load type 'Microsoft.VisualStudio.WebTesting.SharepointInformation'

I installed VS.2017 Enterprise and start a web performance project. When I try to add a Web performance test to the project I receive the error:

"The Web test could not be loaded: Could not load the type 'Microsoft.VisualStudio.TestTools.WebTesting.SharepointInformation' from assembly 'Microsoft.VisualStudio.QualityTools.WebTestFramework' Version=10.0.0.0, .."

Upvotes: 3

Views: 1571

Answers (2)

Younus Paperwala
Younus Paperwala

Reputation: 11

The above answer is correct but the problem is the directory isn't accessible in my case due to some reasons so I just open my cmd and run this command. Just run, it will copy the file, but first turn of the vs.

copy "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\ReferenceAssemblies\v4.0\Microsoft.VisualStudio.QualityTools.WebTestFramework.dll" "C:\windows\assembly\GAC_MSIL\Microsoft.VisualStudio.QualityTools.WebTestFramework\10.0.0.0__b03f5f7f11d50a3a"

Upvotes: 0

cek-cek
cek-cek

Reputation: 494

TL;DR:

  1. Check installed prerequisites in the latter part of Create a web performance and load test project
  2. In my case, replacing original file C:\windows\assembly\GAC_MSIL\Microsoft.VisualStudio.QualityTools.WebTestFramework\10.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.QualityTools.WebTestFramework.dll with C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\ReferenceAssemblies\v4.0\Microsoft.VisualStudio.QualityTools.WebTestFramework.dll solved the problem.

I tackled the same issue. Every time I created Web Performance and Load Test Project in Visual Studio 2017 Enterprise (with arbitrary .NET framework version) I got the same error when I tried to open *.webtest file. VS's user interface seemed incomplete and clicking on toolbars sometimes shown null exceptions.

At first, I thought I have incomplete installation, according to Create a web performance and load test project. I have even tried to completely uninstall and reinstall mentioned packages. Unfortunately, this did not help. I have also experimented with adding and removing reference to Microsoft.VisualStudio.QualityTools.WebTestFramework as there are several options in my reference browser, but without success.

There is not much information about WebTesting.SharepointInformation namespace. After a while, I discovered the existence of Microsoft.VisualStudio.QualityTools.WebTest.SharePoint.dll and after closer inspection, I have noticed that it references QualityTools.WebTestFramework assembly in C:\Windows\assembly\... that has the same assembly version and public key token, yet smaller in size compared to the one that is contained in VS 2017 installation. I have replaced it with VS2017's one and voila, *.webtest can be successfully opened.

Upvotes: 6

Related Questions