New Ranks & Badges For The Community!
Notice something different? The ranks and associated badges have gone "Star Fleet". See what they all mean HERE
Highlighted
Absent Member.
Absent Member.
885 views

.Net protocol problem with assemblies

Hello,
I am using .Net protocol to write C# code in Load Runner. The problem is with some of the assemblies like System.Web, System.Net that are not available and throws an exception when used. Why are some of the assemblies supported and the others not. I see red colored icon while trying to include some assemblies. I heard LR9.5 is .Net 3.5 compatible?
Detailed snapshot attached.


Replay Log..............................

Error: Failed to compile virtual user.
Notify: _______________________________________________
Notify:
Error: Action.cs(11,14): error CS0234: The type or namespace name 'Web' does not exist in the namespace 'System' (are you missing an assembly reference?)
Notify: Done building project "Script.csproj" -- FAILED.
Warning: Extension DotnetExtensionReplay.dll reports error -1 on call to function ExtPerProcessInitialize [MsgId: MWAR-10485]
Error: Thread Context: Call to service of the driver failed, reason - thread context wasn't initialized on this thread. [MsgId: MERR-10176]
0 Likes
4 Replies
Highlighted
Absent Member.. Absent Member..
Absent Member..

Tipsy,
you need to share your code if you expect us to help you.

Jan
0 Likes
Highlighted
Absent Member.
Absent Member.

I don't have any specific code. I am testing by pasting a simple code that connects to database and fetches some rows. I used Microsoft .Net protocol and written some C# code.

The lines

using System;
using System.IO;

work fine

the problem is when i add

using System.Data;
or
using System.Net;
or
using System.Web;

It throws the above mentioned exception.

"The type or namespace name 'Web' does not exist in the namespace 'System' (are you missing an assembly reference?)".
0 Likes
Highlighted
Absent Member.
Absent Member.

Hi Tipsy,
I am also getting same kind of error when i am compiling c# script. If you would able to resolve the issue please share to me even.

Srini
0 Likes
Highlighted
Absent Member.. Absent Member..
Absent Member..

I think I have a solution:

In VuGen, you select: Vuser, Open solution in visual studio.
Here you add your assembly reference, and save the project. Reopen your VuGen project, and it will compile.
I noticed these lines being added to .csproj (System.Data was added)







Hope this solves the problem.
Jan
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.